/* ==========================================================================
   jontoney.com — site styles
   Tokens → base → type → layout primitives → components → sections → motion
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- Tokens */

:root {
  color-scheme: dark;

  --color-bg: #0E0E0D;
  --color-band: #1A1A18;          /* Experience, Product work, Contact */
  --color-text: #ECEAE4;
  --color-text-strong: #F2F0EB;
  --color-soft: #C9C5BD;          /* secondary paragraphs */
  --color-muted: #9C9990;         /* labels */
  --color-dim: #6E6B65;           /* de-emphasised display text */
  --color-faint: #3A3936;         /* Approach lines before they light */
  --color-step: #6E6B65;          /* Approach steps before they light */
  --color-accent: #C99A1E;
  --color-rule: rgba(236, 234, 228, .16);
  --color-rule-strong: rgba(236, 234, 228, .22);
  --color-outline: rgba(236, 234, 228, .18);
  --color-band-rule: rgba(242, 240, 235, .18);
  --placeholder: repeating-linear-gradient(135deg, #1B1B19 0 8px, #232321 8px 16px);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 3vw, 40px);
  --space-section: clamp(120px, 16vw, 240px);
  --space-feature: clamp(100px, 14vw, 220px);
  --space-title-top: clamp(28px, 4vw, 56px);
  --nav-h: 59px;

  --ease: cubic-bezier(.19, 1, .22, 1);
}

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; height: auto; }
figure, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-accent); }

::selection { background: var(--color-accent); color: var(--color-bg); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--color-text);
  color: var(--color-bg);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; color: var(--color-bg); }

/* ---------------------------------------------------------------- Type */

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.muted  { color: var(--color-muted); }
.soft   { color: var(--color-soft); }
.dim    { opacity: .6; }
.dim-60 { opacity: .6; }
.dimmer { color: var(--color-dim); }
.accent { color: var(--color-accent); }

.display {
  font-weight: 600;
  line-height: .88;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.display--hero    { font-size: clamp(50px, 9.4vw, 184px); line-height: .86; letter-spacing: -.052em; text-transform: uppercase; }
.display--section { font-size: clamp(44px, 8vw, 150px); text-transform: uppercase; }
.display--profile { font-size: clamp(40px, 7.2vw, 138px); text-transform: uppercase; max-width: 14ch; }
.display--contact { font-size: clamp(52px, 11vw, 220px); line-height: .84; letter-spacing: -.06em; text-transform: uppercase; }
.display--feature { font-size: clamp(40px, 6.4vw, 120px); line-height: .9; }
.display--split   { font-size: clamp(48px, 7vw, 132px); line-height: .86; letter-spacing: -.055em; }
.display--spec    { font-size: clamp(40px, 6vw, 112px); }
.display--product { font-size: clamp(56px, 9vw, 170px); line-height: .86; letter-spacing: -.055em; text-transform: uppercase; }
.display--card    { font-size: clamp(28px, 2.8vw, 48px); line-height: .95; letter-spacing: -.04em; }
.display--lab     { font-size: clamp(36px, 3.6vw, 60px); line-height: .9; letter-spacing: -.045em; }

.lede    { max-width: 42ch; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.4; letter-spacing: -.01em; text-wrap: pretty; }
.body-xl { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.3; letter-spacing: -.02em; text-wrap: pretty; }
.body-lead { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; letter-spacing: -.02em; text-wrap: pretty; }
.body-lg { font-size: 17px; line-height: 1.4; text-wrap: pretty; }
.body-md { font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.body-sm { font-size: 15px; line-height: 1.45; text-wrap: pretty; }

.measure-30 { max-width: 30ch; }
.measure-34 { max-width: 34ch; }
.measure-36 { max-width: 36ch; }
.measure-44 { max-width: 44ch; }
.measure-52 { max-width: 52ch; }
.measure-56 { max-width: 56ch; }

.u-link { border-bottom: 1px solid currentColor; }

/* Headline lines: each line clips its own text so it can rise into place (see Motion). */
.ln { display: block; overflow: hidden; padding-bottom: .04em; }
.ln > span { display: block; }
.ln--indent    { padding-left: clamp(0px, 18vw, 340px); }
.ln--indent-sm { padding-left: clamp(0px, 14vw, 280px); }

/* ---------------------------------------------------------------- Layout primitives */

.wrap { padding-inline: var(--gutter); }
.section { padding-top: var(--space-section); }
.stack-10 { display: grid; gap: 10px; }
.stack-18 { display: grid; gap: 18px; }

.section-title { margin: var(--space-title-top) 0 clamp(48px, 7vw, 110px); }
.section-title--tight { margin-bottom: clamp(40px, 6vw, 88px); }
.display--profile.section-title { margin-bottom: clamp(48px, 6vw, 96px); }

/* Ruled label bar that opens every section */
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-text);
}
.meta-bar--light { border-top-color: var(--color-text-strong); }
.meta-bar--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 12px 24px;
}
.meta-bar__end { justify-self: end; }

