/* ——— SELF-HOSTED FONTS (first-party; replaces fonts.bunny.net) ———
   Cormorant Garamond 300/400/500 + 300/400 italic, JetBrains Mono 300/400.
   latin + latin-ext subsets only. woff2 served same-origin with immutable
   cache headers; font-display:swap keeps text visible while loading. */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-300-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-300-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-300-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-300-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-300-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-300-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}


/* ——— CROSS-DOCUMENT VIEW TRANSITIONS (progressive enhancement) ———
   Same-origin navigations cross-fade; a piece's cover image morphs from the
   archive grid into the detail hero (matched by view-transition-name). Ignored
   by browsers without support, and disabled under reduced-motion. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.45s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ——— TOKENS ——— */
:root {
  --bg: #121212;
  --surface-hover: #1f1f1f;
  --text: #d5d5d5;
  --muted: #c3c3c3;
  --inactive: #6a6a6a;
  --label: rgba(255,255,255,0.6);
  --link: #e3974f;
  --border: #2d2d2d;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: 4rem;
  --transition: 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f2efe8;
  --surface-hover: #e7e3d9;
  --text: #1a1a1a;
  --muted: #3d3d3d;
  --inactive: #8a8474;
  --label: rgba(0,0,0,0.55);
  --link: #b8612a;
  --border: #d6d0c2;
  color-scheme: light;
}
/* No-JS fallback: if scripting is off, still honour a light device preference.
   With JS on, the inline head script always sets data-theme, so this never applies. */
@media (prefers-color-scheme: light) {
  html:not([data-theme]) {
    --bg: #f2efe8;
    --surface-hover: #e7e3d9;
    --text: #1a1a1a;
    --muted: #3d3d3d;
    --inactive: #8a8474;
    --label: rgba(0,0,0,0.55);
    --link: #b8612a;
    --border: #d6d0c2;
    color-scheme: light;
  }
}

html {
  font-size: 16px; scroll-behavior: smooth;
  background: var(--bg);
  transition: background 0.6s ease;
}
@media (min-width: 1439px) { html { font-size: 20px; } }
@media (min-width: 2199px) { html { font-size: 26px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
  animation: fadeIn 1.4s ease-in both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--link); color: var(--bg); }

/* ——— NAV TOKENS ——— */
:root {
  --t: 0;
  --nav-w-exp: min(58rem, calc(100vw - 3rem));
  --nav-w-col: 3rem;
  --nav-h:     3rem;
  --nav-r-exp: 1.5rem;
  --nav-r-col: 1.5rem; /* same unit as --nav-r-exp so calc() interpolates cleanly */
}

/* ——— NAV ROW ——— */
.nav-row {
  position: fixed; top: 1rem; left: 0; right: 0; z-index: 200;
  display: flex; justify-content: center; align-items: flex-start;
  pointer-events: none;
}
.nav-row > * { pointer-events: auto; }

/* floating theme toggle (desktop only) */
.float-toggle {
  position: absolute; left: 1.25rem; top: 0;
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.6s ease, border-color 0.3s ease;
}
.float-toggle:hover { background: var(--surface-hover); }
.float-toggle svg {
  width: 1.1rem; height: 1.1rem; color: var(--muted);
  transition: color 0.3s ease; overflow: visible;
}
.float-toggle:hover svg { color: var(--text); }
.float-toggle svg [data-draw] {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  animation: illusDraw 1.4s cubic-bezier(0.3,0.7,0.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 0.07s);
}
/* sticky-nav icon: same draw-in on every toggle */
.ns-theme-icon [data-draw] {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  animation: illusDraw 1.4s cubic-bezier(0.3,0.7,0.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 0.07s);
}
/* sun rays orbit + crescent stars twinkle — both nav icon slots */
.float-toggle svg .orbit-slow,
.ns-theme-icon .orbit-slow {
  animation: orbit 42s linear infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.float-toggle svg .twinkle,
.ns-theme-icon .twinkle {
  animation: twinkle 3.5s ease-in-out 1s infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.float-toggle svg .twinkle:nth-child(2),
.ns-theme-icon .twinkle:nth-child(2) { animation-delay: 1.6s; }

/* shell wrapper */
.nav-shell-wrap { display: flex; justify-content: center; }

/* the morphing pill */
.nav-shell {
  position: relative; overflow: hidden;
  width: calc(var(--nav-w-exp) + (var(--nav-w-col) - var(--nav-w-exp)) * var(--t));
  height: var(--nav-h);
  border-radius: 1.5rem; /* constant: pill at full width, circle when w=h=3rem */
  background: color-mix(in oklab, var(--bg) var(--nav-pill-bg-mix, 65%), transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  cursor: default;
  will-change: width;
  transition: background 0.6s ease;
}
.nav-shell[data-state="collapsed"] { cursor: pointer; }
.nav-shell[data-state="expanded"] .nav-expanded { pointer-events: auto; }

/* expanded row */
.nav-expanded {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 0.5rem;
  gap: 0.25rem;
  opacity: calc(1 - var(--t) * 3);
  pointer-events: none;
  white-space: nowrap;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 0 0.5rem;
  border-right: 1px solid var(--border);
  margin-right: 0.25rem; flex-shrink: 0;
}
.nav-brand .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--muted); opacity: 0.6; flex-shrink: 0;
}
.nav-brand-mini {
  display: none;
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.12em; color: var(--muted);
  padding: 0 0.5rem; border-right: 1px solid var(--border);
  margin-right: 0.25rem; align-items: center; gap: 0.35rem; flex-shrink: 0;
}
.nav-brand-mini .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--muted); opacity: 0.6; flex-shrink: 0;
}
.nav-items {
  display: flex; align-items: center; justify-content: center; gap: 0.1rem; flex: 1;
}
.nav-item {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--label); padding: 0.35rem 0.6rem;
  border-radius: 0.75rem;
  transition: color 0.2s ease, background 0.2s ease;
  transform: translateY(calc(var(--t) * -0.5rem));
  opacity: calc(1 - var(--t) * 4);
  flex-shrink: 0;
}
.nav-item:nth-child(2) { transition-delay: 0.02s; }
.nav-item:nth-child(3) { transition-delay: 0.04s; }
.nav-item:nth-child(4) { transition-delay: 0.06s; }
.nav-item:nth-child(5) { transition-delay: 0.08s; }
.nav-item:hover { color: var(--text); background: var(--surface-hover); }
.nav-item.active { color: var(--text); }
.nav-time {
  font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--label);
  padding-left: 0.6rem; margin-left: 0.25rem;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}

/* inline theme button (tablet) */
.inline-theme {
  width: 2.2rem; height: 2.2rem;
  display: none; place-items: center;
  border-radius: 50%; flex-shrink: 0;
  transition: background 0.2s ease;
}
.inline-theme:hover { background: var(--surface-hover); }
.inline-theme svg {
  width: 1rem; height: 1rem; color: var(--muted);
  overflow: visible; pointer-events: none;
}

/* right floating circle (mobile nav trigger) */
.float-menu {
  display: none;
  position: absolute; right: 1.25rem; top: 0;
  width: 3rem; height: 3rem;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.6s ease, border-color 0.3s ease;
}
.float-menu:hover { background: var(--surface-hover); }
.float-menu svg { width: 1rem; height: 1rem; color: var(--muted); }

/* collapsed state icon */
.nav-collapsed {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: calc((var(--t) - 0.6) * 2.5);
  pointer-events: none;
}
.nav-collapsed-icon { width: 1.1rem; height: 1.1rem; color: var(--muted); }

/* tooltip */
.nav-tip {
  position: absolute; bottom: calc(100% + 0.5rem); left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--label); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-shell[data-state="collapsed"]:hover .nav-tip { opacity: 1; }

