* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.75; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.mono { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
/* Tracking is for Latin caps; Hangul set this wide reads as gaps. */
:lang(ko) .mono { letter-spacing: 0.03em; }
.muted { color: var(--muted); }
.nw { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: var(--track-display); }
/* Latin reads at 1.6; Hangul needs the extra leading body sets above. */
:lang(en) body { line-height: 1.6; }
/* NanumSquare is already set tight, so Korean headings take almost no negative tracking,
   and Hangul has no italic: emphasis stays as colour only. */
:lang(ko) { --track-display: -0.01em; --track-heading: -0.01em; }
:lang(ko) .contact h2 em, :lang(ko) .case-page h1 em { font-style: normal; }
::selection { background: color-mix(in srgb, var(--signal) 24%, transparent); color: var(--ink); }
.display em, .em { font-style: italic; color: var(--signal); }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 6px var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.2) blur(6px);
}
.bar .brand { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-nav { display: flex; justify-content: center; gap: 2px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.site-nav a:hover { color: var(--ink); }
.nav-tracks { display: contents; }
.site-nav a[aria-current="true"], .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.menu-btn {
  display: none; font: inherit; color: inherit; background: none; cursor: pointer;
  min-height: 44px; padding: 0 14px; border: 1px solid var(--rule);
}
/* Anchor jumps skip the section's top padding so its first line lands just under the bar. */
section[id] { scroll-margin-top: calc(var(--bar-h) + clamp(24px, 3vw, 40px) - var(--section)); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.bar .right { display: flex; justify-content: flex-end; gap: 16px; align-items: center; }
.lang, .theme { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; min-height: 44px; padding: 0 4px; }
.theme { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 6px; }
.theme:hover { text-decoration-color: var(--signal); }
.lang span { opacity: .62; }
.lang span[aria-current="true"] { opacity: 1; }
.status::before, .hero-status::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: var(--signal); animation: blink 1.6s steps(2, start) 3;
}
@keyframes blink { to { visibility: hidden; } }

/* ---------- hero ---------- */
.hero { height: 170vh; position: relative; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#tape { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 8vh; max-width: 1000px; pointer-events: none; }
/* From the chart's desktop layout up (opsTape: chart starts at 56% of the width), the copy keeps to the left half. */
@media (min-width: 760px) { .hero-copy { max-width: calc(52vw - var(--gutter)); } }
/* Who first: the name is the headline, the role under it, the slogan a supporting line. */
.hero-title { display: grid; gap: clamp(10px, 1.6vh, 18px); font-weight: 400; }
.hero-name { font-size: clamp(56px, 6vw + 26px, 128px); line-height: .95; }
.hero-role { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.25; letter-spacing: var(--track-heading); text-wrap: balance; }
/* The slogan is English on both pages, so it keeps Latin tracking even under :lang(ko). */
.hero-slogan { margin-top: clamp(12px, 2vh, 24px); font-size: clamp(20px, 1.2vw + 12px, 30px); line-height: 1.2; letter-spacing: -0.02em; color: var(--muted); }
.hero-tracks { display: contents; }
/* The bar already shows the status from 1101px up; the hero repeats it only where the bar hides it. */
@media (min-width: 1101px) { .hero-actions .hero-status { display: none; } }
.hero-copy p.lede { margin-top: 28px; max-width: 32em; line-height: 1.75; color: var(--muted); font-size: var(--fs-lede); text-wrap: pretty; }
.hero-actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; pointer-events: auto; }
.hero-actions a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 6px; }
.hero-actions a[hidden] { display: none; }
.hero-status { color: var(--signal); }
.hero-legend { position: absolute; right: var(--gutter); top: 88px; text-align: end; color: var(--muted); z-index: 1; padding: 8px 0 8px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); }
.hero-legend b { display: block; font-family: var(--font-mono); font-size: clamp(24px, 2.4vw, 36px); font-weight: 400; color: var(--ink); line-height: 1.2; }
.hero-cue { display: block; margin-top: 6px; color: var(--ink); }

/* ---------- sections ---------- */
.block { padding: var(--section) var(--gutter); border-top: 1px solid var(--rule); }
.code { font-weight: 400; color: var(--muted); margin-bottom: clamp(48px, 7vw, 96px); display: flex; justify-content: space-between; gap: 16px; }