.status { display: inline-flex; align-items: center; gap: 8px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); flex: none; }
.pulse--sm { width: 6px; height: 6px; }

/* Label above value */
.kv { display: grid; gap: 4px; align-content: start; }

/* Label / value rows between hairlines */
.spec-list { display: grid; }
.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 9px 0;
  border-top: 1px solid var(--color-rule);
}
.spec-list > div:last-child { border-bottom: 1px solid var(--color-rule); }
.spec-list dt { color: var(--color-muted); }
.spec-list dd { text-align: right; }

/* Image frames */
.fig { display: grid; gap: 10px; counter-increment: fig; }
.figs { counter-reset: fig; }
.fig__frame {
  overflow: hidden;
  background: var(--placeholder);
  outline: 1px solid var(--color-outline);
  outline-offset: -1px;
}
.fig__frame img { width: 100%; height: 100%; object-fit: cover; }
.fig__frame--16x10 { aspect-ratio: 16 / 10; }
.fig__caption { color: var(--color-muted); }
.fig__caption::before { content: "Fig." counter(fig, upper-alpha) " — "; }
.fig__caption:empty::before { content: "Fig." counter(fig, upper-alpha); }
.fig__meta { display: flex; justify-content: space-between; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--color-text-strong);
  color: var(--color-text-strong);
  font-size: 12px;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(242, 240, 235, .45);
  background: rgba(14, 14, 13, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--color-text-strong);
  cursor: pointer;
  transition: border-color .2s;
}
.chip:hover { border-color: var(--color-accent); }
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-muted); }
.chip[aria-pressed="true"] .chip__dot { background: var(--color-accent); }

/* ---------------------------------------------------------------- Navigation */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  color: var(--color-text-strong);
  background: rgba(14, 14, 13, .55);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(236, 234, 228, .1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav a { color: var(--color-text-strong); }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--color-text-strong);
  font-weight: 500;
  letter-spacing: 0;
}
.nav__section { display: flex; gap: 10px; align-items: center; min-width: 0; }
.nav__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__links { display: flex; gap: 22px; align-items: center; }
.nav__links a:hover { color: var(--color-text-strong); text-decoration: underline; text-underline-offset: 4px; }
.nav__links a[aria-current="true"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--color-accent); }
.nav__clock { white-space: nowrap; }
.nav__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--color-accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

@media (max-width: 819px) {
  .nav__wide { display: none; }
  .nav__links { gap: 14px; }
  .nav__brand > span:last-child { display: none; }
}
@media (max-width: 380px) {
  .nav__section { display: none; }
}

/* ---------------------------------------------------------------- 01 Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 32px;
  padding: 84px var(--gutter) clamp(20px, 3vw, 36px);
  overflow: hidden;
}
.hero__headline { align-self: center; }
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
}
.hero__readout { display: flex; gap: 32px; }
.hero__coords { min-width: 14ch; }
.hero__cross {
  position: absolute;
  background: rgba(236, 234, 228, .14);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.hero__cross--x { top: 0; bottom: 0; left: 0; width: 1px; }
.hero__cross--y { left: 0; right: 0; top: 0; height: 1px; }

@media (hover: hover) and (pointer: fine) {
  .hero { cursor: crosshair; }
  .hero.is-pointer .hero__cross { opacity: 1; }
}

.hero--404 { grid-template-rows: auto 1fr auto; }
.hero--404 .display { align-self: center; }

/* ---------------------------------------------------------------- 02 Selected Work */

.section--work { padding-top: clamp(72px, 10vw, 160px); }