/* nav sheet — direct child of .nav-row (position:fixed), drops below the circles */
.nav-sheet {
  position: absolute;
  top: calc(var(--nav-h) + 0.75rem);
  left: 1rem; right: 1rem;
  background: color-mix(in oklab, var(--bg) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  /* opacity hides the border line when closed; max-height clips content */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s cubic-bezier(0.2,0.6,0.2,1),
              opacity 0.25s ease,
              background 0.6s ease;
  z-index: 10;
}
.nav-sheet[data-open="1"] {
  max-height: 24rem;
  opacity: 1;
  pointer-events: auto;
}
.nav-sheet a {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-sheet a .arrow { opacity: 0.4; font-size: 0.8em; }
.nav-sheet a:last-child { border-bottom: 0; }
.nav-sheet a:hover, .nav-sheet a.active { color: var(--text); background: var(--surface-hover); }
.nav-sheet a.active .arrow { opacity: 1; }

/* ——— STICKY NAV ——— */
.nav-sticky {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 2rem var(--pad);
  background: color-mix(in oklab, var(--bg) var(--nav-sticky-bg-mix, 82%), transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, background 0.6s ease;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--muted);
}
.nav-sticky[data-scrolled="1"] {
  border-bottom-color: var(--border);
}
.ns-left {
  display: flex; align-items: center; gap: 0.9rem;
}
.ns-right {
  display: flex; align-items: center; gap: 0.9rem;
}

/* theme toggle button */
.ns-theme-btn {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 0.6rem;
  transition: background 0.3s ease;
}
.ns-theme-btn:hover { background: var(--surface-hover); }
.ns-theme-icon {
  width: 1.9rem; height: 1.9rem;
  color: var(--muted);
  transition: color 0.3s ease;
  overflow: visible;
}
.ns-theme-btn:hover .ns-theme-icon { color: var(--text); }

/* brand */
.ns-brand {
  color: var(--text);
  font-weight: 300;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.ns-brand:hover { opacity: 0.7; }

/* time — carries its own left border as divider */
.ns-time {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  white-space: nowrap;
  padding-left: 0.9rem;
  margin-left: 0.4rem;
  border-left: 1px solid var(--border);
}

/* menu button */
.ns-menu-btn {
  display: inline-flex; align-items: center; gap: 0.9rem;
  font-size: 1.25rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.ns-menu-btn:hover { color: var(--text); }
.ns-menu-dash {
  display: inline-block;
  width: 1.5rem; height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}
.ns-menu-btn:hover .ns-menu-dash { width: 2.25rem; }

/* responsive */
@media (max-width: 767px) {
  .nav-sticky { padding: 1.5rem 1.5rem; font-size: 1rem; }
  .ns-time { display: none; }
}

/* ——— Tier 2: ≤1100px — float toggle hidden, mini brand + inline theme, no kebab ——— */
@media (max-width: 1100px) {
  .float-toggle { display: none; }
  .nav-brand { display: none; }
  .nav-brand-mini { display: flex; }
  .inline-theme { display: grid; }
  .nav-time { display: none; }
}

/* ——— Tier 3: ≤640px — hide the pill entirely, show two floating circles ——— */
@media (max-width: 640px) {
  .nav-shell-wrap { display: none; }
  /* re-show theme circle on the left (overrides tier-2 hide) */
  .float-toggle { display: grid; }
  /* show nav circle on the right */
  .float-menu { display: grid; }
}

/* ——— MENU OVERLAY ——— */
.menu-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; grid-template-columns: 34% 66%;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.menu-overlay[data-open="1"] { opacity: 1; pointer-events: auto; }
.menu-panel { padding: 7rem var(--pad) 4rem; border-right: 1px solid var(--border); }
.menu-panel:last-child { border-right: 0; }
.menu-label {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--label);
  margin-bottom: 3rem;
}
.menu-link {
  display: block; font-size: 3rem; font-weight: 300; line-height: 1.3;
  color: var(--text);
  opacity: 0; transform: translateY(1rem);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s;
  position: relative;
}
.menu-overlay[data-open="1"] .menu-link { opacity: 1; transform: none; }
.menu-link:nth-child(2) { transition-delay: 0.1s; }
.menu-link:nth-child(3) { transition-delay: 0.15s; }
.menu-link:nth-child(4) { transition-delay: 0.2s; }
.menu-link:nth-child(5) { transition-delay: 0.25s; }
.menu-link::after {
  content: attr(data-meta);
  position: absolute; right: 0; bottom: 1.2rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--inactive); text-transform: uppercase;
  transform: translateX(-1rem); opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-link:hover { color: var(--link); }
.menu-link:hover::after { transform: none; opacity: 1; }
.menu-close {
  position: absolute; top: 2rem; right: var(--pad);
  font-size: 1.25rem; color: var(--muted);
}
@media (max-width: 767px) {
  /* Single column, vertically centred as one balanced group (no empty 1fr stretch). */
  .menu-overlay {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: max-content;
    align-content: safe center;
    padding: max(5rem, env(safe-area-inset-top)) 0 max(3rem, env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  .menu-panel { padding: 0 1.5rem; border-right: 0; border-bottom: 0; }
  .menu-panel + .menu-panel { margin-top: 2.75rem; }
  .menu-label { margin-bottom: 0.85rem; }
  /* Each link is a tidy row: label left, its meta right (always visible — touch has no hover). */
  .menu-link {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    font-size: 1.85rem; line-height: 1.2;
    padding: 0.55rem 0;
  }
  .menu-link::after {
    position: static; right: auto; bottom: auto;
    transform: none; opacity: 0.8; white-space: nowrap;
    align-self: center;
  }
  .menu-close { top: 1.5rem; right: 1.5rem; }
}

/* ——— STRUCTURE ——— */
.row {
  border-bottom: 1px solid var(--border);
  position: relative;
}
.row.no-border { border-bottom: 0; }
.row-grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
.row-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.row-split-right { display: grid; grid-template-columns: 1.6fr 1fr; align-items: stretch; }

.cell {
  padding: var(--pad);
  display: flex; flex-direction: column; min-height: 22rem;
  position: relative;
}
.cell + .cell { border-left: 1px solid var(--border); }
.cell-spacer { flex: 1; min-height: 2.5rem; }

@media (max-width: 768px) {
  :root { --pad: 1.5rem; }
  .row-grid-2, .row-grid-3, .row-split-right { grid-template-columns: 1fr; }
  .cell + .cell { border-left: 0; border-top: 1px solid var(--border); }
  .cell { min-height: 0; }
}

/* ——— HERO ——— */
.hero { padding: 2rem var(--pad) var(--pad); }
.hero-portrait {
  --portrait-size: 4.25rem;
  width: var(--portrait-size); height: var(--portrait-size); border-radius: 50%;
  background: linear-gradient(145deg, #3a322a, #1a1814);
  position: relative; overflow: hidden;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
  transition: transform 0.6s ease;
}
.hero-portrait--sm { --portrait-size: 3rem; }
.hero-portrait--md { --portrait-size: 4.25rem; }
.hero-portrait--lg { --portrait-size: 7rem; }
.hero--inline {
  display: flex; flex-direction: row; align-items: center; gap: 2rem;
}
.hero--inline .hero-portrait { margin-bottom: 0; }
@media (max-width: 600px) {
  .hero--inline { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero--inline .hero-portrait { margin-bottom: 0; }
}
.hero-portrait::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 38% 42%, rgba(230,200,170,0.9) 0 14%, transparent 15%),
    radial-gradient(ellipse at 50% 78%, rgba(200,170,140,0.8) 0 22%, transparent 23%),
    linear-gradient(180deg, #4a3c2f 0%, #2a231b 100%);
  filter: contrast(1.05);
}
.hero-portrait::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.12), transparent 60%);
}
.hero-portrait:hover { transform: scale(1.05); }
img.hero-portrait--photo {
  object-fit: cover;
  background: none;
  display: block;
}

.h1, h1.headline {
  font-size: 3.5rem; font-weight: 300; line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 26ch;
}
.headline em { font-style: italic; font-weight: 400; color: var(--muted); }
.headline .dash {
  display: inline-block; width: 1.2rem; height: 1px;
  background: currentColor; vertical-align: middle;
  margin: 0 0.4rem 0.35rem;
  transform-origin: left;
  animation: drawDash 1.4s 0.8s cubic-bezier(0.2,0.7,0.2,1) both;
}
@keyframes drawDash { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 450px) {
  .h1, h1.headline { font-size: 2.5rem; }
}

/* ——— CARDS / ICONS ——— */
.kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--label);
  margin-bottom: 2rem;
  display: inline-flex; align-items: center; gap: 0.75rem;
}
.kicker-num { color: var(--inactive); }
.card-icon {
  width: 3rem; height: 3rem; margin-bottom: 2rem;
  color: var(--text);
  transition: transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.cell:hover .card-icon { transform: rotate(-8deg) scale(1.08); }
.card-icon svg { width: 100%; height: 100%; }

h2, .h2 {
  font-size: 1.75rem; font-weight: 400; line-height: 1.2;
  letter-spacing: -0.005em;
  margin-bottom: 1.25rem;
  max-width: 22ch;
}
.body {
  font-size: 1.25rem; line-height: 1.55; color: var(--muted);
  max-width: 40rem;
}
.body em { color: var(--text); font-style: italic; }

/* ——— PILL ——— */
.pill {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 1.75rem 0.5rem 2rem;
  border: 1px solid var(--border); border-radius: 5rem;
  font-size: 1.25rem; color: var(--text);
  transition: background var(--transition), border-color var(--transition), padding var(--transition);
  align-self: flex-start;
}
.pill .arrow {
  display: inline-block; font-size: 1.1rem;
  transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1);
}
.pill:hover {
  background: var(--surface-hover); border-color: var(--text);
  padding-left: 2.25rem; padding-right: 2rem;
}
.pill:hover .arrow { transform: translateX(0.35rem); }
.pill-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }

/* ——— BOTANICAL FULL-WIDTH ROW ——— */
.wide-row { display: grid; grid-template-columns: 1.6fr 1fr; align-items: stretch; }
.wide-row.reverse { grid-template-columns: 1fr 1.6fr; }
.wide-row > .cell + .cell { border-left: 1px solid var(--border); }
.wide-row .text-cell { padding: var(--pad); display: flex; flex-direction: column; justify-content: center; gap: 1.75rem; }
.wide-row .text-cell h2 { max-width: 28ch; }
.botanical-cell {
  padding: var(--pad);
  display: grid; place-items: center;
  min-height: 28rem;
  position: relative;
  overflow: hidden;
}
.botanical {
  width: 18rem; max-width: 100%; height: auto;
  color: var(--muted);
}
.botanical path, .botanical line, .botanical circle {
  stroke-dasharray: var(--len, 800);
  stroke-dashoffset: var(--len, 800);
}
.reveal[data-in="1"] .botanical path,
.reveal[data-in="1"] .botanical line,
.reveal[data-in="1"] .botanical circle {
  animation: draw 2.2s cubic-bezier(0.3,0.7,0.2,1) forwards;
}
.reveal[data-in="1"] .botanical :nth-child(2) { animation-delay: 0.1s; }
.reveal[data-in="1"] .botanical :nth-child(3) { animation-delay: 0.2s; }
.reveal[data-in="1"] .botanical :nth-child(4) { animation-delay: 0.3s; }
.reveal[data-in="1"] .botanical :nth-child(5) { animation-delay: 0.4s; }
.reveal[data-in="1"] .botanical :nth-child(6) { animation-delay: 0.5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 768px) {
  .wide-row, .wide-row.reverse { grid-template-columns: 1fr; }
  .wide-row > .cell + .cell { border-left: 0; border-top: 1px solid var(--border); }
  .botanical-cell { min-height: 18rem; order: -1; }
  .botanical { width: 14rem; }
}

/* ——— NOW ROW ——— */
.now-cell { gap: 1.5rem; }
.now-label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--label);
}
.now-swap {
  font-size: 1.25rem; color: var(--muted); min-height: 4.5rem;
  max-width: 32ch;
}
.now-swap .frag { display: inline; transition: opacity 0.5s ease; }
.now-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--link);
  display: inline-block; margin-left: 0.5rem; vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.4); } }

/* ——— SIGN-OFF ——— */
.signoff {
  position: relative;
  padding: var(--pad);
  display: flex; flex-direction: column; gap: 3rem;
  overflow: hidden;
}
.signoff-inner {
  position: relative; z-index: 2;
  max-width: 56rem;
  display: flex; flex-direction: column; gap: 3rem;
}
.signoff-top { font-size: 1.25rem; color: var(--muted); max-width: 28rem; }
.signoff-closing { font-size: 3.5rem; font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; }
.signoff-closing .sig {
  font-style: italic;
  color: var(--muted);
  display: inline-block;
  padding-right: 0.25em;
  transition: color 0.8s ease;
}
.signoff:hover .signoff-closing .sig { color: var(--text); }

.footer-line {
  display: flex; justify-content: flex-start; align-items: center;
  gap: 2rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--label);
  padding-top: 3rem;
}
.footer-line a:hover { color: var(--link); }

@media (max-width: 768px) {
  .signoff-closing { font-size: 2.25rem; }
  .footer-line { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ——— SELECTED WORK (3-up emphasis row) ——— */
.selected-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--pad) var(--pad) 2rem;
  border-bottom: 1px solid var(--border);
  gap: 2rem; flex-wrap: wrap;
}
.selected-header h2 {
  font-size: 2.25rem; font-weight: 400; max-width: 26ch; line-height: 1.2;
}
.selected-header .selected-aside {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label); text-align: right;
}
.selected-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.selected-grid .cell + .cell { border-left: 1px solid var(--border); }
.selected-grid .cell {
  aspect-ratio: 1 / 1;
  min-height: 0;
  gap: 0;
  padding: 0;
  text-decoration: none; color: inherit;
  transition: background 0.5s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.selected-grid .cell:hover { background: var(--surface-hover); }
.selected-grid .cell h2 { font-size: 1.9rem; font-weight: 400; line-height: 1.15; letter-spacing: -0.005em; margin-top: 0.9rem; max-width: 18ch; }
.selected-grid .cell .body { margin-top: 1rem; max-width: 34ch; }
.selected-meta {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label);
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.selected-meta .arrow {
  font-family: var(--serif); font-size: 1.3rem; color: var(--text);
  transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1);
}
.selected-grid .cell:hover .selected-meta .arrow { transform: translateX(0.4rem); }
@media (max-width: 900px) {
  .selected-grid { grid-template-columns: 1fr 1fr; }
  .selected-grid .cell:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .selected-grid { grid-template-columns: 1fr; }
  .selected-grid .cell + .cell { border-left: 0; border-top: 1px solid var(--border); }
  .selected-grid .cell:nth-child(3) { border-top: 1px solid var(--border); }
}

/* ——— ARCHIVE & SELECTED CELLS — shared 1:1 card base ——— */
.archive-cell {
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.has-cover.archive-cell { border-bottom-color: rgba(255,255,255,0.08); }

/* ——— COVER CARDS (full-bleed image with gradient overlay) ——— */
.has-cover {
  background: #0a0a0a; color: #fff;
}
.has-cover + .has-cover { border-left-color: rgba(255,255,255,0.08) !important; }
.has-cover:hover { background: #0a0a0a !important; }
.cover-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2,0.7,0.2,1);
}
.has-cover:hover .cover-img { transform: scale(1.04); }
.has-cover::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.18) 0%,
    transparent 30%,
    rgba(0,0,0,0.55) 60%,
    rgba(0,0,0,0.88) 100%
  );
  pointer-events: none;
}
.cover-text {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  padding: var(--pad);
}
.cover-text-top { flex: 1; }
.cover-text-bottom {
  display: flex; flex-direction: column;
  gap: 0.5rem;
}
.cover-year {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--label);
  height: 1rem; overflow: hidden;
}
.has-cover .cover-year { color: rgba(255,255,255,0.45); }

