/* navyashah.me — portfolio
   Tokens follow the design brief: paper ground, ink text, 1px rules, one deep orange accent. */

:root {
  --paper: #F5F5F3;
  --ink: #1C1C1C;
  --soft: #5C5C5C;
  --rule: #DCDCDC;
  --panel: #ECECEA;
  --card: #FBFBFA;
  --accent: #C2410C;
  --accent-soft: rgba(194, 65, 12, .07);
  --accent-line: rgba(194, 65, 12, .35);

  --display: 'Newsreader', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --measure: 66ch;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: #fff; }

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

/* ── Type ─────────────────────────────────────────────── */
.serif { font-family: var(--display); font-weight: 400; }
.italic { font-family: var(--display); font-style: italic; font-weight: 400; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.05; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.label { font-size: 13px; color: var(--soft); letter-spacing: .01em; line-height: 1.4; }
.prose { max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; }
.prose a { text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(245, 245, 243, .86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-home { font-family: var(--display); font-size: 21px; text-decoration: none; letter-spacing: -.01em; }
.nav-home .up { font-family: var(--sans); font-size: 14px; color: var(--soft); margin-right: 10px; }
.nav-links { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 15px; }
.nav-links a { text-decoration: none; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor; transition: right .25s; }
.nav-links a:hover::after { right: 0; }

/* ── Frame (bordered page column, the grid look) ──────── */
.frame { max-width: var(--max); margin: 0 auto; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.rule-top { border-top: 1px solid var(--rule); }
.rule-bottom { border-bottom: 1px solid var(--rule); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; align-content: end;
  padding: calc(var(--nav-h) + 40px) var(--gutter) clamp(56px, 10vh, 110px);
  border-bottom: 1px solid var(--rule);
}
.hero-glow {
  position: absolute; left: 50%; bottom: -46vh; width: 130vw; height: 80vh;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(242, 92, 20, .95), rgba(214, 72, 14, .55) 40%, rgba(194, 65, 12, .14) 72%, rgba(194, 65, 12, 0) 100%);
  filter: blur(30px); pointer-events: none;
}
.hero-inner { position: relative; max-width: var(--max); width: 100%; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.hero h1 { font-size: clamp(52px, 8.4vw, 150px); line-height: .94; letter-spacing: -.035em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.hero h1 em { font-style: italic; }
.hero-hi { font-family: var(--display); font-style: italic; font-size: clamp(22px, 2.6vw, 34px); padding-bottom: .5em; white-space: nowrap; }
.hero-sub { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: clamp(24px, 4vh, 44px); }
.hero-sub p { max-width: 46ch; margin: 0; font-size: 17px; }
.hero-sub .label { white-space: nowrap; }

.js .hero h1 .line > span { transform: translateY(105%); }
.js .hero-hi, .js .hero-sub { opacity: 0; }
.loaded .hero h1 .line > span { transform: none; transition: transform 1.1s cubic-bezier(.2, .7, .1, 1); }
.loaded .hero h1 .line:nth-child(2) > span { transition-delay: .12s; }
.loaded .hero-hi, .loaded .hero-sub { opacity: 1; transition: opacity 1s .55s; }

/* ── Sticky split section (selected work) ─────────────── */
.split { display: grid; grid-template-columns: minmax(240px, 34%) 1fr; }
.split-title { border-right: 1px solid var(--rule); }
.split-title-inner { position: sticky; top: var(--nav-h); padding: 48px var(--gutter) 48px; }
.split-title h2 { font-size: clamp(56px, 7vw, 108px); font-style: italic; line-height: .9; letter-spacing: -.03em; }
.split-title h2 span { display: block; padding-left: .55em; }
.split-title p { margin-top: 28px; max-width: 30ch; color: var(--soft); font-size: 15px; }

/* Project rows */
.projects { list-style: none; margin: 0; padding: 0; }
.project { border-bottom: 1px solid var(--rule); }
.project:last-child { border-bottom: 0; }
.project-link { display: block; text-decoration: none; padding: 32px var(--gutter) 40px; position: relative; }
.project-top { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: baseline; }
.project-num { font-family: var(--display); font-size: 22px; color: var(--soft); }
.project-name { font-size: clamp(34px, 4vw, 56px); letter-spacing: -.02em; }
.project-cat { text-align: right; }
.project-desc { margin: 14px 0 0 calc(22px + 18px); max-width: 54ch; color: var(--ink); }
.project-parts { margin: 16px 0 0 calc(22px + 18px); display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; font-size: 13px; text-decoration: none; background: var(--paper); transition: border-color .2s, color .2s; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.project-media { margin: 26px 0 0 calc(22px + 18px); position: relative; }
.project-media .shot { --ar: 16/9; transition: transform .6s cubic-bezier(.2, .7, .1, 1); }
.project-link:hover .project-media .shot { transform: scale(.985); }
.project-foot { margin: 22px 0 0 calc(22px + 18px); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cta { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.cta .arrow { transition: transform .25s; }
.project-link:hover .cta .arrow, a.cta:hover .arrow { transform: translateX(5px); }

/* Rotating badge */
.badge {
  --size: 96px;
  width: var(--size); height: var(--size); flex: none;
  position: relative; display: inline-grid; place-items: center;
  border-radius: 50%; text-decoration: none; color: var(--ink);
}
.badge svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; }
.badge svg.ring text { font-family: var(--sans); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; fill: currentColor; }
.badge .core { width: 38%; height: 38%; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; transition: background .25s, transform .25s; }
.badge .core svg { width: 44%; height: 44%; }
.badge:hover .core, .project-link:hover .badge .core { background: var(--accent); transform: scale(1.08); }
.badge.try .core { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }
.badge.try:hover .core, .project-link:hover .badge.try .core { background: var(--accent); border-color: var(--accent); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── About ───────────────────────────────────────────── */
.about-words { padding: 48px var(--gutter); }
.about-words p { font-family: var(--display); font-size: clamp(56px, 7vw, 108px); line-height: .95; letter-spacing: -.03em; margin: 0; }
.about-words p:nth-child(2) { font-style: italic; padding-left: .5em; }
.about-words p:nth-child(3) { padding-left: 1em; }
.about-body { padding: 48px var(--gutter) 56px; }
.about-body .prose { font-size: 18px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); margin-top: 40px; }
.facts > div { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--rule); }
.facts > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.facts > div:nth-child(even) { padding-left: 20px; }
.facts dt { font-size: 13px; color: var(--soft); margin-bottom: 2px; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.45; }

.timeline { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.timeline li { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.timeline .when { color: var(--soft); font-size: 13px; padding-top: 2px; }
.timeline b { font-weight: 600; }

/* ── Footer ──────────────────────────────────────────── */
.footer { text-align: center; padding: clamp(80px, 14vh, 160px) var(--gutter) 40px; position: relative; overflow: hidden; }
.footer h2 { font-size: clamp(52px, 9vw, 140px); font-style: italic; letter-spacing: -.035em; line-height: .95; }
.footer .mail { display: inline-block; margin-top: 28px; font-size: clamp(18px, 2vw, 22px); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.footer .mail:hover { color: var(--accent); border-color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 28px; margin-top: 40px; font-size: 15px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(64px, 10vh, 120px); padding-top: 18px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--soft); text-align: left; }

/* ── Screens / placeholders ──────────────────────────── */
.shot {
  --ar: 16/10;
  position: relative; margin: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  aspect-ratio: var(--ar);
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot.contain img { object-fit: contain; padding: 4%; }
.ph {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  padding: 20px; text-align: center;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(35, 35, 35, .035) 11px 12px);
  background-blend-mode: normal;
}
.ph::before { content: ''; position: absolute; inset: 14px; border: 1px dashed #C9C9C6; pointer-events: none; }
.ph .ph-tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.ph .ph-title { font-family: var(--display); font-size: clamp(18px, 2vw, 26px); line-height: 1.15; max-width: 26ch; }
.ph code { font-size: 11.5px; color: var(--soft); background: rgba(255, 255, 255, .6); padding: 2px 6px; border-radius: 3px; font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.shot.has-img .ph { display: none; }
.shot-cap, figcaption.cap { font-size: 13px; color: var(--soft); margin-top: 10px; line-height: 1.45; }

/* ── Case study layout ───────────────────────────────── */
.cs { padding-top: var(--nav-h); }
.cs-crumbs { padding: 18px var(--gutter); border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.cs-crumbs a { text-decoration: none; color: var(--soft); }
.cs-crumbs a:hover { color: var(--ink); }
.cs-crumbs a[aria-current] { color: var(--ink); border-bottom: 1px solid var(--accent); }
.cs-crumbs .lead { color: var(--ink); font-weight: 600; margin-right: 6px; }
.cs-opening { padding: 28px var(--gutter); border-bottom: 1px solid var(--rule); }
.cs-head { padding: 48px var(--gutter) 40px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.cs-head .kicker { font-size: 13px; color: var(--soft); margin-bottom: 18px; }
.cs-head h1 { font-size: clamp(42px, 6.4vw, 96px); letter-spacing: -.03em; line-height: .98; max-width: 15ch; }
.cs-head h1 em { font-style: italic; }
.cs-head .cat { margin-top: 18px; font-size: 15px; color: var(--soft); }

.cs-row { display: grid; grid-template-columns: minmax(200px, 30%) 1fr; border-bottom: 1px solid var(--rule); }
.cs-row > .cs-label { padding: 40px var(--gutter); border-right: 1px solid var(--rule); }
.cs-row > .cs-label h2 { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -.015em; position: sticky; top: calc(var(--nav-h) + 32px); }
.cs-row > .cs-label h2 em { font-style: italic; }
.cs-row > .cs-label .num { display: block; font-family: var(--sans); font-size: 13px; color: var(--soft); margin-bottom: 10px; letter-spacing: 0; }
.cs-row > .cs-body { padding: 40px var(--gutter) 48px; min-width: 0; }
.cs-body > * + * { margin-top: 28px; }
.cs-body .prose + .prose { margin-top: 1em; }
.cs-full { padding: 40px var(--gutter) 48px; border-bottom: 1px solid var(--rule); }
.cs-full > .cs-label h2 { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -.015em; margin-bottom: 8px; }
.cs-full > .cs-label p { color: var(--soft); max-width: 60ch; }
.cs-full > * + * { margin-top: 28px; }

.facts-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.facts-table > div { padding: 14px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts-table dt { font-size: 12.5px; color: var(--soft); }
.facts-table dd { margin: 4px 0 0; font-size: 15px; line-height: 1.4; }

.pull { font-family: var(--display); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.22; letter-spacing: -.01em; max-width: 28ch; margin: 0; }
.pull em { font-style: italic; }
.quote-from { font-size: 13px; color: var(--soft); margin-top: 10px; }

/* Decision list */
.decisions { list-style: none; margin: 0; padding: 0; counter-reset: d; border-top: 1px solid var(--rule); }
.decisions > li { counter-increment: d; display: grid; grid-template-columns: 3.2em 1fr; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.decisions > li::before { content: counter(d, decimal-leading-zero); font-family: var(--display); font-size: 22px; color: var(--soft); line-height: 1.2; }
.decisions h3 { font-size: 24px; margin-bottom: 8px; letter-spacing: -.01em; }
.decisions p { margin: 0; max-width: var(--measure); }
.decisions p + p { margin-top: .8em; }

/* Two up / grids */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-plain { border: 1px solid var(--rule); background: var(--card); padding: 22px; }
.card-plain h3 { font-size: 22px; margin-bottom: 8px; }
.card-plain p { font-size: 15.5px; margin: 0; }
.card-plain p + p { margin-top: .7em; }
.card-plain .label { display: block; margin-bottom: 10px; }

/* "In my words" notes taken from the design canvas */
.canvas-note { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; max-width: 60ch; }
.canvas-note p { font-family: var(--display); font-style: italic; font-size: 20px; line-height: 1.4; margin: 0; }
.canvas-note .label { margin-top: 8px; }

/* Before → after pairs */
.ba-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.ba-pair > .arrow { align-self: center; color: var(--soft); font-size: 20px; }
.ba-pair .side { border: 1px solid var(--rule); background: var(--card); padding: 18px; }
.ba-pair .side .label { display: block; margin-bottom: 6px; }
.ba-pair .side p { margin: 0; font-size: 15.5px; }
.ba-pair .side.after { border-color: var(--accent-line); }

/* Parts index on the Ren hub */
.parts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.parts a { display: grid; grid-template-columns: 3em 1fr auto; gap: 16px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.parts .n { font-family: var(--display); color: var(--soft); font-size: 20px; }
.parts .t { font-family: var(--display); font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.015em; line-height: 1.1; }
.parts .d { display: block; font-family: var(--sans); font-size: 15px; color: var(--soft); margin-top: 6px; max-width: 58ch; letter-spacing: 0; line-height: 1.5; }
.parts .go { font-size: 14px; white-space: nowrap; }
.parts a:hover .t { color: var(--accent); }
.parts a:hover .go .arrow { transform: translateX(4px); }
.parts .go .arrow { display: inline-block; transition: transform .25s; }

/* Results */
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.results > div { padding: 22px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.results .big { font-family: var(--display); font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.results .label { margin-top: 10px; }

/* More projects */
.more { padding: 48px var(--gutter) 64px; }
.more h2 { font-size: clamp(40px, 5vw, 72px); font-style: italic; letter-spacing: -.03em; margin-bottom: 28px; }
.more-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.more-list a { display: block; padding: 22px 20px 26px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-decoration: none; transition: background .2s; }
.more-list a:hover { background: var(--card); }
.more-list .label { display: block; margin-bottom: 8px; }
.more-list .t { font-family: var(--display); font-size: 26px; line-height: 1.1; letter-spacing: -.01em; }
.more-list a:hover .t { color: var(--accent); }

/* Next / prev between Ren parts */
.pager { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); }
.pager a { padding: 28px var(--gutter); text-decoration: none; }
.pager a + a { border-left: 1px solid var(--rule); text-align: right; }
.pager .label { display: block; }
.pager .t { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); }
.pager a:hover .t { color: var(--accent); }

/* ── Demo shell ───────────────────────────────────────── */
.demo { border: 1px solid var(--rule); background: var(--card); }
.demo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.demo-head .label b { color: var(--ink); font-weight: 600; }
.demo-note { font-size: 12px; color: var(--soft); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.demo-body { padding: 18px; }
.demo-hint { font-size: 14.5px; color: var(--soft); margin: 0 0 14px; }

.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: var(--paper); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.seg button:hover:not([aria-pressed="true"]):not([aria-selected="true"]) { background: var(--panel); }

.btn { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 7px 16px; font-size: 13.5px; cursor: pointer; transition: background .2s, border-color .2s; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.small { padding: 4px 11px; font-size: 12.5px; }

/* Opt-in banner switcher */
.optin { border: 1px solid var(--rule); background: var(--card); }
.optin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--rule); font-size: 14.5px; transition: background .3s; }
.optin-bar .msg { display: flex; align-items: center; gap: 10px; }
.optin-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); flex: none; transition: background .3s; }
.optin[data-view="new"] .optin-bar { background: var(--accent-soft); }
.optin[data-view="new"] .optin-bar .dot { background: var(--accent); }
.optin-stage { position: relative; padding: 16px; }
.optin-stage .shot { transition: opacity .45s; }
.optin-stage .shot + .shot { position: absolute; inset: 16px; }
.optin[data-view="classic"] .optin-stage .shot.v-new { opacity: 0; pointer-events: none; }
.optin[data-view="new"] .optin-stage .shot.v-classic { opacity: 0; pointer-events: none; }
.optin-foot { display: flex; justify-content: space-between; gap: 12px; padding: 0 16px 14px; font-size: 13px; color: var(--soft); }

/* Screen wall */
.wall-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.wall button { all: unset; cursor: zoom-in; display: block; }
.wall button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wall .shot { --ar: 4/3; }
.wall .mobile .shot { --ar: 4/3; }
.wall .shot .ph { padding: 10px; gap: 4px; }
.wall .shot .ph::before { inset: 6px; }
.wall .shot .ph-title { font-size: 14px; }
.wall .shot .ph code { display: none; }
.wall .tile-name { font-size: 12.5px; margin-top: 6px; line-height: 1.35; }
.wall .tile-name span { color: var(--soft); display: block; }
.wall [hidden] { display: none; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; }
.lightbox::backdrop { background: rgba(245, 245, 243, .92); backdrop-filter: blur(4px); }
.lightbox .lb-inner { background: var(--card); border: 1px solid var(--rule); }
.lightbox .lb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.lightbox .shot { border: 0; --ar: 16/10; }
.lightbox .lb-head button { border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: 4px 12px; cursor: pointer; }

/* ── Draft helpers (only while DRAFT = true in site.js) ── */
.todo, .verify { border-radius: 3px; padding: 0 3px; }
.draft .todo { background: #FFE9A8; box-shadow: inset 0 -1px 0 #E2B93B; }
.draft .verify { background: #E3E6FF; box-shadow: inset 0 -1px 0 var(--accent-line); }
.draft .todo.flash, .draft .verify.flash { animation: flash 1.4s; }
@keyframes flash { 0%, 100% { outline: 0 solid transparent; } 20%, 60% { outline: 3px solid var(--accent); } }
.draft-pill { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px 6px 6px 14px; box-shadow: 0 4px 20px rgba(0, 0, 0, .12); }
.draft-pill button { border: 0; border-radius: 999px; padding: 4px 10px; cursor: pointer; background: rgba(255, 255, 255, .14); color: var(--paper); font-size: 12px; }
.draft-pill button:hover { background: var(--accent); }
.draft-pill .k { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.draft-pill.min .full { display: none; }

/* ── Reveal ──────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .1, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .split, .cs-row { grid-template-columns: 1fr; }
  .split-title, .cs-row > .cs-label { border-right: 0; border-bottom: 1px solid var(--rule); }
  .split-title-inner, .cs-row > .cs-label h2 { position: static; }
  .cs-row > .cs-label { padding-bottom: 20px; }
  .cs-row > .cs-body { padding-top: 24px; }
  .project-desc, .project-parts, .project-media, .project-foot { margin-left: 0; }
  .project-top { grid-template-columns: auto 1fr; }
  .project-cat { grid-column: 1 / -1; text-align: left; }
  .two, .three { grid-template-columns: 1fr; }
  .ba-pair { grid-template-columns: 1fr; }
  .ba-pair > .arrow { transform: rotate(90deg); justify-self: center; }
  .cs-head { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-hi { order: -1; padding: 0; }
  .hero-sub { flex-direction: column; align-items: start; }
  .facts { grid-template-columns: 1fr; }
  .facts > div:nth-child(odd) { border-right: 0; }
  .facts > div:nth-child(even) { padding-left: 0; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .badge { --size: 80px; }
  .footer-base { flex-direction: column; }
  .pager { grid-template-columns: 1fr; }
  .pager a + a { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .nav-home .up { display: none; }
  .nav-links { gap: 16px; font-size: 14px; }
  .parts a { grid-template-columns: 2.2em 1fr; }
  .parts .go { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge svg.ring { animation: none; }
  .js .reveal, .js .hero h1 .line > span, .js .hero-hi, .js .hero-sub { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Whole project row clickable without nesting links */
.project-link { position: relative; }
.stretch { text-decoration: none; }
.stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.project-link .chip, .project-link .badge { position: relative; z-index: 2; }
.project-link:hover .project-name { color: var(--ink); }
.project-link:has(.stretch:focus-visible) { outline: 2px solid var(--accent); outline-offset: -4px; }
.stretch:focus-visible { outline: none; }

.cs-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .cs-cols { grid-template-columns: 1fr; gap: 24px; } }
.canvas-note p.label { font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--soft); }

/* ── Readability pass ─────────────────────────────────────
   Serif only for large headings. Everything small reads in the sans, upright. */
.hero h1 { letter-spacing: -.03em; font-weight: 400; }
.cs-row > .cs-label h2 em, .cs-full > .cs-label h2 em, .cs-head h1 em { font-style: normal; }
.cs-row > .cs-label h2 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.15; }
.decisions h3, .card-plain h3 { font-family: var(--sans); font-weight: 600; font-size: 19px; letter-spacing: 0; line-height: 1.35; }
.decisions > li::before { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--accent); padding-top: 3px; }
.pull { font-style: normal; }
.canvas-note p { font-style: normal; font-size: 19px; line-height: 1.45; }
.prose { max-width: 64ch; }
.label { color: var(--soft); }

/* The short version: three plain answers at the top of every case study */
.short { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.short > div { padding: 28px var(--gutter) 32px; border-right: 1px solid var(--rule); }
.short > div:last-child { border-right: 0; }
.short h2 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.short p { margin: 0; font-size: 16.5px; line-height: 1.55; }
@media (max-width: 900px) {
  .short { grid-template-columns: 1fr; }
  .short > div { border-right: 0; border-bottom: 1px solid var(--rule); padding-top: 22px; padding-bottom: 22px; }
  .short > div:last-child { border-bottom: 0; }
}

/* Real screens from the prototypes: shown whole, never cropped */
.shot.full { aspect-ratio: auto; background: #fff; }
.shot.full img { height: auto; object-fit: contain; }
.shot.full .ph { position: relative; min-height: 240px; }
figure.screen { margin: 0; }
figure.screen figcaption { font-size: 14px; color: var(--soft); margin-top: 10px; max-width: 70ch; line-height: 1.5; }

/* Prototype links */
.protos { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.protos a { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-decoration: none; background: var(--card); transition: background .2s; }
.protos a:hover { background: #fff; }
.protos .t { font-family: var(--display); font-size: 24px; line-height: 1.15; }
.protos a:hover .t { color: var(--accent); }
.protos p { margin: 0; font-size: 15px; color: var(--soft); }
.protos .go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--accent); }
.shot:not(.has-img) > img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }

/* ── Project cards (home) ─────────────────────────────── */
.pcards { list-style: none; margin: 0; padding: 32px var(--gutter) 24px; display: flex; flex-direction: column; gap: 56px; }
.pcard { position: relative; }
.pcard-link { display: block; text-decoration: none; color: inherit; }
.pcard-media {
  --t1: #DCEFEA; --t2: #F3E3D8;
  position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 16 / 10;
  background:
    radial-gradient(110% 90% at 0% 0%, var(--t1) 0%, transparent 62%),
    radial-gradient(110% 90% at 100% 100%, var(--t2) 0%, transparent 62%),
    #ECEEEC;
}
.pcard-media img { position: absolute; left: 50%; top: 9%; width: 84%; height: auto; transform: translateX(-50%); border-radius: 12px; box-shadow: 0 30px 60px -30px rgba(16, 40, 44, .45), 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .7s cubic-bezier(.2, .7, .1, 1); }
.pcard-link:hover .pcard-media img { transform: translateX(-50%) translateY(-10px) scale(1.01); }
.pcard-pill { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; transform: translate(50%, 50%); opacity: 0; transition: opacity .2s; background: var(--ink); color: #fff; font-size: 14px; letter-spacing: .02em; padding: 10px 18px; border-radius: 999px; white-space: nowrap; }
.pcard-link:hover .pcard-pill { opacity: 1; }
@media (hover: none) { .pcard-pill { display: none; } }
.pcard-meta { display: grid; grid-template-columns: auto auto 1fr auto; gap: 14px; align-items: baseline; margin-top: 18px; }
.pcard-num { font-size: 14px; color: var(--soft); }
.pcard-name { font-family: var(--display); font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.015em; line-height: 1.1; }
.pcard-link:hover .pcard-name { color: var(--accent); }
.pcard-cat { font-size: 14px; color: var(--soft); }
.pcard-year { font-size: 14px; color: var(--soft); }
.pcard-desc { margin: 8px 0 0; max-width: 60ch; font-size: 16.5px; color: #3A3A3A; }
.pcard-badge { position: absolute; top: 16px; right: 16px; z-index: 4; background: rgba(255, 255, 255, .7); backdrop-filter: blur(6px); }
.pcard-media.dark { background: radial-gradient(110% 90% at 0% 0%, #2D3440 0%, transparent 62%), radial-gradient(110% 90% at 100% 100%, #3C2B24 0%, transparent 62%), #1E2126; }
.pcard-diagram { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 8% 7%; color: #E9ECEF; }
.pd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: clamp(12px, 1.3vw, 15px); }
.pd-row span { padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.pd-row i { font-style: normal; opacity: .5; }
.pd-row .pd-dim { opacity: .4; text-decoration: line-through; }
.pd-row .pd-bad { background: rgba(220, 70, 50, .2); border-color: rgba(240, 110, 90, .6); }
.pd-row .pd-good { background: rgba(60, 190, 120, .18); border-color: rgba(90, 210, 140, .6); }
.pd-cap { margin: 0 0 14px; font-size: clamp(12px, 1.2vw, 14px); color: #AEB4BB; }
@media (max-width: 720px) {
  .pcard-meta { grid-template-columns: auto 1fr auto; }
  .pcard-cat { grid-column: 1 / -1; grid-row: 2; }
  .pcard-badge { --size: 64px; top: 10px; right: 10px; }
}
.pcard-phones img { width: 24%; top: 10%; border-radius: 22px; border: 4px solid #141414; }
.pcard-phones img:nth-child(1) { left: 22%; }
.pcard-phones img:nth-child(2) { left: 50%; top: 16%; z-index: 1; }
.pcard-phones img:nth-child(3) { left: 78%; }
.about-photo { margin: 36px 0 0; max-width: 340px; }
.about-photo img { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 24px 50px -30px rgba(0,0,0,.45); }
@media (max-width: 900px) { .about-photo { max-width: 300px; } }

/* ── Hero glow v2: soft, fades out before the edge, follows the cursor ── */
.hero { border-bottom: 0; overflow: hidden; }
.hero-glow {
  position: absolute; inset: 0; left: 0; bottom: 0; width: auto; height: auto; transform: none;
  background: none; filter: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  --mx: 50%; --my: 78%;
}
.hero-glow span { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.hero-glow .g1 { width: 70vw; height: 46vh; left: calc(var(--mx) - 35vw); top: calc(var(--my) - 23vh);
  background: radial-gradient(closest-side, rgba(240, 96, 30, .55), rgba(240, 96, 30, 0)); }
.hero-glow .g2 { width: 50vw; height: 34vh; left: 12vw; top: 58%;
  background: radial-gradient(closest-side, rgba(194, 65, 12, .35), rgba(194, 65, 12, 0)); animation: drift 14s ease-in-out infinite alternate; }
.hero-glow .g3 { width: 44vw; height: 30vh; right: 8vw; top: 62%;
  background: radial-gradient(closest-side, rgba(251, 146, 60, .35), rgba(251, 146, 60, 0)); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(-4vw, 2vh) scale(1); } to { transform: translate(5vw, -3vh) scale(1.12); } }
.ripple { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(234, 88, 12, .45); animation: ripple 1.2s ease-out forwards; }
@keyframes ripple { to { transform: scale(14); opacity: 0; } }

/* ── Mobile: simple, readable, no stray lines ─────────── */
@media (max-width: 760px) {
  .frame { border-left: 0; border-right: 0; }
  .rule-top { border-top: 0; }
  .split-title, .split-title-inner { border: 0 !important; }
  .split-title-inner { padding: 40px var(--gutter) 8px; }
  .split-title h2 { font-size: 52px; }
  .split-title h2 span { padding-left: .4em; }
  .pcards { padding: 16px var(--gutter) 8px; gap: 44px; }
  .pcard-media { border-radius: 16px; }
  .pcard-desc { font-size: 16px; }
  .about-words { padding-bottom: 0; }
  .about-words p { font-size: 48px; }
  .about-body { padding: 24px var(--gutter) 40px; }
  .about-body .prose { font-size: 17px; }
  .footer { padding-top: 64px; }
  .footer h2 { font-size: 44px; }
  .hero { min-height: 88svh; padding-bottom: 48px; }
  .hero h1 { font-size: 46px; }
  .hero-sub p { font-size: 16px; }
  .hero-glow .g1 { width: 120vw; left: calc(var(--mx) - 60vw); }
  /* case studies */
  .case-head { padding: 32px var(--gutter) 24px; }
  .case-head h1 { font-size: 44px; }
  .case-hero { border: 0; }
  .case-hero .panel { padding: 16px; }
  .case-body > section { padding-top: 48px; }
  .statement { font-size: 26px; }
  .case-body .lede { font-size: 18px; }
  .facts-row { grid-template-columns: 1fr 1fr; }
  .devices { padding: 12px; gap: 12px; }
  .device img { border-width: 3px; border-radius: 18px; }
  .shelf { padding: 14px; }
  .hmw { padding: 32px 0; }
  .next-case a { padding: 40px var(--gutter); }
  .next-case .t { font-size: 40px; }
  .draft-pill { left: 8px; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .hero-glow span { animation: none; } .ripple { display: none; } }

/* ── Hero layout v2: one clean left-aligned column ── */
.hero { align-content: center; padding-bottom: clamp(80px, 14vh, 160px); }
.hero-inner { display: block; max-width: var(--max); }
.hero-hi { font-family: var(--sans); font-style: normal; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 22px; padding: 0; white-space: normal; }
.hero h1 { font-size: clamp(48px, 7.2vw, 120px); line-height: 1; letter-spacing: -.03em; }
.hero-sub { display: block; margin-top: 32px; }
.hero-sub p { max-width: 44ch; font-size: 19px; line-height: 1.6; color: #3A3A3A; }

/* ── No hanging lines anywhere ── */
.frame { border-left: 0 !important; border-right: 0 !important; }
.split-title { border-right: 0 !important; border-bottom: 0 !important; }
.rule-top { border-top: 0 !important; }
.footer-base { border-top: 1px solid var(--rule); }
@media (max-width: 760px) {
  .hero { min-height: 80svh; align-content: end; padding-bottom: 56px; }
  .hero h1 { font-size: 44px; }
  .hero-hi { font-size: 13px; margin-bottom: 14px; }
  .hero-sub p { font-size: 16px; }
}
.hero-glow .g1 { background: radial-gradient(closest-side, rgba(234, 88, 12, .85), rgba(234, 88, 12, .35) 55%, rgba(234, 88, 12, 0)); filter: blur(50px); }
.hero-glow .g2 { background: radial-gradient(closest-side, rgba(194, 65, 12, .6), rgba(194, 65, 12, 0)); }
.hero-glow .g3 { background: radial-gradient(closest-side, rgba(249, 115, 22, .55), rgba(249, 115, 22, 0)); }
/* glow v3: no cursor-follow, slow organic drift; soft flowing ripples */
.hero-glow .g1 { left: 15vw; top: 55%; animation: drift 20s ease-in-out infinite alternate; }
.ripple { width: 160px; height: 160px; margin: -80px 0 0 -80px; border: 0; z-index: 0;
  background: radial-gradient(closest-side, rgba(234,88,12,.22), rgba(234,88,12,.08) 60%, transparent);
  filter: blur(14px); animation: flow 2.6s cubic-bezier(.2,.6,.2,1) forwards; }
.ripple.big { background: radial-gradient(closest-side, transparent 55%, rgba(234,88,12,.25) 70%, transparent); filter: blur(6px); }
@keyframes flow { from { transform: scale(.3); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
.hero-inner { position: relative; z-index: 1; }
.hero-grid { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero .ripple, .hero-glow { display: none; }
.about-waves { position: relative; height: 0; overflow: visible; pointer-events: none; z-index: 0; }
.about-waves span { position: absolute; left: -10vw; width: 120vw; height: 420px; top: -60px; border-radius: 50%; filter: blur(70px); opacity: .55;
  background: radial-gradient(60% 50% at 50% 50%, rgba(234,88,12,.45), transparent 70%); animation: wave 16s ease-in-out infinite alternate; }
.about-waves span:nth-child(2) { top: 180px; background: radial-gradient(50% 50% at 30% 50%, rgba(249,115,22,.4), transparent 70%); animation-duration: 21s; animation-direction: alternate-reverse; }
.about-waves span:nth-child(3) { top: 420px; background: radial-gradient(50% 50% at 70% 50%, rgba(194,65,12,.35), transparent 70%); animation-duration: 26s; }
@keyframes wave { from { transform: translateX(-8vw) scaleY(.85); } to { transform: translateX(8vw) scaleY(1.15); } }
#about { position: relative; z-index: 1; }
body { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { .about-waves span { animation: none; } }
/* readable home */
.pcard-desc { font-size: 18px; } .pcard-cat, .pcard-year, .pcard-num { font-size: 15px; }
.about-body .prose { font-size: 19px; } .facts dd, .timeline li { font-size: 16px; } .facts dt, .timeline .when { font-size: 14px; }
.hero-sub p { font-size: 20px; }
.hero-photo { display: none; }
@media (max-width: 760px) {
  .hero { min-height: 0; align-content: start; padding: calc(var(--nav-h) + 28px) var(--gutter) 40px; }
  .hero-hi { display: flex; align-items: center; gap: 12px; font-size: 14px; margin-bottom: 18px; }
  .hero-photo { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accent); }
  .hero h1 { font-size: 42px; }
  .hero-sub { margin-top: 18px; }
  .split-title-inner { padding-top: 24px; }
}
@media (max-width: 420px) { .nav-links { gap: 14px; font-size: 14px; } .nav-home { font-size: 19px; } }
.hero-photo { object-position: 50% 35%; }
/* Home headings in the same readable sans */
.hero h1, .split-title h2, .pcard-name, .footer h2, .about-words p { font-family: var(--sans); font-weight: 700; letter-spacing: -.03em; font-style: normal !important; }
.hero h1 em { font-style: normal; color: var(--accent); }
.split-title h2 { font-size: clamp(44px, 5vw, 76px); }
.about-words p { font-size: clamp(44px, 5vw, 76px); }