.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.about p { grid-column: 1 / span 7; font-size: clamp(20px, 2vw, 30px); line-height: 1.6; font-weight: 400; letter-spacing: -0.015em; }
.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; margin-top: clamp(72px, 9vw, 128px); border-top: 1px solid var(--ink); }
.facts div { padding: 24px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.03em; font-size: var(--fs-stat); line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
/* Units sit beside the number at regular weight (Hangul has no light face), so the digits keep the light voice alone. */
.facts .unit { font-weight: 400; font-size: 0.42em; letter-spacing: 0; margin-left: 0.2em; vertical-align: 0.15em; color: var(--muted); }
/* The "15 tools" fact, broken down by where each group was used. */
.tools { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; margin-top: 40px; border-top: 1px solid var(--rule); }
.tools > div { padding: 20px 0 0; }
.tools dt { color: var(--signal); }
.tools .names { list-style: none; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tools .names li { font-size: 0.875rem; line-height: 1.4; padding: 4px 10px; border: 1px solid var(--rule); }
.tools .names small { color: var(--muted); font-size: 0.75rem; margin-left: 4px; }
.tools .use { display: block; margin-top: 8px; color: var(--muted); font-size: 0.875rem; line-height: 1.6; }

/* Section opener: heading and its lede side by side, the content below. */
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head h2, .section-title { font-size: var(--fs-h2); line-height: 1.2; text-wrap: balance; }
.section-title { margin-bottom: clamp(32px, 4vw, 56px); }
.section-lede { font-size: var(--fs-lede); line-height: 1.75; color: var(--muted); max-width: 30em; text-wrap: pretty; }

/* Cross-document view transitions: a role door's name morphs into the role page title. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease-out); }

/* Role doors: full-width rows that fill with the signal colour from the left on hover. */
.doors { list-style: none; border-top: 1px solid var(--ink); }
.door {
  position: relative; isolation: isolate; display: grid; align-items: center; text-decoration: none;
  grid-template-columns: 40px minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr) auto; gap: 16px clamp(20px, 3vw, 48px);
  padding: clamp(28px, 3.4vw, 48px) 0; border-bottom: 1px solid var(--rule);
  transition: color .45s var(--ease-out);
}
.door::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--signal);
  clip-path: inset(0 100% 0 0); transition: clip-path .6s var(--ease-out);
}
.door:hover, .door:focus-visible { color: var(--signal-ink); }
/* The row's content slides in with the fill; translate moves it without re-laying out the grid. */
.door > :not(.door-go) { transition: translate .6s var(--ease-out), color .45s; }
.door:is(:hover, :focus-visible) > :not(.door-go) { translate: 16px 0; }
.door:hover::before, .door:focus-visible::before { clip-path: inset(0 0 0 0); }
.door:focus-visible { outline-offset: -3px; }
.door-n { align-self: start; padding-top: .9em; color: var(--muted); transition: color .45s; }
.door-head { display: grid; gap: 8px; }
.door-name { font-size: var(--fs-h2); line-height: 1; }
.door-full, .door-stat .mono { color: var(--muted); transition: color .45s; }
.door-line { font-size: var(--fs-body); line-height: 1.7; max-width: 34em; text-wrap: pretty; }
.door-stat { display: grid; gap: 6px; }
.door-stat b { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h3); letter-spacing: var(--track-heading); line-height: 1.1; color: var(--signal); white-space: nowrap; transition: color .45s; }
.door-go { white-space: nowrap; }
.door-go span { display: inline-block; transition: transform .45s var(--ease-out); }
.door:hover .door-go span, .door:focus-visible .door-go span { transform: translateX(8px); }
.door:hover :is(.door-n, .door-full, .door-stat .mono, .door-stat b),
.door:focus-visible :is(.door-n, .door-full, .door-stat .mono, .door-stat b) { color: var(--signal-ink); }

