/* ============ tokens ============ */
:root {
  --bg: #060708;
  --panel: #0c0e11;
  --line: rgba(214, 222, 232, 0.14);
  --line-strong: rgba(214, 222, 232, 0.32);
  --text: #e9ebee;
  --muted: #868d97;
  --signal: #ff5b1f;          /* used only for live state: progress, active slide, focus */
  --display: "Unbounded", "Arial Black", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.7 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--signal); outline-offset: 4px; }
::selection { background: var(--signal); color: #000; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; }


/* page transitions (Chrome, Edge, Safari 18+): the clicked image morphs into the next page */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.35s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in 0.6s var(--ease) both; }
::view-transition-group(*) { animation-duration: 0.75s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ============ header ============ */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px var(--gutter);
  transition: transform 0.6s var(--ease), background-color 0.4s;
}
.hud.is-solid { background: rgba(6, 7, 8, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hud.is-hidden { transform: translateY(-100%); }
.mark {
  font: 500 13px/1 var(--display); letter-spacing: 0.32em; text-transform: uppercase; justify-self: start;
}
.hud-role { font-size: 12px; color: var(--muted); }
.nav { justify-self: end; display: flex; gap: clamp(14px, 2.4vw, 32px); font-size: 13px; }
.nav a, .link, .foot-links a { position: relative; }
.nav a::after, .link::after, .foot-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.nav a:hover::after, .nav a[aria-current]::after, .link:hover::after, .foot-links a:hover::after {
  transform: scaleX(1); transform-origin: left;
}
.progress { position: fixed; inset: 0 0 auto 0; height: 1px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--signal); transform-origin: left; transform: scaleX(0); }

/* ============ shared ============ */
.section-title {
  font: 400 clamp(26px, 3.4vw, 46px)/1.05 var(--display); letter-spacing: -0.01em; text-transform: uppercase; margin: 0;
}
.p-index { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.link { color: var(--text); }

/* split-letter reveal used on big titles */
[data-split] .ch { display: inline-block; transform: translateY(105%); opacity: 0; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; }
[data-split].is-in .ch { animation: ch-in 1.1s var(--ease) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes ch-in { to { transform: none; opacity: 1; } }

/* scroll reveal: a wipe upward, one motion family for the whole site */
/* (the clip sits on the children: a fully clipped element never reports as visible) */
.js [data-reveal] > * { clip-path: inset(0 0 100% 0); transform: translateY(40px); transition: clip-path 1.3s var(--ease), transform 1.3s var(--ease); }
.js [data-reveal] > :nth-child(2) { transition-delay: 0.08s; }
.js [data-reveal] > :nth-child(3) { transition-delay: 0.16s; }
.js [data-reveal].is-in > * { clip-path: inset(0 0 0 0); transform: none; }

/* HUD corner brackets */
.frame { position: absolute; inset: clamp(70px, 9vh, 96px) var(--gutter) clamp(24px, 4vh, 40px); pointer-events: none; z-index: 3; }
.frame i { position: absolute; width: 18px; height: 18px; border: 1px solid var(--line-strong); }
.frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.hero-shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,7,8,0.55) 0%, rgba(6,7,8,0) 22%, rgba(6,7,8,0) 50%, rgba(6,7,8,0.88) 100%),
    radial-gradient(ellipse at center, rgba(6,7,8,0) 55%, rgba(6,7,8,0.5) 100%);
}

/* ============ home hero ============ */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #000; }
.hero-stage { position: absolute; inset: 0; overflow: hidden; }
/* Desktop: the image sits inside a black border instead of running edge to edge */
@media (min-width: 901px) {
  .hero { --mat: clamp(24px, 3vw, 48px); }
  .hero-stage { inset: 72px var(--mat) var(--mat); }
  .page-home .hero .frame { inset: calc(72px + 18px) calc(var(--mat) + 18px) calc(var(--mat) + 18px); }
  .page-home .hero-text { left: calc(var(--mat) + 40px); right: calc(var(--mat) + 40px); }
  .page-home .readout-card { right: calc(var(--mat) + 58px); }
}
.slides { position: absolute; inset: -3%; will-change: transform; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.6s var(--ease-io); }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.slide.is-on { opacity: 1; }
.slide.is-on img { animation: drift 9s linear both; }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1.02); } }

