/* =========================================================
   Ayush Kumar · portfolio
   ========================================================= */

:root {
  --ink: #0b0b0a;
  --ink-2: #131311;
  --ink-3: #1c1c19;
  --paper: #efeae2;
  --paper-2: #e4ded3;
  --muted: #8f8a80;
  --muted-2: #5f5b54;
  --line: rgba(239, 234, 226, 0.12);
  --line-ink: rgba(11, 11, 10, 0.14);
  --accent: #ff5a1f;
  --accent-soft: #ffb37a;

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(16px, 3.2vw, 48px);
  --nav-h: 72px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-style: normal; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.serif {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.idx { color: var(--accent); margin-right: 0.4em; }

.display {
  font-size: clamp(2.4rem, 6.4vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.display .serif { letter-spacing: -0.02em; font-size: 1.06em; }

.section {
  position: relative;
  padding: clamp(96px, 14vw, 200px) var(--gutter);
}

.section__label {
  color: var(--muted);
  margin-bottom: clamp(28px, 4vw, 56px);
  display: flex;
  align-items: center;
  gap: 0.2em;
}

.link {
  position: relative;
  display: inline-block;
}
.link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.link:hover::after { transform: scaleX(0); }

/* ---------- Grain + cursor ---------- */

.grain {
  pointer-events: none;
  position: fixed;
  inset: -50%;
  z-index: 90;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 4%); }
  40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 7%); }
  80% { transform: translate(6%, 2%); }
  100% { transform: translate(0, 0); }
}

.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  html.js .cursor {
    display: grid;
    place-items: center;
    position: fixed;
    top: 0; left: 0;
    width: 12px; height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--paper);
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 100;
    transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), background 0.3s;
  }
  html.js .cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  html.js .cursor.is-label {
    width: 92px; height: 92px; margin: -46px 0 0 -46px;
    background: var(--accent);
    mix-blend-mode: normal;
  }
  .cursor__label {
    font-family: var(--f-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    opacity: 0;
    transition: opacity 0.2s;
  }
  .cursor.is-label .cursor__label { opacity: 1; }
}

/* ---------- Loader ---------- */

.loader { display: none; }
html.js .loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.loader__stream {
  position: absolute;
  top: var(--gutter); left: var(--gutter); right: var(--gutter);
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted-2);
  height: 60vh;
  overflow: hidden;
  white-space: pre;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%);
  mask-image: linear-gradient(to bottom, transparent, #000 40%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.loader__stream .hl { color: var(--accent); }
.loader__count {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) - 0.12em);
  font-size: clamp(5rem, 22vw, 20rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}
