/* Muhammad Sheharyar Khan – portfolio styles */

/* Arial scaled to Instrument Sans metrics, so the webfont swap doesn't reflow the hero */
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400 500;
  size-adjust: 101.55%;
  ascent-override: 95.5%;
  descent-override: 24.6%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600 700;
  size-adjust: 97.23%;
  ascent-override: 99.8%;
  descent-override: 25.7%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --bg: #F5F5FA;
  --bg-2: #ECECF4;
  --surface: #FFFFFF;
  --ink: #111216;
  --ink-2: #3A3D44;
  --muted: #62656D;
  --line: rgba(20, 18, 45, .1);
  --line-2: rgba(20, 18, 45, .2);
  --accent: #2D44E0;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(45, 68, 224, .09);
  --ok: #1E7A49;
  --alert: #B23A1E;
  --paper: #FFFFFF;
  --paper-ink: #121417;
  --band: #111216;
  --spot: rgba(59, 91, 255, .1);
  --shadow: 0 1px 2px rgba(17, 18, 22, .06), 0 24px 48px -24px rgba(17, 18, 22, .38);
  --shadow-sm: 0 1px 2px rgba(17, 18, 22, .05), 0 12px 28px -18px rgba(17, 18, 22, .35);
  --radius: 14px;
  --font: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1013;
    --bg-2: #15171B;
    --surface: #1A1C21;
    --ink: #ECEBE6;
    --ink-2: #BDBFC6;
    --muted: #8D9199;
    --line: rgba(236, 235, 230, .1);
    --line-2: rgba(236, 235, 230, .22);
    --accent: #8D9CFF;
    --accent-ink: #0F1013;
    --accent-soft: rgba(141, 156, 255, .12);
    --ok: #5CC98C;
    --alert: #FF8F6B;
    --paper: #F4F3EE;
    --band: #17191E;
    --spot: rgba(141, 156, 255, .12);
    --shadow: 0 24px 48px -24px rgba(0, 0, 0, .8);
    --shadow-sm: 0 12px 28px -18px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1013;
  --bg-2: #15171B;
  --surface: #1A1C21;
  --ink: #ECEBE6;
  --ink-2: #BDBFC6;
  --muted: #8D9199;
  --line: rgba(236, 235, 230, .1);
  --line-2: rgba(236, 235, 230, .22);
  --accent: #8D9CFF;
  --accent-ink: #0F1013;
  --accent-soft: rgba(141, 156, 255, .12);
  --ok: #5CC98C;
  --alert: #FF8F6B;
  --paper: #F4F3EE;
  --band: #17191E;
  --spot: rgba(141, 156, 255, .12);
  --shadow: 0 24px 48px -24px rgba(0, 0, 0, .8);
  --shadow-sm: 0 12px 28px -18px rgba(0, 0, 0, .75);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 600; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.skip {
  position: fixed; left: 16px; top: 10px; z-index: 50;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 20px;
  font: inherit; font-size: 15.5px; font-weight: 600; line-height: 1.2;
  border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary {
  color: #FFFFFF; background: linear-gradient(135deg, #3B5BFF, #7C3AED 70%, #9F67FF); background-size: 150% 100%;
  box-shadow: 0 10px 30px -12px rgba(76, 70, 255, .75);
  transition: background-position .4s, box-shadow .2s, transform .2s;
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 16px 38px -12px rgba(124, 58, 237, .85); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary:disabled { box-shadow: none; transform: none; }
.link {
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-2);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.link:hover { text-decoration-color: var(--accent); }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg); color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background-color .3s;
}
/* Glass variant while the header floats over the dark hero */
.site-head.over-hero {
  --bg: #0A0A18; --surface: rgba(255, 255, 255, .06); --ink: #F4F3EF; --ink-2: #C6C8CF;
  --line: rgba(255, 255, 255, .1); --line-2: rgba(255, 255, 255, .22); --accent: #8D9CFF; --accent-soft: rgba(141, 156, 255, .16);
  background: rgba(10, 10, 24, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #3B5BFF, #C084FC, #5EEAD4);
}
.site-head.scrolled, .site-head.menu-open { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }
.nav-links a[aria-current="true"] { color: var(--ink); background: var(--accent-soft); }
.nav-links .menu-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line-2); border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .moon, .icon-btn .close { display: none; }
#themeBtn[data-mode="dark"] .sun { display: none; }
#themeBtn[data-mode="dark"] .moon { display: block; }
.menu-btn { display: none; }
.menu-open .menu-btn .open { display: none; }
.menu-open .menu-btn .close { display: block; }

