:root {
  --paper: #f3f0e8;
  --paper-2: #e9e5da;
  --ink: #161614;
  --ink-2: #5d5a52;
  --ink-3: #9a968b;
  --rule: #d6d1c4;
  --signal: #e2401c;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  /* spacing scale: every vertical gap on the page is one of these */
  --s-section: clamp(120px, 14vw, 200px);  /* between numbered sections */
  --s-group:   clamp(80px, 9vw, 128px);    /* between projects inside a section */
  --s-block:   clamp(40px, 4vw, 56px);     /* section header → content */
  --s-gap:     16px;                       /* between tiles */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain over the whole page, very faint */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background-image: var(--grain); opacity: .09; mix-blend-mode: multiply;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--ink-2); }
.dim { color: var(--ink-3); }
.signal { color: var(--signal); }

/* ── nav ───────────────────────────── */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.nav .name { font-family: var(--mono); font-size: 13px; }
.nav .name i { color: var(--signal); font-style: normal; }
.nav ul { display: flex; gap: 18px; list-style: none; }
.nav a:hover { color: var(--ink); }
.nav a { transition: color .2s; }

/* ── hero ──────────────────────────── */
.hero { padding: clamp(80px, 16vh, 180px) 0 var(--s-section); }
.hero h1 {
  font: 400 clamp(48px, 8.4vw, 132px)/.95 var(--serif);
  letter-spacing: -.02em; max-width: 12ch;
}
.hero h1 em { font-style: italic; }
.hero { position: relative; isolation: isolate; }

/* headline lands word by word, like a dictation */
.speak > span, .speak em > span {
  display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(.12em);
  animation: land .9s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes land { to { opacity: 1; filter: blur(0); transform: none; } }
.speak .red {
  color: var(--signal);
  background: linear-gradient(100deg, #c7362b 10%, #ef5a2a 55%, #e88a3c 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-right: .06em;
}
.speak .caret {
  display: inline-block; width: .06em; height: .78em; margin-left: .06em;
  background: var(--signal); vertical-align: -.04em;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.listen { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.listen .dot { margin: 0; }
.wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.wave b { width: 2px; height: 100%; background: var(--signal); border-radius: 1px; animation: wave 1.1s ease-in-out infinite; }
.wave b:nth-child(2) { animation-delay: -.9s; } .wave b:nth-child(3) { animation-delay: -.6s; }
.wave b:nth-child(4) { animation-delay: -.3s; } .wave b:nth-child(5) { animation-delay: -.75s; }
@keyframes wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.hero .lede {
  margin-top: 40px; max-width: 46ch; font-size: 18px; color: var(--ink-2);
}
.hero .meta { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal); margin-right: 8px; vertical-align: 1px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

/* ── section heading ───────────────── */
.sec-head {
  display: flex; align-items: baseline; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--ink);
}
.sec-head h2 { font: 400 32px/1 var(--serif); }
.sec-head .mono:last-child { margin-left: auto; }
.sec-head { margin-bottom: var(--s-block); }
.wrap > section + section { margin-top: var(--s-section); }

/* ── index table ───────────────────── */
.index { list-style: none; }
.index a {
  display: grid; grid-template-columns: 56px 1.1fr 2fr 1fr 64px;
  gap: 16px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
  transition: padding .35s cubic-bezier(.2,.7,.2,1), color .2s;
}
.index .t { font: 400 clamp(28px, 3.2vw, 44px)/1 var(--serif); }
.index .d { color: var(--ink-2); font-size: 15px; }
.index .y { text-align: right; }
.index a:hover { padding-left: 14px; }
.index a:hover .n { color: var(--signal); }
.index li:first-child a { border-top: 0; }

/* cursor-follow preview */
.peek {
  position: fixed; top: 0; left: 0; width: 380px; aspect-ratio: 16/11;
  pointer-events: none; z-index: 50; opacity: 0; overflow: hidden;
  transform: translate(-50%, -50%) scale(.92);
  transition: opacity .25s, transform .35s cubic-bezier(.2,.7,.2,1);
  background: var(--ink);
}
.peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.peek img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ── specimens (featured projects) ─── */
.specimen {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px);
}
.specimen + .specimen { margin-top: var(--s-group); padding-top: var(--s-group); border-top: 1px solid var(--rule); }
.specimen:nth-of-type(even) { grid-template-columns: 7fr 5fr; }
.specimen:nth-of-type(even) .copy { order: 2; }

.copy .kicker { margin-bottom: 20px; }
.copy h3 { font: 400 clamp(40px, 5vw, 72px)/1 var(--serif); letter-spacing: -.01em; }
.copy h3 em { font-style: italic; }
.copy p { margin-top: 20px; color: var(--ink-2); max-width: 44ch; }

.stat { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); }
.stat .big { font: 400 clamp(64px, 7vw, 104px)/.9 var(--serif); letter-spacing: -.03em; }
.stat .big sup { font-size: .35em; vertical-align: top; margin-left: 4px; color: var(--signal); }
.stat .mono { display: block; margin-top: 10px; }

.spec {
  margin-top: 32px; display: grid; grid-template-columns: auto 1fr; gap: 6px 20px;
}
.spec dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding-top: 2px; }
.spec dd { font-family: var(--mono); font-size: 12px; }