.feature__intro {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-top: clamp(20px, 3vw, 40px);
}
.feature__intro .body-lg { max-width: 38ch; }

/* 01 — full-bleed */
.feature--bleed { position: relative; }
.feature--bleed__media {
  position: relative;
  height: min(110vh, 64vw);
  min-height: 460px;
  overflow: hidden;
  background: var(--placeholder);
  outline: 1px solid var(--color-outline);
  outline-offset: -1px;
}
/* In normal flow (not absolute) so padding set on the frame via Inline style insets the image */
.feature--bleed__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feature--bleed__numeral {
  position: absolute;
  top: 0;
  left: var(--gutter);
  height: min(110vh, 64vw);
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  pointer-events: none;
}
.feature--bleed__numeral span {
  display: block;
  font-weight: 600;
  font-size: clamp(120px, 24vw, 460px);
  line-height: .72;
  letter-spacing: -.07em;
  color: var(--color-text-strong);
  mix-blend-mode: difference;
}
.spec-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px 24px;
  padding-top: 16px;
}
.spec-inline .kv > span:first-child,
.feature--type .kv > span:first-child { color: var(--color-muted); }

/* 02 — split */
.feature--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(24px, 4vw, 64px);
  padding-top: var(--space-feature);
}
.feature--split__copy {
  position: sticky;
  top: 84px;
  align-self: start;
  display: grid;
  gap: 28px;
}
.feature--split__copy .spec-list > div { padding: 10px 0; gap: 16px; }
.feature--split__figs { display: grid; gap: clamp(24px, 3vw, 40px); }
.feature--split__figs .fig:nth-child(3n + 1) .fig__frame { aspect-ratio: 4 / 5; }
.feature--split__figs .fig:nth-child(3n + 2) { margin-left: 18%; }
.feature--split__figs .fig:nth-child(3n + 2) .fig__frame { aspect-ratio: 1 / 1; }
.feature--split__figs .fig:nth-child(3n) .fig__frame { aspect-ratio: 4 / 3; }
@media (max-width: 919px) {
  .feature--split__copy { position: static; }
}

/* 03 — spec grid */
.feature--spec { padding-top: var(--space-feature); }
.spec-grid {
  display: grid;
  gap: 1px;
  background: var(--color-rule-strong);
  border: 1px solid var(--color-rule-strong);
}
.spec-grid > * { background: var(--color-bg); }
.spec-grid__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: clamp(16px, 2vw, 28px);
}
.spec-grid__cells { display: flex; flex-wrap: wrap; gap: 1px; background: var(--color-rule-strong); }
.spec-grid__cell {
  flex: 1 1 220px;
  background: var(--color-bg);
  display: grid;
  gap: 6px;
  padding: 14px clamp(16px, 2vw, 28px);
  transition: background .2s, color .2s;
}
.spec-grid__cell:hover { background: var(--color-text); color: var(--color-bg); }
.spec-grid__figs {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--color-rule-strong);
}
.spec-grid__figs .fig { background: var(--color-bg); padding: clamp(12px, 1.5vw, 20px); flex: 1 1 260px; }
.spec-grid__figs .fig:first-child { flex: 2 1 480px; }
.spec-grid__figs .fig:first-child .fig__frame { aspect-ratio: 16 / 10; }
.spec-grid__figs .fig:not(:first-child) .fig__frame { aspect-ratio: 4 / 3; }
/* Figures B and C stack beside A, like the prototype, when there is room for two columns */
@media (min-width: 760px) {
  .spec-grid__figs { display: grid; grid-template-columns: 2fr 1fr; }
  .spec-grid__figs .fig:first-child { grid-row: span 2; }
  .spec-grid__figs .fig:first-child .fig__frame { aspect-ratio: auto; height: 100%; min-height: 0; }
  .spec-grid__figs .fig:first-child { grid-template-rows: 1fr auto; }
}

