/* iamtudor.com — inner pages (/projects, /now).

   ONE SYSTEM, use nothing outside it:
   Type     --t-hero  the page title only
            --t-1     chapter headlines, ending links
            --t-2     second-level lines: hero story, side titles, tile titles, list items
            --t-3     reading paragraphs (the lede), questions, index entries
            --t-body  small paragraphs
            --t-label small capitals labels
   Layout   12 columns inside --edge-l / --edge-r. Content never wider than 1440 px.
            Desktop (>= 960 px): two sides, nothing stacked in a narrow centre column.
            Narrow screens: one column.
   Visuals  The horizon is a fixed wallpaper behind the whole Projects page; every section
            scrolls over it on a soft dark veil. Each project has one artwork in a frame.
            No device mock-ups, no website screenshots, nothing fills the screen (Tudor, 24 Oct).
   Motion   Scroll-linked movement uses CSS scroll-driven animations (html.sda), which the
            browser runs in step with scrolling. Without support, or with reduced motion,
            everything is visible and still. No blur filters (they glitch on some GPUs). */

:root {
  --t-hero: clamp(56px, 9vw, 150px);
  --t-1: clamp(42px, 5.4vw, 88px);
  --t-2: clamp(26px, 2.6vw, 42px);
  --t-3: clamp(20px, 1.6vw, 26px);
  --t-body: 17px;
  --t-label: 12px;

  --gut: clamp(20px, 5vw, 80px);
  --gut-l: var(--gut);
  --edge-r: max(var(--gut), calc((100vw - 1440px) / 2));
  --edge-l: max(var(--gut-l), calc((100vw - 1440px) / 2));
  --col-gap: clamp(20px, 2.2vw, 36px);
  --line: rgba(233, 230, 223, .16);
  --veil: rgba(10, 13, 20, .62);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 1100px) { :root { --gut-l: max(var(--gut), 120px); } }

.page main { position: relative; z-index: 1; }
.label {
  font: 600 var(--t-label)/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ── Wallpaper ───────────────────────────────────────────────────────── */
.wallpaper { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--night); }
.wallpaper img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 70%; transform: scale(1.02); }
.sda .wallpaper img { animation: wall linear both; animation-timeline: scroll(root); }
@keyframes wall { from { transform: scale(1.02); } to { transform: scale(1.12) translateY(-2%); } }

/* ── Side rail (desktop) ─────────────────────────────────────────────── */
.rail { display: none; }
@media (min-width: 1100px) {
  .rail {
    position: fixed;
    z-index: 3;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    gap: 18px;
    font: 500 var(--t-label)/1 var(--sans);
    letter-spacing: .08em;
  }
  .rail::before, .rail::after {
    content: "";
    position: absolute;
    left: 10px;
    top: -24px;
    bottom: -24px;
    width: 1px;
    background: var(--line);
  }
  .rail::after { background: var(--dawn-3); transform-origin: top; transform: scaleY(0); }
  .sda .rail::after { animation: grow linear both; animation-timeline: scroll(root); }
  .rail a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 26px;
    color: var(--soft);
    text-decoration: none;
  }
  .rail a::before {
    content: "";
    position: absolute;
    left: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--night);
    border: 1px solid rgba(233, 230, 223, .35);
    transition: background .3s, border-color .3s, transform .3s;
  }
  .rail em {
    font-style: normal;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 4px 8px;
    margin-left: -4px;
    border-radius: 6px;
    background: rgba(10, 13, 20, .85);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .3s, transform .3s;
  }
  .rail a:hover em { opacity: 1; transform: none; }
  .rail a[aria-current] { color: var(--fg); }
  .rail a[aria-current]::before { background: var(--dawn-3); border-color: var(--dawn-3); transform: scale(1.3); }
}
@keyframes grow { to { transform: scaleY(1); } }

/* ── Word reveal, reading fill, reveal-on-enter ──────────────────────── */
.motion [data-split] .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.5em) rotate(3deg);
  transform-origin: 0 100%;
  transition: opacity .8s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i) * 60ms);
}
.motion [data-split].in .w { opacity: 1; transform: none; }
.motion [data-fill] .w { color: rgba(233, 230, 223, .58); transition: color .3s ease; }
.motion [data-fill] .w.lit { color: var(--fg); }
.motion [data-fill] em .w.lit { color: var(--dawn-3); }
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.motion [data-reveal].in { opacity: 1; transform: none; }

/* ── Hero (over the wallpaper) ───────────────────────────────────────────
   Still: one screen — title high, story bottom-left, index bottom-right.
   Scroll (html.sda): title starts in the middle and moves to the top-left; the story lines
   rise one by one; the index slides in; then all of it fades as the first chapter arrives. */
.hero { position: relative; }
.hero .sticky { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.sda .hero { height: 360vh; view-timeline: --hero block; }
.sda .hero .sticky { position: sticky; top: 0; }
/* The first chapter slides up over the hero's last frame — no black screen between them. */
.sda .hero + .chapter { margin-top: -60vh; }

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 13, 20, .5), rgba(10, 13, 20, 0) 30%, rgba(10, 13, 20, .25) 70%, rgba(10, 13, 20, .75));
}
.hero-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 13, 20, .65), rgba(10, 13, 20, 0) 60%); }

.hero-title {
  --tx: calc(var(--edge-l) - 50vw + 22vw);
  --ty: -31vh;
  --ts: .52;
  position: absolute;
  left: 50%;
  top: 30%;
  margin: 0;
  font-weight: 400;
  font-size: var(--t-hero);
  line-height: .88;
  letter-spacing: -.03em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.hero-title em { color: var(--dawn-3); }
.hero-lines { position: absolute; left: var(--edge-l); bottom: clamp(48px, 12vh, 130px); font-size: var(--t-2); line-height: 1.12; }
.hero-lines p:last-child { color: var(--dawn-3); font-style: italic; }
.hero-index { position: absolute; right: var(--edge-r); bottom: clamp(48px, 12vh, 130px); width: min(380px, 30vw); list-style: none; padding: 0; margin: 0; }
.hero-index li { border-bottom: 1px solid var(--line); }
.hero-index li:first-child { border-top: 1px solid var(--line); }
.hero-index a {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  align-items: baseline;
  padding: 14px 0;
  text-decoration: none;
  transition: padding .35s var(--ease), color .3s;
}
.hero-index a:hover { padding-left: 8px; color: var(--dawn-3); }
.hero-index .n, .hero-index .s { font: 500 11px/1 var(--sans); letter-spacing: .1em; color: var(--soft); }
.hero-index .s { text-transform: uppercase; }
.hero-index .t { font-size: var(--t-3); line-height: 1; }

.cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--soft); display: none; }
.sda .cue { display: block; }
.cue::after { content: ""; display: block; width: 1px; height: 36px; margin: 12px auto 0; background: rgba(242, 195, 143, .8); transform-origin: top; animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.3); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