/* Workbench: each work in the frame its medium lives in, alternating sides. */
.works-filter { margin-bottom: 32px; }
.bench { list-style: none; border-top: 1px solid var(--ink); container: bench / inline-size; }
.work { display: grid; gap: 32px; border-bottom: 1px solid var(--rule); padding: clamp(40px, 5vw, 72px) 0; }
/* The bench, not the viewport, decides when a work goes side by side. */
@container bench (min-width: 820px) {
  .work { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 112px); align-items: center; }
  .work:nth-child(even) .work-media { order: 2; }
  .work--text { grid-template-columns: minmax(0, 7fr); }
}
.work[hidden] { display: none; }
.work-media { display: grid; justify-items: center; gap: 20px; }
.work-meta { color: var(--muted); }
.work-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); letter-spacing: var(--track-heading); line-height: 1.2; margin-top: 12px; text-wrap: balance; }
.work-pitch { font-size: var(--fs-lede); line-height: 1.7; margin-top: 16px; max-width: 30em; text-wrap: pretty; }
.work-stack { color: var(--muted); margin-top: 18px; }
.work-actions { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 20px; }
.work-actions a, .work-actions button {
  display: inline-flex; align-items: center; min-height: 44px; font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 6px;
}
/* Details popover (Popover API; rendered inline where it is unsupported). */
.work-pop { margin: auto; width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 64px); overflow: auto; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--ink); background: var(--bg); color: var(--ink); }
.work-pop::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.work-pop ul { list-style: none; margin-top: 20px; color: var(--muted); }
.work-pop li { padding: 12px 0; border-top: 1px dashed var(--rule); }
.work-pop.inline { grid-column: 1 / -1; padding: 0; border: 0; }
.work-pop.inline > .work-meta, .work-pop.inline > .work-title { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .work-pop:popover-open { animation: pop-in .35s var(--ease-out); }
  @keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
}

/* app: a phone you swipe */
.phone { width: min(280px, 72vw); aspect-ratio: 240 / 532; padding: 10px; border-radius: 34px; background: #0e0d0b; box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--ink) 60%, transparent); }
.phone-screen { height: 100%; border-radius: 26px; overflow-x: auto; display: flex; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.phone-screen::-webkit-scrollbar { display: none; }
.phone-screen img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.phone-ctl { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; width: min(280px, 72vw); text-align: center; color: var(--muted); }
.phone-ctl button { font: inherit; color: var(--ink); background: none; border: 1px solid var(--rule); min-height: 44px; cursor: pointer; }
.phone-ctl button:hover { border-color: var(--ink); }
.phone-cap { text-transform: none; letter-spacing: 0.02em; }
.phone-bar { position: absolute; left: 0; right: 0; bottom: -10px; height: 2px; background: var(--rule); }
.phone-bar i { position: absolute; inset: 0; background: var(--signal); transform-origin: left; transform: scaleX(.25); transition: transform .2s; }

/* web: a browser window */
.browser { display: block; width: 100%; border: 1px solid var(--ink); text-decoration: none; overflow: hidden; background: var(--bg-sunk); }
.browser-bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--ink); text-transform: none; letter-spacing: 0.02em; }
.browser img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .8s var(--ease-out); }
.browser:hover img, .browser:focus-visible img { transform: scale(1.04); }

/* image: a set you scrub through */
.scrub { width: 100%; display: grid; gap: 14px; }
.scrub-stack { display: grid; aspect-ratio: 1; background: var(--bg-sunk); }
.scrub-stack img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.scrub-ctl { display: grid; gap: 8px; text-transform: none; color: var(--muted); }
.scrub-ctl input { width: 100%; accent-color: var(--signal); min-height: 44px; }

/* specimen: this site's own type and colour, with its own light/dark switch */
.specimen {
  --s-bg: var(--bg); --s-ink: var(--ink); --s-signal: var(--signal);
  width: 100%; display: grid; gap: 18px; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--ink);
  background: var(--s-bg); color: var(--s-ink); transition: background-color .5s, color .5s;
}
.specimen.dark { --s-bg: #11120f; --s-ink: #e9e6dd; --s-signal: #2fbf74; }
.specimen.light { --s-bg: #f1ede4; --s-ink: #151513; --s-signal: #097540; }
/* how this site was made: planning → deploy, drawn in the specimen's own tokens */
.spec-flow-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--s-ink); }
.spec-flow { list-style: none; margin: 0; padding: 0; }
.spec-flow li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; padding: 0 0 18px; }
.spec-flow li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 1px; background: color-mix(in srgb, var(--s-ink) 30%, transparent); }
.spec-flow li:last-child { padding-bottom: 0; }
.spec-flow li:last-child::before { display: none; }
.spec-flow-n { grid-row: span 2; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--s-ink); font-size: 11px; background: var(--s-bg); }
.spec-flow li:last-child .spec-flow-n { background: var(--s-signal); border-color: var(--s-signal); color: var(--s-bg); }
.spec-flow-step { font-weight: 500; line-height: 24px; }
.spec-flow-what { font-size: var(--fs-meta); line-height: 1.5; opacity: .72; }
.spec-flow-by { padding-top: 12px; border-top: 1px solid var(--s-ink); text-transform: none; letter-spacing: 0.02em; }
.spec-flow-by::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--s-signal); }
.spec-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.spec-aa { font-family: var(--font-display); font-weight: 300; font-size: clamp(72px, 12vw, 160px); line-height: .9; letter-spacing: -0.04em; }
.spec-aa span { margin-left: .12em; font-weight: 400; }
.spec-line { font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -0.03em; }
.spec-line em { color: var(--s-signal); }
.spec-swatches { display: flex; gap: 8px; }
.spec-swatches i { width: 40px; height: 40px; border: 1px solid var(--s-ink); }
.spec-swatches i[data-v="--bg"] { background: var(--s-bg); }
.spec-swatches i[data-v="--ink"] { background: var(--s-ink); }
.spec-swatches i[data-v="--signal"] { background: var(--s-signal); }
.spec-toggle { justify-self: start; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 1px solid currentColor; min-height: 44px; padding: 0 16px; cursor: pointer; }