/* 04–07 — horizontal product track */
.hscroll {
  position: relative;
  margin-top: var(--space-feature);
  background: var(--color-band);
  color: var(--color-text-strong);
}
.hscroll__pin {
  display: grid;
  /* Equal flexible rows around the track keep it centred in the whole pinned frame,
     with the label bar held at the top and the progress line at the bottom. */
  grid-template-rows: 1fr auto 1fr;
  gap: 32px;
  padding-block: 78px 28px;
}
.hscroll__bar {
  align-self: start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-inline: var(--gutter);
}
.hscroll__count, .hscroll__hint {
  flex: 1;
  padding-top: 12px;
  border-top: 1px solid var(--color-text-strong);
}
.hscroll__hint { text-align: right; }
.hscroll__viewport {
  display: flex;
  min-height: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.hscroll__track {
  flex: none;
  display: flex;
  align-items: center;
  gap: clamp(40px, 6vw, 120px);
  width: max-content;
  padding-inline: var(--gutter);
}
.hscroll__intro { width: min(38vw, 520px); flex: none; display: grid; gap: 20px; scroll-snap-align: start; }
.hcard { flex: none; width: clamp(300px, 58vw, 1040px); display: grid; gap: 16px; scroll-snap-align: start; }
.hcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.hcard__num {
  font-weight: 600;
  font-size: clamp(56px, 6.4vw, 120px);
  line-height: .8;
  letter-spacing: -.06em;
  color: var(--color-accent);
}
.hcard__disc { text-align: right; }
.hcard__media {
  aspect-ratio: 16 / 9;
  max-height: 52vh;
  overflow: hidden;
  background: var(--placeholder);
  outline: 1px solid var(--color-outline);
  outline-offset: -1px;
}
.hcard__media img { width: 100%; height: 100%; object-fit: cover; }
.hcard__title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 240, 235, .2);
}
.hcard__meta { display: grid; gap: 4px; text-align: right; }
.hscroll__progress { align-self: end; margin-inline: var(--gutter); height: 1px; background: rgba(242, 240, 235, .2); }
.hscroll__progress span {
  display: block;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}
@media (max-width: 819px) {
  .hscroll__intro { width: min(78vw, 420px); }
  .hcard { width: min(84vw, 560px); }
  .hscroll__hint { display: none; }
}

/* 08 — typographic */
.feature--type { position: relative; overflow: hidden; padding-top: clamp(100px, 14vw, 200px); }
.feature--type__word {
  margin-top: clamp(24px, 4vw, 56px);
  font-weight: 700;
  font-size: clamp(120px, 33vw, 640px);
  line-height: .76;
  letter-spacing: -.075em;
  text-transform: uppercase;
  text-align: center;
  user-select: none;
}
.feature--type__figs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(28px, 4vw, 56px);
}
.feature--type__figs .fig:first-child {
  grid-column: span 2;
  grid-row: span 2;
  grid-template-rows: 1fr auto;
}
.feature--type__figs .fig:first-child .fig__frame { height: 100%; min-height: 240px; }
.feature--type__figs .fig:not(:first-child) .fig__frame { aspect-ratio: 8 / 5; }
.feature--type__foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px 24px;
  margin-top: clamp(20px, 3vw, 36px);
  align-items: start;
}
@media (max-width: 819px) {
  .feature--type__figs { grid-template-columns: minmax(0, 1fr); }
  .feature--type__figs .fig:first-child { grid-column: auto; grid-row: auto; }
  .feature--type__figs .fig:first-child .fig__frame { height: auto; aspect-ratio: 3 / 2; }
}

/* ---------------------------------------------------------------- 03 Work Index */

.index__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin: var(--space-title-top) 0 clamp(32px, 4vw, 56px);
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--color-text);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.filter:hover { border-color: var(--color-accent); }
.filter[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); }
.filter__count { opacity: .55; }

/* Shared column sizing for the header and every row */
.index__cols, .index__row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 12px;
}
.c-num  { width: 4ch; flex: none; }
.c-name { flex: 1 1 200px; min-width: 0; }
.c-disc { flex: 1 1 200px; min-width: 0; }
.c-role { flex: 0 1 200px; min-width: 0; }
.c-year { width: 7ch; flex: none; text-align: right; }
.c-sign { width: 2ch; flex: none; text-align: right; }

.index__cols { border-bottom: 1px solid var(--color-text); }