.hero-text { position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: clamp(88px, 14vh, 150px); }
.hero-title {
  margin: 0; font: 300 clamp(48px, 11.5vw, 190px)/0.86 var(--display);
  letter-spacing: -0.035em; text-transform: uppercase;
}
.hero-tag { margin: 22px 0 0; max-width: 40ch; color: rgba(233,235,238,0.78); font-size: 14px; }

.readout-card {
  position: absolute; z-index: 4; right: calc(var(--gutter) + 30px); bottom: clamp(88px, 14vh, 150px);
  width: min(300px, 40vw); display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: baseline;
  font-size: 12px; padding-top: 12px; border-top: 1px solid var(--line-strong);
}
.rc-idx { color: var(--signal); }
.rc-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-year { color: var(--muted); }
.rc-bar { grid-column: 1 / -1; height: 1px; background: var(--line); overflow: hidden; }
.rc-bar i { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(0); }
.readout-card:hover .rc-title { text-decoration: underline; text-underline-offset: 4px; }

.hero-down {
  position: absolute; z-index: 4; left: 50%; bottom: clamp(30px, 5vh, 52px); transform: translateX(-50%);
  font-size: 11px; color: var(--muted); padding-bottom: 26px;
}
.hero-down::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 18px; background: var(--text);
  animation: drip 2.2s var(--ease-io) infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============ work grid ============ */
.work { padding: clamp(90px, 14vh, 170px) var(--gutter) clamp(60px, 10vh, 120px); }
.work-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 22px; margin-bottom: clamp(28px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.work-count { margin: 0; font-size: 12px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(36px, 5vw, 72px) clamp(14px, 1.6vw, 24px); }
.tile { display: block; }
.tile.s7 { grid-column: span 7; } .tile.s7 .tile-media { aspect-ratio: 16 / 10; }
.tile.s5 { grid-column: span 5; } .tile.s5 .tile-media { aspect-ratio: 8 / 7; }
.tile.s4 { grid-column: span 4; } .tile.s4 .tile-media { aspect-ratio: 4 / 5; }
.tile.s6 { grid-column: span 6; } .tile.s6 .tile-media { aspect-ratio: 3 / 2; }
.tile.s12 { grid-column: span 12; } .tile.s12 .tile-media { aspect-ratio: 21 / 9; }
.tile-media { position: relative; overflow: hidden; background: var(--panel); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); filter: saturate(0.9) brightness(0.88); transition: transform 1.4s var(--ease), filter 0.8s var(--ease); }
.tile-media::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; transition: border-color 0.6s var(--ease), inset 0.6s var(--ease); }
.tile:hover .tile-media img, .tile:focus-visible .tile-media img { transform: scale(1.045); filter: saturate(1.05) brightness(1); }
.tile:hover .tile-media::after { inset: 12px; border-color: rgba(255,255,255,0.35); }
.tile-meta { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 16px; padding-top: 14px; font-size: 12px; }
.tile-n { color: var(--muted); grid-row: span 2; padding-top: 2px; }
.tile-title { font: 400 clamp(14px, 1.15vw, 17px)/1.3 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.tile-year { color: var(--muted); grid-row: span 2; padding-top: 2px; }
.tile-cat { color: var(--muted); }
.tile:hover .tile-n { color: var(--signal); }

/* ============ project page ============ */
.p-hero { position: relative; height: 92svh; min-height: 520px; overflow: hidden; background: #000; }
.p-hero-media { position: absolute; inset: -3%; will-change: transform; }
.p-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.p-hero-text { position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: clamp(56px, 9vh, 100px); }
.p-title {
  margin: 0; max-width: 16ch; font: 300 clamp(36px, 7.4vw, 124px)/0.92 var(--display);
  letter-spacing: -0.03em; text-transform: uppercase; overflow-wrap: anywhere;
}
.p-info {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 110px);
  padding: clamp(56px, 9vh, 110px) var(--gutter); border-bottom: 1px solid var(--line);
}
.spec { margin: 0; display: grid; align-content: start; }
.spec div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.spec div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
.p-desc { max-width: 64ch; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.75; }
.p-desc p { margin: 0 0 1.2em; }
.p-desc p:first-child { font: 300 clamp(18px, 1.6vw, 24px)/1.45 var(--display); letter-spacing: -0.005em; margin-bottom: 1em; }
.p-desc:empty { display: none; }

.p-gallery { padding: clamp(40px, 7vh, 90px) var(--gutter); display: grid; gap: clamp(16px, 2.4vw, 36px); }
.row { display: grid; gap: clamp(16px, 2.4vw, 36px); }
.row.pair { grid-template-columns: 1fr 1fr; align-items: start; }
.fig { margin: 0; }
.fig-btn { display: block; width: 100%; background: var(--panel); cursor: zoom-in; overflow: hidden; }
.fig-btn img { width: 100%; transition: transform 1.2s var(--ease); }
.fig-btn:hover img { transform: scale(1.015); }
.fig figcaption { padding-top: 10px; font-size: 11px; color: var(--muted); }

.p-next { position: relative; display: block; height: clamp(320px, 62vh, 640px); overflow: hidden; background: #000; }
.p-next-media { position: absolute; inset: 0; }
.p-next-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.38; filter: grayscale(0.6); transform: scale(1.06); transition: opacity 1s var(--ease), transform 1.6s var(--ease), filter 1s var(--ease); }
.p-next:hover .p-next-media img { opacity: 0.7; filter: none; transform: scale(1); }
.p-next-label { position: absolute; z-index: 2; left: var(--gutter); top: clamp(40px, 7vh, 72px); font-size: 12px; color: var(--muted); }
.p-next-title {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(40px, 7vh, 72px);
  font: 300 clamp(34px, 6.4vw, 104px)/0.95 var(--display); letter-spacing: -0.03em; text-transform: uppercase;
}

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(4, 5, 6, 0.96); display: grid; place-items: center; padding: 64px var(--gutter); opacity: 0; transition: opacity 0.5s var(--ease); }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 128px); width: auto; object-fit: contain; transition: opacity 0.35s var(--ease); }
.lb-count { position: absolute; left: var(--gutter); top: 22px; font-size: 12px; color: var(--muted); }
.lb-btn { position: absolute; font-size: 12px; padding: 12px; }
.lb-btn:hover { color: var(--signal); }
.lb-close { right: calc(var(--gutter) - 12px); top: 10px; }
.lb-prev { left: calc(var(--gutter) - 12px); bottom: 14px; }
.lb-next { right: calc(var(--gutter) - 12px); bottom: 14px; }