.more { display: inline-block; margin-top: 32px; font-family: var(--mono); font-size: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.more:hover { color: var(--signal); border-color: var(--signal); }

/* plate = framed image with grain, duotone until hovered */
.plate {
  position: relative; overflow: hidden; background: var(--ink);
  align-self: start;
}
.plate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); opacity: .5; mix-blend-mode: overlay;
}
.plate img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  filter: grayscale(1) contrast(1.05) brightness(.95);
  transition: filter .8s ease, transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.specimen:hover .plate img { filter: none; transform: scale(1.015); }
.plate .cap {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-family: var(--mono); font-size: 11px; color: #f3f0e8cc;
}
.plate.wide { aspect-ratio: 16/10; }

/* smriti: portrait device on a field */
.plate.field {
  aspect-ratio: 16/11; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 30% 20%, #3b3a33, #121210 70%);
}
.plate.field img { width: auto; height: 86%; object-fit: contain; border-radius: 18px; box-shadow: 0 30px 60px #0008; }

/* utter: drawn, not screenshotted */
.plate.drawn {
  aspect-ratio: 16/11;
  background: radial-gradient(90% 80% at 70% 30%, #2a2925, #0f0f0e 75%);
  color: #f3f0e8; padding: clamp(20px, 3vw, 36px);
  display: grid; grid-template-rows: auto 1fr auto;
}
.drawn .row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: #f3f0e899; }
.drawn .said { align-self: center; font: italic 400 clamp(22px, 2.6vw, 38px)/1.2 var(--serif); max-width: 20ch; }
.drawn .said .caret { display: inline-block; width: 2px; height: .9em; background: var(--signal); vertical-align: -2px; animation: pulse 1s steps(2) infinite; }
.drawn .foot { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.bars { display: flex; align-items: end; gap: 6px; height: 64px; }
.bars span { width: 14px; background: #f3f0e833; }
.bars span:last-child { background: var(--signal); }
.bubble {
  width: 64px; height: 64px; border-radius: 50%; background: var(--signal);
  display: grid; place-items: center; position: relative; flex: none;
}
.bubble::before, .bubble::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--signal); animation: ring 2.4s ease-out infinite;
}
.bubble::after { animation-delay: 1.2s; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
.bubble i { width: 4px; height: 20px; background: #fff; border-radius: 2px; box-shadow: -9px 4px 0 -0px #fff, 9px 4px 0 0 #fff; transform: scaleY(.9); }

/* ── design grid ───────────────────── */
.grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px var(--s-gap);
}
.tile { grid-column: span 4; }
.tile.w8 { grid-column: span 8; }
.tile .plate { aspect-ratio: 4/3; }
.tile.w8 .plate { aspect-ratio: 16/10; }
.tile.tall .plate { aspect-ratio: 4/5; }
.tile.w12 { grid-column: span 12; }
.tile.w12 .plate { aspect-ratio: 21/9; }
.tile.w6 { grid-column: span 6; }
.tile.w6 .plate { aspect-ratio: 16/10; }
.tile .plate.contain img { object-fit: contain; object-position: center; }
.tile .plate.field { aspect-ratio: 4/5; }
.tile .plate.field img { height: 92%; border-radius: 10px; }
.tile:hover .plate img { filter: none; }
.tile .empty {
  aspect-ratio: 4/3; border: 1px dashed var(--ink-3); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: var(--paper-2);
}
.tile figcaption { display: flex; justify-content: space-between; margin-top: 10px; }

/* design work is grouped per project */
.dgroup + .dgroup { margin-top: var(--s-group); padding-top: var(--s-group); border-top: 1px solid var(--rule); }
.dhead { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: baseline; margin-bottom: 32px; }
.dhead h3 { font: 400 clamp(32px, 3.4vw, 48px)/1 var(--serif); }
.dhead h3 .mono { vertical-align: middle; margin-right: 14px; }
.dhead p { color: var(--ink-2); max-width: 52ch; }

/* ── about ─────────────────────────── */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); padding-bottom: var(--s-section); }
.about p { font: 400 clamp(26px, 2.8vw, 38px)/1.2 var(--serif); }
.about p em { font-style: italic; }
.links { list-style: none; margin-top: 40px; }
.links li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.links a:hover { color: var(--signal); }

footer { border-top: 1px solid var(--rule); padding: 20px 0 32px; display: flex; justify-content: space-between; }

/* ── reveal ────────────────────────── */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv, .speak > span, .speak em > span { opacity: 1; transform: none; filter: none; }
  * { animation: none !important; transition: none !important; }
}