.index__item { border-bottom: 1px solid var(--color-rule); }
.index__item[hidden] { display: none; }
.index__row {
  width: 100%;
  padding-block: 14px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  transition: background .2s, color .2s, padding .3s;
}
.index__row .c-name { font-weight: 500; font-size: clamp(20px, 2vw, 30px); letter-spacing: -.025em; line-height: 1.1; }
.index__row .c-disc, .index__row .c-role { opacity: .7; }
.index__row .c-sign { font-family: var(--font-mono); font-size: 18px; line-height: 1; color: var(--color-accent); }
.index__row .c-sign::before { content: "+"; }
.index__row[aria-expanded="true"] .c-sign::before { content: "−"; }
.index__row:hover,
.index__row:focus-visible { background: var(--color-text); color: var(--color-bg); padding-left: 24px; }
.index__row:focus-visible { outline-offset: -2px; }
.index__row:hover .c-sign,
.index__row:focus-visible .c-sign { color: inherit; }

.index__panel {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 3.2vw, 48px) 12px clamp(36px, 4vw, 64px);
  border-top: 1px solid var(--color-rule);
}
.index__panel[hidden] { display: none; }
.index__aside { flex: 0 1 260px; display: grid; align-content: space-between; gap: 24px; }
.index__aside-foot { display: flex; justify-content: space-between; gap: 12px; }
.index__aside-top { display: grid; gap: 18px; }
.index__about { display: grid; gap: 12px; justify-items: start; }
.index__link {
  display: inline-flex;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  color: var(--color-text);
}

.strip {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin;
}
/* Media strip tiles: a fixed-height frame with a numbered caption beneath ("Fig.01 — …") */
.strip { counter-reset: tile; }
.tile {
  flex: none;
  display: grid;
  gap: 10px;
  align-content: start;
  scroll-snap-align: start;
  counter-increment: tile;
}
/* Tile sizing: frames share one height (87.5% of the viewport, 350–900px), and each tile's locked
   aspect ratio sets its width. On narrow screens a tile is also capped to the screen width, which
   shrinks its height instead of breaking the ratio. */
.tile__frame {
  --ar: 1.7778;
  --tile-h: clamp(350px, 87.5vh, 900px);
  --tile-max-w: calc(100vw - 2 * var(--gutter) - 24px);
  position: relative;
  --tile-scale: 1;
  height: calc(min(var(--tile-h), var(--tile-max-w) / var(--ar)) * var(--tile-scale));
  aspect-ratio: var(--ar);
  overflow: hidden;
  background: var(--placeholder);
  outline: 1px solid var(--color-outline);
  outline-offset: -1px;
}
@media (max-width: 819px) {
  .tile__frame { --tile-h: clamp(300px, 69vh, 700px); }
}
/* The project cover (first tile) is half size, top-aligned with the rest of the strip */
.tile--cover .tile__frame { --tile-scale: .5; }
/* Tile shapes (Media brick → Aspect ratio) */
.ar-21-9 .tile__frame { --ar: 2.3333; }
.ar-16-9 .tile__frame { --ar: 1.7778; }
.ar-3-2  .tile__frame { --ar: 1.5; }
.ar-4-3  .tile__frame { --ar: 1.3333; }
.ar-5-4  .tile__frame { --ar: 1.25; }
.ar-1-1  .tile__frame { --ar: 1; }
.ar-4-5  .tile__frame { --ar: .8; }
.ar-3-4  .tile__frame { --ar: .75; }
.ar-2-3  .tile__frame { --ar: .6667; }
.ar-9-16 .tile__frame { --ar: .5625; }
.ar-9-21 .tile__frame { --ar: .4286; }
.tile__frame img, .tile__frame video, .tile__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.tile--video .tile__frame { background: #000; outline: 0; }
.tile__controls { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }

/* Browser mockup: window bar + a scrolling full-page screenshot, optional phone view */
.browser { display: flex; flex-direction: column; background: var(--color-band); }
.browser__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-band);
}
.browser__dots { display: flex; gap: 6px; flex: none; }
.browser__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(236, 234, 228, .22); }
.browser__address {
  flex: 1;
  min-width: 0;
  max-width: 60%;
  margin-inline: auto;
  padding: 4px 10px;
  overflow: hidden;
  border: 1px solid var(--color-rule);
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 10px;
  letter-spacing: .04em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}
