:root {
  color-scheme: dark;
  --bg: #08110f;
  --bg-elevated: #0d1815;
  --surface: #101d19;
  --surface-soft: #13231e;
  --surface-hover: #172923;
  --line: rgba(224, 240, 232, .14);
  --line-strong: rgba(224, 240, 232, .24);
  --text: #f0f6f1;
  --muted: #9baaa2;
  --faint: #82948a;
  --brand: #b8f36e;
  --brand-ink: #142106;
  --blue: #80b8ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, .34);
  --radius-lg: 32px;
  --radius-md: 22px;
  --shell: 1200px;
  --header-height: 70px;
}

:root.light {
  color-scheme: light;
  --bg: #f4f3ed;
  --bg-elevated: #faf9f4;
  --surface: #ffffff;
  --surface-soft: #eceee6;
  --surface-hover: #f8faf5;
  --line: rgba(24, 43, 34, .14);
  --line-strong: rgba(24, 43, 34, .25);
  --text: #132019;
  --muted: #5f7067;
  --faint: #596961;
  --brand: #39771d;
  --brand-ink: #f6ffe9;
  --blue: #1767bd;
  --shadow: 0 28px 70px rgba(27, 44, 35, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; min-width: 280px; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none; opacity: .5; background-image: linear-gradient(to right, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
h1, h2, h3, p, dl, dd, figure { margin-top: 0; }
h1, h2, h3 { margin-bottom: 0; font-family: "Space Grotesk", Manrope, sans-serif; line-height: 1.02; }
::selection { color: var(--brand-ink); background: var(--brand); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; padding: 10px 16px; border-radius: 10px; color: var(--brand-ink); background: var(--brand); font-size: .8rem; font-weight: 800; transform: translateY(-150%); transition: transform .2s ease; }
.skip-link:focus { transform: translateY(0); }
:where(a, button):focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 72%, white); outline-offset: 4px; border-radius: 6px; }

.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 150; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.ambient { position: fixed; z-index: -2; width: 42rem; height: 42rem; border-radius: 50%; pointer-events: none; filter: blur(100px); opacity: .08; }
.ambient-a { top: -27rem; right: -19rem; background: var(--brand); }
.ambient-b { bottom: -31rem; left: -24rem; background: var(--blue); }
.light .ambient { opacity: .06; }

.section-shell { width: min(var(--shell), calc(100% - 56px)); margin-inline: auto; }
.section-block { padding-block: clamp(96px, 10vw, 150px); }
.ruled-section { border-top: 1px solid var(--line); }

/* Header */
.site-header { width: min(1240px, calc(100% - 32px)); min-height: var(--header-height); margin: 16px auto 0; padding: 8px 10px 8px 12px; position: sticky; top: 12px; z-index: 100; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--bg-elevated) 88%, transparent); box-shadow: 0 12px 40px rgba(0, 0, 0, .08); backdrop-filter: blur(16px); transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.site-header.is-scrolled { border-color: var(--line-strong); box-shadow: 0 16px 48px rgba(0, 0, 0, .16); }
.brand { grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; gap: 11px; min-width: 225px; }
.brand-mark { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--brand-ink); background: var(--brand); font-family: "Space Grotesk", sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: -.03em; }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { overflow: hidden; font-size: .79rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: .6rem; letter-spacing: .06em; }
nav { grid-column: 2; grid-row: 1; justify-self: center; display: flex; align-items: center; gap: 8px; }
nav a { min-height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border-radius: 10px; color: var(--muted); font-size: .72rem; font-weight: 800; transition: color .2s ease, background .2s ease; }
nav a:not(.nav-cta) > span:first-child { color: var(--faint); font-family: "Space Grotesk", sans-serif; font-size: .57rem; }
nav a.is-active { color: var(--text); background: var(--surface-soft); }
nav a.is-active > span:first-child { color: var(--brand); }
.nav-cta { margin-left: 5px; color: var(--brand-ink); background: var(--brand); }
.nav-cta > span:last-child { color: inherit; transition: transform .2s ease; }
.theme-toggle, .menu-toggle { border: 1px solid var(--line); color: var(--text); background: var(--surface); cursor: pointer; }
.theme-toggle { width: 44px; height: 44px; grid-column: 3; grid-row: 1; display: grid; place-items: center; border-radius: 12px; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.theme-icon { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
.light .theme-icon-sun { display: none; }
.light .theme-icon-moon { display: block; }
.menu-toggle { display: none; }

/* Hero */
.hero { min-height: min(760px, calc(100vh - 98px)); padding-block: clamp(48px, 5vw, 76px) clamp(58px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); align-items: center; gap: clamp(46px, 6vw, 84px); }
.eyebrow, .kicker { margin-bottom: 0; color: var(--brand); text-transform: uppercase; letter-spacing: .16em; font-size: .67rem; font-weight: 800; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin-bottom: 25px; }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 13%, transparent); }
h1 { max-width: 780px; font-size: clamp(3.75rem, 5.55vw, 5.85rem); letter-spacing: -.07em; }
h1 em, .contact-section h2 em { color: var(--brand); font-style: normal; }
.hero-lead { max-width: 670px; margin: 24px 0 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.17rem); line-height: 1.75; }
.hero-lead .company-name { color: var(--text); font-weight: 700; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.button { min-height: 52px; padding: 0 20px; display: inline-flex; justify-content: center; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 12px; font-size: .8rem; font-weight: 800; transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.button > span { transition: transform .2s ease; }
.button-primary { color: var(--brand-ink); border-color: var(--brand); background: var(--brand); box-shadow: 0 13px 30px color-mix(in srgb, var(--brand) 12%, transparent); }
.button-secondary { background: var(--surface); }
.hero-proof { max-width: 650px; margin: 38px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.hero-proof div { min-height: 92px; padding: 19px 14px 16px 0; display: flex; flex-direction: column-reverse; justify-content: center; border-right: 1px solid var(--line); }
.hero-proof div + div { padding-left: 20px; }
.hero-proof div:last-child { border-right: 0; }
.hero-proof dt { margin-top: 4px; color: var(--muted); font-size: .65rem; }
.hero-proof dd { font-family: "Space Grotesk", sans-serif; font-size: 1.07rem; font-weight: 600; letter-spacing: -.02em; }

.hero-visual { min-height: 560px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); isolation: isolate; }
.hero-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .32; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black 25%, transparent 90%); }
.hero-visual::after { content: ""; position: absolute; z-index: -2; width: 310px; height: 310px; top: 105px; left: 50%; border-radius: 50%; background: color-mix(in srgb, var(--brand) 42%, transparent); filter: blur(90px); transform: translateX(-50%); opacity: .34; }
.visual-heading, .visual-caption { position: absolute; left: 24px; right: 24px; z-index: 4; display: flex; align-items: center; justify-content: space-between; color: var(--muted); text-transform: uppercase; letter-spacing: .13em; font-size: .58rem; font-weight: 800; }
.visual-heading { top: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.visual-caption { bottom: 25px; }
.phone-stage { position: absolute; inset: 80px 8px 92px; display: flex; justify-content: center; align-items: center; perspective: 1200px; }
.phone-card { width: 31%; max-width: 168px; aspect-ratio: 9 / 19.5; margin: 0 -7px; padding: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .2); border-radius: 28px; background: #030705; box-shadow: 0 25px 55px rgba(0, 0, 0, .42); }
.phone-card img { width: 100%; height: 100%; border-radius: 22px; object-fit: cover; }
.phone-left { transform: rotate(-8deg) translateY(20px); }
.phone-center { z-index: 2; transform: translateY(-9px); }
.phone-right { transform: rotate(8deg) translateY(20px); }
.profile-chip { position: absolute; left: 50%; bottom: 60px; z-index: 5; width: max-content; max-width: calc(100% - 40px); padding: 9px 13px 9px 9px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: color-mix(in srgb, var(--bg-elevated) 90%, transparent); box-shadow: 0 14px 30px rgba(0, 0, 0, .2); backdrop-filter: blur(12px); transform: translateX(-50%); }
.profile-chip img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.profile-chip div { min-width: 0; }
.profile-chip strong, .profile-chip span { display: block; white-space: nowrap; }
.profile-chip strong { font-size: .7rem; }
.profile-chip span { color: var(--muted); font-size: .57rem; }

/* Capability rule */
.signal-wrap { border-block: 1px solid var(--line); overflow: hidden; }
.signal-strip { width: min(var(--shell), calc(100% - 56px)); min-height: 72px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 22px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .63rem; font-weight: 800; white-space: nowrap; }
.signal-strip i { width: 4px; height: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); }

