:root {
  --bg: #f8f7f4;
  --bg-alt: #f1efe9;
  --panel: #ebe7de;       /* warm backdrop behind case study screens */
  --surface: #ffffff;
  --ink: #1d2230;
  --ink-2: #4a5061;
  --ink-3: #7a7f8c;
  --line: #e2dfd7;
  --accent: #fbe39b;      /* warm yellow, carried over from the old site */
  --accent-ink: #8a6a00;
  --btn: #232a3b;
  --btn-hover: #11151f;
  --on-btn: #ffffff;
  --quote-muted: #6f7482;
  --tint: rgba(29,34,48,.06);
  --focus-ring: rgba(35,42,59,.12);
  --footer-bg: #232a3b;
  --footer-ink: #d6d9e0;
  --tone-sun: linear-gradient(135deg, #fdf0c4, #f7dc86);
  --tone-green: linear-gradient(135deg, #eaf4d8, #c9e4a2);
  --tone-indigo: linear-gradient(135deg, #e3e4fb, #b9bdf3);
  --tone-navy: linear-gradient(135deg, #dfe6f2, #b4c3dd);
  --tone-pink: linear-gradient(135deg, #fde2df, #f6b4c4);
  color-scheme: light;
  --radius: 10px;
  --max: 1440px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Dark mode: follows the system unless the visitor picks a theme (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #111419;
  --bg-alt: #161a21;
  --panel: #1c212a;
  --surface: #1c212a;
  --ink: #eceae4;
  --ink-2: #b3b7c0;
  --ink-3: #858a96;
  --line: #2a303b;
  --accent: #3a321d;
  --accent-ink: #e3c46e;
  --btn: #eceae4;
  --btn-hover: #ffffff;
  --on-btn: #111419;
  --quote-muted: #8d929e;
  --tint: rgba(236,234,228,.08);
  --focus-ring: rgba(236,234,228,.18);
  --footer-bg: #0b0d11;
  --footer-ink: #9a9fab;
  --tone-sun: linear-gradient(135deg, #3b3420, #4a3f1c);
  --tone-green: linear-gradient(135deg, #263222, #2f4224);
  --tone-indigo: linear-gradient(135deg, #25273f, #2f3358);
  --tone-navy: linear-gradient(135deg, #222a38, #2b3850);
  --tone-pink: linear-gradient(135deg, #3a2629, #4a2a37);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111419;
  --bg-alt: #161a21;
  --panel: #1c212a;
  --surface: #1c212a;
  --ink: #eceae4;
  --ink-2: #b3b7c0;
  --ink-3: #858a96;
  --line: #2a303b;
  --accent: #3a321d;
  --accent-ink: #e3c46e;
  --btn: #eceae4;
  --btn-hover: #ffffff;
  --on-btn: #111419;
  --quote-muted: #8d929e;
  --tint: rgba(236,234,228,.08);
  --focus-ring: rgba(236,234,228,.18);
  --footer-bg: #0b0d11;
  --footer-ink: #9a9fab;
  --tone-sun: linear-gradient(135deg, #3b3420, #4a3f1c);
  --tone-green: linear-gradient(135deg, #263222, #2f4224);
  --tone-indigo: linear-gradient(135deg, #25273f, #2f3358);
  --tone-navy: linear-gradient(135deg, #222a38, #2b3850);
  --tone-pink: linear-gradient(135deg, #3a2629, #4a2a37);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--btn); color: var(--on-btn); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--btn); outline-offset: 3px; border-radius: 4px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 68px; }
/* Logo: plain wordmark */
.logo { text-decoration: none; color: var(--ink); }
.logo-name { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; transition: color .2s ease; }
.logo:hover .logo-name { color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; margin-left: auto; }
.nav > a { text-decoration: none; color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav > a:hover, .nav > a.active { color: var(--ink); border-color: var(--ink); }
.nav-icons { display: flex; gap: 8px; margin-left: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--tint); color: var(--ink); cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.icon-btn:hover { background: var(--ink); color: var(--on-btn); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }

/* Theme toggle: Phosphor sun and moon swap places with a spin */
.theme-toggle { margin-left: 8px; background: transparent; }
.theme-toggle:hover { background: transparent; color: var(--ink); transform: none; }
.theme-toggle svg {
  grid-area: 1 / 1; width: 20px; height: 20px;
  transition: transform .5s cubic-bezier(.3,1.4,.5,1), opacity .3s ease;
}
.theme-toggle .t-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="dark"] .theme-toggle .t-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="dark"] .theme-toggle .t-moon { opacity: 1; transform: none; }
:root:not([data-theme="dark"]) .theme-toggle:hover .t-sun { transform: rotate(30deg); }
:root[data-theme="dark"] .theme-toggle:hover .t-moon { transform: rotate(-15deg); }

/* Circular reveal when switching themes (View Transitions; browsers without it just swap) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Hamburger: three lines that slide together, then rotate into an X (and reverse on close) */
.menu-toggle {
  display: none; position: relative; width: 44px; height: 44px; padding: 0; margin-right: -10px;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  transition: background .2s ease;
}
.menu-toggle:hover { background: var(--tint); }
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: top .2s ease .2s, transform .2s ease, opacity 0s .2s, background .2s;
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-open .menu-toggle span { transition: top .2s ease, transform .25s cubic-bezier(.3,1.6,.6,1) .2s, opacity 0s .2s, background .2s; }
.menu-open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Buttons */
/* One button size everywhere: same height, padding, type and corner radius */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 10px;
  background: var(--btn); color: var(--on-btn); border: 1.5px solid var(--btn);
  font: 500 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover { background: var(--btn-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-btn); }

/* Hero */
.hero { padding: 88px 0 80px; }
.eyebrow { font-size: 15px; color: var(--ink-2); margin-bottom: 18px; }
.eyebrow a { color: var(--ink); text-underline-offset: 3px; }
.hero-grid { display: grid; grid-template-columns: 1fr; }
/* Keep the hero text to a comfortable measure instead of the full content width */
.hero-main { max-width: 880px; }
.hero-sub { max-width: 62ch; }
.hero h1 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; text-wrap: pretty; }
.hero-sub { margin-top: 28px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-2); }
mark { background: none; color: inherit; }
.hero-sub strong { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-top: 40px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 10px; margin-left: 12px; padding: 8px 0;
  background: none; border: 0; cursor: pointer; color: var(--ink); font: 500 17px var(--font);
}
.link-btn svg { width: 20px; height: 20px; transition: transform .25s ease; }
.link-btn span { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.link-btn:hover svg { transform: scale(1.12); }
.link-btn:hover span { text-decoration-thickness: 2.5px; }

.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero stats: a row under the hero. One continuous rule above; thin vertical dividers between stats. */
.hero-stats { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.hero-stats-slot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.hero-stat { padding: 0 32px; }
.hero-stat:first-child { padding-left: 0; }
.hero-stat + .hero-stat { border-left: 1px solid var(--line); }
/* Unit ("yrs", "Series F") sits inline on the number's baseline; it wraps as a whole if a column gets narrow */
.hero-stat-num { font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stat-num small { display: inline-block; white-space: nowrap; margin-left: .4em; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.hero-stat dd { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 26ch; }

/* Hero card stack (modeled on ScrollX UI's FlipStack). Below 1100px: a pile under the hero text
   that cycles every 4s, the incoming card bouncing up as it comes to the front (main.js moves .is-active).
   1100px and up: it sits beside the hero text, and the pile fans out once on load.
   Without JS or with reduced motion the cards just sit in their final place. */
.flipstack { margin-top: 56px; }
/* Screens are phone mockups on transparency (the device frame is in the image); the deck takes the first one's shape */
.flipstack-deck { position: relative; width: min(230px, 58vw); aspect-ratio: var(--ratio, 1 / 2); margin: 0 auto; }
.flipstack-card {
  position: absolute; inset: 0; margin: 0;
  transform-origin: 50% 100%;
  z-index: calc(5 - var(--i)); rotate: var(--rot); scale: .95;
  /* z-index switches mid-bounce, so the incoming card rises over the pile before landing in front */
  transition: opacity .4s ease-in-out, rotate .4s ease-in-out, scale .4s ease-in-out, translate .4s ease-in-out, z-index 0s .2s;
}
.flipstack-card img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(17,21,31,.18)); }
.flipstack-card.is-active { z-index: 40; rotate: 0deg; scale: 1; animation: flipstack-bounce .4s ease-in-out; }
@keyframes flipstack-bounce { 50% { translate: 0 -80px; } }
.reveal-on .flipstack:not(.is-in) .flipstack-card { opacity: 0; scale: .9; translate: 0 100px; }

@media (min-width: 1100px) {
  /* The stack gets 40% of the row; the headline wraps to three lines to make room */
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(380px, 40%); column-gap: 40px; align-items: center; }
  .hero-stats { grid-column: 1 / -1; }
  .flipstack { margin: 0; container-type: inline-size; }
  .flipstack-deck { width: 39cqw; }
  /* Fanned: the first card in front and centered, the others to either side, lower and tilted out */
  .flipstack-card, .flipstack-card.is-active {
    z-index: calc(3 - var(--abs)); opacity: 1; scale: 1; animation: none;
    translate: calc(var(--pos) * 17cqw) calc(var(--abs) * 6cqw);
    rotate: calc(var(--pos) * 12deg);
    transition: translate .8s cubic-bezier(0,0,.58,1) calc(.25s + var(--i) * .1s), rotate .8s cubic-bezier(0,0,.58,1) calc(.25s + var(--i) * .1s);
  }
  /* Before it fans: a messy pile, slightly lower */
  .reveal-on .flipstack:not(.is-in) .flipstack-card { z-index: calc(3 - var(--i)); opacity: 1; scale: 1; translate: 0 calc(var(--i) * 8px + 100px); rotate: var(--rot); }
}

/* Scroll reveals: fade + rise, opacity/transform only (GPU-friendly). Staggered with --reveal-i.
   .reveal-on is set in <head> only when JS + IntersectionObserver are available and motion is welcome. */
.reveal-on [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--reveal-i, 0) * 80ms);
}
.reveal-on [data-reveal].is-revealed { opacity: 1; transform: none; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(28px, 3.4vw, 38px); }
.lede { color: var(--ink-3); margin-top: 8px; font-size: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.note { color: var(--ink-2); font-size: 15px; margin: 40px 0 24px; }
.note a { color: var(--ink); text-underline-offset: 3px; }


/* Work cards */
.work-list { display: grid; gap: 72px; }
.work-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.work-card.is-flipped .work-media { order: 2; }
.work-card[hidden] { display: none; }
.work-media {
  aspect-ratio: 16 / 10; border-radius: var(--radius); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; position: relative;
  background: var(--tone, #e9ecf5);
}
.work-media span { font-weight: 500; color: var(--ink-3); font-size: 15px; }
.work-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
/* Cards with a real screenshot use the case study's hero on the neutral panel, shown whole */
.work-media.has-image { background: var(--panel); }
.work-media.has-image img { object-fit: contain; padding: 5%; }
/* Single-image card art fills the card edge to edge (the base img rule already covers it) */
.work-media.is-fill { border-color: transparent; background: var(--panel); }
/* Composed card cover: desktop screen cropped off the right and bottom, phone layered in front.
   Sizes are % of the card so the crop holds at every width. */
.work-cover { border-color: transparent; }
.work-cover[data-backdrop="dark"] { background: radial-gradient(120% 90% at 15% 0%, #36415c 0%, #232a3b 55%, #1a1f2c 100%); }
.work-cover[data-backdrop="light"] { background: radial-gradient(120% 90% at 15% 0%, #f1ece2 0%, #e4ddcf 60%, #d9d0bf 100%); border-color: var(--line); }
.work-cover img { inset: auto; height: auto; max-width: none; object-fit: initial; }
.work-cover .cover-desktop {
  left: 6%; top: 12%; width: 128%; border-radius: 8px;
  filter: drop-shadow(0 22px 40px rgba(10,14,24,.35));
}
.work-cover .cover-phone {
  right: 6%; top: 15%; width: 33%;
  filter: drop-shadow(0 24px 34px rgba(10,14,24,.45));
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.work-card:hover .work-cover .cover-phone { transform: translateY(-8px); }
/* A standalone sidebar in front instead of a phone: narrower, and tall enough to show the whole nav */
.work-cover[data-front="nav"] .cover-phone { right: 8%; top: 4.5%; width: 20.5%; border-radius: 10px; }
.work-media[data-tone="sun"]    { --tone: var(--tone-sun); }
.work-media[data-tone="green"]  { --tone: var(--tone-green); }
.work-media[data-tone="indigo"] { --tone: var(--tone-indigo); }
.work-media[data-tone="navy"]   { --tone: var(--tone-navy); }
.work-media[data-tone="pink"]   { --tone: var(--tone-pink); }
.meta { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 10px; }
.work-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.work-body h3 { font-size: 26px; }
.work-body > p:not(.meta) { color: var(--ink-2); }
/* Public site has no metrics row, so give the button its own space below the summary */
.work-body > p + .btn { margin-top: 24px; }
/* Stat labels stay on one line; if a pair doesn't fit, the second stat drops to its own row instead */
.metrics { display: flex; flex-wrap: wrap; gap: 20px 40px; margin: 24px 0; }
.metrics div { margin: 0; }
.metrics dt { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.metrics dd { margin: 4px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); white-space: nowrap; }

/* Teaser cards (no case study page): the teaser line is a pill next to the title (private site) */
.work-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  background: var(--tint); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.work-pill svg { width: 14px; height: 14px; }

/* About */
.about-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.portrait {
  margin: 0; position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); max-width: 480px;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: 1; }
.portrait-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; }
.about-copy .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 500; color: var(--ink-3); margin-bottom: 18px; }
.about-copy h2 { font-size: clamp(32px, 3.8vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 28px; }
/* Each sentence starts its own line (as in the PDF); long ones still wrap naturally */
.about-copy h2 span { display: block; }
.about-copy > p:not(.eyebrow) { color: var(--ink-2); font-size: 18px; line-height: 1.6; margin-bottom: 22px; }
.off-clock { margin-top: 8px; }
.off-clock-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin-bottom: 14px; }
.off-clock ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.off-clock li {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 16px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
  font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.3;
}
.off-clock li svg { width: 17px; height: 17px; color: var(--ink-2); }

.known-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 104px 0 28px; }
.known-head h3 { font-size: clamp(26px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.02em; }
.known-head p { font-size: 14px; color: var(--ink-3); }
/* Cards share row tracks (subgrid) so icon, title, description, divider and quote line up across each row */
.known { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.known-card {
  display: grid; grid-row: span 2; grid-template-rows: subgrid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 0; align-content: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; margin-bottom: 20px;
}
/* Icon and title share the first row */
.known-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--tint); align-self: center; }
.known-ico svg { width: 18px; height: 18px; }
.known-card h4 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; align-self: center; }
.known-card figure { grid-column: 1 / -1; margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--line); align-self: stretch; }
/* Quote reads muted; the key phrase is pulled forward in full-strength bold */
.known-card blockquote { margin: 0 0 16px; font-size: 19px; line-height: 1.5; font-weight: 400; color: var(--quote-muted); }
.known-card blockquote strong { color: var(--ink); font-weight: 700; }
.known-card figcaption { font-size: 13px; color: var(--ink-3); }
.known-dots { display: none; }
.known-card figcaption strong { color: var(--ink); font-weight: 600; }

/* Experience */
.timeline { list-style: none; padding: 0; margin: 40px 0 0; }
.timeline li {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 56px; align-items: start;
  padding: 36px 0; border-bottom: 1px solid var(--line);
}
.timeline li:first-child { border-top: 1px solid var(--line); }
.exp-head { display: flex; align-items: center; gap: 20px; }
.badge {
  display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}
.badge img { width: 32px; height: 32px; object-fit: contain; }
/* Teamworks mark ships in black and white; show the one that suits the theme */
.badge .on-dark, :root[data-theme="dark"] .badge .on-light { display: none; }
:root[data-theme="dark"] .badge .on-dark { display: block; }
.timeline h4 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.exp-meta { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.exp-meta .dot { margin: 0 10px; color: var(--ink-3); }
.exp-desc { color: var(--ink-2); font-size: 16px; line-height: 1.6; padding-top: 4px; }
/* Closing strip under the timeline: earlier career, education, resume CTA */
.exp-more {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 24px 48px; align-items: center;
  margin-top: 40px; padding: 28px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
}
.exp-more-item + .exp-more-item { padding-left: 48px; border-left: 1px solid var(--line); }
.exp-more-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin-bottom: 8px; }
.exp-more-item p:not(.exp-more-label):not(.exp-more-sub) { font-size: 16px; font-weight: 500; color: var(--ink); }
.exp-more-item .exp-more-sub { font-size: 14px; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link svg { width: 15px; height: 15px; transition: transform .2s ease; }
.text-link:hover svg, .exp-more-cta:hover svg { transform: translateX(3px); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; margin-top: 36px; }
.contact-form h3, .contact-other h3 { font-size: 22px; margin-bottom: 20px; }
.contact-form { display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
input, textarea {
  font: 400 16px var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-ring); }
textarea { resize: vertical; }
.contact-form .btn { width: fit-content; }
.form-status { font-size: 14px; color: var(--ink-2); min-height: 1.4em; }
.contact-other p { color: var(--ink-2); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.back-top { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.back-top svg { width: 16px; height: 16px; }

/* Screenshot viewer (case study pages): screenshots open full size over a dark backdrop */
.cs .is-zoomable { cursor: zoom-in; }
.cs .is-zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 64px 24px 24px;
  border: 0; background: transparent; color: #eceae4;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: lightbox-in .2s ease-out; }
.lightbox::backdrop { background: rgba(10,12,18,.9); }
@keyframes lightbox-in { from { opacity: 0; } }
.lightbox-figure { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; margin: 0; }
.lightbox-figure img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 140px);
  border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); cursor: zoom-out;
}
.lightbox-figure figcaption { max-width: 70ch; font-size: 14px; line-height: 1.5; text-align: center; color: #b3b7c0; }
.lightbox-close { position: fixed; top: 16px; right: 16px; background: rgba(255,255,255,.14); color: #fff; }
.lightbox-close:hover { background: #fff; color: #11151f; }

/* Pitch dialog */
.pitch {
  border: 0; border-radius: 14px; padding: 40px; max-width: 620px; width: calc(100% - 32px);
  background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.pitch::backdrop { background: rgba(17,21,31,.55); backdrop-filter: blur(3px); }
.pitch h2 { font-size: 30px; margin-bottom: 16px; }
.pitch p:not(.eyebrow) { color: var(--ink-2); margin-bottom: 14px; }
.pitch .eyebrow { margin-bottom: 8px; }
.pitch .hero-actions { margin-top: 24px; }
.pitch-close { position: absolute; top: 16px; right: 16px; }

/* Spam trap field: hidden from people, filled in by bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Request access (swatimehta.com) and request walkthrough (portfolio.swatimehta.com) dialogs */
.request-form { display: grid; gap: 14px; margin-top: 24px; }
.request-form .btn { width: fit-content; margin-top: 4px; }
.request-dialog .eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--ink-3); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn:disabled:hover { background: var(--btn); }
/* "Coming soon" on a work card: disabled for good, not busy */
.work-body .btn:disabled { opacity: .45; cursor: not-allowed; }

/* Case study page */
.cs { padding: 56px 0 0; }
.cs-hero .meta { margin-bottom: 16px; }
.cs-hero h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.cs-intro { margin-top: 16px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); }
/* Project facts: one row of four under the title and blurb */
.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 40px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-facts dt, .cs-label, .cs-tradeoff strong {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3);
}
.cs-facts dt { margin-bottom: 8px; }
/* First line is the answer; any lines after it are supporting detail, set smaller and lighter */
.cs-facts dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.cs-facts dd + dd { margin-top: 6px; font-size: 14.5px; font-weight: 400; line-height: 1.45; color: var(--ink-2); }

/* Figures: screenshots get a hairline frame; phones and the hero sit on a neutral panel */
.cs-figure { margin: 0; }
.cs-figure img { width: 100%; height: auto; }
.cs-figure figcaption { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.cs-figure[data-device="desktop"] img { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
/* Screenshots that bring their own window frame keep its rounded corners; a shadow follows that shape */
.cs-figure[data-chrome] img { border: 0; border-radius: 0; background: none; filter: drop-shadow(0 14px 30px rgba(17,21,31,.16)); }
.cs-figure[data-device="mobile"] img { padding: 32px 22%; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cs-hero-figure { margin-top: 48px; }
.cs-hero-figure { padding: clamp(16px, 4vw, 56px); border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }

/* Sections: plain sections share one gap; tinted bands carry their own padding.
   Every section title uses the same size, so the page reads as one system. */
.cs-section { padding: 96px 0; }
.cs-section:not(.cs-band) + .cs-section:not(.cs-band) { padding-top: 0; }
.cs-band { background: var(--bg-alt); }
.cs-h2 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 24px; }
.cs-lede { margin-top: -8px; font-size: clamp(20px, 2vw, 24px); font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
/* How I led: the story on the left, a colleague's word for it on the right */
.cs-led-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 64px; margin-top: 32px; align-items: start; }
.cs-led-head > :only-child { grid-column: 1 / -1; max-width: 72ch; }
.cs-pullquote { margin: 0; padding: 28px 32px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.cs-pullquote::before { content: "\201C"; display: block; height: 36px; font-size: 64px; font-weight: 700; line-height: 1; color: var(--accent-ink); }
.cs-pullquote blockquote { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink); }
.cs-pullquote figcaption { margin-top: 20px; display: grid; gap: 2px; font-size: 14px; color: var(--ink-3); }
.cs-pullquote figcaption strong { font-size: 15px; font-weight: 600; color: var(--ink); }

/* Problem / bet, with the evidence for it underneath */
.cs-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; }
.cs-split p { font-size: 17px; color: var(--ink-2); }
.cs-split p + p { margin-top: 16px; }
.cs-proof { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); align-items: start; }
.cs-proof .cs-request:only-child { grid-column: 2; }
.cs-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; }
/* Context numbers stay small: the Impact row is the only big-number row on a page */
.cs-evidence dt { font-size: clamp(24px, 2.2vw, 30px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.cs-evidence dd { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 24ch; }
.cs-request { margin: 0; padding-left: 20px; border-left: 3px solid var(--line); }
.cs-request.has-logo { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; padding-left: 0; border-left: 0; }
.cs-request.has-logo .cs-logo-tile { grid-row: span 2; align-self: start; }
.cs-request blockquote { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); font-style: italic; }
.cs-request figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-3); }

/* Competitor logos: full color on the same panel as other boxed areas. In dark mode the panel goes dark,
   so logos drawn for light backgrounds turn white; square badges invert instead of becoming a solid block. */
.cs-alternatives { margin-top: 40px; }
.cs-alternatives .cs-label { margin-bottom: 16px; }
.cs-alternatives ul {
  list-style: none; margin: 0; padding: 28px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 28px 40px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
}
.cs-alternatives li { display: flex; }
.cs-alternatives img { width: auto; border-radius: 4px; }
:root[data-theme="dark"] .cs-alternatives img { filter: brightness(0) invert(1); opacity: .85; }
:root[data-theme="dark"] .cs-alternatives .is-square img { filter: grayscale(1) invert(1); opacity: .9; }

/* Impact: the same stat language as the homepage hero (rule on top, hairline dividers), set larger */
.cs-results { list-style: none; margin: 0; padding: 32px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-results li { padding: 0 40px; }
.cs-results li:first-child { padding-left: 0; }
.cs-results li + li { border-left: 1px solid var(--line); }
.cs-result-value { font-size: clamp(40px, 3.8vw, 52px); font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.cs-result-label { margin-top: 16px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cs-adoption { margin-top: 40px; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 72ch; }
.cs-result-detail { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 32ch; }
.cs-measure { margin-top: 32px; }
.cs-measure summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .2s ease;
}
.cs-measure summary::-webkit-details-marker { display: none; }
.cs-measure summary:hover { color: var(--ink); }
.cs-measure summary svg { width: 16px; height: 16px; transition: transform .25s ease; }
.cs-measure[open] summary svg { transform: rotate(45deg); }
.cs-measure ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.cs-measure li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.cs-measure strong { font-weight: 600; color: var(--ink); }

/* How I led: a statement, a dated track (filled dot = release), then how the work got done */
.cs-timeline { position: relative; list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps, 6), minmax(0, 1fr)); }
.cs-timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--line); }
.cs-timeline li { position: relative; display: grid; gap: 6px; align-content: start; padding: 30px 24px 0 0; }
.cs-timeline li::before {
  content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; box-sizing: border-box;
  border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--ink-3);
}
.cs-timeline li:last-child::before { background: var(--ink); border-color: var(--ink); }
.cs-tl-date { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cs-tl-label { font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.cs-cards { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
/* Four cards read better as two rows of two than four narrow columns */
.cs-cards[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-led-intro { margin: 0; font-size: 18px; line-height: 1.7; color: var(--ink-2); }
/* A card's artifact sits on top, cropped to one shape from the top-left so the cards line up */
.cs-card-media { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.cs-problem-figure { margin-top: 56px; }
.cs-cards li { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.cs-cards h3 { margin-bottom: 10px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
/* Narrated walkthrough at the top of What shipped: click to play, with sound */
.cs-walkthrough { margin-bottom: 40px; }
.cs-walkthrough video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 12px; background: #000; }
/* What shipped feature tiles: no heading above them, and a quiet credit for features someone else built */
.cs-cards.cs-features { margin-top: 0; }
.cs-cards p.cs-credit { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.cs-cards p { font-size: 16px; line-height: 1.6; color: var(--ink-2); }

/* Key decisions: what I chose on the left, why and what it cost on the right */
.cs-decisions { list-style: none; margin: 0; padding: 0; }
.cs-decision {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px;
  padding: 48px 0; border-top: 1px solid var(--line);
}
.cs-decision:first-child { padding-top: 40px; }
.cs-decision:last-child { padding-bottom: 0; }
.cs-decision-num { font-size: 14px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cs-decision h3 { margin-top: 10px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.cs-decision-body p { font-size: 17px; color: var(--ink-2); }
.cs-decision-body p + p { margin-top: 14px; }
.cs-decision-body .cs-tradeoff { margin-top: 20px; padding: 16px 20px; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cs-tradeoff strong { display: block; margin-bottom: 4px; }
.cs-media { grid-column: 1 / -1; display: grid; gap: 24px; margin-top: 16px; }
.cs-media[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* A lone image is supporting detail: keep it in the text column */
.cs-media[data-count="1"] { grid-column: 2; margin-top: 8px; }
.cs-media.is-wide { grid-column: 1 / -1; }
/* Document excerpt: real text on the dark panel of the tool it comes from (same in light and dark mode) */
.cs-excerpt {
  padding: 28px 32px; border: 1px solid #2a2f38; border-radius: 12px; background: #161616;
  color: #c9ccd2; font-size: 15px; line-height: 1.75;
}
.cs-excerpt h4 { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid #2a2a2a; color: #fff; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.cs-excerpt p + p, .cs-excerpt p + ul { margin-top: 12px; }
.cs-excerpt strong { color: #fff; font-weight: 600; }
.cs-excerpt ul { margin: 6px 0 0; padding-left: 20px; }
.cs-excerpt code {
  padding: 1px 6px; border-radius: 4px; background: #262626; color: #e3c46e;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap;
}
/* Screen recording slot; until the video exists, a dashed placeholder holds its place */
.cs-video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; }
video.cs-video { aspect-ratio: auto; height: auto; }
.cs-video-placeholder { display: grid; place-items: center; padding: 24px; text-align: center; background: var(--panel); border: 2px dashed var(--ink-3); color: var(--ink-3); font-size: 15px; }

/* What shipped: web screens are dense, so each runs full width; phones sit three across */
.cs-shipped-group + .cs-shipped-group { margin-top: 64px; }
.cs-shipped-group .cs-label { margin-bottom: 20px; }
.cs-shipped { display: grid; gap: 32px 24px; align-items: start; }
.cs-shipped.is-desktop { grid-template-columns: 1fr; gap: 48px; }
/* A pair of web screens is a before/after: side by side so they compare at a glance */
.cs-shipped.is-desktop[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cs-shipped.is-desktop[data-count="2"] { align-items: stretch; }
.cs-shipped.is-desktop[data-count="2"] .cs-figure { display: flex; flex-direction: column; }
.cs-shipped.is-desktop[data-count="2"] figcaption { margin-top: auto; padding-top: 12px; }
.cs-shipped.is-mobile { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-shipped.is-mobile .cs-figure img { padding: 32px 16%; }

/* Customer cards: logo, their words (or how they used it), then attribution, so the set reads as one */
.cs-logo-tile {
  display: inline-grid; place-items: center; flex-shrink: 0; height: 80px; min-width: 80px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.cs-logo-tile img { width: auto; height: 54px; max-width: 150px; object-fit: contain; }
.cs-request .cs-logo-tile { height: 64px; min-width: 64px; padding: 10px; }
.cs-request .cs-logo-tile img { height: 42px; }
.cs-customers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cs-customers[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-customers li { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.cs-customers .cs-logo-tile { width: 144px; }
.cs-customers .cs-logo-tile img { max-width: 100%; }
.cs-customers blockquote, .cs-customer-text { margin: 0; font-size: 19px; font-weight: 400; line-height: 1.5; color: var(--ink); }
.cs-customer-by { margin-top: auto; display: grid; gap: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.cs-customer-by strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.cs-usedby {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 24px; align-items: baseline;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.55; color: var(--ink);
}

.cs-reflection h3 { margin-bottom: 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
/* A reflection item with an image (a proposed next step) gets its own row: text left, image right */
.cs-reflection-feature { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); align-items: start; }

.cs-prose > * { max-width: 720px; }
.cs-prose > p { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.cs-prose > p + p { margin-top: 18px; }
.cs-prose > ul { padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); font-size: 17px; }
.cs-prose .metrics { margin: 0 0 56px; }
.case-note { margin-top: 32px; color: var(--ink-3); font-size: 15px; }

.cs-faq { display: grid; gap: 12px; }
.cs-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.cs-faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none;
}
.cs-faq summary::-webkit-details-marker { display: none; }
.cs-faq summary svg { width: 20px; height: 20px; transition: transform .25s ease; }
.cs-faq details[open] summary svg { transform: rotate(45deg); }
.cs-faq details > div { padding: 0 24px 22px; }
.cs-faq details p { font-size: 16px; color: var(--ink-2); }
.cs-faq details p + p { margin-top: 12px; }

.cs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 96px; padding-bottom: 96px; }
.cs-pager a { display: grid; gap: 6px; padding: 24px 28px; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s ease, background .2s ease; }
.cs-pager a:hover { border-color: var(--ink); background: var(--surface); }
.cs-pager span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.cs-pager strong { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.cs-pager svg { transition: transform .2s ease; }
.cs-pager-prev svg { transform: rotate(180deg); }
.cs-pager-prev:hover svg { transform: rotate(180deg) translateX(3px); }
.cs-pager-next { grid-column: 2; text-align: right; }
.cs-pager-next strong { justify-content: flex-end; }
.cs-pager-next:hover svg { transform: translateX(3px); }

/* Case study: tablet */
@media (max-width: 900px) {
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
  .cs-led-head { grid-template-columns: 1fr; }
  .cs-split, .cs-decision, .cs-cards, .cs-cards[data-count="4"], .cs-customers, .cs-customers[data-count="3"] { grid-template-columns: 1fr; }
  .cs-split { gap: 48px; }
  .cs-decision { gap: 16px; }
  .cs-media[data-count="1"] { grid-column: 1 / -1; }
  .cs-proof { gap: 32px; }
  .cs-proof .cs-request:only-child { grid-column: auto; }
  .cs-results li { padding: 0 24px; }
  .cs-usedby { grid-template-columns: 1fr; }
  /* Timeline turns vertical: the track runs down the left */
  .cs-timeline { grid-template-columns: 1fr; gap: 20px; }
  .cs-timeline::before { top: 6px; bottom: 6px; left: 5px; right: auto; width: 2px; height: auto; }
  .cs-timeline li { padding: 0 0 0 32px; gap: 2px; }
  .cs-timeline li::before { top: 4px; }
}
/* Case study: phone */
@media (max-width: 760px) {
  .cs { padding-top: 40px; }
  .cs-section { padding: 64px 0; }
  .cs-evidence { gap: 28px; }
  .cs-alternatives ul { padding: 24px; gap: 24px 32px; }
  .cs-results { grid-template-columns: 1fr; }
  .cs-results li { padding: 24px 0; }
  .cs-results li:first-child { padding-top: 0; }
  .cs-results li + li { border-left: 0; border-top: 1px solid var(--line); }
  .cs-media[data-count="2"]:not(.is-mobile) { grid-template-columns: 1fr; }
  .cs-shipped.is-desktop { gap: 32px; }
  .cs-shipped.is-desktop[data-count="2"] { grid-template-columns: 1fr; }
  .cs-figure[data-device="mobile"] img, .cs-shipped.is-mobile .cs-figure img { padding: 20px 14%; }
  /* Phone screens become a swipeable row */
  .cs-shipped.is-mobile {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    margin: 0 -24px; padding: 0 24px 4px; scroll-padding: 0 24px; scrollbar-width: none;
  }
  .cs-shipped.is-mobile::-webkit-scrollbar { display: none; }
  .cs-shipped.is-mobile .cs-figure { flex: 0 0 68%; scroll-snap-align: start; }
  .cs-customers li, .cs-cards li { padding: 24px; }
  .cs-pager { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 72px; }
  .cs-pager-next { grid-column: auto; text-align: left; }
  .cs-pager-next strong { justify-content: flex-start; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero { padding: 56px 0 48px; }
  .hero-sub { margin-top: 20px; }
  .hero-actions { margin-top: 28px; gap: 12px; }
  .link-btn { margin-left: 4px; font-size: 15px; }
  .about-intro { grid-template-columns: 1fr; gap: 40px; }
  .portrait { max-width: 360px; }
  .known { grid-template-columns: 1fr; }
  .exp-more { grid-template-columns: 1fr 1fr; }
  .exp-more-cta { grid-column: 1 / -1; justify-self: start; }
  .known-head { margin-top: 72px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 760px) {

  /* Mobile: cards become a swipeable, auto-advancing row */
  .known {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -24px; padding: 0 24px 4px; scroll-padding: 0 24px; scrollbar-width: none;
  }
  .known::-webkit-scrollbar { display: none; }
  .known-card { flex: 0 0 86%; scroll-snap-align: start; grid-row: auto; grid-template-rows: auto 1fr; margin-bottom: 0; }
  .known-dots { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
  .known-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--line); cursor: pointer; transition: width .3s ease, background .3s ease; }
  .known-dots button[aria-current="true"] { width: 22px; background: var(--ink); }
  .menu-toggle { display: block; }
  .theme-toggle { margin-left: auto; }
  .site-header { transition: background .3s; }
  .menu-open .site-header { background: var(--bg); }
  body.menu-open { overflow: hidden; }

  /* Menu panel wipes down from the header; links rise in one after another */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - 68px);
    flex-direction: column; align-items: stretch; gap: 0; padding: 16px 24px 32px;
    background: var(--bg); border-top: 1px solid var(--line);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .4s cubic-bezier(.65,0,.35,1) .1s, visibility 0s .5s;
  }
  .menu-open .nav { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .5s cubic-bezier(.65,0,.35,1), visibility 0s; }
  .nav > a, .nav-icons {
    opacity: 0; transform: translateY(14px);
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav > a {
    font-size: 32px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink);
    padding: 14px 0; border: 0; border-bottom: 1px solid var(--line);
  }
  .nav > a.active { color: var(--ink); }
  .nav > a.active::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); margin-left: 12px; vertical-align: middle; }
  .nav-icons { margin: 28px 0 0; gap: 12px; }
  .nav-icons .icon-btn { width: 48px; height: 48px; }
  .menu-open .nav > a, .menu-open .nav-icons {
    opacity: 1; transform: none;
    transition: opacity .4s ease, transform .5s cubic-bezier(.2,.8,.2,1);
    transition-delay: calc(.15s + var(--i) * .06s);
  }
  .hero { padding: 64px 0 48px; }
  .section { padding: 72px 0; }
  .work-card { grid-template-columns: 1fr; gap: 24px; }
  .work-card.is-flipped .work-media { order: 0; }
  .work-list { gap: 56px; }
  .field-row { grid-template-columns: 1fr; }
  .known-card { padding: 24px; }
  .timeline li { grid-template-columns: 1fr; padding: 28px 0; }
  .exp-more { grid-template-columns: 1fr; padding: 24px; }
  .exp-more-item + .exp-more-item { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .exp-more-cta { justify-self: stretch; justify-content: center; }
  .badge { width: 52px; height: 52px; border-radius: 13px; }
  .badge img { width: 26px; height: 26px; }
  .timeline h4 { font-size: 19px; }
  .metrics { gap: 28px; }
  .pitch { padding: 28px 20px; }
}
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .known, .cs-shipped.is-mobile { margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; }
  .footer-inner { flex-direction: column; justify-content: center; gap: 6px; }
}
@media (max-width: 1099px) {
  .hero-stats { margin-top: 48px; padding-top: 28px; }
  .hero-stat { padding: 0 20px; }
  .hero-stat-num small { font-size: 12px; }
  .hero-stat dd { font-size: 14px; }
}
@media (max-width: 760px) {
  .hero-stats-slot { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .hero-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hero-stat:nth-child(even) { padding-right: 0; }
}

/* Phones: the two buttons share a row, the pitch link centers beneath them */
@media (max-width: 560px) {
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .btn { padding: 0 8px; white-space: nowrap; }
  .link-btn { grid-column: 1 / -1; justify-self: center; margin: 4px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .lightbox[open] { animation: none; }
  .flipstack-card { animation: none !important; }
}