/* ── case study ────────────────────── */
.cs-hero { padding: clamp(64px, 12vh, 140px) 0 48px; }
.cs-hero h1 { font: 400 clamp(64px, 11vw, 176px)/.9 var(--serif); letter-spacing: -.03em; }
.cs-hero .lede { margin-top: 28px; max-width: 40ch; font: italic 400 clamp(24px, 2.6vw, 34px)/1.25 var(--serif); color: var(--ink-2); }
.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 64px; }
.cs-meta div { padding: 14px 16px 16px 0; }
.cs-meta b { display: block; font: 400 15px/1.4 var(--sans); margin-top: 4px; color: var(--ink); }
.cs-body { display: grid; grid-template-columns: 3fr 9fr; gap: clamp(24px, 4vw, 64px); padding: 48px 0; border-top: 1px solid var(--rule); }
.cs-body .prose { max-width: 62ch; }
.cs-body .prose p + p { margin-top: 1em; }
.cs-body .prose p { font-size: 18px; color: #2c2b27; }
.cs-body h2 { font: 400 28px/1.1 var(--serif); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); margin: 64px 0; }
.figures div { padding: 20px 20px 24px 0; border-right: 1px solid var(--rule); }
.figures div + div { padding-left: 20px; }
.figures div:last-child { border-right: 0; }
.figures .big { font: 400 clamp(56px, 6vw, 88px)/.9 var(--serif); letter-spacing: -.03em; }
.pipeline { list-style: none; counter-reset: s; }
.pipeline li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.pipeline li::before { content: "0" counter(s); font-family: var(--mono); font-size: 12px; color: var(--signal); padding-top: 4px; }
.next { display: flex; justify-content: space-between; align-items: baseline; padding: 48px 0 96px; border-top: 1px solid var(--ink); }
.next a { font: 400 clamp(40px, 6vw, 88px)/1 var(--serif); }
.next a:hover { font-style: italic; }

/* ── mobile ────────────────────────── */
@media (max-width: 820px) {
  .nav ul { gap: 12px; }
  .nav ul li:nth-child(n+3) { display: none; }
  .index a { grid-template-columns: 36px 1fr auto; }
  .index .d, .index .k { display: none; }
  .specimen, .specimen:nth-of-type(even), .about, .cs-body, .dhead { grid-template-columns: 1fr; }
  .dhead { gap: 12px; }
  .specimen:nth-of-type(even) .copy { order: 0; }
  .tile, .tile.w8, .tile.tall, .tile.w6 { grid-column: span 12; }
  .tile.w8 .plate { aspect-ratio: 16/10; height: auto; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .figures { grid-template-columns: 1fr; }
  .figures div, .figures div + div { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0; }
  .peek { display: none; }
}

/* ── case study: shared ───────────── */
.cs-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 32px; }
.cs-links a, .dlinks a { font-family: var(--mono); font-size: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.cs-links a:hover, .dlinks a:hover { color: var(--signal); border-color: var(--signal); }
.cs-links .dim { font-family: var(--mono); font-size: 12px; }
.cs-section { margin-top: var(--s-group); }
.cs-body + .cs-body { border-top: 1px solid var(--rule); }
.cs-body .kick { display: block; margin-bottom: 10px; }

/* full-bleed-ish shots, always in colour on case pages */
.shot { background: var(--ink); overflow: hidden; }
.shot img { width: 100%; height: auto; }
.shot.pad { padding: clamp(20px, 4vw, 56px); background: #121210; }
.shot.paper { background: var(--paper-2); }
figure.cap figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; }

/* research findings */
.findings { list-style: none; border-top: 1px solid var(--ink); }
.findings li { display: grid; grid-template-columns: 48px 1fr; gap: 0 8px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.findings li > span { font-family: var(--mono); font-size: 12px; color: var(--signal); padding-top: 4px; }
.findings b { display: block; font: 400 22px/1.2 var(--serif); margin-bottom: 4px; }
.findings p { color: var(--ink-2); font-size: 16px; }

/* close-ups: zoomed crops of the real design files */
.closeups { display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px var(--s-gap); }
.closeups figure { grid-column: span 6; }
.closeups figure.w4 { grid-column: span 4; }
.closeups figure.w8 { grid-column: span 8; }
.closeups figure.w12 { grid-column: span 12; }
.zoom { position: relative; overflow: hidden; aspect-ratio: var(--ar, 4/3); background: var(--ink); }
.zoom img { position: absolute; left: 0; top: 0; max-width: none; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.zoom.contain img { position: static; width: 100%; height: 100%; object-fit: contain; }
.zoom:hover img { transform: scale(1.04); }
.zoom::after {
  content: attr(data-z); position: absolute; top: 12px; right: 14px;
  font-family: var(--mono); font-size: 11px; color: #f3f0e8; mix-blend-mode: difference;
}
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-gap); background: #121210; padding: clamp(20px, 4vw, 56px); }
.phones img { width: 100%; border-radius: 14px; }

/* home: design group links */
.dhead h3 a:hover { color: var(--signal); }
.dhead h3 a::after { content: " →"; font-size: .6em; opacity: 0; transition: opacity .2s; }
.dhead h3 a:hover::after { opacity: 1; }
.dlinks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }

@media (max-width: 820px) {
  .closeups figure, .closeups figure.w4, .closeups figure.w8 { grid-column: span 12; }
  .phones { grid-template-columns: 1fr 1fr; }
}
.copy h3 a:hover { color: var(--signal); }
.copy .dlinks { margin-top: 32px; }
.dlinks .dim { font-size: 12px; }