.browser__address:empty { visibility: hidden; }
.browser__views { display: flex; flex: none; border: 1px solid var(--color-rule); }
.browser__views button {
  padding: 3px 8px;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: 10px;
  cursor: pointer;
}
.browser__views button[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); }
.browser__screen, .phone__screen {
  overflow-y: auto;
  overscroll-behavior-y: auto;   /* at the end of the screenshot, keep scrolling the page */
  scrollbar-width: thin;
  background: #fff;
}
.browser__screen { flex: 1; min-height: 0; }
.browser__screen:focus-visible, .phone__screen:focus-visible { outline-offset: -2px; }
.tile__frame .browser__screen img,
.tile__frame .phone__screen img { width: 100%; height: auto; object-fit: initial; }
.browser__phone {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--placeholder);
}
.browser__phone[hidden], .browser__screen[hidden] { display: none; }
.phone {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border: 6px solid #2A2A28;
  border-radius: 28px;
  background: #000;
}
.phone__screen { height: 100%; scrollbar-width: none; }
.browser__hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  background: rgba(14, 14, 13, .72);
  color: var(--color-text-strong);
  font-size: 10px;
  pointer-events: none;
  transition: opacity .3s;
}
.tile--browser.is-scrolled .browser__hint { opacity: 0; }

/* Caption never widens the tile beyond its frame */
.tile__caption { width: 0; min-width: 100%; color: var(--color-muted); }
.tile__caption::before { content: "Fig." counter(tile, decimal-leading-zero) " — "; }
.tile__caption:empty::before { content: "Fig." counter(tile, decimal-leading-zero); }

/* YouTube / Vimeo: poster + play button until clicked, then the player */
.tile__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--placeholder) center / cover no-repeat;
  color: var(--color-text-strong);
  cursor: pointer;
}
.tile__play::after { content: ""; position: absolute; inset: 0; background: rgba(14, 14, 13, .25); transition: background .2s; }
.tile__play:hover::after { background: rgba(14, 14, 13, .05); }
.tile__play > * { position: relative; z-index: 1; }
.tile__play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-accent);
  display: grid;
  place-items: center;
  transition: transform .3s var(--ease);
}
.tile__play-icon::before {
  content: "";
  margin-left: 5px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--color-bg);
}
.tile__play:hover .tile__play-icon { transform: scale(1.08); }
.tile__play[hidden] { display: none; }
.tile__play:disabled { cursor: default; }

/* Hover preview that trails the pointer (fine pointers only; purely decorative) */
.preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 240px;
  display: grid;
  gap: 8px;
  padding: 8px;
  background: var(--color-band);
  color: var(--color-text-strong);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.preview.is-on { opacity: 1; }
.preview__img { aspect-ratio: 1 / 1; background: var(--placeholder) center / cover no-repeat; }
.preview__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
@media not ((hover: hover) and (pointer: fine)) { .preview { display: none; } }

@media (max-width: 819px) {
  .index__cols .c-role, .index__row .c-role { display: none; }
  .index__cols .c-disc { display: none; }
  .index__row { flex-wrap: wrap; row-gap: 4px; }
  .index__row .c-name { flex: 1 1 calc(100% - 4ch - 9ch - 2ch - 48px); order: 1; }
  .index__row .c-num { order: 0; }
  .index__row .c-year { order: 2; }
  .index__row .c-sign { order: 3; }
  .index__row .c-disc { order: 4; flex-basis: 100%; padding-left: calc(4ch + 16px); }
}

/* ---------------------------------------------------------------- 04 Profile */

.profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.profile__portrait { display: grid; gap: 10px; max-width: 520px; }
.profile__portrait .fig__frame { aspect-ratio: 4 / 5; }
.profile__copy { display: grid; gap: 32px; }
.overlap { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--color-text); }
.overlap__line { font-weight: 500; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--color-rule);
  border: 1px solid var(--color-rule);
}
.facts > div { flex: 1 1 150px; display: grid; gap: 6px; align-content: start; padding: 12px; background: var(--color-bg); }
.facts dt { color: var(--color-muted); }

/* ---------------------------------------------------------------- 05 Experience */