/* Fixed-height title — 2 lines of 1.9rem × 1.15lh = 4.37rem */
.cover-text h2 {
  margin: 0;
  font-size: 1.9rem; font-weight: 400;
  line-height: 1.15; letter-spacing: -0.005em;
  max-width: 18ch;
  height: 4.4rem; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.has-cover h2 {
  color: #fff; font-size: 1.75rem;
}

/* Fixed-height summary — 2 lines, always rendered (empty when no content) */
.cover-text .body {
  margin: 0;
  font-size: 0.85rem; line-height: 1.5;
  height: 2.55rem; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.has-cover .body { color: rgba(255,255,255,0.55); }

.has-cover .kicker { color: rgba(255,255,255,0.55); margin-bottom: 0; }
.has-cover .kicker-num { color: rgba(255,255,255,0.25); }
.has-cover .selected-meta {
  color: rgba(255,255,255,0.45);
  border-top-color: rgba(255,255,255,0.12);
  padding-top: 1.5rem;
}
.has-cover .selected-meta .arrow { color: #fff; }
.has-cover:hover .selected-meta .arrow { transform: translateX(0.4rem); }
/* ——— GATEWAYS (main branching point) ——— */
.gateways-header {
  padding: calc(var(--pad) * 1.5) var(--pad) var(--pad);
  display: flex; flex-direction: column; gap: 1rem;
  border-top: 1px solid var(--border);
}
.gateways-header .kicker { margin-bottom: 0.5rem; }
.gateways-header h2 {
  font-size: 3rem; font-weight: 300; line-height: 1.1; letter-spacing: -0.01em;
  max-width: 30ch;
}
.gateways-header h2 em { color: var(--muted); font-style: italic; }
.gateways {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.gateway {
  position: relative; overflow: hidden;
  padding: calc(var(--pad) * 0.9) var(--pad);
  min-height: 32rem;
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--border);
  transition: background 0.5s ease;
  text-decoration: none; color: inherit;
}
.gateway:last-child { border-right: 0; }
.gateway:hover { background: var(--surface-hover); }
.gateway-num {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.gateway-num .kicker-num { color: var(--inactive); }
.gateway-title {
  font-size: 4rem; font-weight: 300; line-height: 1; letter-spacing: -0.015em;
  margin-top: auto;
}
.gateway-desc {
  font-size: 1.1rem; color: var(--muted); max-width: 28ch;
  margin-top: 1.25rem; line-height: 1.5;
}
.gateway-meta {
  margin-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label);
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.gateway-meta .arrow {
  font-family: var(--serif); font-size: 1.3rem; color: var(--text);
  transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1);
}
.gateway:hover .gateway-meta .arrow { transform: translateX(0.4rem); }
.gateway-celest {
  position: absolute; top: var(--pad); right: var(--pad);
  width: 4.5rem; height: 4.5rem;
  color: var(--inactive);
  transition: color 0.5s ease, transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.gateway:hover .gateway-celest { color: var(--text); transform: rotate(-6deg) scale(1.08); }
/* Single full-width Archive gateway */
.gateway--full { min-height: 24rem; border-right: 0; }
.gateway--full .gateway-title { font-size: 5rem; }
.gateway--full .gateway-desc { max-width: 48ch; font-size: 1.15rem; }
@media (max-width: 900px) {
  .gateways { grid-template-columns: 1fr; }
  .gateway { border-right: 0; border-bottom: 1px solid var(--border); min-height: 22rem; }
  .gateway:last-child { border-bottom: 0; }
  .gateway-title { font-size: 3rem; }
  .gateways-header h2 { font-size: 2rem; }
}

/* ——— ABOUT · NOW (quieter combined) ——— */
.about-now {
  display: grid; grid-template-columns: 1.2fr 1fr;
  border-bottom: 1px solid var(--border);
}
.about-now > .cell + .cell { border-left: 1px solid var(--border); }
.about-cell { padding: var(--pad); display: flex; flex-direction: column; gap: 1.75rem; }
.about-cell h3 {
  font-size: 1.75rem; font-weight: 400; line-height: 1.3; max-width: 32ch;
}
.about-cell p { font-size: 1.15rem; color: var(--muted); line-height: 1.55; max-width: 40ch; }
.about-langs {
  display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 0.5rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label);
}
.about-langs .dim { color: var(--inactive); }
.now-stack {
  padding: var(--pad); display: flex; flex-direction: column; gap: 2rem;
}
.now-row {
  display: grid; grid-template-columns: 10rem 1fr;
  gap: 1.5rem; align-items: baseline;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.now-row:last-child { border-bottom: 0; padding-bottom: 0; }
.now-row .now-label { margin: 0; }
.now-row .now-swap { min-height: 0; font-size: 1.15rem; color: var(--muted); }
@media (max-width: 900px) {
  .about-now { grid-template-columns: 1fr; }
  .about-now > .cell + .cell { border-left: 0; border-top: 1px solid var(--border); }
  .now-row { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ——— ILLUSTRATIONS LIBRARY ——— */
.illus-header {
  padding: var(--pad);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap;
}
.illus-header h2 { max-width: 32ch; }
.illus-header p { color: var(--muted); font-size: 1.1rem; max-width: 36ch; }
.illus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.illus-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  overflow: hidden;
  transition: background 0.4s ease;
}
.illus-cell:nth-child(4n) { border-right: 0; }
.illus-cell:hover { background: var(--surface-hover); }
.illus-cell svg {
  width: 70%; height: 70%;
  color: var(--text);
  transition: transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.illus-cell:hover svg { transform: scale(1.08) rotate(-3deg); }
.illus-meta {
  position: absolute; left: 1.25rem; bottom: 1rem; right: 1.25rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
}
.illus-meta .num { color: var(--inactive); }
.illus-download {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border); border-radius: 5rem;
  opacity: 0; transform: translateY(-0.25rem);
  transition: opacity 0.3s, transform 0.3s, background 0.3s, color 0.3s;
}
.illus-cell:hover .illus-download { opacity: 1; transform: none; }
.illus-download:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
/* draw-in reveal for celestial line art */
.illus-cell svg [data-draw] {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
}
.illus-cell svg [data-fade] {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.illus-cell[data-in="1"] svg [data-draw] {
  animation: illusDraw 1.6s cubic-bezier(0.3,0.7,0.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 0.1s);
}
.illus-cell[data-in="1"] svg [data-fade] {
  opacity: 1;
  transition-delay: calc(1.4s + var(--i, 0) * 0.05s);
}
@keyframes illusDraw { to { stroke-dashoffset: 0; } }

/* twinkle/orbit — only after drawn in */
.illus-cell[data-in="1"] .twinkle { animation: twinkle 3.5s ease-in-out 1.8s infinite; transform-origin: center; transform-box: fill-box; }
.illus-cell .twinkle { transform-origin: center; transform-box: fill-box; }
.illus-cell .twinkle:nth-child(2n) { animation-delay: 0.6s; }
.illus-cell .twinkle:nth-child(3n) { animation-delay: 1.4s; }
@keyframes twinkle { 0%, 100% { opacity: 0.3; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.15); } }
.illus-cell .orbit { animation: orbit 22s linear infinite; transform-origin: center; transform-box: fill-box; }
@keyframes orbit { to { transform: rotate(360deg); } }
.illus-cell .orbit-slow { animation: orbit 42s linear infinite; transform-origin: center; transform-box: fill-box; }
/* pulsar binary motion — two bodies orbiting the center */
.illus-cell[data-name="pulsar-binary"] .pulsar-a { animation: orbitA 9s linear infinite; transform-origin: 100px 100px; transform-box: view-box; }
.illus-cell[data-name="pulsar-binary"] .pulsar-b { animation: orbitB 14s linear infinite reverse; transform-origin: 100px 100px; transform-box: view-box; }
@keyframes orbitA { to { transform: rotate(360deg); } }
@keyframes orbitB { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .illus-grid { grid-template-columns: repeat(2, 1fr); } .illus-cell:nth-child(4n) { border-right: 1px solid var(--border); } .illus-cell:nth-child(2n) { border-right: 0; } }
@media (max-width: 480px) { .illus-grid { grid-template-columns: 1fr; } .illus-cell { border-right: 0 !important; } }

/* ——— SKIP TO CONTENT (first tab stop; visually hidden until focused) ——— */
.skip-link {
  position: fixed; top: 0.6rem; left: 0.6rem; z-index: 500;
  padding: 0.6rem 1rem; border-radius: 5rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  transform: translateY(-160%); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease;
}
.skip-link:focus { transform: translateY(0); opacity: 1; outline: 1px solid var(--muted); outline-offset: 2px; }

/* ——— ACCESSIBILITY: visible keyboard focus ———
   The design otherwise relies on hover, which keyboard users never trigger. A
   consistent, high-contrast ring is shown only for keyboard/AT focus (:focus-visible),
   so mouse and touch interactions stay visually clean. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ——— REVEAL ———
   Content is VISIBLE by default so it never blanks on a slow connection or if JS
   fails. site.js adds .reveal-anim only to below-the-fold elements, which then fade
   in on scroll. Above-the-fold content shows instantly — no fade-in on every page
   load, which also stops navigation / view transitions from feeling jumpy. */
.reveal { opacity: 1; transform: none; }
.reveal.reveal-anim { opacity: 0; transform: translateY(2rem); transition: opacity 1s cubic-bezier(0.2,0.7,0.2,1), transform 1s cubic-bezier(0.2,0.7,0.2,1); }
.reveal.reveal-anim[data-in="1"] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal.reveal-anim { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ——— STATUS STRIP (static) ——— */
.nav-sticky ~ .status-strip {
  margin-top: 0;
}
.status-strip {
  position: relative; z-index: 3;
  margin-top: 5rem;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.6s ease, color 0.6s ease;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label);
  overflow: hidden;
}
.status-strip .dot { width: 6px; height: 6px; border-radius: 50%; background: #6fa86f; animation: pulse 2s infinite; }
.status-strip .sep { color: var(--inactive); }
.status-strip-scroll {
  display: flex; gap: 1.5rem; white-space: nowrap;
  flex: 1;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label);
}
.status-strip-scroll .sep { color: var(--inactive); }
.status-search {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-left: auto;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border); border-radius: 5rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.status-search:hover { color: var(--text); border-color: var(--muted); }
.status-search .status-kbd {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--inactive); padding-left: 0.5rem; margin-left: 0.2rem;
  border-left: 1px solid var(--border);
}
@media (max-width: 640px) { .status-search span:nth-child(2) { display: none; } }


/* ——— STICKY FOOTER REVEAL ——— */
:root {
  --footer-h: 34rem;
}
main {
  position: relative;
  z-index: 2;
  background: var(--bg);
  /* Cover the full viewport so the fixed footer behind stays hidden until the
     user scrolls past main. On short pages (e.g. /notes/ with few items) a
     content-height main would let the footer peek out immediately and leave
     almost nothing to scroll — see STICKY FOOTER REVEAL below. */
  min-height: 100vh;
  margin-bottom: var(--footer-h);
  box-shadow: 0 1px 0 var(--border);
}
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: var(--pad);
  min-height: var(--footer-h);
  display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.site-footer .signoff-inner {
  max-width: 56rem;
  display: flex; flex-direction: column; gap: 3rem;
}
.site-footer .signoff-top { font-size: 1.25rem; color: var(--muted); max-width: 28rem; }
.site-footer .signoff-closing { font-size: 3.5rem; font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; }
.site-footer .signoff-closing .sig {
  font-style: italic; color: var(--muted);
  display: inline-block; padding-right: 0.25em;
  transition: color 0.8s ease;
}
.site-footer:hover .signoff-closing .sig { color: var(--text); }

/* Reveal mode is the default (desktop AND mobile). --footer-h is measured at
   runtime by site.js from the footer's real content height, so adding links or
   changing text never cuts content or leaves a gap. If JS hasn't run yet, the
   34rem fallback above keeps the layout sane. */

/* Static fallback: when the footer's natural height is taller than the viewport
   (e.g. lots of links on a small phone), a fixed reveal would clip the top of
   the footer — which can't be scrolled into view. In that case site.js adds
   .footer-static and the footer simply flows after main as a normal block. */
body.footer-static main { margin-bottom: 0; }
body.footer-static .site-footer {
  position: relative;
  min-height: auto;
}

@media (max-width: 768px) {
  .site-footer .signoff-closing { font-size: 2.25rem; }
}


/* ——— FEATURE: READING LINE (left edge) ——— */
.reading-line {
  position: fixed; left: 0.6rem; top: 0; bottom: 0;
  z-index: 40;
  width: 2.2rem;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0;
  pointer-events: none;
  font-family: var(--mono);
  color: var(--label);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.reading-line[data-visible="1"] { opacity: 1; }
.reading-line .rl-track {
  position: relative;
  width: 1px; height: 14rem;
  background: linear-gradient(to bottom, transparent, var(--inactive) 20%, var(--inactive) 80%, transparent);
}
.reading-line .rl-head {
  position: absolute; left: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--bg) 80%, transparent);
  transition: top 0.15s linear;
  top: 0;
}
.reading-line .rl-tick {
  position: absolute; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 1px;
  background: var(--inactive);
  transition: background 0.3s, width 0.3s;
}
.reading-line .rl-tick[data-hit="1"] { background: var(--text); width: 10px; }
.reading-line .rl-pct {
  margin-top: 1rem;
  font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--label);
  font-variant-numeric: tabular-nums;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.reading-line .rl-eta {
  margin-top: 0.5rem;
  font-size: 0.54rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--inactive);
  font-variant-numeric: tabular-nums;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}
@media (max-width: 1100px) { .reading-line { display: none; } }

/* ——— FEATURE: COMMAND PALETTE ——— */
.cmdk-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.cmdk-backdrop[data-open="1"] { opacity: 1; pointer-events: auto; }
.cmdk {
  position: fixed; left: 50%; top: 14vh;
  transform: translate(-50%, -1.5rem);
  width: min(44rem, calc(100vw - 3rem));
  z-index: 91;
  background: var(--bg);
  border: 1px solid var(--border);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2,0.7,0.2,1);
}
.cmdk[data-open="1"] { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cmdk-head {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.cmdk-glyph {
  width: 1.4rem; height: 1.4rem; flex: 0 0 auto;
  color: var(--muted);
}
.cmdk-input {
  flex: 1; min-width: 0;
  font: 300 1.5rem/1.2 var(--serif);
  background: transparent; color: var(--text);
  border: 0; outline: 0;
  caret-color: var(--text);
}
.cmdk-input::placeholder { color: var(--label); font-style: italic; }
.cmdk-hint {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
  padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: 0.25rem;
}
.cmdk-list {
  max-height: min(22rem, 50vh);
  overflow-y: auto;
  padding: 0.75rem 0;
}
.cmdk-group {
  padding: 0.6rem 1.5rem 0.3rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--inactive);
}
.cmdk-item {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
}
.cmdk-item[data-active="1"] { background: var(--surface-hover); }
.cmdk-item .ci-num {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  color: var(--inactive); min-width: 2.5rem;
}
.cmdk-item .ci-title { font-size: 1.2rem; color: var(--text); flex: 1; min-width: 0; }
.cmdk-item .ci-kind {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
}
.cmdk-empty {
  padding: 2rem 1.5rem;
  color: var(--muted); font-style: italic; font-size: 1.1rem;
}
.cmdk-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
}
.cmdk-foot .keys { display: flex; gap: 0.8rem; }
.cmdk-foot kbd {
  font-family: var(--mono); font-size: 0.62rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border); border-radius: 0.25rem;
  color: var(--muted);
}