/* Shared section rhythm */
.section-heading { margin-bottom: clamp(42px, 6vw, 72px); display: grid; grid-template-columns: .42fr 1.58fr; gap: clamp(32px, 6vw, 92px); }
.section-label { display: flex; align-items: baseline; gap: 16px; }
.section-label > span { color: var(--faint); font-family: "Space Grotesk", sans-serif; font-size: .65rem; }
.section-title { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); align-items: end; gap: 50px; }
.section-title h2, .engineering-copy h2, .archive-intro h2, .contact-section h2 { font-size: clamp(2.7rem, 5.25vw, 5rem); letter-spacing: -.065em; }
.section-title > p, .engineering-copy > p { margin: 0; color: var(--muted); font-size: .92rem; }
.signal-wrap + #experience { padding-top: clamp(68px, 7vw, 96px); }

/* Experience */
.experience-section { position: relative; }
.timeline { position: relative; margin-left: calc(42% + 18px); border-top: 1px solid var(--line); }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 122px; width: 1px; background: var(--line); }
.timeline-item { min-height: 168px; padding: 29px 0; position: relative; display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 49px; border-bottom: 1px solid var(--line); }
.timeline-item::before { content: ""; width: 9px; height: 9px; position: absolute; top: 36px; left: 118px; border: 2px solid var(--bg); border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 1px var(--line-strong); }
.timeline-current::before { background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 12%, transparent); }
.timeline-date { display: grid; align-content: start; gap: 3px; color: var(--faint); font-family: "Space Grotesk", sans-serif; font-size: .61rem; }
.timeline-date strong { color: var(--text); font-weight: 600; }
.timeline-content > p:first-child { margin-bottom: 8px; color: var(--brand); text-transform: uppercase; letter-spacing: .14em; font-size: .61rem; font-weight: 800; }
.timeline-content h3 { font-size: clamp(1.45rem, 2.4vw, 2.15rem); letter-spacing: -.04em; }
.timeline-content h3 span { margin-left: 8px; color: var(--faint); font-family: Manrope, sans-serif; font-size: .62rem; font-weight: 700; letter-spacing: 0; }
.timeline-content > p:last-child { max-width: 690px; margin: 13px 0 0; color: var(--muted); font-size: .82rem; }