/* ============ about ============ */
.about, .nf { padding: clamp(140px, 22vh, 220px) var(--gutter) clamp(60px, 10vh, 120px); }
.about-title { margin: 0; font: 300 clamp(40px, 8.6vw, 140px)/0.9 var(--display); letter-spacing: -0.035em; text-transform: uppercase; }
.about-tag { margin: 26px 0 0; max-width: 44ch; color: rgba(233,235,238,0.78); }
.about-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 7vw, 120px); margin-top: clamp(64px, 11vh, 130px); padding-top: 32px; border-top: 1px solid var(--line); }
.about-bio { max-width: 64ch; font-size: clamp(15px, 1.15vw, 17px); }
.about-bio p { margin: 0 0 1.2em; }
.about-bio p:first-child { font: 300 clamp(18px, 1.6vw, 24px)/1.45 var(--display); }
.mini { font: 400 12px/1 var(--mono); color: var(--muted); margin: 0 0 14px; }
.caps { list-style: none; margin: 0 0 40px; padding: 0; }
.caps li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.caps li:last-child { border-bottom: 1px solid var(--line); }
.about-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 24px); margin-top: clamp(64px, 11vh, 130px); }
.strip-item { display: block; }
.strip-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; filter: brightness(0.85); transition: filter 0.8s var(--ease); }
.strip-item:hover img { filter: none; }
.strip-item span { display: block; padding-top: 10px; font-size: 12px; color: var(--muted); }