/* ——— FEATURE: OBSERVATORY (star map) ——— */
.obs-trigger {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 45;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5rem;
  color: var(--muted);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.obs-trigger:hover { color: var(--text); border-color: var(--muted); }
.obs-trigger svg { width: 0.95rem; height: 0.95rem; }
@media (max-width: 600px) { .obs-trigger { right: 1rem; bottom: 1rem; padding: 0.6rem 0.9rem; } }

.observatory {
  position: fixed; inset: 0; z-index: 210; /* above nav-row (200) */
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease;
}
.observatory[data-open="1"] { opacity: 1; pointer-events: auto; }
.observatory-head {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 5rem var(--pad) 1.5rem; /* top clears the fixed nav (1rem offset + 3rem height + 1rem gap) */
  display: flex; justify-content: space-between; align-items: baseline; gap: 2rem;
  z-index: 2;
}
.observatory-head .ov-title { font-family: var(--serif); font-size: 1.6rem; font-style: italic; color: var(--text); }
.observatory-head .ov-sub { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); margin-top: 0.4rem; }
.observatory-close {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 5rem;
}
.observatory-close:hover { color: var(--text); border-color: var(--muted); }
.observatory-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.observatory-hint {
  position: absolute; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--inactive);
  display: flex; gap: 1.2rem; align-items: center;
}
.observatory-hint kbd {
  font-family: var(--mono); font-size: 0.62rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border); border-radius: 0.25rem;
  color: var(--muted);
}
.ov-readout {
  position: absolute; left: var(--pad); bottom: var(--pad);
  max-width: 22rem;
  opacity: 0; transform: translateY(0.5rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.ov-readout[data-show="1"] { opacity: 1; transform: none; }
.ov-readout .ov-k {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--label);
  margin-bottom: 0.6rem;
}
.ov-readout .ov-t {
  font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--text);
  margin-bottom: 0.4rem;
}
.ov-readout .ov-d {
  font-family: var(--serif); font-size: 1rem; color: var(--muted); line-height: 1.5;
}
@media (max-width: 600px) {
  .observatory-head { padding: 1.5rem 1.5rem; flex-wrap: wrap; }
  .ov-readout { left: 1.5rem; right: 1.5rem; max-width: none; bottom: 4.5rem; }
}

/* ARCHIVE FILTERS */
.filter-row {
  padding: var(--pad) var(--pad) 2rem;
  display: flex; gap: 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.filter-pill {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--label);
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 5rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.filter-pill:hover, .filter-pill.active {
  color: var(--text); border-color: var(--text); background: var(--surface-hover);
}

/* LIST ROWS (Essays) */
.list-row {
  display: grid; grid-template-columns: 70% 30%; gap: 2rem;
  padding: 2rem var(--pad);
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background var(--transition);
}
.list-row:hover { background: var(--surface-hover); }
.list-row-title { font-size: 1.75rem; font-weight: 400; line-height: 1.2; margin-bottom: 0.5rem; }
.list-row-sub { font-size: 1.15rem; color: var(--muted); }
.list-row-meta {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--inactive);
  display: flex; justify-content: space-between; align-items: baseline;
}
.list-row-meta .arrow { font-family: var(--serif); font-size: 1.3rem; transition: transform var(--transition); color: var(--text); opacity: 0;}
.list-row:hover .list-row-meta .arrow { transform: translateX(0.4rem); opacity: 1; }

@media (max-width: 768px) {
  .list-row { grid-template-columns: 1fr; gap: 1rem; }
}

/* DETAIL PAGES */
.detail-header {
  padding: calc(var(--pad) * 1.5) var(--pad) var(--pad);
  border-bottom: 1px solid var(--border);
}
.detail-body {
  padding: var(--pad);
  max-width: 48rem; margin: 0 auto;
}
.detail-body p {
  font-size: 1.25rem; line-height: 1.7; color: var(--muted);
  margin-bottom: 1.5rem;
}
.detail-body h2, .detail-body h3, .detail-body h4 {
  font-weight: 400; line-height: 1.2; letter-spacing: -0.005em;
  margin-top: 3rem; margin-bottom: 1rem; color: var(--text);
}
.detail-body h2 { font-size: 1.75rem; }
.detail-body h3 { font-size: 1.5rem; }
.detail-body img { border-radius: 1.5rem; margin: 2rem 0; max-width: 100%; height: auto; }
.detail-body a { color: inherit; text-decoration: underline; text-decoration-color: var(--inactive); text-underline-offset: 4px; transition: text-decoration-color 0.3s; }
.detail-body a:hover { text-decoration-color: var(--link); }

.media-stack {
  padding: var(--pad);
  display: flex; flex-direction: column; gap: 2rem; align-items: center;
}
.media-stack img {
  width: 90%; max-width: 1200px;
  border-radius: 1.5rem; height: auto;
}
@media (max-width: 768px) { .media-stack img { width: 100%; } }

.essay-detail { max-width: 40rem; margin: 0 auto; }

/* ——— PROJECT / ESSAY HERO FRAME ——— */
.project-hero {
  width: 100%;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 28% 60%, color-mix(in oklab, var(--link) 7%, transparent), transparent 55%),
    radial-gradient(ellipse at 72% 30%, color-mix(in oklab, var(--text) 3%, transparent), transparent 50%),
    var(--bg);
}
.project-hero.film  { aspect-ratio: 16 / 9; }
.project-hero.photo { aspect-ratio: 3 / 2; }
.project-hero.essay { aspect-ratio: 21 / 9; }
.project-hero svg {
  width: 22%;
  max-width: 14rem;
  color: var(--inactive);
  opacity: 0.55;
  transition: opacity 0.8s ease;
}
.project-hero:hover svg { opacity: 0.8; }
.project-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.project-hero-label {
  position: absolute; bottom: 1.25rem; right: 1.5rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
}
@media (max-width: 768px) {
  .project-hero.film  { aspect-ratio: 4 / 3; }
  .project-hero.essay { aspect-ratio: 4 / 3; }
}