.section--band {
  margin-top: var(--space-section);
  padding-block: clamp(80px, 10vw, 150px);
  background: var(--color-band);
  color: var(--color-text-strong);
}
.timeline__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 32px;
  padding: clamp(18px, 2vw, 28px) 0;
  border-top: 1px solid var(--color-band-rule);
  transition: padding .35s var(--ease), border-color .35s;
}
.timeline__item:hover { padding-left: 16px; border-top-color: var(--color-accent); }
.timeline__years { flex: 0 0 13ch; font-size: 12px; }
.timeline__co {
  flex: 1 1 420px;
  font-weight: 600;
  font-size: clamp(28px, 4.6vw, 84px);
  line-height: .92;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.timeline__role { flex: 0 1 300px; display: grid; gap: 4px; }
.timeline__role > span:first-child { font-size: 17px; letter-spacing: -.01em; }
.clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--color-band-rule);
}
.clients .btn { justify-self: start; align-self: start; }

/* ---------------------------------------------------------------- 06 Lab */

.lab__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin: var(--space-title-top) 0 clamp(40px, 5vw, 72px);
}
.lab {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1px;
  background: var(--color-rule-strong);
  border: 1px solid var(--color-rule-strong);
}
.lab__card { display: grid; gap: 18px; align-content: start; padding: clamp(16px, 1.6vw, 24px); background: var(--color-bg); }
.lab__top { display: flex; justify-content: space-between; gap: 12px; }
.lab__top .status { gap: 6px; }

/* ---------------------------------------------------------------- 07 Approach */

.approach { position: relative; margin-top: clamp(80px, 10vw, 160px); }
.approach__pin {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding-block: 84px clamp(20px, 3vw, 36px);
}
.approach__lines {
  align-self: center;
  display: grid;
  gap: clamp(4px, 1vw, 12px);
  padding-block: 48px;
  font-weight: 600;
  font-size: clamp(34px, 6.2vw, 118px);
  line-height: .95;
  letter-spacing: -.05em;
}
.approach__lines span { display: block; transition: color .5s; }
.approach__foot { display: grid; gap: 20px; }
.steps { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.steps li { transition: color .5s; }
.steps li + li::before { content: "→"; color: var(--color-step); margin-right: 8px; }
.approach__track { height: 2px; background: rgba(236, 234, 228, .12); }
.approach__track span {
  display: block;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(var(--p, 1));
  transform-origin: 0 50%;
}

/* ---------------------------------------------------------------- 08 Contact */

.contact {
  overflow: hidden;
  padding-top: clamp(90px, 12vw, 180px);
  background: var(--color-band);
  color: var(--color-text-strong);
}
.contact a { color: var(--color-text-strong); }
.display--contact { margin: clamp(32px, 5vw, 72px) 0 clamp(40px, 6vw, 88px); }
.contact__email {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-text-strong);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 64px);
  letter-spacing: -.035em;
  transition: color .2s, border-color .2s;
}
.contact .contact__email:hover { color: var(--color-accent); border-color: var(--color-accent); }
.contact__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1px;
  margin-top: clamp(56px, 8vw, 120px);
  background: var(--color-band-rule);
  border-block: 1px solid var(--color-band-rule);
  font-size: 12px;
}
.contact__links a, .contact__static {
  display: flex;
  justify-content: space-between;
  padding: 18px 14px;
  background: var(--color-band);
  transition: background .2s, color .2s;
}
.contact .contact__links a:hover { background: var(--color-text); color: var(--color-bg); }
.contact__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 12px 24px;
  padding: 18px 0;
}
.contact__top { justify-self: end; }
.contact__wordmark {
  margin: 0 -.02em -.05em;
  font-weight: 700;
  font-size: 15.6vw;
  line-height: .74;
  letter-spacing: -.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==========================================================================
   Motion — only when JS runs and the visitor hasn't asked for reduced motion.
   JS adds .is-in to a revealed element; CSS does the rest.
   ========================================================================== */

.motion [data-reveal] .ln > span,
.motion [data-lines].is-split .ln > span {
  transform: translateY(110%);
  transition: transform 1.25s var(--ease) calc(var(--d, 0) * 90ms);
}
.motion [data-reveal].is-in .ln > span,
.motion [data-lines].is-split.is-in .ln > span { transform: none; }

.motion [data-mask] {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease);
}
.motion [data-mask] > img,
.motion [data-mask] > * { transform: scale(1.14); transition: transform 1.9s var(--ease); }
.motion [data-mask].is-in { clip-path: inset(0 0 0 0); }
.motion [data-mask].is-in > img,
.motion [data-mask].is-in > * { transform: none; }