/* Shared section furniture */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span { color: var(--accent); }
.eyebrow::after { content: ""; flex: 0 1 56px; height: 1px; background: var(--line-2); }
.section { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }
.sec-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px clamp(24px, 5vw, 72px); align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.sec-head .eyebrow { grid-column: 1 / -1; }
.sec-head h2 { font-size: clamp(32px, 4.2vw, 56px); letter-spacing: -.035em; line-height: 1.04; max-width: 16ch; }
.sec-head > p:last-child { color: var(--ink-2); max-width: 52ch; font-size: 17.5px; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .66em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.stack li {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.4;
  padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink-2);
}

/* Hero: a dark stage that matches the link-preview image, whatever the page theme */
.hero {
  --bg: #0A0A18; --bg-2: #12122A; --surface: rgba(255, 255, 255, .05);
  --ink: #F4F3EF; --ink-2: #C6C8CF; --muted: #9A9EA8;
  --line: rgba(255, 255, 255, .1); --line-2: rgba(255, 255, 255, .2);
  --accent: #8D9CFF; --accent-ink: #0F1013; --accent-soft: rgba(141, 156, 255, .14); --ok: #4ADE80;
  position: relative; isolation: isolate; overflow: clip;
  margin-top: -68px;
  padding: calc(68px + clamp(32px, 4.5vw, 64px)) 0 clamp(56px, 7vw, 96px);
  background: var(--bg); color: var(--ink);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(55% 60% at 74% 34%, #000 10%, transparent 75%);
  mask-image: radial-gradient(55% 60% at 74% 34%, #000 10%, transparent 75%);
}
.aura { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.aura span { position: absolute; border-radius: 50%; animation: drift 24s ease-in-out infinite alternate; }
.aura-hero span:nth-child(1) { width: 900px; height: 900px; left: calc(74% - 450px); top: -260px; background: radial-gradient(closest-side, rgba(45, 68, 224, .55), transparent); }
.aura-hero span:nth-child(2) { width: 620px; height: 620px; left: calc(96% - 310px); top: -340px; background: radial-gradient(closest-side, rgba(139, 92, 246, .5), transparent); animation-duration: 30s; animation-direction: alternate-reverse; }
.aura-hero span:nth-child(3) { width: 680px; height: 680px; left: -280px; bottom: -360px; background: radial-gradient(closest-side, rgba(20, 184, 166, .24), transparent); animation-duration: 28s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-5%, 6%, 0) scale(1.08); } }

.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 640px); }
.hero-copy, .hero .proof, .hero .domains { position: relative; z-index: 1; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px 2px rgba(74, 222, 128, .55); }
.status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(74, 222, 128, .6); animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
/* The name line is the page's h1 (for search); the big tagline below it is styled as the headline */
.hero-who { margin-top: 28px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.6; text-wrap: wrap; }
.who-sep { color: var(--muted); font-weight: 500; }
.who-role { color: var(--accent); font-weight: 600; }
.hero-title {
  margin-top: 12px; font-size: clamp(40px, 4.8vw, 68px); font-weight: 600; letter-spacing: -.045em; line-height: 1.02; max-width: 10.8em; text-wrap: balance;
  background: linear-gradient(180deg, #FFFFFF 40%, #BCC5FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(90deg, #8D9CFF, #C084FC 55%, #5EEAD4); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { margin-top: 24px; font-size: clamp(17px, 1.45vw, 19px); color: var(--ink-2); max-width: 38.6em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 26px; list-style: none; font-size: 14.5px; color: var(--muted); }
.hero-meta a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.hero-meta a:hover { text-decoration-color: var(--accent); }

/* Full-bleed cutout portrait that fades into the stage */
/* Top sits on the header's bottom edge so the hair is never under the header; bottom stops just above the stat cards */
.hero-stage { position: absolute; top: calc(-1 * clamp(32px, 4.5vw, 64px)); bottom: calc(4px - clamp(48px, 6vw, 72px)); right: calc((100% - 100vw) / 2); z-index: 0; width: min(56vw, 880px); pointer-events: none; }
.hero-portrait { position: absolute; top: 0; bottom: 0; right: 0; margin: 0; aspect-ratio: 4 / 5; max-width: 100%; isolation: isolate; }
.hero-portrait { transform: translate3d(var(--px, 0px), var(--py, 0px), 0); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hero-portrait::before {
  content: ""; position: absolute; left: 0; right: 0; top: -6%; aspect-ratio: 1; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, #3B5BFF, #8B5CF6, #14B8A6, #C084FC, #3B5BFF);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 72%); mask-image: radial-gradient(closest-side, #000 18%, transparent 72%);
  opacity: .5; animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
.hero-portrait picture { display: block; width: 100%; height: 100%; }
.hero-portrait img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%;
  filter: drop-shadow(0 0 1px rgba(170, 180, 255, .55)) drop-shadow(0 0 28px rgba(99, 102, 241, .35));
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 24%), linear-gradient(to bottom, #000 70%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 24%), linear-gradient(to bottom, #000 70%, transparent 98%);
  mask-composite: intersect;
}

.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: clamp(48px, 6vw, 72px) 0 0; }
.proof > div {
  display: flex; flex-direction: column-reverse; justify-content: flex-end;
  padding: 18px 18px 16px; border-radius: 16px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
  box-shadow: 0 18px 40px -24px rgba(45, 68, 224, .8);
}
.proof dd {
  margin: 0; font-size: clamp(30px, 3vw, 42px); font-weight: 650; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFFFFF 35%, #B8C1FF); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.proof dt { margin-top: 10px; font-size: 13.5px; line-height: 1.4; color: var(--muted); text-wrap: balance; }
.domains { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; margin-top: 32px; }
.domains-label { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.domains:hover .marquee-track, .domains.paused .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.domains ul { display: flex; flex: none; gap: 8px; padding-right: 8px; list-style: none; }
.domains li { white-space: nowrap; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink-2); }

/* Hero entrance */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-copy > *, .hero-stage, .proof > div, .domains { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-who { animation-delay: .05s; }
.hero-title { animation-delay: .1s; }
.hero-lede { animation-delay: .18s; }
.hero-ctas { animation-delay: .26s; }
.hero-meta { animation-delay: .32s; }
.hero-stage { animation-delay: .15s; }
.proof > div:nth-child(1) { animation-delay: .34s; }
.proof > div:nth-child(2) { animation-delay: .39s; }
.proof > div:nth-child(3) { animation-delay: .44s; }
.proof > div:nth-child(4) { animation-delay: .49s; }
.domains { animation-delay: .6s; }

/* Case studies */
.case {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4.5vw, 72px); align-items: start;
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--line-2);
}
.case.flip .case-media { order: 2; }
.case-media { position: sticky; top: 96px; min-width: 0; }
.case-stage {
  border-radius: 20px; padding: clamp(16px, 2.2vw, 26px);
  background: color-mix(in srgb, var(--tint, var(--accent)) 12%, var(--bg-2));
  border: 1px solid var(--line);
}
.shots {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px; margin: -4px; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.shots img {
  flex: 0 0 auto; width: clamp(150px, 15vw, 196px); aspect-ratio: 516 / 1124; object-fit: cover;
  border-radius: 16px; scroll-snap-align: start; background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
}
.shots:focus-visible { outline-offset: 4px; }
.media-note { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.case-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.case-tags li {
  padding: 4px 9px; border-radius: 6px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent);
}
.case h3 { margin-top: 16px; font-size: clamp(30px, 3.2vw, 44px); letter-spacing: -.035em; }
.case-sum { margin-top: 12px; font-size: 18px; color: var(--ink-2); max-width: 60ch; }
.case-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.case-meta b { color: var(--ink); font-weight: 600; }
.case-detail { display: grid; gap: 22px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.case-detail h4 {
  margin-bottom: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.case-detail > div > p { color: var(--ink-2); max-width: 62ch; }
.case .stack { margin-top: 24px; }
.case-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 26px; }

.releases { margin: 14px 0 0; }
.rel-svg { display: block; width: 100%; height: 40px; overflow: visible; }
.rel-bar {
  fill: var(--accent); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.1);
}
.releases.in .rel-bar { transform: scaleY(1); }
.rel-bar:hover { fill: var(--ink); }
.rel-base { stroke: var(--line-2); stroke-width: 1.5; }
.rel-axis { position: relative; height: 18px; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rel-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.rel-axis span.first { transform: none; }
.releases figcaption { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

.case-pair {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-2);
}
.case-sm { display: flex; flex-direction: column; min-width: 0; }
.case-sm .case-stage { margin-bottom: 24px; }
.case-sm .shots img { width: clamp(128px, 11.5vw, 156px); border-radius: 14px; }
.case-sm h3 { margin-top: 14px; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.03em; }
.case-sm .case-sum { font-size: 16.5px; }
.case-sm .ticks { margin-top: 18px; font-size: 15.5px; }
.case-sm .releases { margin-top: 22px; }
.case-sm .case-ctas { margin-top: auto; padding-top: 22px; }

.clients { margin-top: clamp(64px, 8vw, 104px); }
.clients-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 40px; margin-bottom: 24px; }
.clients-head h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.03em; }
.clients-head p { color: var(--ink-2); max-width: 52ch; }
.client-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  list-style: none; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
}
.client { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 2.4vw, 28px); background: var(--surface); }
.client-domain { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.client h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 21px; letter-spacing: -.02em; }
.client h4 span { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.client > p:not([class]) { font-size: 15.5px; color: var(--ink-2); }
.client-sum { background: var(--bg-2); }
.client-big { font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }

/* Recommendations */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.quote {
  display: flex; flex-direction: column; gap: 14px; margin: 0;
  padding: clamp(22px, 2.6vw, 30px); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius);
}
.quote-rel { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.quote blockquote { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--ink); }
.quote figcaption { display: grid; gap: 2px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: var(--muted); }
.quote figcaption b { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.quotes-more { margin-top: 24px; font-size: 15.5px; }

/* Capabilities */
.caps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  list-style: none; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
}
.cap { display: flex; flex-direction: column; gap: 10px; padding: 26px 22px 24px; background: var(--surface); }
.cap-n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.cap h3 { font-size: 20px; letter-spacing: -.02em; }
.cap p { font-size: 15px; color: var(--ink-2); }
.cap-foot { margin-top: auto; padding-top: 14px; }
.cap .cap-label { margin-bottom: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cap-used { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.cap-used li { padding: 3px 8px; border-radius: 6px; background: var(--bg-2); font-size: 12.5px; font-weight: 500; color: var(--ink-2); }

/* Engineering deep dives */
.dive {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 32px clamp(24px, 5vw, 72px); align-items: start;
  padding: clamp(40px, 5vw, 56px) 0 clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line-2);
}
.dive-wide .dive-stage { grid-column: 1 / -1; }
.dive h3 { font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -.03em; max-width: 18ch; }
.dive-text { display: grid; gap: 14px; color: var(--ink-2); max-width: 58ch; }
.dive > div > .dive-text { margin-top: 18px; }
.dive-text .try { color: var(--ink); font-weight: 600; }
.demo-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: clamp(16px, 2.2vw, 24px); box-shadow: var(--shadow-sm); }