/* ——— MEDIA GRID (stills / series frames) ——— */
.media-grid {
  display: grid;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.media-grid.three-up { grid-template-columns: 1fr 1fr 1fr; }
.media-grid.two-two  { grid-template-columns: 1fr 1fr; }
.media-frame {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 50%, color-mix(in oklab, var(--text) 2%, transparent), transparent 70%),
    var(--bg);
  transition: background 0.4s ease;
}
.media-grid.three-up .media-frame { aspect-ratio: 16 / 9; }
.media-grid.two-two  .media-frame { aspect-ratio: 4 / 3; }
.media-frame:last-child { border-right: 0; }
.media-frame:hover { background: var(--surface-hover); }
.media-frame svg {
  width: 32%;
  max-width: 9rem;
  color: var(--inactive);
  transition: color 0.5s ease, transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.media-frame:hover svg { color: var(--muted); transform: scale(1.05) rotate(-2deg); }
.media-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-frame-num {
  position: absolute; bottom: 0.9rem; left: 1.1rem;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--inactive);
}
@media (max-width: 768px) {
  .media-grid.three-up { grid-template-columns: 1fr 1fr; }
  .media-grid.three-up .media-frame:nth-child(2n) { border-right: 0; }
  .media-grid.three-up .media-frame:nth-child(2n+1):not(:last-child) { border-right: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .media-grid.three-up,
  .media-grid.two-two { grid-template-columns: 1fr; }
  .media-frame { border-right: 0 !important; border-bottom: 1px solid var(--border); }
}

/* ——— PULL QUOTE ——— */
.pull-quote {
  border-left: 2px solid var(--border);
  padding: 0.5rem 0 0.5rem 2rem;
  margin: 3rem 0;
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text);
  line-height: 1.35;
  max-width: 34ch;
}
.detail-body .pull-quote { margin-left: 0; }

/* ——————————————————————————————————————
   ESSAY PAGE — READING BAR, META, COVER,
   HEAD, BODY, FIGURES, RELATED, LIGHTBOX
   —————————————————————————————————————— */


/* ——— TOP READING BAR ——— */
.reading-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 1px;
  z-index: 60; pointer-events: none;
}
.reading-bar .rb-fill {
  height: 100%; background: var(--text); width: 0%;
  transition: width 0.1s linear;
}

/* ——— ARTICLE META STRIP ——— */
.article-meta-strip {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem var(--pad);
  display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
}
.amt-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--inactive); flex-shrink: 0; }
.amt-sep { color: var(--inactive); }

/* ——— ESSAY COVER ——— */
.essay-cover { border-bottom: 1px solid var(--border); }
.essay-cover-image {
  width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  position: relative; display: grid; place-items: center;
  background: var(--surface-hover); cursor: zoom-in;
}
.essay-cover-image img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.essay-cover:hover .essay-cover-image img { transform: scale(1.02); }
.essay-cover-caption {
  padding: 0.9rem var(--pad);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
  display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.essay-cover-caption em {
  font-family: var(--serif); font-style: italic; text-transform: none;
  letter-spacing: 0.02em; font-size: 0.9rem; color: var(--muted);
}

/* ——— ARTICLE HEAD ——— */
.article-head {
  padding: 6rem var(--pad) 4rem;
  border-bottom: 1px solid var(--border);
  max-width: 80rem; margin: 0 auto;
}
.article-kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--label);
  margin-bottom: 2rem;
  display: flex; align-items: center; gap: 0.9rem;
}
.ak-num { color: var(--inactive); }
.amt-kicker-sep {
  /* Round dot separator, matching .amt-dot in the article meta strip. */
  width: 4px; height: 4px; border-radius: 50%; background: var(--inactive); display: inline-block; flex-shrink: 0;
}
.article-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300; line-height: 1.02; letter-spacing: -0.02em;
  max-width: 22ch; margin-bottom: 2.5rem;
}
.article-title em { color: var(--muted); font-style: italic; }
.article-deck {
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  font-style: italic; color: var(--muted);
  max-width: 44ch; line-height: 1.45;
}
.article-byline {
  margin-top: 2rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
}

/* ——— ARTICLE BODY ——— */
.article {
  max-width: 40rem; margin: 0 auto;
  padding: 5rem var(--pad) 4rem;
  font-size: 1.2rem; line-height: 1.75;
  color: var(--text);
  counter-reset: section;
}
.article > p { margin-bottom: 1.6rem; }
/* Drop cap on first paragraph */
.article > p:first-child::first-letter {
  font-size: 4rem; line-height: 0.85; float: left;
  padding: 0.3rem 0.7rem 0 0; font-weight: 400;
  color: var(--text); font-style: italic;
}
.article > p em { color: var(--muted); }
.article a.body-link {
  color: inherit;
  border-bottom: 1px solid var(--inactive);
  transition: border-color 0.3s;
}
.article a.body-link:hover { border-bottom-color: var(--link); }
/* Section headings with auto-counter label */
.article h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: 2rem; line-height: 1.15; letter-spacing: -0.005em;
  margin: 4rem 0 1.5rem; max-width: 28ch;
  counter-increment: section;
}
.article h2::before {
  content: "Section " counter(section, decimal-leading-zero);
  display: block;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--label); font-weight: 400;
  margin-bottom: 0.85rem;
}
.article h3 {
  font-size: 1.3rem; font-weight: 400; font-style: italic;
  color: var(--muted); margin: 2.5rem 0 1rem;
}
.article ul, .article ol { margin: 0 0 1.8rem 1.4rem; }
.article li { margin-bottom: 0.5rem; padding-left: 0.4rem; }
.article ul li::marker { color: var(--inactive); }
/* Simple blockquote within body (non-pull-quote) */
.article blockquote:not(.pull-quote) {
  margin: 2.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 1px solid var(--inactive);
  color: var(--muted); font-style: italic; font-size: 1.1rem;
}
/* Section break ornament */
.article hr.section-break {
  border: 0; margin: 4rem auto;
  display: grid; place-items: center;
}
.article hr.section-break::after {
  content: "✦   ✦   ✦";
  font-family: var(--serif); font-size: 1rem; letter-spacing: 1.5em;
  color: var(--inactive); padding-left: 1.5em;
}

/* ——— PULL QUOTE — full-bleed escape from article column ——— */
.article .pull-quote {
  border-left: 2px solid var(--border);
  border-top: none; border-bottom: none;
  margin: 3rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  max-width: none;
  text-align: left;
  font-family: var(--serif); font-style: italic;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--text); font-weight: 300;
}

/* ——— PAUSE ORNAMENT ——— */
.pause {
  margin: 3rem auto; text-align: center; color: var(--inactive);
}
.pause svg { width: 1.6rem; height: 1.6rem; opacity: 0.65; }
.pause-label {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--inactive); margin-top: 0.6rem;
}

/* ——— FIGURES ——— */
.figure-bleed {
  margin: 5rem calc(50% - 50vw) 5rem calc(50% - 50vw);
  max-width: none;
}
.figure-bleed-inner { max-width: 80rem; margin: 0 auto; padding: 0 var(--pad); }
.figure-frame {
  width: 100%; overflow: hidden; position: relative;
  background: var(--surface-hover); border: 1px solid var(--border);
  display: grid; place-items: center; cursor: zoom-in;
}
.figure-frame[data-aspect="wide"] { aspect-ratio: 16 / 9; }
.figure-frame[data-aspect="tall"] { aspect-ratio: 3 / 4; }
.figure-frame:not([data-aspect]) { aspect-ratio: 4 / 3; }
.figure-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.figure-frame:hover img { transform: scale(1.03); }
.figure-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
figcaption {
  margin-top: 1rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  align-items: baseline;
}
figcaption em {
  font-family: var(--serif); font-style: italic; text-transform: none;
  letter-spacing: 0; font-size: 0.95rem; color: var(--muted);
}

/* ——— ABOUT PAGE ——— */
.about-header {
  padding: 6rem var(--pad) 4rem;
  border-bottom: 1px solid var(--border);
}
.about-header .kicker { margin-bottom: 2rem; }
.about-page-title {
  font-size: 3.5rem; font-weight: 300;
  line-height: 1.1; letter-spacing: -0.01em;
  max-width: 26ch;
}
.about-page-title em { font-style: italic; color: var(--muted); }
/* Centred content column — mirrors .article */
.about-body {
  max-width: 40rem; margin: 0 auto;
  padding: 0 var(--pad);
}
.about-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.about-section:last-child { border-bottom: 0; }
.about-section-marker {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--inactive); margin-bottom: 2rem;
}
.about-section-text p {
  font-size: 1.2rem; line-height: 1.75;
  color: var(--text); margin-bottom: 1.6rem;
}
.about-section-text p:last-child { margin-bottom: 0; }
.about-section-text em { font-style: italic; color: var(--muted); }
.about-section-text a {
  color: inherit;
  border-bottom: 1px solid var(--inactive);
  transition: border-color 0.3s;
}
.about-section-text a:hover { border-bottom-color: var(--link); }
/* Justify option */
.about-text-justify .about-section-text p {
  text-align: justify; hyphens: auto;
}
@media (max-width: 768px) {
  .about-header { padding: var(--pad) var(--pad) calc(var(--pad) * 0.75); }
  .about-page-title { font-size: 2.5rem; }
  .about-section { padding: 2.5rem 0; }
  .about-section-text p { font-size: 1.1rem; }
}
@media (max-width: 450px) { .about-page-title { font-size: 2rem; } }