.motion [data-fade] { opacity: 0; transition: opacity 1s ease calc(var(--d, 0) * 90ms); }
.motion [data-fade].is-in { opacity: 1; }

.motion [data-scramble] { opacity: 0; }
.motion [data-scramble].is-in { opacity: 1; }

.motion .pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.motion [data-parallax] { will-change: transform; }

/* Pinned horizontal track: tall wrapper, sticky viewport, JS translates the track. */
.motion .hscroll { height: 420vh; }
.motion .hscroll__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.motion .hscroll__viewport { overflow: visible; scroll-snap-type: none; }
.motion .hscroll__track { will-change: transform; }

/* Pinned Approach: statements and steps light as you scroll. */
.motion .approach { height: 320vh; }
.motion .approach__pin { position: sticky; top: 0; height: 100vh; height: 100svh; }
.motion .approach__lines { padding-block: 0; }
.motion [data-appr] { color: var(--color-faint); }
.motion [data-appr].is-lit { color: var(--color-text); }
.motion [data-step] { color: var(--color-step); }
.motion [data-step].is-lit { color: var(--color-text); }
.motion .approach__track span { transform: scaleX(var(--p, 0)); }

/* Index panel opening */
.motion .index__panel.is-opening { animation: panel-in .5s var(--ease); }
.motion .index__panel.is-opening .tile { animation: tile-in .9s var(--ease) backwards; }
.motion .index__panel.is-opening .tile:nth-child(2) { animation-delay: 130ms; }
.motion .index__panel.is-opening .tile:nth-child(3) { animation-delay: 200ms; }
.motion .index__panel.is-opening .tile:nth-child(4) { animation-delay: 270ms; }
.motion .index__panel.is-opening .tile:nth-child(n + 5) { animation-delay: 340ms; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes tile-in { from { opacity: 0; transform: translateX(60px); } }

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

/* A section heading that sits in a meta bar and keeps its label styling */
.meta-bar__heading { font: inherit; letter-spacing: inherit; text-transform: inherit; }

/* Feature figure crop anchor — set per image in Work → Feature figures → Image alignment */
img.crop-top    { object-position: 50% 0; }
img.crop-center { object-position: 50% 50%; }
img.crop-bottom { object-position: 50% 100%; }

/* Spec grid with a single figure: let it span the full width */
.spec-grid__figs .fig:only-child { grid-column: 1 / -1; grid-row: auto; }
.spec-grid__figs .fig:only-child .fig__frame { aspect-ratio: 16 / 9; height: auto; }

/* Feature titles link down to their Work Index row */
.feature-link { color: inherit; }
.feature-link[data-lines] { display: block; }
.feature-link:hover { color: var(--color-accent); }

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

/* Image Fit (Work → "Fit"): show the whole image, never cropped, floating inside its frame with padding
   on a solid band. Frame style (inline) can still override padding/background. Kept last so it wins
   over the per-component "cover" rules of equal specificity. */
.is-fit {
  padding: clamp(12px, 6%, 72px);
  background: var(--color-band);
}
.is-fit > img { object-fit: contain; }

/* ---- Image size: the image's own dimensions ------------------------------------------------
   Media tiles / cover:  ar-original — tile height as usual, width follows the image (no crop)
                         ar-natural  — real pixel size, capped to the tile height and screen width
   Feature figures:      size-original — the layout's width, the image's own height (overrides the
                                         layout's designed shape); size-natural — real pixel size,
                                         capped to the layout width. */
/* --ar is set tiny so the shared width cap doesn't shorten the tile; the img's max-width caps width instead */
.ar-original .tile__frame { --ar: .1; aspect-ratio: auto; width: max-content; min-width: 24px; }
.ar-original .tile__frame img {
  width: auto;
  height: 100%;
  max-width: var(--tile-max-w);
  object-fit: contain;
}
.ar-natural .tile__frame {
  height: auto;
  aspect-ratio: auto;
  width: max-content;
  min-width: 24px;
  min-height: 24px;
}
.ar-natural .tile__frame img {
  width: auto;
  height: auto;
  max-width: var(--tile-max-w);
  max-height: var(--tile-h);
}

.size-original,
.size-natural {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
}
.size-original > img { width: 100%; height: auto !important; }
.size-natural > img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  margin-inline: auto;
}