/* about: resume sections */
.block { margin-top: clamp(72px, 12vh, 140px); }
.block-title { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.stats { margin: clamp(56px, 9vh, 100px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); max-width: 1100px; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 12px; padding: 22px 20px 0 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat dd { margin: 0; font: 300 clamp(30px, 3.6vw, 56px)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat dt { font-size: 12px; line-height: 1.5; color: var(--muted); max-width: 24ch; }
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 3.6fr) minmax(0, 6fr); gap: 8px clamp(20px, 3vw, 48px); padding: 26px 0; border-bottom: 1px solid var(--line); }
.job-dates { font-size: 12px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.job-co { margin: 0; font: 400 clamp(16px, 1.4vw, 20px)/1.25 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.job-co::before { content: "+"; color: var(--signal); margin-right: 10px; font-family: var(--mono); }
.job-role { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.job-sum { margin: 0; max-width: 64ch; font-size: 14px; line-height: 1.7; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.fact-main { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.facts .caps { margin-bottom: 0; }
.collabs { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 0; }
.collabs li { font: 300 clamp(22px, 3vw, 44px)/1.15 var(--display); letter-spacing: -0.02em; text-transform: uppercase; }
.collabs li:not(:last-child)::after { content: "/"; color: var(--muted); margin: 0 0.45em; font-weight: 300; }
.contact-list { margin: 0; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.about-side .caps:last-child { margin-bottom: 0; }

/* ============ case studies (product launches) ============ */
.cs { padding: 0 var(--gutter); }
.cs-stats { margin-top: clamp(48px, 8vh, 90px); }
.cs-block { margin-top: clamp(72px, 12vh, 140px); }
.cs-title {
  margin: 0 0 clamp(24px, 3vw, 40px); padding-bottom: 18px; border-bottom: 1px solid var(--line);
  font: 400 clamp(22px, 2.6vw, 36px)/1.05 var(--display); letter-spacing: -0.01em; text-transform: uppercase;
}
.cs-intro { max-width: 64ch; margin: -8px 0 clamp(28px, 4vw, 48px); color: rgba(233,235,238,0.82); }
.cs-intro p { margin: 0 0 1em; }
.gal-title { margin-bottom: clamp(16px, 2.4vw, 36px); }

/* overview */
.brief { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 80px); }
.brief div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.brief dt { font-size: 12px; color: var(--muted); padding-top: 3px; }
.brief dt::before { content: "+ "; color: var(--signal); }
.brief dd { margin: 0; font-size: 14px; line-height: 1.7; }
.brief dd p { margin: 0 0 0.6em; }
.brief dd p:last-child { margin: 0; }

/* stage gates */
.gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.gates::before, .gates::after { content: ""; position: absolute; left: 0; top: 7px; height: 1px; }
.gates::before { right: 0; background: var(--line-strong); }
.gates::after { width: calc(var(--done) / 6 * 100%); background: var(--signal); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) 0.2s; }
.is-in .gates::after, .no-js .gates::after, .gates.is-in::after { transform: scaleX(1); }
.gate { position: relative; padding: 30px 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.gate::before { content: ""; position: absolute; left: 0; top: 2px; width: 11px; height: 11px; border: 1px solid var(--line-strong); background: var(--bg); transform: rotate(45deg); }
.gate.done::before { background: var(--signal); border-color: var(--signal); }
.gate.next::before { border-color: var(--text); }
.gate-id { font: 400 clamp(18px, 1.8vw, 26px)/1 var(--display); }
.gate.todo .gate-id, .gate.todo .gate-name { color: var(--muted); }
.gate-name { font-size: 13px; }
.gate-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* chart grid */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.chart { margin: 0; padding: clamp(18px, 2.2vw, 30px); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)); position: relative; min-width: 0; }
.chart::before, .chart::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--line-strong); }
.chart::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.chart::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.chart.wide { grid-column: 1 / -1; }
.chart-head { margin-bottom: 22px; }
.chart-n { display: block; font-size: 11px; color: var(--signal); margin-bottom: 10px; }
.chart-head h3 { margin: 0; font: 400 clamp(16px, 1.35vw, 20px)/1.25 var(--display); letter-spacing: -0.005em; text-wrap: balance; }
.chart-head p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: rgba(233,235,238,0.75); max-width: 62ch; }
.chart-note { margin: 18px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.chart-body { --c0: var(--text); --c1: #8f96a0; --c2: #555c65; --c3: #3a4048; }

/* animated fills: grow when the panel is revealed */
.hb-fill, .vb-bar, .sp-bar i, .st-bar i { transition: transform 1.2s var(--ease); transition-delay: calc(0.25s + var(--i, 0) * 70ms); }
.js .chart:not(.is-in) .hb-fill, .js .chart:not(.is-in) .sp-bar i, .js .chart:not(.is-in) .st-bar i { transform: scaleX(0); }
.js .chart:not(.is-in) .vb-bar { transform: scaleY(0); }
.hb-fill, .sp-bar i, .st-bar i { transform-origin: left; }
.vb-bar { transform-origin: bottom; }

/* horizontal bars */
.hb { display: grid; gap: 12px; }
.hb-row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 14px; align-items: center; font-size: 12px; }
.hb-label { color: rgba(233,235,238,0.85); }
.hb-track { height: 10px; background: rgba(255,255,255,0.05); position: relative; }
.hb-fill { position: absolute; inset: 0 auto 0 0; background: var(--c1); }
.hb-row.hi .hb-fill { background: var(--signal); }
.hb-row.hi .hb-label, .hb-row.hi .hb-val { color: var(--text); }
.hb-val { min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* vertical bars */
.vb { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(6px, 1.2vw, 16px); align-items: end; height: 230px; padding-top: 22px; border-bottom: 1px solid var(--line-strong); }
.vb-col { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.vb-bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; }
.vb-bar { flex: 1; height: var(--h); background: var(--c1); position: relative; min-height: 1px; }
.vb-bar.s0 { background: var(--c1); } .vb-bar.s1 { background: var(--c2); } .vb-bar.s2 { background: var(--c3); }
.vb-bar.hi, .vb-col.hi .vb-bar { background: var(--signal); }
.vb-bar.empty { background: none; }
.vb-bar b { position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); font-weight: 400; font-size: 11px; white-space: nowrap; color: rgba(233,235,238,0.85); font-variant-numeric: tabular-nums; }
.vb-label { order: 2; margin-top: 10px; margin-bottom: -34px; height: 28px; font-size: 11px; line-height: 1.25; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.chart.t-bar .chart-body { padding-bottom: 34px; }

/* legend */
.legend { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 3px; background: var(--c1); }
.legend .s0 i { background: var(--c0); } .legend .s1 i { background: var(--c1); } .legend .s2 i { background: var(--c2); }
.chart.t-bar .legend .s0 i { background: var(--c1); } .chart.t-bar .legend .s1 i { background: var(--c2); }
.legend .hi i { background: var(--signal) !important; }
.legend .dashed i { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; color: var(--text); }
.legend.seg .s0 i { background: var(--g0); } .legend.seg .s1 i { background: var(--g1); } .legend.seg .s2 i { background: var(--g2); }
.legend.seg .s3 i { background: var(--g3); } .legend.seg .s4 i { background: var(--g4); }

/* line chart */
.lc-plot { position: relative; height: 220px; margin: 18px 12px 0; }
.lc-grid i { position: absolute; left: -12px; right: -12px; height: 1px; background: var(--line); }
.lc svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ln { fill: none; stroke: var(--c1); stroke-width: 1.5; }
.ln.s0 { stroke: var(--c0); } .ln.s1 { stroke: var(--c1); } .ln.s2 { stroke: var(--c2); }
.ln.hi { stroke: var(--signal); stroke-width: 2; }
.ln.dashed { stroke-dasharray: 5 4; }
.lc svg { clip-path: inset(0 0 0 0); transition: clip-path 1.8s var(--ease) 0.2s; }
.js .chart:not(.is-in) .lc svg { clip-path: inset(0 100% 0 0); }
.dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--c1); transition: opacity 0.6s var(--ease); transition-delay: calc(0.6s + var(--i) * 80ms); }
.dot.s0 { border-color: var(--c0); } .dot.hi { border-color: var(--signal); }
.dot b { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-weight: 400; font-size: 10.5px; color: rgba(233,235,238,0.8); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dot.s1 b { top: 10px; bottom: auto; color: var(--muted); }
.js .chart:not(.is-in) .dot { opacity: 0; }
.lc-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 14px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.lc-x span:first-child { text-align: left; } .lc-x span:last-child { text-align: right; }

/* 100% splits and stacked rows */
.chart-body { --g0: var(--signal); --g1: #e9ebee; --g2: #a9afb7; --g3: #6d747d; --g4: #464c54; --g5: #2c3137; }
.sp-bar, .st-bar { display: flex; gap: 2px; height: 34px; }
.sp-bar i, .st-bar i { display: block; min-width: 2px; }
.g0 { --g: var(--g0); } .g1 { --g: var(--g1); } .g2 { --g: var(--g2); } .g3 { --g: var(--g3); } .g4 { --g: var(--g4); } .g5 { --g: var(--g5); }
.sp-bar i, .st-bar i { background: var(--g); }
.sp-key { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px 20px; }
.sp-key li { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.sp-key b { font: 300 clamp(24px, 2.4vw, 34px)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sp-key span { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.sp-key span i { flex: none; width: 8px; height: 8px; background: var(--g); transform: translateY(-1px); }
.st { display: grid; gap: 16px; }
.st-row { display: grid; gap: 8px; }
.st-label { font-size: 13px; color: rgba(233,235,238,0.88); }
.st-bar { height: 26px; }
.st-bar i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; color: #000; font-variant-numeric: tabular-nums; overflow: hidden; }
.st-bar i.g3, .st-bar i.g4, .st-bar i.g5 { color: var(--text); }

/* table */
.tb-wrap { overflow-x: auto; margin: 0 calc(-1 * clamp(18px, 2.2vw, 30px)); padding: 0 clamp(18px, 2.2vw, 30px); }
.tb { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 520px; }
.tb th, .tb td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tb thead th { color: var(--muted); font-weight: 400; border-bottom-color: var(--line-strong); }
.tb tbody th { font-weight: 400; color: var(--text); }
.tb td { color: rgba(233,235,238,0.8); }
.tb .hi, .tb tr.hi th, .tb tr.hi td { color: var(--signal); }

/* word cloud */
.wd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; line-height: 1.1; }
.wd span { font: 300 calc(13px + var(--w) * 30px)/1.1 var(--display); letter-spacing: -0.01em; color: color-mix(in srgb, var(--text) calc(35% + var(--w) * 65%), transparent); text-transform: lowercase; }
.wd span.hi { color: var(--signal); }

/* quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 3vw, 44px); }
.quote { margin: 0; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.quote p { margin: 0; font: 300 clamp(18px, 1.7vw, 24px)/1.4 var(--display); letter-spacing: -0.01em; }
.quote p::before { content: "\201C"; color: var(--signal); }
.quote p::after { content: "\201D"; color: var(--signal); }
.quote footer { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* SWOT */
.swot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sw { padding: clamp(18px, 2.2vw, 30px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sw h3 { margin: 0 0 14px; display: flex; align-items: baseline; gap: 12px; font: 400 12px/1 var(--mono); color: var(--muted); }
.sw h3 span { font: 300 34px/1 var(--display); color: var(--text); }
.sw-strengths h3 span, .sw-opportunities h3 span { color: var(--signal); }
.sw ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.sw li { font-size: 13px; line-height: 1.6; padding-left: 16px; position: relative; }
.sw li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 6px; height: 1px; background: var(--muted); }

/* my role + stakeholders */
.role { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.role-text p { margin: 0 0 1em; font-size: 15px; line-height: 1.75; color: rgba(233,235,238,0.88); max-width: 62ch; }
.role-text p:first-child { font: 300 clamp(18px, 1.6vw, 22px)/1.5 var(--display); letter-spacing: -0.01em; color: var(--text); }
.sh-head { margin: 0 0 6px; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sh-list { margin: 0; }
.sh-list div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sh-list dt { font-size: 12px; color: var(--signal); padding-top: 2px; }
.sh-list dd { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(233,235,238,0.86); }

/* recovery plan */
.plan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border-top: 1px solid var(--line-strong); }
.plan li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 22px clamp(14px, 2vw, 26px) 26px 0; border-bottom: 1px solid var(--line); }
.plan-n { font: 300 30px/1 var(--display); color: var(--signal); }
.plan h3 { margin: 4px 0 10px; font: 500 14px/1.4 var(--mono); color: var(--text); }
.plan p { margin: 0 0 0.6em; font-size: 13px; line-height: 1.65; color: rgba(233,235,238,0.84); }

/* challenges and resolutions */
.cr { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.cr li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); padding: 22px 0; border-bottom: 1px solid var(--line); }
.cr-n { font: 400 12px/1.6 var(--mono); color: var(--muted); }
.cr-k { display: block; margin-bottom: 8px; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cr-r .cr-k { color: var(--signal); }
.cr p { margin: 0 0 0.6em; font-size: 13.5px; line-height: 1.7; }
.cr-c p { color: rgba(233,235,238,0.72); }

/* homepage groups */
.work-group + .work-group { margin-top: clamp(100px, 16vh, 180px); }

/* project images that are illustrations (SVG covers) */
.tile-media img[src$=".svg"], .p-next-media img[src$=".svg"] { object-fit: cover; background: #0a0c0f; }
.p-hero-media img[src$=".svg"] { object-fit: contain; object-position: 70% 40%; }
.p-hero:has(img[src$=".svg"]) { background: #0a0c0f; }

@media (max-width: 900px) {
  .brief { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .swot { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; }
  .cr li { grid-template-columns: 40px minmax(0, 1fr); }
  .cr-r { grid-column: 2; }
  .gates { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .gates::before, .gates::after { display: none; }
  .gate { border-top: 1px solid var(--line); padding-top: 26px; }
  .gate::before { top: -6px; }
}
@media (max-width: 560px) {
  .brief div { grid-template-columns: 1fr; gap: 6px; }
  .sh-list div { grid-template-columns: 1fr; gap: 4px; }
  .cr li { grid-template-columns: 1fr; gap: 12px; }
  .cr-r { grid-column: auto; }
  .hb-row { grid-template-columns: 1fr auto; }
  .hb-label { grid-column: 1 / -1; }
  .gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vb { height: 190px; }
  .vb-bar b { font-size: 9.5px; }
}

/* ============ footer ============ */
.foot { padding: clamp(80px, 14vh, 160px) var(--gutter) 26px; border-top: 1px solid var(--line); }
.foot-line { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.foot-mail { font: 300 clamp(26px, 5.4vw, 88px)/1 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; transition: color 0.4s; }
.foot-mail:hover { color: var(--signal); }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: clamp(60px, 10vh, 120px); font-size: 12px; color: var(--muted); }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--text); }
.readout { font-variant-numeric: tabular-nums; }

/* ============ cursor (mouse only) ============ */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 95; }
  .cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; border-radius: 50%; }
  .cursor-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--text); }
  .cursor-ring {
    width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(233,235,238,0.45);
    display: grid; place-items: center; transition: width 0.5s var(--ease), height 0.5s var(--ease), margin 0.5s var(--ease), background-color 0.5s var(--ease), border-color 0.5s;
  }
  .cursor-label { font-size: 10px; letter-spacing: 0.08em; opacity: 0; transition: opacity 0.3s; color: #000; }
  .cursor.is-view .cursor-ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--text); border-color: var(--text); }
  .cursor.is-view .cursor-label { opacity: 1; }
  .cursor.is-view .cursor-dot { opacity: 0; }
}

/* ============ intro (home, once per visit) ============ */
.intro { position: fixed; inset: 0; z-index: 99; background: var(--bg); display: grid; place-items: center; pointer-events: none; }
.intro-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--text); transform: scaleX(0); transform-origin: left; animation: line-draw 0.9s var(--ease-io) 0.1s forwards; }
.intro-name { position: relative; font: 500 13px/1 var(--display); letter-spacing: 0.4em; text-transform: uppercase; padding: 0 0 34px; clip-path: inset(100% 0 0 0); animation: name-up 0.8s var(--ease) 0.55s forwards; }
.intro-count { position: absolute; right: var(--gutter); bottom: 24px; font-size: 12px; color: var(--muted); }
.intro.is-out { animation: intro-out 1s var(--ease-io) forwards; }
@keyframes line-draw { to { transform: scaleX(1); } }
@keyframes name-up { to { clip-path: inset(0 0 0 0); } }
@keyframes intro-out { to { clip-path: inset(0 0 100% 0); } }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .hud { grid-template-columns: 1fr auto; }
  .hud-role { display: none; }
  .tile.s7, .tile.s5, .tile.s6, .tile.s12 { grid-column: span 12; }
  .tile.s4 { grid-column: span 6; }
  .tile.s4:nth-of-type(3n) { grid-column: span 12; }
  .tile.s7 .tile-media, .tile.s5 .tile-media, .tile.s6 .tile-media, .tile.s4:nth-of-type(3n) .tile-media { aspect-ratio: 3 / 2; }
  .p-info, .about-body { grid-template-columns: 1fr; }
  .readout-card { left: var(--gutter); right: auto; width: calc(100% - 2 * var(--gutter)); bottom: 70px; }
  .hero-text { bottom: 150px; }
  .hero-down { display: none; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat { padding-bottom: 22px; }
  .job { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tile.s4 { grid-column: span 12; }
  .tile.s4 .tile-media { aspect-ratio: 3 / 2; }
  .row.pair { grid-template-columns: 1fr; }
  .about-strip { grid-template-columns: 1fr; }
  .work-head { flex-direction: column; align-items: start; }
  .spec div { grid-template-columns: 90px 1fr; }
  .mark { letter-spacing: 0.22em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] > * { clip-path: none; transform: none; }
  [data-split] .ch { transform: none; opacity: 1; }
  .intro { display: none; }
  @view-transition { navigation: none; }
}