/* ——— END MARKER ——— */
.end-marker {
  text-align: center; padding: 5rem var(--pad) 2.5rem;
  color: var(--inactive);
}
.end-marker .sigil {
  font-family: var(--serif); font-style: italic;
  font-size: 1.6rem; color: var(--muted);
}
.end-marker .end-label {
  margin-top: 0.6rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--inactive);
}

/* ——— ARTICLE FOOT ——— */
.article-foot {
  border-top: 1px solid var(--border);
  padding: 4rem var(--pad);
  display: grid; grid-template-columns: 1fr auto;
  gap: 2rem; align-items: end;
}
.article-foot .credit {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
}
.article-foot .credit .author {
  font-family: var(--serif); font-style: italic; font-size: 1.5rem;
  color: var(--text); text-transform: none; letter-spacing: 0;
  margin-top: 0.4rem; display: block;
}
.article-foot .actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.article-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border); border-radius: 5rem;
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  cursor: pointer; white-space: nowrap;
}
.article-pill:hover { color: var(--text); border-color: var(--muted); background: var(--surface-hover); }
.article-pill svg { width: 0.85rem; height: 0.85rem; flex-shrink: 0; }

/* ——— RELATED SECTION ——— */
.related {
  border-top: 1px solid var(--border);
  padding: 5rem var(--pad);
}
.related-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 3rem; gap: 2rem; flex-wrap: wrap;
}
.related-kicker {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--label);
}
.related-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 300; letter-spacing: -0.01em;
}
.related-head h2 em { color: var(--muted); }
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.related-cell {
  padding: 2rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 1rem;
  color: inherit; min-height: 18rem;
  transition: background 0.4s ease;
}
.related-cell:hover { background: var(--surface-hover); }
.related-cell-kicker {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--label);
  display: flex; gap: 0.9rem;
}
.related-cell h3 {
  font-size: 1.5rem; font-weight: 400; line-height: 1.15;
  margin-top: auto; max-width: 20ch;
}
.related-cell p { font-size: 0.95rem; color: var(--muted); line-height: 1.5; }
.related-cell .arrow {
  font-family: var(--serif); font-size: 1.3rem; color: var(--text);
  align-self: flex-end;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.related-cell:hover .arrow { transform: translateX(0.4rem); }

/* ——— LIGHTBOX ——— */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in oklab, var(--bg) 93%, #000);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  padding: var(--pad);
}
.lightbox[data-open="1"] { opacity: 1; pointer-events: auto; }
.lightbox-img {
  max-width: min(90rem, 92vw); max-height: 80vh;
  width: auto; height: auto; object-fit: contain;
  border: 1px solid var(--border);
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  padding: 0.4rem 0.9rem; border: 1px solid var(--border); border-radius: 5rem;
  transition: color 0.3s, border-color 0.3s;
}
.lightbox-close:hover { color: var(--text); border-color: var(--muted); }
.lightbox-cap {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--label);
  text-align: center; max-width: 40rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-lightbox] { cursor: zoom-in; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3rem; height: 3rem; display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--border); border-radius: 50%;
  background: color-mix(in oklab, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.lightbox-nav:hover { color: var(--text); border-color: var(--muted); background: color-mix(in oklab, var(--bg) 75%, transparent); }
.lightbox-nav svg { width: 1.2rem; height: 1.2rem; }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-counter {
  position: absolute; top: 1.6rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--label);
}
@media (max-width: 640px) {
  .lightbox-nav { width: 2.4rem; height: 2.4rem; }
  .lightbox-prev { left: 0.6rem; } .lightbox-next { right: 0.6rem; }
}

/* ——— TOAST ——— */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(1rem);
  z-index: 300; padding: 0.7rem 1.2rem;
  background: var(--text); color: var(--bg);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast[data-show="1"] { opacity: 1; transform: translateX(-50%); }

/* ——— RESPONSIVE: ESSAY ——— */
@media (max-width: 900px) {
  .related-grid { grid-template-columns: 1fr; }
  .figure-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .article-head { padding: 3.5rem var(--pad) 2.5rem; }
  .article { padding: 3rem var(--pad) 2rem; font-size: 1.1rem; }
  .article > p:first-child::first-letter { font-size: 3.2rem; }
  .article-foot { grid-template-columns: 1fr; }
  .figure-bleed { margin: 3rem 0; }
  .figure-bleed-inner { padding: 0 var(--pad); }
}

/* ——————————————————————————
   PROJECT PAGE — FILM & PHOTO
   —————————————————————————— */


/* ——— FILM VIDEO COVER ——— */
.project-video-cover {
  width: 100%; aspect-ratio: 16 / 9;
  background: #000; position: relative; overflow: hidden;
}
.project-video {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}

/* ——— PHOTO COVER (inherits essay-cover-image, add 3:2 override) ——— */
.photo-cover { aspect-ratio: 3 / 2; }

/* ——— COVER PLACEHOLDER (shown when no image is uploaded yet) ——— */
.project-cover-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
}
.project-cover-placeholder svg {
  width: clamp(60px, 20%, 120px); height: auto;
  color: var(--label); opacity: 0.35;
}
.project-video-cover .project-cover-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ——— FILM "PLAY" AFFORDANCE (only when a video is embedded) ——— */
.project-video-cover.is-playable .project-cover-img,
.project-video-cover.is-playable .project-cover-placeholder { cursor: pointer; }
.film-play {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem; color: #f5f1ea;
  text-decoration: none;
  background: color-mix(in oklab, #000 22%, transparent);
  transition: background 0.4s ease;
}
.film-play:hover { background: color-mix(in oklab, #000 34%, transparent); }
.film-play-ring {
  width: clamp(58px, 9vw, 84px); height: clamp(58px, 9vw, 84px);
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in oklab, #000 30%, transparent);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s;
}
.film-play-ring svg { width: 70%; height: 70%; }
.film-play:hover .film-play-ring { transform: scale(1.08); background: color-mix(in oklab, #000 45%, transparent); }
.film-play-label {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
  .film-play, .film-play-ring { transition: none; }
  .film-play:hover .film-play-ring { transform: none; }
}

/* ——— MEDIA SECTION HEADER ——— */
.project-media-section {
  border-top: 1px solid var(--border);
}
.project-media-head {
  padding: 0.9rem var(--pad);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label);
  display: flex; gap: 1.2rem; align-items: center;
}

/* ——— PROJECT ARTICLE BODY — same as essay but no drop-cap ——— */
.project .article > p:first-child::first-letter {
  all: unset;
}

/* ═══════════════════════════════════════════════════════════
   PRESENTATION BLOCKS (project.php block canvas output)
   ═══════════════════════════════════════════════════════════ */

.prs-blocks {
  display: flex;
  flex-direction: column;
  padding-top: 4rem;
}

/* Writing block — same column as .article, no drop-cap.
   Strip .article's intrinsic vertical padding and the first/last child's
   outer margins so the box hugs its text; vertical rhythm comes only from
   the shared block-spacing scale below. */
.prs-block--writing {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0;
  padding-bottom: 0;
}
.prs-block--writing > p:first-child::first-letter { all: unset; }
.prs-block--writing > :first-child { margin-top: 0; }
.prs-block--writing > :last-child { margin-bottom: 0; }

/* Photo block — width variants */
.prs-block--photo {
  margin: 0;
  padding: 0;
}
.prs-block--photo.width-contained {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--pad);
}
.prs-block--photo.width-full {
  width: 100%;
  padding: 0;
}
.prs-block--photo.width-breakout {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--pad);
}

.prs-block--photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.prs-block--photo.width-full img {
  border-radius: 0;
}

.prs-photo-caption {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
  text-align: left;
}

/* Gallery block — multi-image grid (breakout width) */
.prs-block--gallery {
  display: grid;
  gap: 0.75rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.prs-block--gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.prs-block--gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.prs-block--gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
.prs-gallery-item { margin: 0; }
.prs-gallery-item img {
  display: block; width: 100%; aspect-ratio: 1;
  object-fit: cover; border-radius: 0.5rem; cursor: zoom-in;
}
@media (max-width: 48rem) {
  .prs-block--gallery.cols-3, .prs-block--gallery.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Section-break block — numbered heading (contained width) */
.prs-block--section {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 var(--pad);
}
/* Matches the auto-numbered .article h2 treatment: a small left-aligned
   mono number sits above the title — but shows only the number (no "Section"). */
.prs-section-head {
  display: block;
}
.prs-section-num {
  display: block;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--label); font-weight: 400;
  margin-bottom: 0.85rem;
}
.prs-section-label {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: 2rem; line-height: 1.15; letter-spacing: -0.005em;
  color: var(--text); max-width: 28ch;
}
/* No label → the number is the only child, so drop the label gap below it. */
.prs-section-num:last-child { margin-bottom: 0; }

/* Video block */
.prs-block--video {
  width: 100%;
  padding: 0 var(--pad);
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}
.prs-block--video.width-contained { max-width: 40rem; }
.prs-block--video.width-full { max-width: none; padding-left: 0; padding-right: 0; }
.prs-video-ratio {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
}
.prs-video-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Divider block */
.prs-block--divider {
  width: 100%;
  padding: 0 var(--pad);
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
.prs-block--divider.dw-short  { max-width: 10rem; }
.prs-block--divider.dw-medium { max-width: 22rem; }
.prs-divider-ornament {
  display: inline-block;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
}
.prs-divider-dots {
  display: inline-block;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.4em;
}
.prs-divider-line {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--label);
}

/* ── Block spacing ──────────────────────────────────────────────
   The gap below every block is set ONLY by its spacing setting, the
   same three steps for every block type. Blocks carry no intrinsic
   vertical padding/margin, so this is the single source of vertical
   rhythm. The gap above a block is the previous block's gap-below;
   the last block adds nothing (the page footer follows). */
.prs-block { margin-bottom: 4rem; }                 /* default ≈ medium */
.prs-block.spacing-narrow { margin-bottom: 1.5rem; }
.prs-block.spacing-medium { margin-bottom: 4rem; }
.prs-block.spacing-large  { margin-bottom: 9rem; }
.prs-blocks > .prs-block:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
  .prs-block--photo.width-contained,
  .prs-block--photo.width-breakout,
  .prs-block--video:not(.width-full),
  .prs-block--divider {
    padding-left: var(--pad);
    padding-right: var(--pad);
  }
}

/* ── Prev / Next piece navigation ─────────────────────────── */
.piece-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  margin-top: 5rem;
}
.piece-nav-cell {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 2.5rem var(--pad);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
}
.piece-nav-cell:hover { background: var(--surface-hover); }
.piece-nav-prev { border-right: 1px solid var(--border); }
.piece-nav-next { text-align: right; }
.piece-nav-empty { border-right: 1px solid var(--border); }
.piece-nav-next.piece-nav-empty { border-right: none; }
.piece-nav-dir {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.piece-nav-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--inactive);
}
.piece-nav-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.3;
  margin-top: 0.2rem;
}
@media (max-width: 600px) {
  .piece-nav {
    grid-template-columns: 1fr;
  }
  .piece-nav-prev { border-right: none; border-bottom: 1px solid var(--border); }
  .piece-nav-next { text-align: left; }
  .piece-nav-empty { display: none; }
}