.loader__count small {
  font-size: 0.16em;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 0.3em;
  vertical-align: top;
}
.loader__label {
  position: absolute;
  left: var(--gutter);
  bottom: var(--gutter);
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 24px;
  mix-blend-mode: difference;
  color: #fff;
}
.nav__logo { display: flex; align-items: center; gap: 12px; }
.nav__mark {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
}
.nav__name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.nav__status {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3dff8a;
  box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(61, 255, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0); }
}
.nav__links { display: flex; justify-content: flex-end; gap: 28px; font-size: 14px; }
.nav__links a { position: relative; overflow: hidden; display: inline-block; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__time { min-width: 72px; text-align: right; }
.nav__burger { display: none; }

/* Mobile menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--accent);
  color: var(--ink);
  padding: calc(var(--nav-h) + 24px) var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease-in-out), visibility 0s 0.8s;
}
.menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.8s var(--ease-in-out), visibility 0s;
}
.menu__links { display: flex; flex-direction: column; gap: 4px; }
.menu__links a {
  font-size: clamp(3rem, 15vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.menu__links .mono { font-size: 12px; letter-spacing: 0.04em; }
.menu__foot { display: flex; flex-direction: column; gap: 10px; }

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

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  padding: var(--nav-h) var(--gutter) 0;
  overflow: hidden;
}

.hero__name {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-weight: 500;
  font-size: clamp(5rem, 19.5vw, 24rem);
  line-height: 0.8;
  letter-spacing: -0.065em;
}
.hero__line { position: absolute; display: block; white-space: nowrap; }
.hero__line--1 {
  top: calc(var(--nav-h) + 3vh);
  left: calc(var(--gutter) - 0.04em);
  z-index: 1;
}
.hero__line--2 {
  bottom: 4vh;
  left: calc(var(--gutter) - 0.02em);
  z-index: 3;
  color: var(--paper);
  font-size: 0.86em;
}
.hero__line--2 .serif {
  font-size: 1.14em;
  letter-spacing: -0.035em;
  padding-right: 0.06em;
}

.hero__portrait {
  position: absolute;
  left: 60%;
  bottom: 0;
  height: min(85svh, 60vw);
  aspect-ratio: 1200 / 1188;
  transform: translateX(-50%);
  z-index: 2;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
}
.hero__img, .hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 100%;
}
.hero__img { filter: grayscale(1) sepia(0.2) contrast(1.18) brightness(0.92); }
.hero__canvas { opacity: 0; }
.hero__portrait.is-live .hero__canvas { opacity: 1; }
.hero__portrait.is-live .hero__img { opacity: 0; }
.hero__hint {
  position: absolute;
  left: 50%;
  top: 4%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.6s;
}
.hero__portrait.is-live .hero__hint { opacity: 0.8; }
.hero__portrait.is-lens .hero__hint { opacity: 0; }

.hero__meta {
  position: absolute;
  right: var(--gutter);
  top: calc(var(--nav-h) + 4vh);
  text-align: right;
  z-index: 3;
  color: var(--paper);
  line-height: 1.9;
}
.hero__now { color: var(--muted); margin-top: 10px; }

.hero__intro {
  position: absolute;
  left: var(--gutter);
  top: calc(var(--nav-h) + 3vh + 17.5vw);
  max-width: min(28vw, 32ch);
  z-index: 3;
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.hero__intro .serif { font-size: 1.18em; color: var(--accent); }

.hero__foot {
  position: absolute;
  right: var(--gutter);
  bottom: 22px;
  z-index: 3;
  color: var(--muted);
}
.hero__scroll { display: inline-flex; align-items: center; gap: 12px; }
.hero__scroll i {
  position: relative;
  width: 1px; height: 28px;
  background: var(--line);
  overflow: hidden;
}
.hero__scroll i::after {
  content: "";
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--paper);
  animation: drip 1.8s var(--ease-in-out) infinite;
}
@keyframes drip { to { top: 100%; } }

/* ---------- Latent scene ---------- */

.latent { position: relative; height: 420vh; background: var(--ink); }
.latent__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.latent__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.latent__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(11, 11, 10, 0.85) 100%),
    linear-gradient(to bottom, var(--ink), transparent 14%, transparent 86%, var(--ink));
}
.latent__hud {
  position: absolute;
  top: calc(var(--nav-h) + 8px);
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.latent__caps {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(32px, 9vh, 96px);
  width: min(40rem, calc(100% - 2 * var(--gutter)));
  height: 9.5em;
  font-size: clamp(1.8rem, 3.6vw, 3.4rem);
}
.latent__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}
.latent__cap.is-active { opacity: 1; transform: none; }
.latent__cap .mono { display: block; color: var(--muted); margin-bottom: 14px; font-size: 12px; }
.latent__cap p {
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.latent__cap .serif { color: var(--accent); font-size: 1.08em; }
html:not(.js) .latent { height: auto; }
html:not(.js) .latent__sticky { position: relative; height: auto; padding: 120px var(--gutter); }
html:not(.js) .latent__canvas, html:not(.js) .latent__hud, html:not(.js) .latent__vignette { display: none; }
html:not(.js) .latent__caps { position: static; height: auto; width: auto; }
html:not(.js) .latent__cap { position: static; opacity: 1; transform: none; margin-bottom: 40px; }

/* ---------- About ---------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  grid-template-areas: "lede facts";
  column-gap: clamp(32px, 6vw, 120px);
  row-gap: 48px;
  align-items: end;
}
.about__lede {
  grid-area: lede;
  font-size: clamp(1.6rem, 3.3vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 450;
}
.about__lede .w { transition: color 0.2s; }
.about__facts { grid-area: facts; border-top: 1px solid var(--line); }
.about__facts li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-transform: none;
  font-size: 13px;
  letter-spacing: 0;
}
.about__facts li span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; padding-top: 2px; }

/* ---------- Stats ---------- */

.stats { padding-top: 0; padding-bottom: clamp(48px, 7vw, 110px); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.stat {
  padding: 36px 24px 8px 0;
  border-right: 1px solid var(--line);
  padding-left: 24px;
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat__num {
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.stat__num .unit, .stat__num .cur { color: var(--accent); }
.stat__num .cur { font-family: var(--f-serif); font-style: italic; font-weight: 400; margin-right: 0.04em; }
.stat__num .arrow { color: var(--accent); font-size: 0.6em; margin: 0 0.15em; align-self: center; }
.stat p { color: var(--muted); font-size: 14px; max-width: 28ch; line-height: 1.45; }

/* ---------- The loop ---------- */

.loop { background: var(--ink); padding-bottom: clamp(60px, 8vw, 120px); }
.loop__head { max-width: 1100px; margin-bottom: clamp(40px, 7vw, 100px); }
.loop__head .display { margin-bottom: 32px; }
.loop__sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  max-width: 62ch;
}

.loop__body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: start;
}
.loop__visual {
  position: sticky;
  top: calc(var(--nav-h) + 4vh);
  height: calc(100svh - var(--nav-h) - 8vh);
  display: grid;
  place-items: center;
}
.loop__svg {
  width: min(100%, 72svh);
  height: auto;
  overflow: visible;
}
.loop__track { fill: none; stroke: var(--line); stroke-width: 1.2; }
.loop__ticks { fill: none; stroke: rgba(239, 234, 226, 0.18); stroke-width: 6; stroke-dasharray: 1 11.5; }
.loop__arc {
  fill: none;
  stroke: url(#arcGrad);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.loop__runner { fill: var(--accent); filter: drop-shadow(0 0 10px rgba(255, 90, 31, 0.9)); }
.loop__node circle.ring { fill: var(--ink); stroke: rgba(239, 234, 226, 0.3); stroke-width: 1.2; transition: stroke 0.4s, fill 0.4s; }
.loop__node circle.core { fill: rgba(239, 234, 226, 0.3); transition: fill 0.4s, r 0.4s; }
.loop__node text {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--muted);
  transition: fill 0.4s;
}
.loop__node.is-done circle.ring { stroke: var(--accent); }
.loop__node.is-done circle.core { fill: var(--accent); }
.loop__node.is-active circle.ring { fill: var(--accent); stroke: var(--accent); }
.loop__node.is-active circle.core { fill: var(--ink); }
.loop__node.is-active text { fill: var(--paper); }

.loop__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.loop__center-label, .loop__center-sub { color: var(--muted); font-size: 10.5px; }
.loop__acc {
  font-size: clamp(4rem, 9vw, 8.5rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  margin: 8px 0 6px;
}
.loop__acc small { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--accent); font-size: 0.5em; letter-spacing: 0; margin-left: 0.04em; }

.loop__steps { padding: 18vh 0 28vh; }
.step {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.22;
  transition: opacity 0.6s var(--ease);
}
.step.is-active { opacity: 1; }
.step__n { color: var(--accent); margin-bottom: 18px; }
.step h3 {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 20px;
}
.step p { color: #bdb7ad; font-size: clamp(1rem, 1.2vw, 1.15rem); max-width: 48ch; }

/* ---------- Case studies: shared ---------- */

.case__head { max-width: 1100px; margin-bottom: clamp(40px, 6vw, 90px); }
.case__head .display { margin-bottom: 32px; }
.case__sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  max-width: 62ch;
}
.case__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  margin-top: clamp(56px, 8vw, 120px);
}
.case__metrics div { padding: 24px 20px 0 0; }
.case__metrics b {
  display: block;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.case__metrics span { color: var(--muted); font-size: 13px; display: block; max-width: 24ch; }
.case__links { display: flex; gap: 28px; font-weight: 500; margin-top: 32px; }

/* Sheets: each case slides over the last with a rounded top */
.research, .maps {
  border-radius: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 0 0;
  position: relative;
  z-index: 1;
}

/* ---------- Case 02: war room ---------- */

.war { background: var(--ink); padding-top: clamp(40px, 6vw, 90px); }
.war::before {
  content: "";
  position: absolute;
  top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px;
  background: var(--line);
}

.sprint { margin-bottom: clamp(72px, 10vw, 160px); }
.sprint__top { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 14px; }
.sprint__top b { color: var(--paper); font-weight: 500; font-variant-numeric: tabular-nums; }
.sprint__bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.sprint__bar li {
  height: clamp(36px, 5vw, 64px);
  border-radius: 4px;
  background: var(--ink-3);
  position: relative;
  overflow: hidden;
}
.sprint__bar li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--accent), var(--accent-soft));
  transform: scaleY(var(--fill, 0));
  transform-origin: bottom;
}
html:not(.js) .sprint__bar li { --fill: 1; }
.sprint__mods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sprint__mods li {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 12px;
  font-size: 11px;
  color: var(--muted-2);
  transition: color 0.4s, border-color 0.4s, background 0.4s;
}
.sprint__mods li.is-on { color: var(--paper); border-color: rgba(239, 234, 226, 0.4); }
.sprint__mods li.is-on:last-child { background: var(--accent); border-color: var(--accent); color: var(--ink); }
html:not(.js) .sprint__mods li { color: var(--paper); }