/* Work */
.project-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.project-card { --accent: var(--brand); min-height: 370px; padding: 26px; position: relative; overflow: hidden; display: flex; flex-direction: column; grid-column: span 6; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); isolation: isolate; transition: transform .28s cubic-bezier(.2,.7,.2,1), border-color .28s ease, background .28s ease, box-shadow .28s ease; }
.project-card::before { content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; top: -170px; right: -100px; border-radius: 50%; background: var(--accent); filter: blur(75px); opacity: .17; transition: opacity .28s ease, transform .28s ease; }
.project-card::after { content: ""; position: absolute; inset: auto 26px 0; height: 1px; background: var(--accent); opacity: .45; transform: scaleX(.16); transform-origin: left; transition: transform .35s ease; }
.project-featured { min-height: 460px; grid-column: 1 / -1; padding: 32px; background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--accent) 5%, var(--surface))); }
.project-large { min-height: 330px; grid-column: 1 / -1; }
.project-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; color: var(--faint); font-family: "Space Grotesk", sans-serif; font-size: .64rem; }
.project-badge { padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 99px; color: var(--accent); text-transform: uppercase; letter-spacing: .11em; font-family: Manrope, sans-serif; font-size: .55rem; font-weight: 800; }
.project-type { color: var(--accent); text-align: right; text-transform: uppercase; letter-spacing: .12em; font-family: Manrope, sans-serif; font-size: .6rem; font-weight: 800; }
.project-body { margin-top: auto; padding-top: 58px; position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 116px; align-items: end; gap: 18px 24px; }
.project-featured .project-body { grid-template-columns: minmax(0, 1fr) 230px; }
.project-large .project-body { grid-template-columns: minmax(0, 1fr) 132px; }
.project-copy { min-width: 0; }
.project-copy h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: .18em .35em; font-size: clamp(2rem, 3.5vw, 3.5rem); letter-spacing: -.05em; }
.project-name-ar { direction: rtl; unicode-bidi: isolate; color: var(--accent); font-size: .46em; font-weight: 700; letter-spacing: 0; }
.project-copy > p { max-width: 620px; margin: 15px 0 0; color: var(--muted); }
.project-visual { width: 116px; aspect-ratio: 1; justify-self: end; align-self: end; padding: 5px; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line)); border-radius: 27px; background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft)); box-shadow: 0 22px 48px rgba(0,0,0,.22); transform: rotate(2deg); transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; }
.project-visual img { width: 100%; height: 100%; display: block; border-radius: 21px; object-fit: cover; }
.project-visual-phone { width: 194px; aspect-ratio: 9 / 19.5; margin-right: 0; padding: 6px; justify-self: center; border-radius: 28px; background: #050806; transform: rotate(3deg); }
.project-visual-phone img { border-radius: 22px; }
.project-body > .tags, .project-body > .store-links { grid-column: 1 / -1; margin-top: 0; }
.tags, .store-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 20px; }
.tags span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .6rem; }
.store-links a { min-height: 30px; position: relative; padding-bottom: 2px; display: inline-flex; align-items: center; color: var(--text); font-size: .69rem; font-weight: 800; }
.store-links a::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--accent); transform: scaleX(.35); transform-origin: left; transition: transform .22s ease; }
.accent-copper { --accent: #e0a06d; }
.accent-blue { --accent: #7db9ff; }
.accent-green { --accent: #65daa8; }
.accent-violet { --accent: #b397ff; }
.accent-cyan { --accent: #59cfda; }
.accent-orange { --accent: #ff9861; }
.light .accent-copper { --accent: #9b5528; }
.light .accent-blue { --accent: #246eae; }
.light .accent-green { --accent: #197954; }
.light .accent-violet { --accent: #6550a9; }
.light .accent-cyan { --accent: #167180; }
.light .accent-orange { --accent: #a84a1e; }

/* Case studies */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case-card { min-height: 390px; padding: 24px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: transform .28s cubic-bezier(.2,.7,.2,1), background .25s ease, border-color .25s ease; }
.case-card::after { content: ""; position: absolute; width: 180px; height: 180px; top: -95px; right: -95px; border: 1px solid var(--line); border-radius: 50%; transition: transform .4s ease; }
.case-number { align-self: stretch; padding-bottom: 15px; border-bottom: 1px solid var(--line); color: var(--faint); text-align: right; font-family: "Space Grotesk", sans-serif; font-size: .59rem; letter-spacing: .08em; }
.case-card > img { width: 72px; height: 72px; margin-top: 28px; border-radius: 19px; object-fit: cover; box-shadow: 0 13px 28px rgba(0,0,0,.2); }
.case-card > div { margin-top: auto; padding-top: 30px; }
.case-card > div > span { color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-size: .58rem; font-weight: 800; }
.case-card h3 { margin-top: 8px; font-size: 1.8rem; letter-spacing: -.04em; }
.case-card p { margin: 9px 0 20px; color: var(--muted); font-size: .78rem; }
.case-card b { display: flex; align-items: center; gap: 8px; font-size: .69rem; }
.case-card b span { transition: transform .2s ease; }

/* Engineering */
.engineering-section { display: grid; grid-template-columns: minmax(310px, .82fr) minmax(0, 1.18fr); gap: clamp(55px, 9vw, 130px); }
.engineering-copy { position: sticky; top: 112px; align-self: start; }
.engineering-copy .section-label { margin-bottom: 34px; }
.engineering-copy h2 { max-width: 620px; }
.engineering-copy > p { max-width: 550px; margin-top: 26px; line-height: 1.75; }
.text-link { margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; color: var(--brand); font-size: .76rem; font-weight: 800; }
.text-link span { transition: transform .2s ease; }
.engineering-list { border-top: 1px solid var(--line); }
.engineering-list article { min-height: 162px; padding: 30px 0; display: grid; grid-template-columns: 48px 1fr; gap: 24px; border-bottom: 1px solid var(--line); transition: padding-left .25s ease; }
.engineering-list article > span { color: var(--brand); font-family: "Space Grotesk", sans-serif; font-size: .65rem; }
.engineering-list h3 { font-size: clamp(1.45rem, 2.1vw, 2rem); letter-spacing: -.035em; }
.engineering-list p { max-width: 580px; margin: 11px 0 0; color: var(--muted); font-size: .86rem; }

/* Skills and foundations */
.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.skill-grid article { min-height: 260px; padding: 26px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.skill-grid article > span { color: var(--faint); font-family: "Space Grotesk", sans-serif; font-size: .61rem; }
.skill-grid h3 { margin-top: auto; padding-top: 42px; font-size: clamp(1.55rem, 2.8vw, 2.35rem); letter-spacing: -.045em; }
.skill-chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--surface-soft); font-size: .61rem; font-weight: 700; }
.foundation-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.foundation-card { min-height: 220px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--brand) 4%, var(--surface))); }
.foundation-card h3 { max-width: 560px; margin-top: 48px; font-size: clamp(2rem, 4.2vw, 3.5rem); letter-spacing: -.055em; }
.foundation-card h3 span { color: var(--brand); }
.foundation-card > p:last-child { max-width: 520px; margin: 18px 0 0; color: var(--muted); font-size: .78rem; }

/* Archive */
.archive-section { display: grid; grid-template-columns: minmax(270px, .68fr) minmax(0, 1.32fr); gap: clamp(55px, 8vw, 120px); }
.archive-intro { align-self: start; position: sticky; top: 112px; }
.archive-intro .section-label { margin-bottom: 34px; }
.archive-grid { border-top: 1px solid var(--line); }
.archive-grid article { min-height: 110px; padding: 22px 0; display: grid; grid-template-columns: 34px 56px minmax(180px, 1fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); transition: padding-inline .25s ease, background .25s ease; }
.archive-index { color: var(--faint); font-family: "Space Grotesk", sans-serif; font-size: .59rem; }
.archive-icon { width: 56px; height: 56px; display: block; border: 1px solid var(--line); border-radius: 15px; object-fit: cover; box-shadow: 0 9px 22px rgba(0,0,0,.13); }
.archive-grid h3 { font-size: 1.25rem; letter-spacing: -.025em; }
.archive-grid p { margin: 5px 0 0; color: var(--muted); font-size: .73rem; }
.archive-grid .store-links { min-width: 168px; margin: 0; justify-content: flex-end; }
.archive-grid .store-links a { font-size: .61rem; }

/* Contact + footer */
.contact-section { margin-block: 30px 110px; padding: clamp(36px, 6.5vw, 82px); overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); isolation: isolate; }
.contact-section::before { content: ""; position: absolute; z-index: -1; width: 430px; height: 430px; right: -190px; top: -220px; border-radius: 50%; background: var(--brand); filter: blur(100px); opacity: .16; }
.contact-section::after { content: "AD"; position: absolute; z-index: -1; right: -1.5rem; bottom: -6rem; color: transparent; -webkit-text-stroke: 1px var(--line); font-family: "Space Grotesk", sans-serif; font-size: 18rem; font-weight: 700; line-height: 1; letter-spacing: -.1em; opacity: .7; }
.contact-topline { padding-bottom: 24px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.contact-topline > span { color: var(--faint); text-transform: uppercase; letter-spacing: .12em; font-size: .6rem; font-weight: 800; }
.contact-section h2 { max-width: 970px; margin-top: 62px; }
.contact-row { margin-top: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; }
.contact-actions { margin-top: 0; }
.social-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px 22px; color: var(--muted); font-size: .66rem; font-weight: 800; }
.social-links a { transition: color .2s ease; }
footer { width: min(var(--shell), calc(100% - 56px)); min-height: 92px; margin-inline: auto; padding-block: 25px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; }
footer a { color: var(--text); font-weight: 800; }
footer span:last-child { text-align: right; }

/* Progressive motion */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--reveal-delay, 0ms); }
.js .reveal.reveal-visible { opacity: 1; transform: translateY(0); }

@media (hover: hover) {
  nav a:hover:not(.nav-cta) { color: var(--text); background: var(--surface-soft); }
  .nav-cta:hover { filter: brightness(1.05); }
  .nav-cta:hover > span:last-child, .button:hover > span, .case-card:hover b span, .text-link:hover span { transform: translate(2px, -2px); }
  .theme-toggle:hover { border-color: var(--line-strong); background: var(--surface-hover); transform: rotate(8deg); }
  .button:hover { transform: translateY(-2px); border-color: var(--line-strong); }
  .button-primary:hover { box-shadow: 0 17px 36px color-mix(in srgb, var(--brand) 18%, transparent); }
  .project-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: var(--surface-hover); box-shadow: 0 22px 55px rgba(0,0,0,.13); }
  .project-card:hover::before { opacity: .25; transform: scale(1.12); }
  .project-card:hover::after { transform: scaleX(1); }
  .project-card:hover .project-visual { transform: rotate(0) translateY(-6px); box-shadow: 0 28px 56px rgba(0,0,0,.27); }
  .skill-grid article:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-hover); }
  .store-links a:hover::after { transform: scaleX(1); }
  .case-card:hover { transform: translateY(-5px); border-color: var(--line-strong); background: var(--surface-hover); }
  .case-card:hover::after { transform: scale(1.14); }
  .engineering-list article:hover { padding-left: 10px; }
  .archive-grid article:hover { padding-inline: 12px; background: var(--surface); }
  .social-links a:hover, footer a:hover { color: var(--brand); }
}

@media (max-width: 1050px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  nav { gap: 1px; }
  nav a { padding-inline: 9px; }
  .hero { min-height: auto; padding-block: 56px 104px; grid-template-columns: 1fr; gap: 64px; }
  .hero-copy { max-width: 880px; }
  .hero-visual { width: min(620px, 100%); min-height: 600px; margin-inline: auto; }
  .section-heading { grid-template-columns: 1fr; gap: 28px; }
  .section-title { grid-template-columns: 1.2fr .8fr; }
  .timeline { margin-left: 0; }
  .engineering-section, .archive-section { grid-template-columns: 1fr; }
  .engineering-copy, .archive-intro { position: static; }
  .engineering-copy h2, .archive-intro h2 { max-width: 750px; }
  .archive-intro h2 br { display: none; }
  .contact-row { align-items: flex-start; flex-direction: column; }
  .social-links { justify-content: flex-start; }
}

@media (max-width: 900px) {
  :root { --header-height: 58px; }
  html { scroll-padding-top: 88px; }
  .section-shell, .signal-strip, footer { width: min(100% - 40px, var(--shell)); }
  .section-block { padding-block: 92px; }
  .site-header { width: calc(100% - 24px); min-height: 58px; top: 8px; margin-top: 8px; padding: 6px 8px 6px 10px; grid-template-columns: minmax(150px, auto) 1fr auto; gap: 12px; border-radius: 15px; }
  .brand { min-width: 0; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
  .brand-copy small { display: none; }
  nav { justify-self: end; }
  nav a { padding-inline: 8px; }
  nav a:not(.nav-cta) > span:first-child { display: none; }
  .hero { padding-block: 46px 92px; gap: 54px; }
  .hero-visual { min-height: clamp(540px, 68vw, 570px); }
  .project-featured .project-body { grid-template-columns: minmax(0, 1fr) 160px; }
  .project-visual-phone { width: 145px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-card:last-child { width: calc(50% - 8px); grid-column: 1 / -1; justify-self: center; }
}

@media (max-width: 700px) {
  :root { --header-height: 60px; }
  html { scroll-padding-top: 82px; }
  body::before { display: none; }
  .section-shell, .signal-strip, footer { width: min(100% - 32px, var(--shell)); }
  .section-block { padding-block: 76px; }
  .site-header { width: calc(100% - 16px); min-height: 60px; top: 6px; margin-top: 6px; padding: 7px 8px; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; border-radius: 14px; }
  .site-header.menu-open { border-color: var(--line-strong); background: var(--bg-elevated); box-shadow: 0 18px 48px rgba(0, 0, 0, .2); }
  html:not(.js) .site-header { position: relative; top: 0; }
  .brand { min-width: 0; grid-column: 1; grid-row: 1; gap: 9px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { font-size: .71rem; }
  .theme-toggle { width: 44px; height: 44px; grid-column: 3; grid-row: 1; }
  .js .menu-toggle { width: 44px; height: 44px; padding: 0; display: grid; place-content: center; grid-column: 2; grid-row: 1; gap: 5px; border-radius: 11px; }
  .menu-toggle > span:not(.sr-only) { width: 17px; height: 1px; display: block; background: currentColor; transition: transform .2s ease; }
  .js .menu-toggle[aria-expanded="true"] > span:nth-last-child(2) { transform: translateY(3px) rotate(45deg); }
  .js .menu-toggle[aria-expanded="true"] > span:last-child { transform: translateY(-3px) rotate(-45deg); }
  nav { justify-self: stretch; grid-column: 1 / -1; grid-row: 2; padding: 10px 0 2px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; border-top: 1px solid var(--line); }
  nav a { min-height: 44px; padding-inline: 13px; justify-content: space-between; border: 1px solid var(--line); background: var(--surface); }
  .js nav { display: none; }
  .js .site-header.menu-open nav { display: grid; }
  .nav-cta { margin-left: 0; grid-column: 1 / -1; justify-content: center; }
  html:not(.js) .nav-cta { grid-column: auto; }
  .hero { padding-block: 38px 76px; gap: 48px; }
  h1 { font-size: clamp(3rem, 8.6vw, 3.75rem); }
  .hero-proof { margin-top: 38px; }
  .hero-visual { min-height: 520px; }
  .signal-strip { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .signal-strip::-webkit-scrollbar { display: none; }
  .section-title { grid-template-columns: 1fr; gap: 22px; }
  .section-title p { max-width: 610px; }
  .timeline::before { left: 97px; }
  .timeline-item { grid-template-columns: 76px minmax(0, 1fr); gap: 42px; }
  .timeline-item::before { left: 93px; }
  .project-card { grid-column: 1 / -1; }
  .project-featured { min-height: 500px; }
  .project-body { padding-top: 44px; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; }
  .project-featured .project-body { grid-template-columns: minmax(0, 1fr) 122px; }
  .project-large .project-body { grid-template-columns: minmax(0, 1fr) 108px; }
  .project-visual { width: 96px; border-radius: 23px; }
  .project-visual img { border-radius: 18px; }
  .project-visual-phone { width: 108px; margin-right: 0; border-radius: 22px; }
  .project-visual-phone img { border-radius: 17px; }
  .case-grid { grid-template-columns: 1fr; }
  .case-card, .case-card:last-child { width: auto; min-height: 320px; grid-column: auto; }
  .case-card > div { margin-top: 35px; }
  .archive-grid article { grid-template-columns: 26px 48px minmax(0, 1fr); }
  .archive-icon { width: 48px; height: 48px; border-radius: 13px; }
  .archive-grid .store-links { grid-column: 3; justify-content: flex-start; }
  .store-links a { min-height: 40px; }
  .social-links a, footer a { min-height: 44px; display: inline-flex; align-items: center; }
  .contact-section { margin-bottom: 68px; }
  .contact-section h2 { margin-top: 42px; }
  .skill-grid, .foundation-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr auto; }
  footer span:last-child { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 520px) {
  .section-shell, .signal-strip, footer { width: min(100% - 28px, var(--shell)); }
  .section-block { padding-block: 68px; }
  .ambient { display: none; }
  .hero { padding-block: 30px 64px; gap: 40px; }
  .eyebrow { align-items: flex-start; font-size: .61rem; }
  h1 { font-size: clamp(2.75rem, 13.2vw, 3.7rem); }
  h1 br { display: none; }
  .hero-lead { margin-top: 22px; }
  .hero-actions { margin-top: 28px; }
  .hero-actions .button { width: 100%; }
  .hero-proof { grid-template-columns: 1fr 1fr; }
  .hero-proof div { min-height: 78px; }
  .hero-proof div:nth-child(2) { border-right: 0; }
  .hero-proof div:last-child { grid-column: 1 / -1; padding-left: 0; border-top: 1px solid var(--line); }
  .hero-visual { min-height: 440px; border-radius: 22px; }
  .visual-heading, .visual-caption { left: 17px; right: 17px; }
  .phone-stage { inset: 68px -5px 82px; }
  .phone-card { width: 34%; padding: 4px; border-radius: 21px; }
  .phone-card img { border-radius: 17px; }
  .profile-chip { bottom: 50px; }
  .section-label { gap: 11px; }
  .section-title h2, .engineering-copy h2, .archive-intro h2, .contact-section h2 { font-size: clamp(2.4rem, 12.5vw, 3.45rem); }
  .project-card { min-height: 350px; padding: 22px; }
  .project-featured { min-height: 500px; padding: 22px; }
  .project-body { padding-top: 38px; grid-template-columns: minmax(0, 1fr) 82px; gap: 14px; }
  .project-featured .project-body { grid-template-columns: minmax(0, 1fr) 94px; }
  .project-large .project-body { grid-template-columns: minmax(0, 1fr) 88px; }
  .project-copy h3 { font-size: clamp(1.78rem, 9.5vw, 2.55rem); }
  .project-visual { width: 82px; padding: 4px; border-radius: 20px; }
  .project-visual img { border-radius: 15px; }
  .project-visual-phone { width: 90px; border-radius: 19px; }
  .project-visual-phone img { border-radius: 14px; }
  .project-meta { gap: 12px; }
  .project-type { max-width: 68%; }
  .store-links { gap: 6px 15px; }
  .case-card { padding: 22px; }
  .engineering-list article { min-height: 146px; grid-template-columns: 34px 1fr; gap: 14px; }
  .archive-grid article { gap: 12px; }
  .contact-section { width: calc(100% - 20px); padding: 32px 20px; border-radius: 22px; }
  .contact-topline { gap: 20px; }
  .contact-topline > span { white-space: nowrap; }
  .contact-section::after { font-size: 11rem; bottom: -3rem; }
  .contact-actions { width: 100%; }
  .contact-actions .button { width: 100%; }
  .social-links { gap: 8px 20px; }
}

@media (max-width: 360px) {
  .brand-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .scroll-progress { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