/* Sync demo */
.demo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.demo-title { font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.net {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 16px 7px 10px; cursor: pointer;
}
.net .track { width: 34px; height: 20px; border-radius: 999px; background: var(--ok); position: relative; transition: background-color .2s; }
.net .track::after { content: ""; position: absolute; top: 3px; left: 17px; width: 14px; height: 14px; border-radius: 50%; background: #FFFFFF; transition: left .2s; }
.net[aria-checked="false"] .track { background: var(--alert); }
.net[aria-checked="false"] .track::after { left: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.act {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 14px; cursor: pointer;
}
.act:hover { border-color: var(--accent); color: var(--accent); }
.act:active { transform: translateY(1px); }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.count-box { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.count-box .h { font-size: 13px; font-weight: 600; color: var(--muted); }
.count-box .n { margin-top: 6px; font-size: 42px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.count-box .sub { font-size: 13px; color: var(--muted); }
.queue-h { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.queue { list-style: none; margin: 8px 0 0; display: grid; gap: 6px; }
.q-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg); border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 500;
  transition: opacity .35s;
}
.q-item.gone { opacity: 0; }
.q-id { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.q-status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.s-queued { border-color: var(--line-2); color: var(--ink-2); }
.s-waiting { border-color: var(--alert); color: var(--alert); }
.s-syncing { background: var(--accent); color: var(--accent-ink); }
.s-synced { border-color: var(--ok); color: var(--ok); }
.q-empty { margin-top: 8px; font-size: 14px; color: var(--muted); }
.sync-note { margin-top: 14px; min-height: 1.6em; font-size: 14px; font-weight: 600; }

/* Extraction demo */
.ai-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.slip {
  position: relative; overflow: hidden;
  background: var(--paper); color: var(--paper-ink);
  border-radius: 6px; padding: 20px 20px 16px;
  box-shadow: 0 0 0 1px rgba(18, 20, 23, .08), var(--shadow-sm);
  font-size: 13.5px;
}
.slip-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; border-bottom: 2px solid var(--paper-ink); padding-bottom: 10px; margin-bottom: 12px; }
.slip-head strong { color: var(--paper-ink); font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.slip-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 14px; }
.slip-meta dt { font-size: 11.5px; font-weight: 600; color: #4A4F55; }
.slip-meta dd { margin: 2px 0 0; font-weight: 600; }
.slip table { width: 100%; border-collapse: collapse; }
.slip th { text-align: left; font-size: 11.5px; font-weight: 600; color: #4A4F55; padding: 0 6px 6px 0; }
.slip td { padding: 7px 6px 7px 0; border-top: 1px dashed rgba(18, 20, 23, .3); vertical-align: top; }
.slip .qty { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.mark { border-radius: 2px; transition: background-color .3s, box-shadow .3s; }
.mark.hit { background: rgba(45, 68, 224, .28); box-shadow: 0 0 0 3px rgba(45, 68, 224, .28); }
.mark.done { background: rgba(45, 68, 224, .1); box-shadow: 0 0 0 3px rgba(45, 68, 224, .1); }
.slip-laser {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: #2D44E0; box-shadow: 0 0 12px 3px rgba(45, 68, 224, .5);
  opacity: 0; pointer-events: none;
}
.slip.scanning .slip-laser { animation: slipsweep 1.3s ease-in-out forwards; }
@keyframes slipsweep { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.rform-title { margin-bottom: 14px; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.field { margin-bottom: 12px; }
.field .lbl { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fval {
  min-height: 42px; padding: 9px 12px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px;
  font-weight: 500; font-variant-numeric: tabular-nums;
}
.fval.filled { border-color: var(--accent); }
.fval.typing::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--ink); }
.lines { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-top: -6px; }
.lines th { text-align: left; padding: 0 0 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lines td { padding: 0; }
.lines td + td { padding-left: 8px; }
.lines .fval { min-height: 40px; padding: 8px 12px; }
.lines .qcol { width: 80px; }
.ai-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ai-status { margin-top: 12px; min-height: 1.6em; font-size: 14px; font-weight: 600; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px clamp(16px, 2.4vw, 32px); list-style: none; }
.step { padding-top: 20px; border-top: 2px solid var(--ink); }
.step-n { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.step h3 { margin-top: 10px; font-size: 22px; letter-spacing: -.02em; }
.step p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }

/* Experience */
.roles { list-style: none; }
.role {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 10px clamp(24px, 5vw, 72px);
  padding: 32px 0; border-top: 1px solid var(--line-2);
}
.role-when { padding-top: 6px; font-family: var(--mono); font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.role h3 { font-size: 23px; letter-spacing: -.02em; }
.role-org { margin-top: 4px; font-weight: 500; color: var(--ink-2); }
.role-ctx { margin-top: 10px; max-width: 64ch; font-size: 15.5px; color: var(--muted); }
.role .ticks { margin-top: 14px; max-width: 72ch; }
.role .stack { margin-top: 16px; }
.toolbox {
  display: grid; grid-template-columns: minmax(0, 220px) repeat(4, minmax(0, 1fr));
  gap: 24px clamp(20px, 2.6vw, 36px);
  margin-top: clamp(24px, 3vw, 32px); padding-top: 32px; border-top: 1px solid var(--line-2);
}
.toolbox-title { font-size: 23px; letter-spacing: -.02em; }
.tool h4 { margin-bottom: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tool p { font-size: 15px; color: var(--ink-2); }

/* Contact */
.contact {
  --bg: #1F1A6E; --bg-2: #2A2380; --surface: rgba(255, 255, 255, .08); --spot: rgba(255, 255, 255, .12);
  --ink: #FFFFFF; --ink-2: #ECE9FF; --muted: #DCD7FA;
  --line: rgba(255, 255, 255, .16); --line-2: rgba(255, 255, 255, .3);
  --accent: #C7D0FF; --accent-ink: #1F1A6E; --accent-soft: rgba(255, 255, 255, .14);
  position: relative; isolation: isolate; overflow: clip;
  background: linear-gradient(135deg, #1D1B6B 0%, #33208F 50%, #4C1D95 100%); color: var(--ink);
  padding: clamp(80px, 10vw, 136px) 0;
  border-top: 1px solid var(--line);
}
.aura-contact span:nth-child(1) { width: 820px; height: 820px; right: -280px; top: -320px; background: radial-gradient(closest-side, rgba(45, 68, 224, .5), transparent); }
.aura-contact span:nth-child(2) { width: 640px; height: 640px; left: -260px; bottom: -340px; background: radial-gradient(closest-side, rgba(139, 92, 246, .38), transparent); animation-direction: alternate-reverse; }
.contact .btn-primary { background: #FFFFFF; color: #2B1B85; box-shadow: 0 12px 30px -12px rgba(10, 6, 40, .6); }
.contact .btn-primary:hover { background: #EEF0FF; }
.contact h2 em { font-style: normal; background: linear-gradient(90deg, #C7D0FF, #F0ABFC 55%, #99F6E4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact h2 { margin-top: 20px; font-size: clamp(34px, 4.8vw, 64px); letter-spacing: -.04em; line-height: 1.03; max-width: 20ch; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: clamp(40px, 5vw, 56px); }
.contact-card { display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); }
.contact-card h3 { font-size: 22px; }
.contact-card p { color: var(--ink-2); max-width: 52ch; }
.contact-card .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: auto 0 0; padding-top: 14px; }
.contact-direct { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: clamp(40px, 5vw, 56px); padding-top: 28px; border-top: 1px solid var(--line); }
.email { font-size: clamp(22px, 3vw, 38px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; text-decoration: none; overflow-wrap: anywhere; }
.email:hover { color: var(--accent); }
.copy-status { min-height: 1.5em; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.contact-meta { flex-basis: 100%; font-size: 15px; color: var(--muted); }

.site-foot { padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot-row a { color: var(--ink-2); }

/* Dark sections give the page the same light/dark rhythm as a product site */
.section-dark {
  --bg: #0B0A1A; --bg-2: #14132A; --surface: rgba(255, 255, 255, .05); --spot: rgba(141, 156, 255, .14);
  --ink: #F4F3EF; --ink-2: #C9CAD3; --muted: #A2A5B3;
  --line: rgba(255, 255, 255, .1); --line-2: rgba(255, 255, 255, .2);
  --accent: #9AA8FF; --accent-ink: #0F1013; --accent-soft: rgba(141, 156, 255, .14); --ok: #4ADE80; --alert: #FF8F6B;
  --shadow-sm: 0 12px 28px -18px rgba(0, 0, 0, .8);
  color: var(--ink); border-top-color: transparent;
  background:
    radial-gradient(900px 520px at 88% 0%, rgba(124, 58, 237, .22), transparent 70%),
    radial-gradient(760px 520px at 0% 100%, rgba(45, 68, 224, .18), transparent 70%),
    var(--bg);
}

/* Vivid band: one bold colour block (Capabilities) */
.section-vivid {
  --bg-2: rgba(255, 255, 255, .14); --surface: rgba(255, 255, 255, .08);
  --ink: #FFFFFF; --ink-2: #F3F1FF; --muted: #E4E0FF; --line: rgba(255, 255, 255, .16); --line-2: rgba(255, 255, 255, .3);
  --accent: #99F6E4; --spot: rgba(255, 255, 255, .12);
  position: relative; isolation: isolate; overflow: clip; color: var(--ink); border-top-color: transparent;
  background:
    radial-gradient(700px 420px at 100% 0%, rgba(94, 234, 212, .2), transparent 65%),
    linear-gradient(120deg, #2430D9 0%, #4A1FB8 55%, #6D28D9 100%);
}
.section-vivid::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.section-vivid .caps { gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
.section-vivid .cap { border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 60px -36px rgba(10, 6, 40, .8); }
.section-vivid .cap-icon { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }

/* Architecture flow used in place of screenshots for confidential engagements */
.flowmap { position: relative; display: grid; gap: 10px; list-style: none; }
.flowmap::before {
  content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px;
  background: linear-gradient(180deg, #3B5BFF, #8B5CF6, #14B8A6);
}
.flowmap li {
  position: relative; display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px 14px 10px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.fm-n {
  position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 8px; color: #FFFFFF; font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: linear-gradient(135deg, #3B5BFF, #7C3AED);
}
.flowmap h4 { font-size: 16px; letter-spacing: -.01em; }
.flowmap p { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }


/* Flash layer: motion and glow that reward attention without getting in the way of reading */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
.spot { background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), var(--spot), transparent 62%); }

.case-stage { box-shadow: 0 40px 80px -50px color-mix(in srgb, var(--tint, var(--accent)) 85%, transparent); }
.shots { padding: 10px 4px 16px; margin: -10px -4px -12px; }
.shots img { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) { .shots img:hover { transform: translateY(-6px); } }

.quote { position: relative; transition: border-color .25s, box-shadow .25s; }
.quote::before {
  content: "\201C"; position: absolute; top: 2px; right: 20px; pointer-events: none;
  font-size: 96px; line-height: 1; font-weight: 700; opacity: .45;
  background: linear-gradient(135deg, #3B5BFF, #C084FC); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.quote-rel { padding-right: 56px; }
.quote:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-2)); box-shadow: 0 28px 56px -34px rgba(59, 91, 255, .55); }

.cap-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cap-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #FFFFFF;
  background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 10px 24px -12px var(--g1);
}
.cap-icon .i { width: 20px; height: 20px; stroke-width: 1.8; }
.cap:nth-child(4n+1) { --g1: #3B5BFF; --g2: #7C3AED; }
.cap:nth-child(4n+2) { --g1: #8B5CF6; --g2: #C084FC; }
.cap:nth-child(4n+3) { --g1: #0EA5E9; --g2: #3B5BFF; }
.cap:nth-child(4n+4) { --g1: #14B8A6; --g2: #0EA5E9; }
.cap h3, .client h4 { transition: color .2s; }
.cap:hover h3, .client:hover h4 { color: var(--accent); }

.step { border-top: 2px solid; border-image: linear-gradient(90deg, #3B5BFF, #C084FC, #5EEAD4) 1; }
.now-pill {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: 1px;
  font-family: var(--font); font-size: 11.5px; font-weight: 600; color: #FFFFFF;
  background: linear-gradient(135deg, #3B5BFF, #7C3AED);
}
.contact-card { transition: border-color .25s, box-shadow .25s; }
.contact-card:hover { border-color: rgba(141, 156, 255, .5); box-shadow: 0 30px 60px -36px rgba(124, 58, 237, .7); }

/* Motion layer: decorative only, and switched off for reduced motion */
.marquee-btn { width: 32px; height: 32px; border-radius: 8px; }
.marquee-btn svg { width: 14px; height: 14px; }
.marquee-btn .play, .paused .marquee-btn .pause { display: none; }
.paused .marquee-btn .play { display: block; fill: currentColor; stroke: none; }

.site-head { animation: drop .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes drop { from { transform: translateY(-100%); opacity: 0; } }

/* Headlines sweep in from the left; the key phrase keeps a slow colour flow */
@keyframes sweep { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
.hero-title, .sec-head.reveal h2 {
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%;
}
.hero-title { animation: rise .8s cubic-bezier(.2, .7, .2, 1) .1s both, sweep 1.5s cubic-bezier(.6, 0, .2, 1) .1s both; }
.sec-head.reveal h2 { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
.sec-head.reveal.in h2 { animation: sweep 1.3s cubic-bezier(.6, 0, .2, 1) .1s both; }
.hero-title em {
  background-image: linear-gradient(90deg, #8D9CFF, #C084FC 25%, #5EEAD4 50%, #C084FC 75%, #8D9CFF);
  background-size: 200% 100%; animation: flow 7s ease-in-out infinite alternate;
}
@keyframes flow { to { background-position: 100% 0; } }
.eyebrow::after { background: linear-gradient(90deg, var(--accent), var(--line-2)); transform-origin: 0 50%; transition: transform .9s cubic-bezier(.2, .7, .2, 1) .25s; }
.sec-head.reveal .eyebrow::after { transform: scaleX(0); }
.sec-head.reveal.in .eyebrow::after { transform: none; }

/* A cursor flashlight that brightens the hero grid */
.hero-light {
  position: absolute; left: 0; top: 0; z-index: -1; width: 520px; height: 520px; pointer-events: none;
  background-image:
    linear-gradient(rgba(165, 180, 252, .3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(165, 180, 252, .3) 1px, transparent 1px),
    radial-gradient(closest-side, rgba(99, 102, 241, .24), transparent);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 15%, transparent); mask-image: radial-gradient(closest-side, #000 15%, transparent);
  opacity: 0; transition: opacity .5s; will-change: transform;
}
.hero.lit .hero-light { opacity: 1; }

/* Stat cards catch a light sweep once they land */
.proof > div { position: relative; overflow: hidden; }
.proof > div::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%);
  transform: translateX(-100%); animation: shine 1.4s cubic-bezier(.4, 0, .2, 1) both;
}
.proof > div:nth-child(1)::after { animation-delay: 1s; }
.proof > div:nth-child(2)::after { animation-delay: 1.12s; }
.proof > div:nth-child(3)::after { animation-delay: 1.24s; }
.proof > div:nth-child(4)::after { animation-delay: 1.36s; }
@keyframes shine { to { transform: translateX(100%); } }

/* Primary buttons: magnetic pull and a shine on hover */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; transform: translate3d(var(--bx, 0px), var(--by, 0px), 0); }
.btn-primary:hover { transform: translate3d(var(--bx, 0px), calc(var(--by, 0px) - 1px), 0); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.btn-primary:hover::after { transform: translateX(120%); }
.contact .btn-primary::after { background: linear-gradient(110deg, transparent 35%, rgba(124, 58, 237, .2) 50%, transparent 65%); }

/* Card borders light up where the cursor is */
.spot { position: relative; --glow: rgba(141, 156, 255, .95); }
.section-vivid .spot, .contact .spot { --glow: rgba(255, 255, 255, .9); }
.spot::after {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, -999px) var(--my, -999px), var(--glow), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* Case-study stages tilt toward the cursor; screens and steps arrive one after another */
.case-stage { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes slidein { from { opacity: 0; transform: translateX(48px); } }
@keyframes stepin { from { opacity: 0; transform: translateY(14px); } }
.reveal:not(.in) .shots img, .reveal:not(.in) .flowmap li { opacity: 0; }
.reveal.in .shots img { animation: slidein .8s cubic-bezier(.2, .7, .2, 1) backwards; }
.reveal.in .flowmap li { animation: stepin .6s cubic-bezier(.2, .7, .2, 1) backwards; }
.reveal.in .shots img:nth-child(2), .reveal.in .flowmap li:nth-child(2) { animation-delay: .1s; }
.reveal.in .shots img:nth-child(3), .reveal.in .flowmap li:nth-child(3) { animation-delay: .2s; }
.reveal.in .shots img:nth-child(4), .reveal.in .flowmap li:nth-child(4) { animation-delay: .3s; }
.reveal.in .shots img:nth-child(5), .reveal.in .flowmap li:nth-child(5) { animation-delay: .4s; }
.cap-icon { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.cap:hover .cap-icon { transform: translateY(-3px) rotate(-6deg) scale(1.06); }

/* Experience timeline fills as you scroll; each role's dot lights up */
.roles { --dot: 40px; position: relative; padding-left: 30px; }
.roles::before, .roles::after { content: ""; position: absolute; left: 5px; top: calc(var(--dot) + 6px); bottom: var(--line-end, 0px); width: 2px; border-radius: 2px; }
.roles::before { background: var(--line-2); }
.roles::after { background: linear-gradient(180deg, #3B5BFF, #8B5CF6, #14B8A6); box-shadow: 0 0 12px rgba(139, 92, 246, .55); transform-origin: 50% 0; transform: scaleY(var(--fill, 1)); }
.role { position: relative; }
.role::before {
  content: ""; position: absolute; left: -30px; top: var(--dot); width: 12px; height: 12px; border-radius: 50%;
  background: #8B5CF6; border: 2px solid #C4B5FD; box-shadow: 0 0 0 4px rgba(139, 92, 246, .18), 0 0 14px rgba(139, 92, 246, .6);
  transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.roles.track .role:not(.lit)::before { background: var(--bg); border-color: var(--line-2); box-shadow: none; }

/* Responsive */
@media (max-width: 1100px) {
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbox { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbox-title { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    padding: 4px clamp(16px, 4vw, 40px) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  }
  .menu-open .nav-links { display: flex; }
  .nav-links a { padding: 14px 2px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-links a:hover, .nav-links a[aria-current="true"] { background: none; color: var(--accent); }
  .nav-links .menu-only { display: block; }
  .nav-links li:last-child a { border-bottom: 0; }
  .sec-head, .case, .dive, .role { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 58%; }
  .hero-stage { width: 50vw; }
  .who-sep { display: none; }
  .who-role { display: block; }
  .case.flip .case-media { order: 0; }
  .case-media { position: static; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid, .quotes { grid-template-columns: minmax(0, 1fr); }
  .role { gap: 6px; }
  .role-when { padding-top: 0; }
}
@media (max-width: 720px) {
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Compact avatar beside the name keeps the headline and CTAs near the fold */
  .hero-grid { grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; align-items: center; }
  .hero-copy { display: contents; }
  .hero-stage { position: static; grid-column: 1; grid-row: 1; width: 76px; justify-self: start; pointer-events: auto; }
  .hero-portrait { position: static; aspect-ratio: auto; max-width: none; }
  .hero-portrait::before { display: none; }
  .hero-portrait picture {
    height: auto; padding: 2px; border-radius: 20px;
    background: conic-gradient(from 210deg, #5EEAD4, #2D44E0, #8B5CF6, #C084FC, #5EEAD4);
    box-shadow: 0 0 28px -4px rgba(139, 92, 246, .75);
  }
  .hero-portrait img { height: auto; aspect-ratio: 1; border-radius: 18px; -webkit-mask-image: none; mask-image: none; filter: none; background: radial-gradient(circle at 50% 30%, #3B3BA8, #14132A 70%); }
  .hero-who { grid-column: 2; grid-row: 1; margin-top: 0; line-height: 1.35; }
  .who-role { font-size: 16px; }
  .status { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin-top: 22px; border-radius: 14px; line-height: 1.4; }
  .hero-title, .hero-lede, .hero-ctas, .hero-meta { grid-column: 1 / -1; }
  .hero-title { margin-top: 18px; }
  .case-pair, .ai-stage { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-cv { display: none; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .proof { gap: 10px; }
  .proof > div { padding: 16px 14px 14px; }
  .domains { grid-template-columns: minmax(0, 1fr) auto; }
  .marquee { grid-column: 1 / -1; grid-row: 2; }
  .caps, .client-grid, .steps, .toolbox { grid-template-columns: minmax(0, 1fr); }
  .case-sum { font-size: 16.5px; }
  .shots img { width: 148px; }
  .case-sm .shots img { width: 132px; }
}
@media (max-width: 960px) {
  .roles { --dot: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; animation: none; }
  .marquee-track > ul { flex-wrap: wrap; padding-right: 0; }
  .marquee-track > ul + ul, .marquee-btn { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