.sda .hero-title, .sda .hero-lines p, .sda .hero-index li, .sda .hero-veil, .sda .hero-shade, .sda .cue {
  animation-timeline: --hero;
  animation-range: contain 0% contain 100%;
  animation-fill-mode: both;
  animation-timing-function: linear;
}
.sda .hero-title { top: 50%; animation-name: h-title; }
.sda .hero-veil { animation-name: h-veil; }
.sda .hero-shade { animation-name: h-shade; }
.sda .cue { animation-name: h-cue; }
.sda .hero-lines p:nth-child(1) { animation-name: h-l1; }
.sda .hero-lines p:nth-child(2) { animation-name: h-l2; }
.sda .hero-lines p:nth-child(3) { animation-name: h-l3; }
.sda .hero-index li { animation-name: h-idx; }
.hero-index li:nth-child(1) { --ix: 40px; }
.hero-index li:nth-child(2) { --ix: 80px; }
.hero-index li:nth-child(3) { --ix: 120px; }
.hero-index li:nth-child(4) { --ix: 160px; }

@keyframes h-title {
  0%, 3% { transform: translate(-50%, -50%); opacity: 1; animation-timing-function: cubic-bezier(.6, 0, .2, 1); }
  26%, 74% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(var(--ts)); opacity: 1; }
  88%, 100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(var(--ts)); opacity: 0; }
}
@keyframes h-veil { 0%, 3% { opacity: 0; } 26%, 74% { opacity: 1; } 88%, 100% { opacity: 0; } }
@keyframes h-shade { 0%, 76% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes h-cue { 0% { opacity: 1; } 5%, 100% { opacity: 0; } }
@keyframes h-l1 { 0%, 18% { opacity: 0; transform: translateY(36px); } 30%, 74% { opacity: 1; transform: none; } 88%, 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes h-l2 { 0%, 28% { opacity: 0; transform: translateY(36px); } 40%, 74% { opacity: 1; transform: none; } 88%, 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes h-l3 { 0%, 38% { opacity: 0; transform: translateY(36px); } 50%, 74% { opacity: 1; transform: none; } 88%, 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes h-idx { 0%, 48% { opacity: 0; transform: translateX(var(--ix)); } 62%, 74% { opacity: 1; transform: none; } 88%, 100% { opacity: 0; transform: none; } }

/* Narrow or short screens: one column. Story and index share one place, one after the other. */
@media (max-width: 959px), (max-height: 640px) {
  .hero-title { --tx: 0px; --ty: -32vh; --ts: .6; font-size: clamp(48px, 13vw, 96px); }
  .hero-lines, .hero-index { left: var(--gut); right: var(--gut); width: auto; bottom: auto; top: 34%; }
  .hero-index .t { font-size: 20px; }
  .hero-index a { padding: 10px 0; }
  .sda .hero-lines p:nth-child(1) { animation-name: h-l1s; }
  .sda .hero-lines p:nth-child(2) { animation-name: h-l2s; }
  .sda .hero-lines p:nth-child(3) { animation-name: h-l3s; }
  .sda .hero-index li { animation-name: h-idxs; }
  html:not(.sda) .hero .sticky { height: auto; min-height: 100svh; display: grid; align-content: end; gap: 32px; padding: 120px var(--gut) 56px; }
  html:not(.sda) .hero-title, html:not(.sda) .hero-lines, html:not(.sda) .hero-index { position: relative; inset: auto; transform: none; }
}
@keyframes h-l1s { 0%, 16% { opacity: 0; transform: translateY(30px); } 26%, 46% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes h-l2s { 0%, 22% { opacity: 0; transform: translateY(30px); } 32%, 46% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes h-l3s { 0%, 28% { opacity: 0; transform: translateY(30px); } 38%, 46% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes h-idxs { 0%, 54% { opacity: 0; transform: translateY(20px); } 64%, 80% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: none; } }

/* ── Chapters (a soft veil over the wallpaper) ───────────────────────── */
.chapter {
  position: relative;
  padding: clamp(110px, 16vh, 180px) var(--edge-r) clamp(90px, 14vh, 150px) var(--edge-l);
  background: var(--veil);
}
.hero + .chapter { background: linear-gradient(rgba(10, 13, 20, 0), var(--veil) 55vh); }
.ending { background: var(--veil); }

.grid12 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) { .grid12 { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); } }

.ch-intro { align-items: end; }
@media (min-width: 960px) {
  .ch-title { grid-column: 1 / span 7; }
  .ch-copy { grid-column: 8 / span 5; }
}
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.eyebrow .ix { color: var(--soft); }
.eyebrow .status { color: var(--dawn-3); }
.eyebrow .status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242, 195, 143, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(242, 195, 143, 0); } }
.chapter h2 { margin-top: 22px; font-weight: 400; font-size: var(--t-1); line-height: .95; letter-spacing: -.02em; text-wrap: balance; }
.chapter h2 em { color: var(--dawn-3); }
.ch-lede { font: 400 var(--t-3)/1.45 var(--serif); color: rgba(233, 230, 223, .92); text-wrap: pretty; }
.facts { margin: 28px 0 0; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); font: 400 16px/1.4 var(--sans); }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { padding-right: 24px; color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; }

/* ── Feature: one framed artwork and the story beside it ─────────────── */
.feature { margin-top: clamp(64px, 10vh, 120px); align-items: center; }
@media (min-width: 960px) {
  .feature .frame { grid-column: 1 / span 7; }
  .feature .feature-side { grid-column: 9 / span 4; }
  .feature.flip .frame { grid-column: 6 / span 7; grid-row: 1; }
  .feature.flip .feature-side { grid-column: 1 / span 4; grid-row: 1; }
}
.frame {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 28px;
  background: var(--night);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 50px 110px -40px rgba(0, 0, 0, .85);
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.kicker { color: var(--dawn-3); }
.side-title { margin-top: 14px; font-size: var(--t-2); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.side-text { margin-top: 16px; font: 400 var(--t-body)/1.6 var(--sans); color: rgba(233, 230, 223, .8); }

.sda .frame { animation: frame-in both cubic-bezier(.2, .7, .2, 1); animation-timeline: view(); animation-range: entry 0% cover 42%; }
.sda .frame img { animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
@keyframes frame-in { from { clip-path: inset(12% 9% 12% 9% round 28px); transform: translateY(70px); } to { clip-path: inset(0 round 28px); transform: none; } }
@keyframes drift { from { transform: scale(1.1) translateY(-4%); } to { transform: scale(1.1) translateY(4%); } }

.questions { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.questions li { padding: 16px 0 16px 20px; border-left: 1px solid var(--dawn-3); font-size: var(--t-3); line-height: 1.3; }
.questions li:nth-child(2) { --d: 150; }
.questions li:nth-child(3) { --d: 300; }

.bio-lines { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.bio-line { display: grid; grid-template-columns: 2.2rem 1fr; align-items: baseline; font-size: var(--t-3); line-height: 1.25; }
.bio-line span { font: 500 11px/1 var(--sans); letter-spacing: .1em; color: var(--soft); }
.bio-line:last-child { color: var(--dawn-3); }
.bio-line:nth-child(2) { --d: 120; }
.bio-line:nth-child(3) { --d: 240; }
.bio-line:nth-child(4) { --d: 360; }
.bio-line:nth-child(5) { --d: 480; }

/* ── Tiles ───────────────────────────────────────────────────────────── */
.tiles { list-style: none; padding: 0; margin: clamp(64px, 10vh, 120px) 0 0; }
@media (min-width: 960px) {
  .tiles .tile:nth-child(1) { grid-column: 1 / span 4; }
  .tiles .tile:nth-child(2) { grid-column: 5 / span 4; margin-top: 56px; }
  .tiles .tile:nth-child(3) { grid-column: 9 / span 4; margin-top: 112px; }
}
.tile {
  --rx: 0deg;
  --ry: 0deg;
  padding: clamp(26px, 2.4vw, 36px);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  border-radius: 24px;
  background: rgba(10, 13, 20, .55);
  border: 1px solid rgba(233, 230, 223, .12);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), border-color .3s;
}
.tile:hover { border-color: rgba(242, 195, 143, .45); }
.motion .tile[data-reveal] { transform: perspective(900px) translateY(60px) rotateX(12deg); transition: opacity .9s var(--ease), transform 1.1s var(--ease), border-color .3s; }
.motion .tile[data-reveal].in { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); }
.tiles .tile:nth-child(2) { --d: 120; }
.tiles .tile:nth-child(3) { --d: 240; }
.tile-n { color: var(--dawn-3); }
.tile b { display: block; font: 400 var(--t-2)/1.05 var(--serif); letter-spacing: -.01em; }
.tile span:last-child { display: block; margin-top: 12px; font: 400 16px/1.55 var(--sans); color: rgba(233, 230, 223, .75); }

/* ── Marquee ─────────────────────────────────────────────────────────── */
.marquee {
  margin: clamp(64px, 10vh, 120px) calc(var(--edge-r) * -1) 0 calc(var(--edge-l) * -1);
  padding: 20px 0;
  border-top: 1px solid rgba(233, 230, 223, .1);
  border-bottom: 1px solid rgba(233, 230, 223, .1);
  overflow: hidden;
  white-space: nowrap;
}
.marquee .track { display: inline-block; font-size: var(--t-2); line-height: 1; }
.marquee .track i { font-style: normal; color: var(--dawn-3); padding: 0 .6em; font-size: .6em; vertical-align: .2em; }
.marquee .track em { color: var(--soft); }
.sda .marquee .track { animation: slide-l linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
.sda .marquee[data-marquee="right"] .track { animation-name: slide-r; }
@keyframes slide-l { from { transform: translateX(0); } to { transform: translateX(-30%); } }
@keyframes slide-r { from { transform: translateX(-30%); } to { transform: translateX(0); } }

.ch-foot { margin-top: clamp(40px, 7vh, 72px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.ch-foot p { font: 400 var(--t-body)/1.5 var(--sans); color: var(--soft); max-width: 34em; }
.cta {
  --mx: 0px;
  --my: 0px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 26px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--night);
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--ease), background .3s;
}
.cta:hover { background: var(--dawn-3); }
.cta span { transition: transform .35s; }
.cta:hover span { transform: translate(3px, -3px); }

/* ── Ending ──────────────────────────────────────────────────────────── */
.ending { position: relative; padding: clamp(90px, 16vh, 180px) var(--edge-r) clamp(80px, 12vh, 130px) var(--edge-l); }
.ending a { display: block; padding: 30px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: var(--t-1); line-height: 1; letter-spacing: -.02em; transition: color .3s, padding .4s var(--ease); }
@media (min-width: 960px) { .ending a:first-child { grid-column: 1 / span 6; } .ending a:last-child { grid-column: 7 / span 6; } }
.ending a small { display: block; margin-bottom: 14px; color: var(--soft); }
.ending a:hover { color: var(--dawn-3); padding-left: 14px; }

/* ── /now ────────────────────────────────────────────────────────────── */
.now-wide { display: grid; min-height: 100vh; }
.now-art { position: relative; min-height: 56vh; overflow: hidden; }
.now-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
.now-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 13, 20, .5), transparent 30%, transparent 60%, var(--night)); }
.now-main { padding: 40px var(--gut) 96px; }
@media (min-width: 960px) {
  .now-wide { grid-template-columns: 5fr 7fr; }
  .now-art { position: sticky; top: 0; height: 100vh; min-height: 0; }
  .now-art::after { background: linear-gradient(90deg, transparent 55%, var(--night)), linear-gradient(180deg, rgba(10, 13, 20, .55), transparent 25%); }
  .now-main { padding: clamp(140px, 22vh, 220px) var(--edge-r) 120px clamp(24px, 4vw, 72px); }
}
.now-main h1 { font-weight: 400; font-size: var(--t-hero); line-height: .88; letter-spacing: -.03em; }
.now-main h1 em { color: var(--dawn-3); }
.now-main .lede { font-size: var(--t-3); }
.now-main .now-list li { font-size: var(--t-2); padding: 24px 0; }
.now-main .now-list li[data-reveal]:nth-child(2) { --d: 100; }
.now-main .now-list li[data-reveal]:nth-child(3) { --d: 200; }
.now-main .now-list li[data-reveal]:nth-child(4) { --d: 300; }
.now-main .back { margin-top: 64px; font-size: var(--t-2); }

/* ── Home ────────────────────────────────────────────────────────────────
   Same wallpaper and system as /projects. The veil over the horizon lifts as you scroll:
   the page starts at night and ends near morning. The bio is never edited. */
.home .wallpaper::after { content: ""; position: absolute; inset: 0; background: var(--night); opacity: .3; }
.sda.home .wallpaper::after, .sda .home .wallpaper::after { animation: morning linear both; animation-timeline: scroll(root); }
@keyframes morning { from { opacity: .38; } to { opacity: .08; } }

/* Story scene: 00 then 01–05 stack one by one; at the end all six are on screen. */
.story { position: relative; }
.story .sticky { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 110px var(--edge-r) 90px var(--edge-l); overflow: hidden; }
.sda .story { height: 560vh; view-timeline: --story block; }
.sda .story .sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.stack { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(8px, 2vh, 22px); max-width: 1300px; }
.row { display: grid; grid-template-columns: clamp(56px, 6.4vw, 104px) minmax(0, 1fr); align-items: baseline; }
.row p { font-size: clamp(26px, 3.3vw, 56px); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
.row p em { color: var(--dawn-3); }
.row .big-num { font-size: clamp(28px, 3vw, 50px); }
.r0 { display: block; margin-bottom: clamp(6px, 1.6vh, 18px); }
.title-box { display: inline-grid; grid-template-columns: clamp(56px, 6.4vw, 104px) auto; align-items: baseline; transform-origin: 50% 50%; }
.r0 h1 { font-weight: 400; font-size: clamp(48px, 6.6vw, 112px); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.r0 h1 em { color: var(--dawn-3); }
.story .cue { display: none; }
.sda .story .cue { display: block; animation: h-cue linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }

.sda .title-box, .sda .row:not(.r0) { animation-timeline: --story; animation-fill-mode: both; animation-timing-function: linear; }
.sda .title-box { animation-name: title-home; animation-range: contain 0% contain 100%; }
.sda .row:not(.r0) { animation-name: stack-in; }
.sda .r1 { animation-range: contain 16% contain 27%; }
.sda .r2 { animation-range: contain 30% contain 41%; }
.sda .r3 { animation-range: contain 44% contain 55%; }
.sda .r4 { animation-range: contain 58% contain 69%; }
.sda .r5 { animation-range: contain 72% contain 83%; }
@keyframes title-home {
  0%, 3% { transform: translate(var(--tx0, 0px), var(--ty0, 0px)) scale(var(--s0, 1.7)); animation-timing-function: cubic-bezier(.6, 0, .2, 1); }
  15%, 100% { transform: none; }
}
@keyframes stack-in { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .story .sticky { padding: 90px var(--gut) 110px; }
  .row { grid-template-columns: 44px minmax(0, 1fr); }
  .title-box { grid-template-columns: 44px auto; }
  .row p { font-size: 21px; }
  .row .big-num { font-size: 24px; }
  .r0 h1 { font-size: 40px; }
}

.home-work { position: relative; padding: clamp(110px, 18vh, 200px) var(--edge-r) clamp(80px, 12vh, 130px) var(--edge-l); background: linear-gradient(rgba(10, 13, 20, 0), var(--veil) 40vh); }
.work-head { align-items: end; }
.work-head h2 { font-weight: 400; font-size: var(--t-1); line-height: .95; letter-spacing: -.02em; }
.work-head h2 em { color: var(--dawn-3); }
@media (min-width: 960px) {
  .work-head h2 { grid-column: 1 / span 8; }
  .work-head .cta { grid-column: 10 / span 3; justify-self: end; }
}
.cards { list-style: none; padding: 0; margin: clamp(48px, 8vh, 88px) 0 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cards li { grid-column: span 3; }
  .cards li:nth-child(2) { margin-top: 48px; }
  .cards li:nth-child(3) { margin-top: 24px; }
  .cards li:nth-child(4) { margin-top: 72px; }
}
.cards li:nth-child(2) { --d: 100; }
.cards li:nth-child(3) { --d: 200; }
.cards li:nth-child(4) { --d: 300; }
.cards a { display: block; text-decoration: none; }
.cards .frame { aspect-ratio: 4 / 5; border-radius: 22px; }
.cards .frame img { transform: scale(1.02); transition: transform 1.2s var(--ease); }
.cards a:hover .frame img { transform: scale(1.08); }
.cards .status { display: block; margin-top: 20px; color: var(--dawn-3); }
.cards b { display: block; margin-top: 10px; font: 400 var(--t-2)/1.05 var(--serif); }
.cards .card-text { display: block; margin-top: 8px; font: 400 var(--t-body)/1.5 var(--sans); color: rgba(233, 230, 223, .75); }
.cards a:hover b { color: var(--dawn-3); }
.home .ending { background: var(--veil); align-items: end; }

/* Social links: clear pill buttons on every page */
.social { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(233, 230, 223, .28);
  background: rgba(10, 13, 20, .5);
  color: var(--soft);
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  transition: color .3s, border-color .3s, background .3s;
}
.social a span { color: var(--fg); font-weight: 600; }
.social a i { font-style: normal; color: var(--dawn-3); transition: transform .3s; }
.social a:hover { border-color: var(--dawn-3); background: rgba(242, 195, 143, .1); color: var(--fg); }
.social a:hover i { transform: translate(2px, -2px); }
.social .label { margin-left: 8px; color: var(--soft); }
.ending .social { grid-column: 1 / -1; margin-top: 28px; }
.home .ending .social { grid-column: auto; margin-top: 0; align-self: end; padding-bottom: 34px; }
@media (min-width: 960px) { .home .ending .social { grid-column: 7 / span 6; justify-self: end; } }
.now-main .social { margin-top: 48px; }
.ending .social a { display: inline-flex; padding: 13px 20px; border-bottom: 1px solid rgba(233, 230, 223, .28); font: 500 16px/1 var(--sans); letter-spacing: 0; }
.ending .social a:hover { padding-left: 20px; border-color: var(--dawn-3); }

/* Big section numbers on the home page (Apple's San Francisco, gold) */
.big-num {
  display: block;
  font: 600 clamp(44px, 5.2vw, 88px)/1 var(--display);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--dawn-3), var(--dawn-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Story layout on wide screens: 00 centered, then left, right, left, right, centered. */
@media (min-width: 960px) {
  .stack { max-width: none; width: 100%; }
  .row { width: fit-content; max-width: 62%; }
  .r0 { justify-self: center; }
  .r1, .r3 { justify-self: start; }
  .r2, .r4 { justify-self: end; text-align: right; }
  .r5 { justify-self: center; max-width: none; }
  .r2, .r4 { --from: 70px; }
  .r1, .r3 { --from: -70px; }
  .sda .row:not(.r0) { animation-name: stack-in-x; }
  .sda .r5 { animation-name: stack-in; }
}
@keyframes stack-in-x { from { opacity: 0; transform: translateX(var(--from, 0px)); } to { opacity: 1; transform: none; } }
@media (min-width: 960px) {
  .r2, .r4 { grid-template-columns: minmax(0, 1fr) clamp(56px, 6.4vw, 104px); }
  .r2 .big-num, .r4 .big-num { order: 2; text-align: right; }
}

/* Numbers sit above their line (Tudor, 24 Oct). Sizes follow height too, so all six fit. */
.row, .title-box { display: block; }
.row .big-num, .title-box .big-num { display: block; margin-bottom: .18em; font-size: clamp(20px, min(2.6vw, 4.2vh), 42px); }
.row p { font-size: clamp(22px, min(3vw, 5.2vh), 52px); }
.r0 h1 { font-size: clamp(44px, min(6.4vw, 11vh), 108px); }
.title-box { text-align: center; }
.stack { gap: clamp(8px, 2.2vh, 24px); }
.story .sticky { padding-top: max(84px, 11vh); padding-bottom: max(40px, 6vh); }
@media (max-width: 959px) {
  .title-box { text-align: left; }
}

/* Home background video: the still picture shows first, the video fades in once it plays.
   Never shown with reduced motion (motion.js does not load it then). */
.wall-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 70%; opacity: 0; transition: opacity 1.6s ease; }
.wall-video.playing { opacity: 1; }

/* Sharp title: it is drawn at its large start size and SHRINKS into its slot (never enlarged).
   --k is the resting scale; motion.js sets the row height to the shrunk size. */
:root { --k: .6; }
.r0 h1 { font-size: clamp(72px, min(10.6vw, 18vh), 180px); }
.r0 .title-box .big-num { font-size: clamp(32px, min(4.2vw, 7vh), 70px); }
.title-box { transform-origin: 50% 0; }
.motion .title-box { transform: scale(var(--k)); }
@media (max-width: 959px) {
  .title-box { transform-origin: 0 0; }
  .r0 h1 { font-size: 66px; }
}
@keyframes title-home {
  0%, 3% { transform: translate(var(--tx0, 0px), var(--ty0, 0px)) scale(1); animation-timing-function: cubic-bezier(.6, 0, .2, 1); }
  15%, 100% { transform: scale(var(--k)); }
}

/* ── Writing ─────────────────────────────────────────────────────────────
   Wallpaper behind, soft veil over it. The list is a two-column grid of essays;
   an article puts the facts on the left (sticky) and the text on the right at a
   readable width. */
.writing main { padding-bottom: 40px; }
.writing-head, .essay-head { padding: clamp(130px, 22vh, 220px) var(--edge-r) 0 var(--edge-l); align-items: end; }
.writing-head h1, .essay-title h1 { font-weight: 400; line-height: .92; letter-spacing: -.025em; text-wrap: balance; }
.writing-head h1 { font-size: var(--t-hero); }
.writing-head h1 em { color: var(--dawn-3); }
.essay-title h1 { margin-top: 22px; font-size: var(--t-1); }
@media (min-width: 960px) {
  .writing-head h1, .essay-title { grid-column: 1 / span 7; }
  .writing-intro, .essay-sum { grid-column: 8 / span 5; }
}
.writing .wallpaper::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(10, 13, 20, .45), rgba(10, 13, 20, .85) 70vh); }

.essays { list-style: none; margin: clamp(64px, 10vh, 110px) 0 0; padding: 0 var(--edge-r) 0 var(--edge-l); display: grid; gap: clamp(40px, 6vh, 72px) var(--col-gap); }
@media (min-width: 900px) {
  .essays { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .essays li:nth-child(even) { margin-top: 90px; }
}
.essays li:nth-child(2) { --d: 120; }
.essays li:nth-child(4) { --d: 120; }
.essays a { display: grid; gap: 22px; text-decoration: none; }
.essays .frame { aspect-ratio: 16 / 10; }
.essays .frame img { transform: scale(1.03); transition: transform 1.2s var(--ease); }
.essays a:hover .frame img { transform: scale(1.08); }
.essays .status { color: var(--dawn-3); }
.essays b { display: block; margin-top: 12px; font: 400 var(--t-2)/1.06 var(--serif); letter-spacing: -.01em; transition: color .3s; }
.essays a:hover b { color: var(--dawn-3); }
.essays .card-text { display: block; margin-top: 12px; font: 400 var(--t-body)/1.55 var(--sans); color: rgba(233, 230, 223, .78); max-width: 34em; }
.essays .when { display: block; margin-top: 14px; color: var(--soft); }

.essay-grid { padding: clamp(56px, 9vh, 96px) var(--edge-r) clamp(40px, 8vh, 80px) var(--edge-l); align-items: start; }
@media (min-width: 960px) {
  .essay-meta { grid-column: 1 / span 3; position: sticky; top: 110px; }
  .essay-text { grid-column: 5 / span 7; }
}
.essay-meta .facts { margin-top: 0; }
.essay-meta .draft-note { margin-top: 22px; }
.back-link { display: inline-block; margin-top: 26px; color: var(--fg); text-decoration: none; border-bottom: 1px solid rgba(233, 230, 223, .3); padding-bottom: 4px; }
.back-link:hover { color: var(--dawn-3); border-color: var(--dawn-3); }
.essay-text { max-width: 40rem; }
.essay-text p { font: 400 clamp(19px, 1.35vw, 21px)/1.65 var(--serif); color: rgba(233, 230, 223, .92); }
.essay-text p + p { margin-top: 1.1em; }
.essay-text p:first-child { font-size: clamp(23px, 1.8vw, 28px); line-height: 1.45; color: var(--fg); }
.essay-text h2 { margin: 1.8em 0 .6em; font: 400 var(--t-2)/1.1 var(--serif); color: var(--dawn-3); }
.writing .ending { background: transparent; }
.article .wallpaper::after { background: linear-gradient(rgba(10, 13, 20, .5), rgba(10, 13, 20, .82) 45vh); }

/* Readability (Tudor, 24 Oct): long text in San Francisco, near-white, generous spacing.
   The serif stays for headlines only. */
.essay-text p { font: 400 clamp(18px, 1.3vw, 20px)/1.75 var(--sans); color: rgba(255, 255, 255, .9); letter-spacing: -.003em; }
.essay-text p:first-child { font: 400 clamp(21px, 1.6vw, 24px)/1.55 var(--sans); color: #fff; letter-spacing: -.01em; }
.essay-text p + p { margin-top: 1.15em; }
.essay-sum, .writing-intro .ch-lede { font: 400 clamp(19px, 1.45vw, 22px)/1.55 var(--sans); color: rgba(255, 255, 255, .88); }
.essays .card-text { font-size: 17px; color: rgba(255, 255, 255, .86); }
.essays .when, .facts dt { color: rgba(233, 230, 223, .7); }
.article .wallpaper::after { background: linear-gradient(rgba(10, 13, 20, .62), rgba(10, 13, 20, .9) 40vh); }
.writing:not(.article) .wallpaper::after { background: linear-gradient(rgba(10, 13, 20, .5), rgba(10, 13, 20, .88) 60vh); }
.essay-text .signoff { margin-top: 2em; font: 400 clamp(26px, 2.2vw, 34px)/1.25 var(--serif); font-style: italic; color: var(--dawn-3); }

/* Link to the biography, last in the story stack */
.r6 { margin-top: clamp(4px, 1.2vh, 14px); }
.story-link {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  border: 1px solid rgba(242, 195, 143, .5);
  background: rgba(10, 13, 20, .45);
  color: var(--fg); font: 500 16px/1 var(--sans); text-decoration: none;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--ease), background .3s, border-color .3s, color .3s;
}
.story-link span { color: var(--dawn-3); transition: transform .3s; }
.story-link:hover { background: rgba(242, 195, 143, .14); border-color: var(--dawn-3); }
.story-link:hover span { transform: translateX(4px); }
@media (min-width: 960px) { .r6 { justify-self: center; } }
.sda .r6 { animation-range: contain 84% contain 92%; }
@media (min-width: 960px) and (max-height: 800px) {
  .story .sticky { padding-top: 76px; padding-bottom: 24px; }
  .stack { gap: 4px; }
  .row .big-num, .title-box .big-num { margin-bottom: .05em; }
  .r6 { margin-top: 2px; }
  .story-link { min-height: 40px; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .story .sticky { padding-top: 70px; padding-bottom: 96px; }
  .stack { gap: 4px; }
  .row p { font-size: 17px; }
  .row .big-num, .title-box .big-num { font-size: 18px; margin-bottom: 0; }
  .r0 h1 { font-size: 54px; }
  .story-link { min-height: 40px; font-size: 15px; }
}

/* Home Q&A: visible text (for readers, search and AI answers), folded like an accordion. */
.qa { position: relative; padding: clamp(90px, 14vh, 160px) var(--edge-r) clamp(60px, 10vh, 110px) var(--edge-l); background: var(--veil); align-items: start; }
@media (min-width: 960px) {
  .qa-head { grid-column: 1 / span 4; position: sticky; top: 120px; }
  .qa-list { grid-column: 6 / span 7; }
}
.qa-head h2 { margin-top: 16px; font-weight: 400; font-size: var(--t-1); line-height: .95; letter-spacing: -.02em; }
.qa-head h2 em { color: var(--dawn-3); }
.qa-item { border-top: 1px solid var(--line); }
.qa-item:last-child { border-bottom: 1px solid var(--line); }
.qa-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 0; cursor: pointer; list-style: none; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary h3 { margin: 0; font: 400 var(--t-2)/1.15 var(--serif); }
.qa-item summary span { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(233, 230, 223, .25); font: 400 22px/1 var(--sans); color: var(--dawn-3); transition: transform .35s var(--ease), background .3s; }
.qa-item[open] summary span { transform: rotate(45deg); background: rgba(242, 195, 143, .12); }
.qa-item summary:hover h3 { color: var(--dawn-3); }
.qa-item summary:focus-visible { outline: 1px solid var(--dawn-3); outline-offset: 4px; }
.qa-item p { padding: 0 0 24px; max-width: 38em; font: 400 clamp(17px, 1.25vw, 19px)/1.7 var(--sans); color: rgba(255, 255, 255, .88); }
.qa-item p a { color: var(--dawn-3); }

/* ── Type scale, Apple proportions (Tudor, 24 Oct) ───────────────────────
   Labels 14→17, body 17→19, subtitles 20→26, second titles 26→44, buttons 17.
   Nothing on the site below 14 px. These rules come last on purpose. */
:root {
  --t-label: clamp(14px, 1.15vw, 17px);
  --t-body: clamp(17px, 1.3vw, 19px);
  --t-3: clamp(20px, 1.8vw, 26px);
  --t-2: clamp(26px, 2.8vw, 44px);
}
.label { font-size: var(--t-label); letter-spacing: .08em; }
.eyebrow { font-size: var(--t-label); }
.eyebrow .status::before { width: 8px; height: 8px; }
.facts { font-size: var(--t-body); }
.facts dt { font-size: 14px; letter-spacing: .08em; }
.hero-index .n, .hero-index .s, .bio-line span, .cue { font-size: 14px; }
.hero-index .t { font-size: var(--t-3); }
.side-text, .card-text, .ch-foot p, .tile span:last-child, .essays .card-text, .cards .card-text { font-size: var(--t-body); line-height: 1.6; }
.ch-lede { font-size: var(--t-3); }
.cta, .story-link, .social a { font-size: 17px; }
.back-link { font-size: 15px; }
.essay-text p { font-size: clamp(18px, 1.4vw, 21px); }
.essay-text p:first-child { font-size: clamp(21px, 1.75vw, 26px); }
.qa-item p { font-size: var(--t-body); }
.skip { font-size: 16px; }
@media (min-width: 1100px) { .rail { font-size: 14px; } }
.now-main .lede { font-size: var(--t-3); }
@media (max-width: 700px) {
  .top .glass-nav a { font-size: 16px; }
}
@media (max-width: 360px) {
  .top .glass-nav a { font-size: 15px; }
}

/* ── Phones (Tudor, 24 Oct, after looking on an iPhone) ──────────────────
   1. Menu at the top: name left, a glass "Menu" button right, full-screen sheet.
      Nothing at the bottom, where Safari has its own toolbar.
   2. No pinned scenes: the page always moves under your finger. Lines reveal as they arrive.
   3. Smaller pictures. */
.menu-btn, .menu-close { display: none; }
.menu-sheet:not(:popover-open) { display: none; }
@media (max-width: 700px) {
  .glass-nav { display: none !important; }
  .page main { padding-bottom: 0; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 20px; border-radius: 999px;
    font: 600 16px/1 var(--sans); color: #fff; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .18);
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06)), rgba(22, 24, 32, .5);
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 24px rgba(0, 0, 0, .3);
  }
  .menu-sheet:popover-open {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    padding: 96px 28px max(40px, env(safe-area-inset-bottom));
    border: 0; color: var(--fg);
    background: rgba(10, 13, 20, .78);
    -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
  }
  .menu-sheet > a { font: 400 48px/1.15 var(--serif); letter-spacing: -.02em; text-decoration: none; padding: 6px 0; }
  .menu-sheet > a[aria-current] { color: var(--dawn-3); }
  .menu-sheet .menu-social { margin-top: 28px; display: flex; gap: 22px; font: 600 17px/1 var(--sans); }
  .menu-sheet .menu-social a { color: var(--soft); text-decoration: none; }
  .menu-close {
    display: inline-flex; position: absolute; top: max(20px, env(safe-area-inset-top)); right: 20px;
    min-height: 44px; padding: 0 20px; align-items: center; border-radius: 999px; cursor: pointer;
    font: 600 16px/1 var(--sans); color: #fff; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08);
  }
  .menu-sheet::backdrop { background: transparent; }

  /* Home story: flows with the page, lines arrive one by one */
  :root { --k: 1; }
  .sda .story { height: auto; }
  .sda .story .sticky { position: relative; height: auto; min-height: 100svh; align-items: start; padding: 26svh var(--gut) 72px; }
  .sda .title-box { animation: none; transform: none; }
  .sda .story .cue { display: none; }
  .sda .row:not(.r0) { animation-name: stack-in; animation-timeline: view(); animation-range: entry 5% entry 70%; }
  .r0 h1 { font-size: clamp(52px, 15vw, 64px); }
  .row p { font-size: 22px; }
  .stack { gap: 18px; }

  /* Projects opening: pinned like on desktop, in its one-column narrow version */
  .sda .hero { height: 300svh; }
  .sda .hero .sticky { height: 100svh; min-height: 0; }
  .hero-title { font-size: clamp(52px, 15vw, 64px); }
  .sda .hero + .chapter { margin-top: -40svh; }

  /* Pictures: shorter frames, compact cards */
  .feature .frame { aspect-ratio: 16 / 10; border-radius: 20px; }
  .tile { min-height: 0; }
  .cards li { margin-top: 0 !important; }
  .cards a { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; }
  .cards .frame { aspect-ratio: 1; border-radius: 16px; }
  .cards .status { margin-top: 0; }
  .cards b { margin-top: 6px; font-size: 24px; }
  .cards .card-text { margin-top: 4px; font-size: 16px; }
  .essays .frame { aspect-ratio: 16 / 9; }
  .essays li:nth-child(even) { margin-top: 0; }
}
@media (max-width: 700px) {
  /* A thin glass bar behind the name and Menu, so they never sit on top of content */
  .page .top, .top {
    padding: max(8px, env(safe-area-inset-top)) 16px 8px;
    background: rgba(10, 13, 20, .62);
    -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  .top .brand { font-size: 18px; }
  .menu-btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
  /* Compact tiles and spacing */
  .tiles { gap: 12px; margin-top: 40px; }
  .tile { padding: 20px 22px; gap: 14px; border-radius: 20px; }
  .tile b { font-size: 26px; }
  .tile span:last-child { margin-top: 8px; }
  .feature { margin-top: 40px; gap: 20px; }
  .chapter { padding-top: 88px; padding-bottom: 64px; }
  .marquee { margin-top: 44px; padding: 12px 0; }
  .ch-foot { margin-top: 32px; }
}

/* ── Phone pass 2 (24 Oct, simulator) ──────────────────────────────────── */
@media (max-width: 700px) {
  /* Cards: small square picture on the left, text on the right — on Home and Writing */
  .cards a, .essays a { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; row-gap: 0; align-items: start; }
  .cards a > .frame, .essays a > .frame { grid-row: 1 / span 4; aspect-ratio: 1; border-radius: 16px; width: 96px; }
  .cards a > :not(.frame) { grid-column: 2; }
  .essays a > div { grid-column: 2; }
  .cards .status, .essays .status { margin-top: 2px; font-size: 14px; }
  .cards b, .essays b { margin-top: 6px; font-size: 22px; line-height: 1.1; }
  .cards .card-text, .essays .card-text { margin-top: 6px; font-size: 15px; line-height: 1.45; }
  .essays .when { margin-top: 8px; font-size: 14px; }
  .cards, .essays { gap: 26px; margin-top: 36px; }
  .home-work { padding-top: 72px; padding-bottom: 48px; }
  .work-head { gap: 20px; }
  .work-head .cta { justify-self: start; }
  .writing-head, .essay-head { padding-top: 120px; gap: 20px; }

  /* Full-screen background under Safari's bars; no scroll-linked zoom on phones */
  .wallpaper { inset: auto; top: 0; left: 0; width: 100%; height: 100lvh; }
  .sda .wallpaper img, .wallpaper img { animation: none !important; transform: none; }
  .home .wallpaper::after { opacity: .45; animation: none !important; }

  /* Q&A and ending */
  .qa { padding-top: 72px; padding-bottom: 48px; }
  .qa-item summary { min-height: 56px; padding: 14px 0; }
  .qa-item summary h3 { font-size: 22px; }
  .ending { padding-top: 56px; padding-bottom: 56px; gap: 20px; }
  .ending a { font-size: 36px; padding: 20px 0; }
  .social a { padding: 11px 16px; font-size: 15px; }

  /* Articles: comfortable reading, facts below the title */
  .essay-grid { padding-top: 32px; gap: 24px; }
  .essay-text p { font-size: 18px; line-height: 1.7; }
  .essay-text p:first-child { font-size: 21px; }
  .essay-text h2 { font-size: 26px; }

  /* Now */
  .now-art { min-height: 42svh; }
  .now-main { padding-top: 28px; }
  .now-main h1 { font-size: 64px; }
  .now-main .now-list li { font-size: 22px; padding: 18px 0; }
}
@media (max-width: 700px) { .wall-video { object-position: 50% 50%; } }

/* ── Phone pass 3 (Tudor, 24 Oct) ────────────────────────────────────────
   Header: the domain scrolls away with the page; only the Menu button floats.
   Menu: a small glass pop-up under the button, not a full page. */
@media (max-width: 700px) {
  .page .top, .top {
    position: absolute; background: none; border: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    padding: calc(env(safe-area-inset-top) + 14px) 16px 0;
  }
  .menu-btn {
    position: fixed; z-index: 30;
    top: calc(env(safe-area-inset-top) + 10px); right: 14px;
  }
  .menu-close { display: none !important; }
  .menu-sheet:popover-open {
    position: fixed; inset: auto; z-index: 31;
    top: calc(env(safe-area-inset-top) + 60px); right: 14px; left: auto; bottom: auto;
    width: min(250px, calc(100vw - 28px)); height: auto; min-height: 0;
    display: flex; flex-direction: column; justify-content: flex-start; gap: 2px;
    padding: 8px; border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)), rgba(18, 20, 28, .72);
    -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 24px 60px rgba(0, 0, 0, .5);
    transform-origin: top right;
    animation: menu-in .22s var(--ease);
  }
  @keyframes menu-in { from { opacity: 0; transform: scale(.92) translateY(-6px); } to { opacity: 1; transform: none; } }
  .menu-sheet > a {
    display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 16px;
    font: 500 19px/1 var(--sans); letter-spacing: -.01em; color: #fff;
  }
  .menu-sheet > a:active { background: rgba(255, 255, 255, .1); }
  .menu-sheet > a[aria-current] { color: var(--dawn-3); background: rgba(242, 195, 143, .1); }
  .menu-sheet .menu-social { margin: 6px 0 0; padding: 12px 16px 8px; gap: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font: 600 15px/1 var(--sans); }

  /* Home story on phones: 00 starts big in the middle, shrinks to the top, then lines arrive
     left, right, left, right and centred — pinned while you scroll, like on desktop. */
  :root { --k: .64; }
  .sda .story { height: 560svh; }
  .sda .story .sticky { position: sticky; top: 0; height: 100svh; min-height: 0; align-items: center; padding: calc(env(safe-area-inset-top) + 64px) 18px 28px; }
  .sda .story .cue { display: block; }
  .stack { width: 100%; gap: 14px; }
  .r0 { justify-self: center; text-align: center; margin-bottom: 4px; }
  .title-box { text-align: center; transform-origin: 50% 0; }
  .sda .title-box { animation: title-home linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
  .r0 h1 { font-size: clamp(56px, 16vw, 68px); }
  .row { max-width: 86%; }
  .r1, .r3 { justify-self: start; text-align: left; --from: -40px; }
  .r2, .r4 { justify-self: end; text-align: right; --from: 40px; }
  .r5 { justify-self: center; text-align: center; max-width: 94%; }
  .r6 { justify-self: center; }
  .row p { font-size: clamp(19px, 5.2vw, 22px); line-height: 1.2; }
  .row .big-num { font-size: 18px; margin-bottom: 2px; }
  .sda .story .row:not(.r0) { animation-name: stack-in-x; animation-timeline: --story; }
  .sda .story .r5, .sda .story .r6 { animation-name: stack-in; }
  .sda .story .r1 { animation-range: contain 16% contain 27%; }
  .sda .story .r2 { animation-range: contain 30% contain 41%; }
  .sda .story .r3 { animation-range: contain 44% contain 55%; }
  .sda .story .r4 { animation-range: contain 58% contain 69%; }
  .sda .story .r5 { animation-range: contain 72% contain 83%; }
  .sda .story .r6 { animation-range: contain 84% contain 92%; }
  .story-link { min-height: 44px; }
}
.wallpaper picture { display: contents; }
@media (max-width: 700px) {
  /* Full screen in iPhone Safari: no full-width fixed layer with a solid colour at the top edge,
     so Safari draws the page itself under its bars instead of a solid strip. */
  /* Safari fills its status-bar strip with one colour taken from the page: make it the sky's own. */
  html, body, .wallpaper { background: #070b13; }
  .grain { display: none; }
}
@media (max-width: 700px) {
  :root { --k: .78; }
  .sda .story .sticky { align-content: center; align-items: center; }
  .stack { gap: 20px; align-content: center; }
  .row p { font-size: clamp(21px, 5.8vw, 24px); line-height: 1.2; }
  .row .big-num { font-size: 19px; }
}
@media (max-width: 700px) and (max-height: 700px) {
  :root { --k: .7; }
  .stack { gap: 12px; }
  .row p { font-size: 19px; }
}

/* ── Phones: true edge to edge (tested in the iOS Simulator, 24 Oct) ────────
   iPhone Safari paints solid bars over the status bar and toolbar whenever a fixed or
   pinned layer has a background colour. So on phones the wallpaper is a PINNED layer with
   no background of its own (only the picture/video inside it), and pinned scenes carry no
   coloured shading — legibility comes from dimming the picture and from text shadows. */
@media (max-width: 700px) {
  .wallpaper {
    position: sticky; inset: auto; top: 0; z-index: 0;
    width: 100%; height: 100lvh; margin-bottom: -100lvh;
    background: none !important;
  }
  .wallpaper::after, .home .wallpaper::after { display: none !important; }
  .wallpaper img, .wall-video {
    filter: brightness(.68);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 84%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 84%, transparent 100%);
  }
  .grain { display: none; }
  html, body { background: #03080f; }
  main { position: relative; z-index: 1; }
  .hero-shade, .hero-veil { display: none !important; }
  .story, .hero, .row, .hero-title, .hero-lines, .hero-index, .r0 { text-shadow: 0 1px 18px rgba(3, 8, 15, .65); }
}
@media (max-width: 700px) { body { overflow-x: clip; } }

/* Marquee rolls by itself at reading speed, in a seamless loop (the text is written twice,
   so moving it by half its width lands exactly on the start). Soft fade at both edges. */
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track, .sda .marquee .track { animation: roll 38s linear infinite; animation-timeline: auto; animation-range: normal; will-change: transform; }
.marquee[data-marquee="right"] .track, .sda .marquee[data-marquee="right"] .track { animation-name: roll-r; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes roll-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (max-width: 700px) { .marquee .track, .sda .marquee .track { animation-duration: 30s; } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* Phones: nothing may be cut off at the top of the screen. Pinned boxes clip only sideways,
   so text moving up slides behind the clock instead of stopping in a hard line; the
   wallpaper also starts above the screen top so the picture is there behind the clock. */
@media (max-width: 700px) {
  .story .sticky, .hero .sticky, .obs-scene .sticky, .scene .sticky, .sda .story .sticky, .sda .hero .sticky {
    overflow-x: clip; overflow-y: visible;
  }
}
/* iPhone Safari paints a solid bar over the clock whenever a fixed element near the top has
   backdrop-filter. So the Menu button itself has no blur; the glass blur sits on an inner layer. */
@media (max-width: 700px) {
  .menu-btn { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; isolation: isolate; overflow: hidden; }
  .menu-btn::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  }
}