/* ── 404 page ──────────────────────────────────────────────── */
.lost-main {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem var(--pad);
}
.lost-wrap {
  max-width: 38rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}
.lost-illus {
  width: 7rem;
  color: var(--muted);
  opacity: 0.7;
}
.lost-illus svg { width: 100%; height: auto; }
.lost-kicker {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lost-num {
  font-size: 0.9rem;
  color: var(--text);
}
.lost-sep { opacity: 0.4; }
.lost-heading {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}
.lost-heading em { font-style: italic; }
.lost-body {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 32rem;
  margin: 0;
}
.lost-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.lost-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.55rem 1.1rem;
  transition: background var(--transition), border-color var(--transition);
}
.lost-link:hover {
  background: var(--surface-hover);
  border-color: var(--muted);
}
.lost-search-hint {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--inactive);
  letter-spacing: 0.04em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.lost-kbd {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.1rem 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--surface-hover);
}

/* ── Colophon page ─────────────────────────────────────────── */
.col-main {
  padding: 4rem var(--pad) 0;
}
.col-wrap {
  max-width: 52rem;
  margin: 0 auto;
}
.col-print-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}
.col-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.col-print-btn:hover { background: var(--surface-hover); border-color: var(--muted); }
.col-print-btn svg { width: 0.9rem; height: 0.9rem; }
.col-back-link {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.col-back-link:hover { color: var(--text); }

/* Receipt sheet */
.col-sheet {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  padding-bottom: 6rem;
}
.col-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 0.8rem 0;
}
.col-rule--thin { margin: 0.4rem 0 0.8rem; opacity: 0.5; }

/* Header */
.col-header { display: flex; flex-direction: column; gap: 0.15rem; }
.col-name {
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 0.4rem;
}
.col-role  { color: var(--text); }
.col-location { color: var(--muted); margin-bottom: 0.15rem; }
.col-dob { font-size: 0.7rem; color: var(--label); letter-spacing: 0.06em; margin-bottom: 0.4rem; }

/* Sections */
.col-section { display: flex; flex-direction: column; }
.col-section-label {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.col-para {
  color: var(--text);
  line-height: 1.8;
  margin: 0;
  max-width: 38rem;
}
.col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.col-list li::before { content: '· '; color: var(--muted); }
.col-list li { color: var(--text); }

/* Table (experience / education) */
.col-entries { display: flex; flex-direction: column; }
.col-entry { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
.col-entry:first-child { padding-top: 0; }
.col-entry:last-child { border-bottom: none; padding-bottom: 0; }
.col-entry-title { color: var(--text); font-size: 0.82rem; line-height: 1.4; margin-bottom: 0.2rem; }
.col-entry-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.72rem; }
.col-entry-org { color: var(--muted); }
.col-entry-period { color: var(--inactive); flex-shrink: 0; }
.col-entry-desc { font-size: 0.75rem; color: var(--muted); margin: 0.45rem 0 0; line-height: 1.6; }

/* Contact */
.col-contact { display: flex; flex-direction: column; gap: 0.25rem; }
.col-contact a { color: inherit; text-decoration: underline; text-decoration-color: var(--inactive); text-underline-offset: 4px; transition: text-decoration-color 0.3s; }
.col-contact a:hover { text-decoration-color: var(--link); }
.col-address { color: var(--muted); font-size: 0.78rem; }

/* Footer */
.col-footer { display: flex; flex-direction: column; gap: 0.6rem; }
.col-avail { color: var(--text); margin: 0; font-style: italic; }
.col-meta { color: var(--inactive); font-size: 0.68rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.col-meta-sep { opacity: 0.4; }

/* ── Print styles ──────────────────────────────────────────── */
@media print {
  /* Hide everything except the sheet */
  .no-print,
  .nav-row, .nav-sticky, .status-strip,
  .obs-trigger, .observatory, .cmdk, .cmdk-backdrop,
  .reading-line, .site-footer, .col-print-bar,
  .col-back-link {
    display: none !important;
  }
  html, body { background: #fff !important; color: #000 !important; }
  .col-main  { padding: 1.5cm !important; }
  .col-wrap  { max-width: 100% !important; }
  .col-sheet {
    font-size: 9pt !important;
    color: #000 !important;
    gap: 1.4rem !important;
    padding-bottom: 0 !important;
  }
  .col-name    { color: #000 !important; }
  .col-role, .col-location, .col-para,
  .col-list li, .col-entry-title { color: #000 !important; }
  .col-section-label, .col-entry-org, .col-entry-desc, .col-muted { color: #555 !important; }
  .col-entry-period, .col-meta { color: #777 !important; }
  .col-entry { border-bottom-color: #ccc !important; }
  .col-rule    { background: #000 !important; opacity: 1 !important; }
  .col-avail   { color: #000 !important; }
  a { color: #000 !important; text-decoration: none !important; }
  @page { margin: 1.5cm; }

  /* ── Post pages (project / essay): keep blocks & images whole ──
     Pagination must push a whole block to the next page rather than
     slicing through an image, figure, or its caption. */
  .prs-block,
  .prs-block--photo,
  .prs-block--gallery,
  .prs-block--video,
  .prs-block--section,
  .prs-gallery-item,
  figure,
  img,
  blockquote,
  .pull-quote {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  /* Images never exceed a single page, and the figure stays with its caption. */
  .prs-block img,
  .article img,
  figure img {
    max-width: 100% !important;
    max-height: 9in !important;
    height: auto !important;
    object-fit: contain;
  }
  figcaption, .prs-photo-caption {
    break-before: avoid;
    page-break-before: avoid;
  }
  /* Don't strand a heading at the bottom of a page, away from its content. */
  .article h2, .article h3,
  .prs-section-head, .prs-section-label {
    break-after: avoid;
    page-break-after: avoid;
  }
}

/* ——— Adaptive nav contrast over hero images ———
   site.js samples the brightness of the cover image directly behind the nav and
   toggles .nav-adapt-dark / .nav-adapt-light on it. Each re-points the nav's LOCAL
   theme tokens to a full dark- or light-surface palette (copied from :root and
   html[data-theme="light"]), so the frosted background AND every text/border colour
   recompute together and stay legible over any photo — independent of the active
   site theme. Neither class is set when the nav sits over the solid page bg, so it
   falls back to the normal theme colours there. */
.nav-sticky.nav-adapt-dark,
.nav-shell.nav-adapt-dark {
  --bg: #121212; --text: #d5d5d5; --muted: #c3c3c3;
  --inactive: #6a6a6a; --label: rgba(255,255,255,0.6); --border: #2d2d2d;
}
.nav-sticky.nav-adapt-light,
.nav-shell.nav-adapt-light {
  --bg: #f2efe8; --text: #1a1a1a; --muted: #3d3d3d;
  --inactive: #8a8474; --label: rgba(0,0,0,0.55); --border: #d6d0c2;
}
/* Smooth the colour flip on the text marks that don't already transition colour.
   (.nav-item / .ns-menu-btn / .ns-theme-icon already animate their own colour, and
   the frosted backgrounds transition via the existing 0.6s background rules.) */
.ns-brand, .ns-time,
.nav-brand, .nav-brand .dot,
.nav-brand-mini, .nav-brand-mini .dot,
.nav-time { transition: color 0.3s ease, background 0.3s ease; }