/* Scroll-driven entrances (CSS only, where supported; content stays visible otherwise). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .door, .work { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .phone { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .browser img { animation: unzoom linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
    @keyframes rise { from { opacity: 0; transform: translateY(48px); } }
    @keyframes settle { from { transform: rotate(-7deg) translateY(40px); } }
    @keyframes unzoom { from { scale: 1.15; } }
  }
}

/* Role page hero: role name at display scale, its definition, two headline stats. */
.role-hero {
  min-height: 100vh; min-height: 100svh; padding: calc(var(--bar-h) + clamp(48px, 8vh, 120px)) var(--gutter) clamp(48px, 8vh, 96px);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px clamp(40px, 6vw, 112px); align-items: end;
}
.rp-name { font-size: clamp(64px, 5vw + 48px, 168px); line-height: .95; letter-spacing: -0.04em; color: var(--signal); }
.role-full { color: var(--muted); margin-top: 20px; }
/* Role pages are shared on their own, so they say whose page it is. */
.role-who { margin-top: 10px; font-size: var(--fs-meta); }
.role-line { font-size: var(--fs-h3); line-height: 1.35; letter-spacing: var(--track-heading); margin-top: clamp(24px, 4vh, 40px); max-width: 28ch; text-wrap: balance; }
.role-actions { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 32px; }
.role-actions a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 6px; }
.role-actions a[hidden] { display: none; }
.role-stats { border-top: 1px solid var(--ink); }
.role-stats div { padding: 20px 0 24px; border-bottom: 1px solid var(--rule); }
.role-stats dt { color: var(--muted); }
.role-stats dd { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-stat); letter-spacing: -0.03em; line-height: 1.05; margin-top: 10px; font-variant-numeric: tabular-nums; }
.role-page #results .section-lede { margin-bottom: clamp(24px, 4vw, 48px); }
.role-missing .role-stats, .role-missing .block { display: none; }

.lens-big { display: flex; gap: 10px; flex-wrap: wrap; }
.lens-big button {
  font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--ink); background: none; color: var(--ink); min-height: 44px; padding: 0 20px; cursor: pointer;
}
.lens-big button { transition: background-color .25s, color .25s, border-color .25s; }
.lens-big button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.lens-big button[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
/* Pinned scenes (js/scene.js): the track holds --n steps of --per each, plus one stage. */
.scene-track { position: relative; height: calc(var(--n, 1) * var(--per, 60vh) + 100vh - var(--bar-h)); height: calc(var(--n, 1) * var(--per, 60vh) + 100svh - var(--bar-h)); }
.scene-stage {
  position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); height: calc(100svh - var(--bar-h));
  display: grid; align-items: center; gap: clamp(32px, 6vw, 112px);
}
/* Too few items to pin (scene.js MIN_PINNED): the stage sits in the flow. */
.scene-track.scene-static { height: auto; }
.scene-static .scene-stage { position: static; height: auto; padding-block: 24px; }
/* Shared list rows: every item stays visible, the current one is pulled forward. */
.spot-list, .case-list { list-style: none; border-top: 1px solid var(--rule); align-self: center; }
.spot-row, .case-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; width: 100%; min-height: 44px;
  padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--rule); font: inherit; text-align: start;
  color: var(--muted); cursor: pointer; transition: color .4s, box-shadow .5s var(--ease-out);
}
.spot-row:hover, .case-item:hover { color: var(--ink); }
.spot-row[data-current="true"], .case-item[data-current="true"] { color: var(--ink); box-shadow: inset 2px 0 var(--signal); }
/* The current row's number and label step in; the value column stays put. */
.spot-row > :is(.n, .l), .case-item > :is(.n, .title) { transition: translate .5s var(--ease-out); }
[data-current="true"] > :is(.n, .l, .title) { translate: 14px 0; }
.spot-row .n, .case-item .n { color: var(--muted); }
.spot-row[data-current="true"] .n, .case-item[data-current="true"] .n, .spot-row[data-current="true"] .v { color: var(--signal); }
.spot-row .l, .case-item .title { font-size: 0.9375rem; line-height: 1.45; padding-inline-end: 14px; }
.spot-row .v { text-transform: none; letter-spacing: 0.02em; white-space: nowrap; }
.case-item .yrs { font-size: var(--fs-label); white-space: nowrap; }
.case-item { text-decoration: none; }