.war__room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: center;
}
.war__copy h3 {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 20px;
}
.war__copy h3 .serif { color: var(--accent); }
.war__copy > p { color: #bdb7ad; font-size: clamp(1rem, 1.2vw, 1.15rem); max-width: 48ch; }
.war__count { margin-top: clamp(32px, 4vw, 56px); padding-top: 20px; border-top: 1px solid var(--line); }
.war__num {
  font-size: clamp(4rem, 9vw, 8.5rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.war__count p { color: var(--muted); margin-top: 10px; }

.term {
  background: #0f0f0d;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(255, 90, 31, 0.18);
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); border: 1px solid var(--line); }
.term__bar span { margin-left: 10px; font-size: 11px; }
.term__lines {
  padding: 20px 18px 8px;
  font-family: var(--f-mono);
  font-size: clamp(11px, 0.95vw, 13px);
  line-height: 1.5;
  min-height: 22em;
}
.term__lines li {
  display: grid;
  grid-template-columns: 3.6em 4.6em minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
  color: #cfc9be;
  opacity: 0.14;
  transition: opacity 0.4s;
}
.term__lines li.is-on { opacity: 1; }
html:not(.js) .term__lines li { opacity: 1; }
.term__lines time { color: var(--muted-2); }
.term__lines b { font-weight: 500; color: var(--muted); text-transform: uppercase; font-size: 0.85em; letter-spacing: 0.06em; padding-top: 0.1em; }
.term__lines b.t-alert { color: var(--accent); }
.term__lines b.t-wait { color: #ffcf5a; }
.term__lines b.t-ok { color: #3dff8a; }
.term figcaption { padding: 12px 18px 16px; color: var(--muted-2); font-size: 10px; }

/* ---------- Case 03: research (light) ---------- */

.research { background: var(--paper); color: var(--ink); }
.research .section__label { color: var(--muted-2); }
.research .display .serif { color: var(--accent); }
.research .case__sub { color: #4a4740; }
.research .case__metrics { border-color: var(--line-ink); }
.research .case__metrics span { color: var(--muted-2); }

.am {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin: 0 0 clamp(64px, 9vw, 140px);
}
.am__node small { display: block; color: var(--muted-2); margin-bottom: 10px; }
.am__node span {
  display: inline-block;
  padding: 0.2em 0.35em 0.24em;
  border-radius: 8px;
  font-size: clamp(1.25rem, 2.2vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.am__node--claim span { background: rgba(255, 90, 31, 0.16); box-shadow: inset 0 -2px 0 var(--accent); }
.am__node--premise span { background: rgba(11, 11, 10, 0.06); box-shadow: inset 0 -2px 0 var(--ink); }
.am__rel { display: grid; justify-items: center; gap: 4px; padding-bottom: 0.7em; color: var(--accent); }
.am__rel svg { width: clamp(64px, 8vw, 120px); height: 18px; overflow: visible; }
.am__rel path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.am__rel .mono { font-size: 10.5px; }

.research__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: start;
}
.phases { border-top: 1px solid var(--line-ink); }
.phase { padding: 28px 0; border-bottom: 1px solid var(--line-ink); }
.phase h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 12px; }
.phase h3 .serif { color: var(--accent); }
.phase p { color: #3b3833; max-width: 52ch; }

.ladder {
  --lab: 11em;
  --lgap: 14px;
  position: sticky;
  top: calc(var(--nav-h) + 4vh);
  background: #e7e1d6;
  border-radius: 16px;
  padding: clamp(20px, 2.4vw, 32px);
}
.ladder__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.ladder__head figcaption .mono { display: block; color: var(--muted-2); margin-bottom: 6px; }
.ladder__head figcaption b { font-weight: 500; font-size: 1.15rem; letter-spacing: -0.02em; }
.ladder__tabs { display: flex; gap: 4px; background: rgba(11, 11, 10, 0.06); border-radius: 100px; padding: 4px; }
.ladder__tabs button { padding: 8px 12px; border-radius: 100px; font-size: 11px; color: var(--muted-2); transition: background 0.3s, color 0.3s; }
.ladder__tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ladder__plot { position: relative; padding-top: 22px; }
.ladder__rows { position: relative; z-index: 1; }
.ladder__row {
  display: grid;
  grid-template-columns: var(--lab) minmax(0, 1fr);
  align-items: center;
  gap: 4px var(--lgap);
  padding: 5px 0;
  cursor: default;
}
.ladder__label { font-size: 13px; color: #3b3833; line-height: 1.2; }
.ladder__track { position: relative; height: 26px; }
.ladder__bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: calc(var(--w, 0) * 100%);
  background: rgba(11, 11, 10, 0.26);
  border-radius: 0 4px 4px 0;
  transition: width 1.1s var(--ease), background 0.3s;
}
.ladder__row.is-best .ladder__bar { background: var(--accent); }
.ladder__row:hover .ladder__bar { background: rgba(11, 11, 10, 0.5); }
.ladder__row.is-best:hover .ladder__bar { background: #e64a12; }
.ladder__val {
  position: absolute;
  top: 50%;
  left: calc(var(--w, 0) * 100% + 8px);
  transform: translateY(-50%);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  background: #e7e1d6;
  padding: 1px 4px;
  margin-left: -4px;
  transition: left 1.1s var(--ease);
}
.ladder__ref {
  position: absolute;
  top: 0; bottom: 0;
  /* plot area starts after the label column */
  left: calc(var(--lab) + var(--lgap) + (100% - var(--lab) - var(--lgap)) * var(--x, 0));
  border-left: 1.5px dashed rgba(11, 11, 10, 0.45);
  transition: left 1.1s var(--ease);
  pointer-events: none;
}
.ladder__ref span { position: absolute; top: 0; left: 6px; font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.ladder__ref[data-ref="denim"] span { top: auto; bottom: -18px; }
.ladder__note { color: var(--muted-2); font-size: 10.5px; margin-top: 30px; text-transform: none; letter-spacing: 0.02em; }
.ladder__tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -110%);
  transition: opacity 0.15s;
  z-index: 3;
}
.ladder__tip.is-on { opacity: 1; }
.ladder:not(.is-shown) .ladder__val { opacity: 0; }
.ladder__val { transition: left 1.1s var(--ease), opacity 0.6s 0.5s; }

/* ---------- Case 04: Ola Maps ---------- */

.maps { background: var(--ink); }
.ner {
  margin-bottom: clamp(64px, 9vw, 130px);
}
.ner__box {
  max-width: 1100px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: clamp(56px, 6vw, 72px);
  padding: 0 22px;
  border-radius: 100px;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.ner__icon {
  width: 16px; height: 16px; flex: none;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  position: relative;
}
.ner__icon::after { content: ""; position: absolute; width: 6px; height: 1.5px; background: var(--muted); right: -5px; bottom: -2px; transform: rotate(45deg); }
.ner__query { font-size: clamp(12px, 1.3vw, 16px); text-transform: none; letter-spacing: 0.01em; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ner__caret { width: 1.5px; height: 1.3em; background: var(--accent); animation: blink 1s steps(1) infinite; flex: none; margin-left: -10px; }
@keyframes blink { 50% { opacity: 0; } }
.ner__out {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 30px 10px;
  min-height: 6.5em;
  padding: 44px 6px 0;
  font-size: clamp(1.3rem, 2.8vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.ner__tok {
  position: relative;
  white-space: nowrap;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.ner__tok:nth-child(even) { border-bottom-color: var(--paper); }
.ner__tok.is-on { opacity: 1; transform: none; }
.ner__tok small {
  position: absolute;
  left: 0; top: calc(100% + 8px);
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.ner figcaption { color: var(--muted-2); font-size: 10.5px; margin-top: 48px; }

.maps__list { border-top: 1px solid var(--line); columns: 2; column-gap: clamp(32px, 6vw, 110px); }
.maps__list li {
  break-inside: avoid;
  display: grid;
  grid-template-columns: 7em minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.maps__list .mono { color: var(--accent); padding-top: 4px; }
.maps__list p { color: #bdb7ad; }

/* ---------- Work (light) ---------- */

.work {
  background: var(--paper);
  color: var(--ink);
  border-radius: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 0 0;
  z-index: 2;
}
.work .section__label { color: var(--muted-2); }
.work__head {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(40px, 6vw, 90px);
}
.work .display .serif { color: var(--accent); }

.projects { border-top: 1px solid var(--line-ink); }
.project { border-bottom: 1px solid var(--line-ink); position: relative; }
.project__row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 20px;
  padding: clamp(22px, 3vw, 40px) 0;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
}
.project__row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
  z-index: -1;
}
@media (hover: hover) {
  .project__row:hover::before { transform: scaleY(1); }
  .project__row:hover { color: var(--paper); }
  .project__row:hover .project__title { transform: translateX(18px); }
}
.project__row, .project__title { transition: color 0.4s, transform 0.6s var(--ease); }
.project__n { color: var(--muted-2); padding-left: 4px; }
.project__title {
  font-size: clamp(1.7rem, 4.3vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}
.project__title .serif { color: var(--accent); letter-spacing: -0.02em; }
.project__tag { color: var(--muted-2); text-align: right; }
@media (hover: hover) { .project__row:hover .project__tag, .project__row:hover .project__n { color: var(--muted); } }
.project__plus {
  position: relative;
  width: 28px; height: 28px;
  justify-self: end;
  margin-right: 4px;
}
.project__plus::before, .project__plus::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.5s var(--ease);
}
.project__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.project.is-open .project__plus::after { transform: translate(-50%, -50%) rotate(0deg); }

.project__body { height: 0; overflow: hidden; }
html:not(.js) .project__body { height: auto; }
.project__inner {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 28px;
  padding: 8px 0 48px;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  color: #2b2925;
}
.project__inner > p:nth-of-type(1) { grid-column: 2; }
.project__inner > p:nth-of-type(2) { grid-column: 3; }
.project__metrics, .project__inner .chips, .project__links { grid-column: 2 / 4; }
.project__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-ink);
}
.project__metrics div { padding: 20px 16px 0 0; }
.project__metrics b {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 8px;
}
.project__metrics span { color: var(--muted-2); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  border: 1px solid var(--line-ink);
  border-radius: 100px;
  padding: 7px 12px;
  font-size: 11px;
}
.project__links { display: flex; gap: 28px; font-weight: 500; }

/* ---------- Graduation ---------- */

.grad { position: relative; height: 230vh; background: var(--paper); }
.grad__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
/* Ambient: a heavily blurred copy fills the sides, so the sharp
   portrait frame never has to be upscaled to a landscape crop */
.grad__ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
}
.grad__ambient img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(48px) saturate(0.7) brightness(0.42);
  transform: scale(1.25);
}
html:not(.js) .grad__ambient { opacity: 1; }
.grad__media {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100%, 75vh);
  width: min(100%, 75svh);
  transform: translateX(-50%);
  overflow: hidden;
  clip-path: inset(16% 12% 16% 12% round 18px);
  will-change: clip-path;
}
html:not(.js) .grad__media { clip-path: none; }
.grad__media img, .grad__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform: scale(1.12);
  will-change: transform;
}
.grad__video { opacity: 0; transition: opacity 0.8s; }
.grad__video.is-ready { opacity: 1; }
.grad__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(11, 11, 10, 0.8), rgba(11, 11, 10, 0) 40%),
    linear-gradient(to right, rgba(11, 11, 10, 0.35), transparent 18%, transparent 82%, rgba(11, 11, 10, 0.35));
}
.grad__text {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(24px, 6vh, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  z-index: 2;
}
.grad__text p:last-child { text-align: right; }
.grad__text .display { font-size: clamp(3rem, 10vw, 10rem); text-align: center; }
.grad__text .serif { color: var(--accent); }

/* ---------- Path ---------- */

.path__title { margin-bottom: clamp(40px, 6vw, 90px); }
.timeline { border-top: 1px solid var(--line); }
.tl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 24px;
  padding: clamp(26px, 3vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.tl__date { color: var(--accent); }
.tl h3 { font-size: clamp(1.6rem, 3vw, 2.8rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; }
.tl__role { color: var(--muted); margin-top: 6px; }
.tl__desc { color: #bdb7ad; max-width: 40ch; }

/* ---------- Honours ---------- */

.honors { padding-top: 0; }
.honors .display { margin-bottom: clamp(40px, 6vw, 80px); }
.honors__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.honor {
  background: var(--ink);
  padding: clamp(24px, 3vw, 40px);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: background 0.5s var(--ease);
}
.honor::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 90, 31, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.honor:hover::before { opacity: 1; }
.honor__big {
  font-size: clamp(3rem, 6vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin-bottom: auto;
  padding-bottom: 36px;
}
.honor--big .honor__big { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.02em; font-size: clamp(3.6rem, 7vw, 6.6rem); }
.honor--big { grid-row: span 2; }
.honor--big .honor__big { font-size: clamp(5rem, 12vw, 11rem); }
.honor--big p { max-width: 30ch; }
.honor h3 { font-size: 1.1rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 6px; }
.honor p { color: var(--muted); font-size: 14px; }

.early {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 24px;
  margin-top: clamp(48px, 6vw, 80px);
}
.early__title { color: var(--muted); padding-top: 18px; font-weight: 400; }
.early__list { border-top: 1px solid var(--line); }
.early__list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.early__list .mono { color: var(--accent); }
.early__list b { font-weight: 500; font-size: clamp(1.05rem, 1.5vw, 1.35rem); letter-spacing: -0.025em; }
.early__list p { color: var(--muted); font-size: 14px; }

/* ---------- Toolbox ---------- */

.tools { padding-top: 0; }
.tools__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}
.tools__group { border-top: 1px solid var(--line); padding-top: 18px; }
.tools__group h3 { color: var(--accent); margin-bottom: 14px; font-weight: 400; }
.tools__group p { color: #bdb7ad; font-size: 15px; line-height: 1.7; }

/* ---------- Quote ---------- */

.quote { padding-top: clamp(40px, 6vw, 80px); }
.quote__text {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin: 0 auto;
  text-align: center;
}

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

.contact {
  position: relative;
  background: var(--accent);
  color: var(--ink);
  padding: clamp(80px, 10vw, 150px) var(--gutter) 0;
  overflow: hidden;
  border-radius: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 0 0;
}
.contact .section__label { color: rgba(11, 11, 10, 0.6); }
.contact .idx { color: var(--ink); }
.contact__title {
  font-size: clamp(3.2rem, 11vw, 12rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.88;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.contact__line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.contact__line > span { display: inline-block; }
.contact__line .serif { letter-spacing: -0.03em; font-size: 1.08em; }

.contact__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: clamp(60px, 8vw, 120px); }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: clamp(56px, 6vw, 76px);
  padding: 0 clamp(24px, 3vw, 40px);
  border-radius: 100px;
  border: 1.5px solid var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
  z-index: -1;
}
.btn:hover { color: var(--accent); }
.btn:hover::before { transform: translateY(0); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary::before { background: var(--paper); }
.btn--primary:hover { color: var(--ink); }
.btn span { display: inline-block; pointer-events: none; }

.contact__foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid rgba(11, 11, 10, 0.25);
}
.socials { display: flex; gap: 22px; }
.socials a { position: relative; }
.socials a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.socials a:hover::after { transform: scaleX(1); transform-origin: left; }
.contact__small { text-align: center; color: rgba(11, 11, 10, 0.65); }
.contact__top { justify-self: end; white-space: nowrap; }
.contact__giant {
  font-size: 14.2vw;
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.74;
  white-space: nowrap;
  margin: 0 calc(var(--gutter) * -1);
  text-align: center;
  color: var(--ink);
  transform: translateY(12%);
  user-select: none;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .nav__status { display: none; }
  .nav { grid-template-columns: 1fr auto auto; }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .tools__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tools__grid .display { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --nav-h: 64px; }

  .latent { height: 360vh; }
  .latent__caps { font-size: clamp(1.7rem, 8vw, 2.4rem); bottom: 40px; }

  .nav { grid-template-columns: 1fr auto auto; gap: 16px; }
  .nav__links { display: none; }
  .nav__burger {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 44px; height: 44px;
    margin-right: -10px;
  }
  .nav__burger span {
    display: block; width: 24px; height: 1.5px; background: currentColor;
    transition: transform 0.5s var(--ease);
  }
  .nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  body.menu-open .nav { mix-blend-mode: normal; color: var(--ink); }

  /* Hero: stacked */
  .hero {
    height: auto;
    min-height: 100svh;
    padding-top: calc(var(--nav-h) + 8px);
    padding-bottom: 64px;
    display: flex;
    flex-direction: column;
  }
  .hero__name { display: contents; font-size: 25.5vw; }
  .hero__line { position: relative; top: auto; left: auto; right: auto; bottom: auto; font-size: 25.5vw; }
  .hero__line--1 { order: 1; margin-left: -0.04em; z-index: 1; }
  .hero__portrait {
    position: relative;
    left: auto; bottom: auto;
    height: auto;
    width: min(112%, 560px);
    transform: none;
    margin: -13vw auto 0;
    align-self: center;
    order: 2;
  }
  .hero__line--2 { order: 3; text-align: right; margin-top: -0.62em; z-index: 3; font-size: 25.5vw; left: auto; }
  .hero__intro { position: relative; left: auto; top: auto; max-width: 32ch; order: 4; margin-top: 22px; font-size: 1.12rem; }
  .hero__meta { position: relative; right: auto; top: auto; text-align: left; order: 5; margin-top: 22px; line-height: 1.7; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 14px; }
  .hero__now { margin-top: 0; width: 100%; }
  .hero__foot { display: none; }
  .hero__hint { display: none; }

  .about__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "lede" "facts";
    row-gap: 48px;
  }
  .about__facts li { grid-template-columns: 96px 1fr; }

  .loop__body { grid-template-columns: 1fr; gap: 0; }
  .loop__visual {
    top: var(--nav-h);
    height: 46svh;
    z-index: 2;
    background: linear-gradient(to bottom, var(--ink) 82%, rgba(11, 11, 10, 0));
    padding-bottom: 4svh;
  }
  .loop__svg { width: auto; height: 100%; max-width: 100%; }
  .loop__node text { font-size: 15px; }
  .loop__acc { font-size: clamp(2.6rem, 11vw, 4rem); }
  .loop__center-label { font-size: 8.5px; max-width: 18ch; margin: 0 auto; }
  .loop__center-sub { font-size: 8.5px; }
  .loop__steps { padding: 4svh 0 20svh; }
  .step { min-height: 58svh; justify-content: flex-start; padding-top: 6svh; }

  .case__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .war__room, .research__body { grid-template-columns: 1fr; }
  .term__lines { min-height: 0; }
  .term__lines li { grid-template-columns: 3.4em minmax(0, 1fr); }
  .term__lines li b { grid-column: 2; }
  .term__lines time { grid-row: span 2; }
  .ladder { position: relative; top: auto; }
  .ladder__label { font-size: 12px; }
  .am { flex-direction: column; align-items: flex-start; }
  .am__rel { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
  .am__rel svg { width: 40px; transform: rotate(90deg); }
  .maps__list { columns: 1; }
  .maps__list li { grid-template-columns: 1fr; gap: 6px; }
  .ner__out { gap: 34px 8px; }

  .project__row { grid-template-columns: 36px minmax(0, 1fr) 30px; gap: 12px; }
  .project__tag { grid-column: 2; grid-row: 2; text-align: left; font-size: 10.5px; }
  .project__plus { grid-column: 3; grid-row: 1 / 3; }
  .project__inner { grid-template-columns: 1fr; padding-left: 48px; row-gap: 20px; }
  .project__inner > p:nth-of-type(1),
  .project__inner > p:nth-of-type(2),
  .project__metrics, .project__inner .chips, .project__links { grid-column: 1; }
  .project__metrics { grid-template-columns: 1fr 1fr; row-gap: 12px; }

  .grad { height: 180vh; }
  .grad__text { grid-template-columns: 1fr; text-align: left; gap: 10px; }
  .grad__text .display { text-align: left; order: -1; }
  .grad__text p:last-child { text-align: left; }
  .grad__media { width: 100%; clip-path: inset(10% 10% 10% 10% round 14px); }

  .tl { grid-template-columns: 1fr; gap: 8px; }
  .tl__desc { margin-top: 6px; }

  .honors__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .honor { min-height: 200px; }
  .honor--big { grid-row: auto; grid-column: 1 / -1; }
  .early { grid-template-columns: 1fr; gap: 8px; }
  .early__list li { grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; }
  .early__list p { grid-column: 2; }

  .tools__grid { grid-template-columns: 1fr; }

  .contact__foot { grid-template-columns: 1fr auto; }
  .contact__small { grid-column: 1 / -1; grid-row: 2; text-align: left; }
}

@media (max-width: 560px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat, .stat:first-child, .stat:nth-child(3) { padding: 28px 0 22px; border-right: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .honors__grid { grid-template-columns: 1fr; }
  .honor { min-height: 0; }
  .honor__big { padding-bottom: 22px; }
  .project__inner { padding-left: 0; }
  .ladder { --lab: 0px; --lgap: 0px; }
  .ladder__row { grid-template-columns: 1fr; padding: 6px 0; }
  .ladder__track { height: 22px; }
  .contact__cta .btn { width: 100%; }
  .btn--primary span { font-size: 0.95rem; }
  .hero__foot span:first-child { max-width: 60%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .grain { animation: none; }
}

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