/* results: the spotlight scrubs from before to after with the scroll */
.results-stage { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.spot { position: relative; padding-top: 24px; border-top: 1px solid var(--ink); }
.spot-meta { color: var(--muted); }
.spot-meta b { color: var(--signal); font-weight: 400; }
.spot-label { font-family: var(--font-display); font-weight: 400; letter-spacing: var(--track-heading); font-size: var(--fs-h3); line-height: 1.3; margin-top: 16px; max-width: 20ch; text-wrap: balance; }
.spot-to {
  font-family: var(--font-display); font-weight: 300; letter-spacing: -0.04em; font-size: clamp(80px, 11vw, 176px); line-height: .95;
  color: var(--signal); margin: clamp(16px, 3vh, 36px) 0; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.spot-compare { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; gap: 12px 16px; align-items: center; font-size: 0.8125rem; max-width: 560px; }
.spot-compare .em-after { color: var(--signal); }
.spot-compare > span:nth-child(3n) { text-transform: none; letter-spacing: 0.02em; white-space: nowrap; text-align: end; }
.spot-track { position: relative; height: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.spot-track i { position: absolute; top: 0; bottom: 0; }
.spot-track .before { background: var(--muted); opacity: .55; }
.spot-track .after { background: var(--signal); }
.spot-progress, .cf-progress { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--signal); transform-origin: left; transform: scaleX(0); }

/* cases: the list on the left, one case forward on the right */
.cases-stage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.case-list { border-top-color: var(--ink); }
.case-feature { position: relative; padding-top: 28px; border-top: 1px solid var(--ink); }
.case-feature > :not(.cf-num) { position: relative; z-index: 1; }
.cf-num {
  position: absolute; right: 0; top: 0; z-index: 0; pointer-events: none;
  font-size: clamp(120px, 16vw, 260px); font-weight: 300; line-height: 1; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px var(--rule);
}
.cf-meta { color: var(--muted); }
.cf-lens { color: var(--signal); }
.cf-title { font-size: var(--fs-h2); line-height: 1.15; margin-top: 24px; max-width: 16ch; text-wrap: balance; }
.cf-summary { color: var(--muted); font-size: var(--fs-lede); line-height: 1.75; margin-top: 24px; max-width: 34em; text-wrap: pretty; }
.cf-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-top: 36px; }
.cf-stat { font-size: var(--fs-meta); color: var(--ink); }
.cf-open { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 6px; }

/* scroll effects (js/scrollFx.js); the .fx class is only set when motion is allowed */
.fx .about p .w { opacity: .16; }
.fx .timeline > li { opacity: .25; transform: translateX(-12px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.fx .timeline > li.on { opacity: 1; transform: none; }
.fx .timeline .year { transition: color .6s; }
.fx .timeline > li.on .year { color: var(--signal); }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .browser img { filter: brightness(.86) contrast(1.05); } }
:root[data-theme="dark"] .browser img { filter: brightness(.86) contrast(1.05); }

/* role bands */
.roles { margin-bottom: clamp(56px, 7vw, 96px); }
.roles-axis, .role { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; }
.roles-axis .track { height: 24px; }
.roles-axis .track span { position: absolute; transform: translateX(6px); }
.role { height: 40px; }
.role-name { font-size: 0.9375rem; }
.track { position: relative; height: 100%; }
.track i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.track b { position: absolute; top: 50%; height: 12px; margin-top: -6px; background: var(--ink); opacity: .85; transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.role.signal .track b { background: var(--signal); opacity: 1; }
.role.signal .role-name { color: var(--signal); }
.roles.in .track b { transform: scaleX(1); }
.roles.in .role:nth-child(3) b { transition-delay: .08s; } .roles.in .role:nth-child(4) b { transition-delay: .16s; }
.roles.in .role:nth-child(5) b { transition-delay: .24s; } .roles.in .role:nth-child(6) b { transition-delay: .32s; }
.roles.in .role:nth-child(7) b { transition-delay: .4s; }

/* timeline */
.timeline { list-style: none; }
.timeline > li { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.timeline .year { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.03em; font-size: clamp(28px, 3vw, 40px); line-height: 1.2; }
/* Role pages: how the person works with AI. Number, the habit, the evidence from real sessions. */
.ways { list-style: none; border-top: 1px solid var(--ink); }
.ways > li { display: grid; grid-template-columns: 40px minmax(0, 5fr) minmax(0, 7fr); gap: 12px clamp(20px, 3vw, 48px); padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.way-n { color: var(--signal); }
.way-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(20px, 1.2vw + 12px, 28px); line-height: 1.35; letter-spacing: var(--track-heading); text-wrap: balance; }
.way-evidence { list-style: none; display: grid; gap: 10px; color: var(--muted); }
.way-evidence li { line-height: 1.65; padding-left: 16px; position: relative; text-wrap: pretty; }
.way-evidence li::before { content: ""; position: absolute; left: 0; top: .75em; width: 6px; height: 1px; background: var(--signal); }
@media (max-width: 900px) { .ways > li { grid-template-columns: 32px minmax(0, 1fr); } .way-evidence { grid-column: 2; } }

/* Role pages: each year holds that role's items from the archive; linked items open their case. */
.year-items { list-style: none; display: grid; gap: 10px; }
.year-items li { line-height: 1.6; text-wrap: pretty; }
.year-items a { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 5px; }
.year-items a::after { content: " →"; color: var(--signal); }

/* contact */
.contact h2 { font-size: var(--fs-h2); line-height: 1.25; max-width: 16ch; text-wrap: balance; }
/* The email leads the contact block at heading scale; other channels sit under it. */
.contact-body { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 24px; justify-items: start; }
.contact-email { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.contact-email .email {
  font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h3); letter-spacing: -0.02em; line-height: 1.2;
  color: var(--ink); overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: .2em;
}
.contact-email .copy { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink); background: none; border: 1px solid var(--rule); min-height: 44px; padding: 0 16px; cursor: pointer; }
.contact-email .copy:hover { border-color: var(--ink); }
.contact-email .copied { color: var(--signal); }
.resume-note { color: var(--muted); }
.contact .links { display: flex; gap: 28px; flex-wrap: wrap; }
.contact .links a { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.875rem; display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 6px; }

footer { padding: 28px var(--gutter) 40px; border-top: 1px solid var(--rule); color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- case page ---------- */
.case-page { padding: 160px var(--gutter) var(--section); }
.case-page header { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; border-bottom: 1px solid var(--ink); padding-bottom: 64px; margin-bottom: 24px; }
.case-page h1 { grid-column: 1 / span 9; font-size: var(--fs-h2); line-height: 1.2; margin-top: 32px; text-wrap: balance; }
.case-page .summary { grid-column: 1 / span 7; font-size: var(--fs-lede); line-height: 1.75; margin-top: 32px; color: var(--muted); text-wrap: pretty; }
.case-page .meta { grid-column: 9 / span 4; align-self: end; text-align: end; color: var(--muted); }
/* Stats are short phrases ("6 runs · 1,608 traders"), so they sit at heading size in sentence case, not as a giant caps number. */
.case-page .meta b {
  display: block; margin-bottom: 8px; font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h3); line-height: 1.2;
  letter-spacing: var(--track-heading); text-transform: none; color: var(--signal); text-wrap: balance; font-variant-numeric: tabular-nums;
}
.steps { list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding: 44px 0; border-bottom: 1px solid var(--rule); counter-increment: step; }
.steps li .label { font-weight: 400; }
.steps li .label::before { content: "0" counter(step) " / "; color: var(--signal); }
.steps li p { font-size: var(--fs-lede); line-height: 1.8; max-width: 36em; text-wrap: pretty; }
.steps li:last-child p { font-family: var(--font-display); font-weight: 400; letter-spacing: var(--track-heading); font-size: clamp(21px, 2.2vw, 30px); line-height: 1.45; }
.case-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 80px; }
.case-nav a, #back { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .bar .status { display: none; } }
@media (max-width: 900px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar .status { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .site-nav {
    display: none; position: fixed; top: var(--bar-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--rule);
  }
  .bar.open .site-nav { display: flex; }
  .site-nav a { font-size: 0.875rem; padding: 0; border-bottom: 1px solid var(--rule); }
  .section-head { grid-template-columns: 1fr; }
  /* Doors stack: name and stat on one line, the definition under them. */
  .door { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; }
  .door-n { display: none; }
  .door-line { grid-column: 1 / -1; grid-row: 2; }
  .door-stat { grid-column: 1; grid-row: 3; }
  .door-go { grid-column: 2; grid-row: 1; align-self: start; }
  .role-hero { grid-template-columns: 1fr; align-content: end; }
  /* Phones: the spotlight / feature on top, the full list compact underneath. */
  .results-stage, .cases-stage { grid-template-columns: 1fr; align-content: start; gap: 20px; padding-top: 16px; }
  .spot-label { font-size: 1.25rem; margin-top: 10px; }
  .spot-to { font-size: clamp(56px, 18vw, 104px); margin: 12px 0 16px; }
  .spot-compare { gap: 8px 10px; font-size: 0.75rem; }
  .spot-row, .case-item { min-height: 32px; padding: 6px 0; gap: 8px; }
  .spot-row .l, .case-item .title { font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .case-item .yrs { display: none; }
  .case-feature { order: -1; padding-top: 18px; }
  .cf-num { font-size: 104px; }
  .cf-title { font-size: clamp(24px, 7vw, 34px); margin-top: 12px; }
  .cf-summary { font-size: 0.9375rem; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .cf-foot { margin-top: 12px; }
  .roles-axis, .role { grid-template-columns: 96px 1fr; gap: 12px; }
  .role-name { font-size: 0.8125rem; }
  .roles-axis .track span { font-size: var(--fs-label); letter-spacing: 0; transform: translateX(3px); }
  .about p { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .tools { grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .timeline > li { grid-template-columns: 1fr; gap: 4px; }
  .steps li { grid-template-columns: 1fr; gap: 8px; }
  .case-page h1, .case-page .summary, .case-page .meta { grid-column: 1 / -1; text-align: start; }
  .hero-legend { top: 72px; }
}
@media (max-width: 560px) { .tools { grid-template-columns: 1fr; } }
/* Short phones: drop the lede (About repeats it) so the chart keeps room above the copy. */
@media (max-width: 759px) and (max-height: 740px) {
  .hero-copy p.lede, .hero-cue { display: none; }
  .hero-slogan { margin-top: 8px; }
  .hero-actions { margin-top: 12px; }
  .cf-summary { display: none; }
}
/* Phone landscape: keep the copy to the left half so the chart can use the lower right. */
@media (max-height: 560px) and (min-width: 760px) {
  .hero-copy { max-width: 50vw; bottom: 4vh; }
  .hero-name { font-size: clamp(36px, 5vw, 64px); }
  .hero-role { font-size: 1.25rem; }
  .hero-slogan { display: none; }
  .hero-copy p.lede { display: none; }
  .hero-actions { margin-top: 8px; }
  .hero-legend { top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  /* The tall hero only exists to scrub the tape animation; static, one screen is enough. */
  .hero { height: 100vh; height: 100svh; }
  .status::before, .hero-status::before { animation: none; }
  .hero-cue { display: none; }
  .door, .door > *, .door::before, .door-go span, .browser img { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* Scenes unpinned: list rows switch the spotlight / feature instead of scrolling. */
  .scene-track { height: auto; }
  .scene-stage { position: static; height: auto; padding-block: 24px; }
  .spot-row, .case-item, .spot-row > *, .case-item > * { transition: none; }
  .track b { transition: none; transform: none; }
}

/* Shown by js/fail.js when a data file can't be loaded. */
.load-error { position: relative; z-index: 21; margin: var(--bar-h) var(--gutter) 0; padding: 14px 0; border-bottom: 1px solid var(--ink); color: var(--ink); text-transform: none; letter-spacing: 0.02em; }
