/* chiezeamaku.com · Nocturne: smoked glass, holographic foil. Dark-first. */
@view-transition { navigation: auto; }

:root {
  color-scheme: dark;
  --ground: #07080c;
  --ground-2: #0c0e14;
  --ink: #eef0f4;
  --body: #b8bbc5;
  --muted: #868a96;
  --faint: #4b4f5a;
  --rule: rgba(255, 255, 255, 0.07);
  --rule-strong: rgba(255, 255, 255, 0.12);
  --glass: rgba(20, 22, 30, 0.52);
  --glass-hi: rgba(28, 31, 42, 0.66);
  --glass-brd: rgba(255, 255, 255, 0.075);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --sheen: rgba(255, 255, 255, 0.06);
  --glow: rgba(196, 214, 255, 0.085);
  --focus: #b9c7ff;
  --current-bg: rgba(255, 255, 255, 0.07);
  --current-ring: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  --card: #14151a;
  --card-2: #1d1f26;
  --card-ink: #f2f2f5;
  --card-muted: #8f929c;
  --ok: #8fd9c4;
  --aurora-1: 61, 127, 122;   /* teal */
  --aurora-2: 108, 95, 149;   /* lilac */
  --aurora-3: 154, 138, 102;  /* champagne */
  --aurora-4: 45, 74, 107;    /* slate blue */
  --aurora-alpha: 0.32;
  --foil: linear-gradient(115deg, #f6d3e4 0%, #d6e0ff 17%, #cdf5ea 33%, #f5ecc6 50%, #e1d5ff 66%, #cdeeff 83%, #f6d3e4 100%);
  --foil-ink: var(--foil);
  --foil-soft: linear-gradient(90deg, rgba(246, 211, 228, 0), rgba(214, 224, 255, 0.9) 25%, rgba(205, 245, 234, 0.9) 50%, rgba(245, 236, 198, 0.9) 75%, rgba(246, 211, 228, 0));
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --read: 680px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ground: #eceef3;
    --ground-2: #f5f6f9;
    --ink: #0f1117;
    --body: #3b3f4a;
    --muted: #666b77;
    --faint: #a7abb5;
    --rule: rgba(15, 17, 23, 0.08);
    --rule-strong: rgba(15, 17, 23, 0.14);
    --glass: rgba(255, 255, 255, 0.5);
    --glass-hi: rgba(255, 255, 255, 0.74);
    --glass-brd: rgba(255, 255, 255, 0.75);
    --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 30px 60px -34px rgba(30, 36, 60, 0.35);
    --sheen: rgba(255, 255, 255, 0.7);
    --glow: rgba(255, 255, 255, 0.55);
    --focus: #4a5bd6;
    --current-bg: rgba(255, 255, 255, 0.85);
    --current-ring: 0 1px 2px rgba(20, 24, 40, 0.08);
    --ok: #1f7a64;
    --aurora-1: 150, 205, 198;
    --aurora-2: 196, 184, 236;
    --aurora-3: 236, 218, 178;
    --aurora-4: 170, 196, 232;
    --aurora-alpha: 0.55;
    --foil-ink: linear-gradient(115deg, #9a4f78 0%, #4a5fc0 25%, #2f8a7c 50%, #9a7a2e 72%, #6a4fc0 100%);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #eceef3;
  --ground-2: #f5f6f9;
  --ink: #0f1117;
  --body: #3b3f4a;
  --muted: #666b77;
  --faint: #a7abb5;
  --rule: rgba(15, 17, 23, 0.08);
  --rule-strong: rgba(15, 17, 23, 0.14);
  --glass: rgba(255, 255, 255, 0.5);
  --glass-hi: rgba(255, 255, 255, 0.74);
  --glass-brd: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 30px 60px -34px rgba(30, 36, 60, 0.35);
  --sheen: rgba(255, 255, 255, 0.7);
  --glow: rgba(255, 255, 255, 0.55);
  --focus: #4a5bd6;
  --current-bg: rgba(255, 255, 255, 0.85);
  --current-ring: 0 1px 2px rgba(20, 24, 40, 0.08);
  --ok: #1f7a64;
  --aurora-1: 150, 205, 198;
  --aurora-2: 196, 184, 236;
  --aurora-3: 236, 218, 178;
  --aurora-4: 170, 196, 232;
  --aurora-alpha: 0.55;
  --foil-ink: linear-gradient(115deg, #9a4f78 0%, #4a5fc0 25%, #2f8a7c 50%, #9a7a2e 72%, #6a4fc0 100%);
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 350;
  --px: 50%; --py: 30%;
}
::selection { background: rgba(185, 199, 255, 0.3); color: var(--ink); }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 1.5px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px;
  background: var(--glass-hi); color: var(--ink); text-decoration: none; font-size: 14px;
}
.skip:focus { top: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Field ---------- */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; view-transition-name: field; }
.glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px circle at var(--px) var(--py), var(--glow), transparent 60%);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
main { display: block; padding-block: clamp(120px, 16vh, 168px) clamp(64px, 10vh, 120px); }

/* ---------- Header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding-block: calc(env(safe-area-inset-top, 0px) + 14px) 14px;
  view-transition-name: site-head;
}
/* The header stays transparent so the aurora flows through it. Instead of painting a bar,
   the page content is masked away as it scrolls under the header (site.js sets --cut). */
main, .site-foot {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent var(--cut, -40px), #000 calc(var(--cut, -40px) + 28px));
          mask-image: linear-gradient(to bottom, transparent 0, transparent var(--cut, -40px), #000 calc(var(--cut, -40px) + 28px));
}
section[id], [id].section, h2[id] { scroll-margin-top: 110px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14px; letter-spacing: -0.01em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 6px 16px -8px rgba(0, 0, 0, 0.6);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  position: relative; overflow: hidden;
}
.brand .mark span { background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, transparent 30%, rgba(255, 255, 255, 0.25) 48%, transparent 62%); }
.brand .full { white-space: nowrap; }

.nav {
  display: flex; align-items: center; gap: 2px; padding: 5px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  position: relative;
}
.nav::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px;
  background: var(--foil-soft); opacity: 0.55; border-radius: 1px;
}
.nav a {
  text-decoration: none; font-size: 13px; color: var(--muted); padding: 7px 13px; border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--current-bg); box-shadow: var(--current-ring); }
.theme-btn {
  appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; margin-left: 2px;
}
.theme-btn:hover { color: var(--ink); }
.theme-btn svg { width: 15px; height: 15px; }
/* ---------- Mobile header: a menu pill that opens a full-screen glass sheet ---------- */
.head-mobile, .menu-sheet { display: none; }
.site-head .wrap { position: relative; z-index: 1; }
.glass-pill {
  appearance: none; cursor: pointer; color: var(--ink); font: 400 13px var(--sans); letter-spacing: -0.005em;
  height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--glass); border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
}
.head-mobile .theme-btn { width: 40px; margin: 0; color: var(--muted); }
.menu-btn { padding: 0 16px 0 14px; }
.menu-btn .bars { position: relative; width: 16px; height: 10px; }
.menu-btn .bars i { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform 0.45s var(--ease), top 0.45s var(--ease); }
.menu-btn .bars i:first-child { top: 1px; }
.menu-btn .bars i:last-child { top: 7.5px; }
.menu-btn[aria-expanded="true"] .bars i:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars i:last-child { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .nav { display: none; }
  .head-mobile { display: flex; gap: 8px; }
  .brand .full { font-size: 14.5px; }
  .menu-sheet:not([hidden]) {
    display: flex; flex-direction: column; justify-content: space-between;
    position: fixed; inset: 0; z-index: 0; overflow-y: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 92px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 28px);
    background: color-mix(in srgb, var(--ground) 58%, transparent);
    -webkit-backdrop-filter: blur(34px) saturate(1.5); backdrop-filter: blur(34px) saturate(1.5);
    animation: sheet-in 0.45s var(--ease) both;
  }
  .menu-sheet.closing { animation: sheet-out 0.28s ease-in both; }
  .menu-links { display: grid; }
  .menu-links a {
    display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; align-items: baseline;
    padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none;
    animation: link-in 0.6s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 60ms);
  }
  .menu-links a:first-child { border-top: 1px solid var(--rule); }
  .menu-links .n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); grid-row: span 2; padding-top: 12px; }
  .menu-links .l { font-weight: 250; font-size: clamp(36px, 11vw, 46px); letter-spacing: -0.045em; line-height: 1.05; color: var(--ink); }
  .menu-links .d { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
  .menu-links a[aria-current="page"] .l { background: var(--foil-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .menu-links a[aria-current="page"] .n::after { content: " ●"; font-size: 8px; vertical-align: 2px; }
  .menu-foot { display: grid; gap: 10px; margin-top: 32px; font-size: 14px; color: var(--muted); animation: link-in 0.6s var(--ease) 0.36s both; }
  .menu-foot a { color: var(--ink); text-decoration: none; }
  .menu-foot span { display: flex; gap: 18px; }
  .menu-foot span a { color: var(--muted); }
  html.menu-open { overflow: hidden; }
  html.menu-open main, html.menu-open .site-foot { visibility: hidden; }
}
@media (max-width: 359px) { .brand .full { display: none; } }
@keyframes sheet-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes link-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--foil); box-shadow: 0 0 10px rgba(205, 245, 234, 0.6); }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--ink); }
.page-title {
  font-weight: 200; color: var(--ink); letter-spacing: -0.045em; line-height: 0.98;
  font-size: clamp(46px, 8.4vw, 118px); margin: 18px 0 0; text-wrap: balance;
}
.page-title em, .foil-text { font-style: normal; background: var(--foil-ink); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil-drift 9s ease-in-out infinite alternate; }
@keyframes foil-drift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.lede { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--body); max-width: 46ch; margin: 28px 0 0; font-weight: 300; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 400; }
h2.section {
  font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 18px; display: flex; align-items: center; gap: 14px;
}
h2.section::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section-block { margin-top: clamp(64px, 9vw, 112px); }
.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px clamp(24px, 5vw, 72px); align-items: end; margin-bottom: 26px; }
.section-intro h3 { margin: 0; color: var(--ink); font-weight: 300; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.035em; line-height: 1.08; text-wrap: balance; }
.section-intro p { margin: 0; max-width: 52ch; }
@media (max-width: 820px) { .section-intro { grid-template-columns: 1fr; } }

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  backdrop-filter: blur(26px) saturate(1.35);
  --sx: 30%; --sy: 0%;
  isolation: isolate;
}
.glass::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px;
  background: var(--foil-soft); opacity: 0.5; pointer-events: none;
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--sx) var(--sy), var(--sheen), transparent 60%);
}

.tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.tag.foil { color: var(--ink); border-color: transparent; background: linear-gradient(var(--glass-hi), var(--glass-hi)) padding-box, var(--foil) border-box; border: 1px solid transparent; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--body); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.status.live::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.status.built::before { background: transparent; box-shadow: 0 0 0 1.5px var(--muted) inset; }
.status.local::before { background: var(--foil); }

.arrow-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 14px; }
.arrow-link .ar { transition: transform 0.35s var(--ease); }
.arrow-link:hover .ar { transform: translateX(4px); }
.button {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 14px; color: var(--ink);
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(var(--glass-hi), var(--glass-hi)) padding-box, var(--foil) border-box;
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s var(--ease);
}
.button:hover { transform: translateY(-1px); }
.button .ar { transition: transform 0.35s var(--ease); }
.button:hover .ar { transform: translateX(3px); }
.button.quiet { background: transparent; border-color: var(--rule-strong); box-shadow: none; }

/* ---------- Holographic card (tilts, flips) ---------- */
.card-stage { perspective: 1400px; display: grid; place-items: center; }
.holo-tilt {
  --rx: 0deg; --ry: 0deg; --mx: 30%; --my: 20%; --fx: 40%; --fy: 50%;
  position: relative; width: min(100%, 520px); aspect-ratio: 1.586;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  will-change: transform;
  view-transition-name: holo-card;
}
.holo-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.9s var(--ease); }
.holo-tilt.flipped .holo-inner { transform: rotateY(180deg); }
.holo {
  position: absolute; inset: 0; border-radius: 22px;
  background:
    radial-gradient(120% 90% at 0% 0%, #262833 0%, transparent 60%),
    linear-gradient(150deg, #1b1c22 0%, #111216 55%, #17181e 100%);
  color: var(--card-ink);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 50px 90px -40px rgba(0, 0, 0, 0.85),
    0 20px 40px -24px rgba(0, 0, 0, 0.6);
  overflow: hidden; isolation: isolate;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.holo.back { transform: rotateY(180deg); }
.holo .tex {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.8;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 4px);
}
.holo .foil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    conic-gradient(from 200deg at var(--fx) var(--fy), #f6d3e4, #d6e0ff, #cdf5ea, #f5ecc6, #e1d5ff, #cdeeff, #f6d3e4),
    repeating-linear-gradient(115deg, transparent 0 14px, rgba(255, 255, 255, 0.12) 18px, transparent 22px);
  background-blend-mode: soft-light;
  mix-blend-mode: color-dodge;
  opacity: 0.24;
  -webkit-mask-image: radial-gradient(120% 120% at var(--fx) var(--fy), #000 20%, transparent 75%);
          mask-image: radial-gradient(120% 120% at var(--fx) var(--fy), #000 20%, transparent 75%);
}
.holo .glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(55% 60% at var(--mx) var(--my), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 45%, transparent 70%);
}
.holo .edge {
  position: absolute; inset: 0; border-radius: inherit; z-index: 4; pointer-events: none;
  border: 1px solid transparent;
  background: var(--foil) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  opacity: 0.35;
}
.holo .face {
  position: absolute; inset: 0; z-index: 5; padding: clamp(18px, 5.5%, 30px);
  display: grid; grid-template-rows: auto 1fr auto;
}
.holo .mono-mark {
  font-weight: 600; font-size: clamp(22px, 5vw, 30px); letter-spacing: -0.04em; line-height: 1;
  background: var(--foil); background-size: 200% 100%; background-position: var(--fx) 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.holo .top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.holo .kind { font-family: var(--mono); font-size: clamp(8.5px, 1.8vw, 10px); letter-spacing: 0.16em; text-transform: uppercase; color: var(--card-muted); padding-top: 6px; text-align: right; }
.holo .who { align-self: end; display: grid; gap: 3px; }
.holo .who b { font-weight: 500; font-size: clamp(17px, 3.6vw, 23px); letter-spacing: -0.02em; color: var(--card-ink); }
.holo .who span { font-size: clamp(11.5px, 2.3vw, 14px); color: var(--card-muted); }
.holo .bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-family: var(--mono); font-size: clamp(9px, 1.9vw, 11px); letter-spacing: 0.1em; text-transform: uppercase; color: var(--card-muted); }
.holo .bottom span:last-child { text-transform: none; letter-spacing: 0.02em; }
.holo.back .face { grid-template-rows: auto 1fr auto; }
.holo .quote { align-self: center; font-weight: 300; font-size: clamp(15px, 3.1vw, 21px); line-height: 1.3; letter-spacing: -0.02em; color: var(--card-ink); max-width: 22ch; text-wrap: balance; }
.holo .quote em { font-style: normal; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-stage { gap: 22px; }
.flip-btn {
  appearance: none; cursor: pointer; border: 1px solid var(--rule-strong); background: var(--glass); color: var(--muted);
  font: 400 12px var(--mono); letter-spacing: 0.06em; padding: 7px 14px; border-radius: 999px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: color 0.2s;
}
.flip-btn:hover { color: var(--ink); }
.holo-tilt { cursor: pointer; }
.holo a { text-decoration: none; }
.holo a:hover { color: var(--card-ink); }

/* ---------- Footer ---------- */
.site-foot { padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.email { font-size: clamp(18px, 2.4vw, 22px); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; font-weight: 300; }
.copy-btn {
  appearance: none; cursor: pointer; font: 500 12px var(--mono); letter-spacing: 0.04em; color: var(--ink);
  padding: 7px 12px; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(var(--glass-hi), var(--glass-hi)) padding-box, var(--foil) border-box;
}
.copy-btn:hover { filter: brightness(1.12); }
.copy-state { font-family: var(--mono); font-size: 11.5px; color: var(--muted); min-width: 6ch; }
.foot-links { display: flex; gap: 18px; font-size: 13.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--ink); }

/* ---------- Home ---------- */
.home main { min-height: 100vh; display: flex; align-items: center; padding-block: clamp(110px, 14vh, 150px) 56px; }
.home main > .wrap { width: 100%; }
.hero { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 {
  font-weight: 300; color: var(--ink); letter-spacing: -0.045em; line-height: 1.01;
  font-size: clamp(38px, 5.3vw, 76px); margin: 18px 0 0; text-wrap: balance;
}
.hero .bio { margin: 28px 0 0; max-width: 50ch; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.6; color: var(--body); text-wrap: pretty; }
.hero .bio strong { color: var(--ink); font-weight: 400; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(44px, 7vh, 84px); }
@media (max-width: 1000px) and (min-width: 641px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.door {
  display: grid; gap: 2px; padding: 16px 18px 15px; border-radius: 16px; text-decoration: none; color: var(--body);
  transition: transform 0.4s var(--ease);
}
.door .t { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); font-size: 15.5px; font-weight: 400; }
.door .t .ar { color: var(--muted); transition: transform 0.4s var(--ease), color 0.3s; }
.door .d { font-size: 13px; color: var(--muted); }
.door:hover { transform: translateY(-2px); }
.door:hover .t .ar { transform: translateX(3px); color: var(--ink); }
.door.glass::before { left: 16px; right: 16px; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); }
.proof b { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .home main { align-items: flex-start; }
  .hero-card .holo-tilt { width: min(100%, 420px); }
}
/* Phones: headline first, then the card, then the doors as one grouped glass list */
@media (max-width: 640px) {
  .home main { padding-top: calc(env(safe-area-inset-top, 0px) + 104px); }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy { display: contents; }
  .hero h1 { order: 1; margin-top: 0; font-size: clamp(34px, 10vw, 44px); line-height: 1.02; }
  .hero .bio { order: 2; font-size: 16px; }
  .hero-card { order: 3; margin-top: 34px; }
  .roles { order: 4; margin-top: 28px; }
  .doors { order: 5; }
  .hero-card .card-stage { gap: 16px; }
  .doors { grid-template-columns: 1fr; gap: 0; margin-top: 18px; }
  .door { border-radius: 0; padding: 17px 20px 16px; margin-top: -1px; box-shadow: none; }
  .door:first-child { border-radius: 20px 20px 0 0; margin-top: 0; }
  .door:last-child { border-radius: 0 0 20px 20px; box-shadow: var(--glass-shadow); }
  .door:hover { transform: none; }
  .door.glass::before { display: none; }
  .door:first-child.glass::before { display: block; }
  .proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 26px; border-top: 1px solid var(--rule); }
  .proof span { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
  .proof span:nth-child(odd) { padding-right: 12px; border-right: 1px solid var(--rule); }
  .proof span:nth-child(even) { padding-left: 16px; }
  .proof b { font-family: var(--sans); font-weight: 200; font-size: 34px; letter-spacing: -0.04em; line-height: 1; text-transform: none; }
}

/* ---------- Chapters (about) ---------- */
.chapters { display: grid; gap: 0; }
.chapter {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 0.9fr); gap: 10px clamp(20px, 4vw, 56px);
  padding: clamp(26px, 3.4vw, 40px) 0; border-top: 1px solid var(--rule); align-items: start;
}
.chapter:last-child { border-bottom: 1px solid var(--rule); }
.chapter .when { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); padding-top: 8px; font-variant-numeric: tabular-nums; }
.chapter h3 { margin: 0; color: var(--ink); font-weight: 300; font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.chapter h3 small { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; letter-spacing: 0; color: var(--muted); font-weight: 350; }
.chapter p { margin: 0 0 12px; }
.chapter p:last-child { margin-bottom: 0; }
.chapter ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.chapter li { padding-left: 18px; position: relative; }
.chapter li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--muted); }
@media (max-width: 900px) { .chapter { grid-template-columns: 1fr; } .chapter .when { padding-top: 0; } }

.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cap { padding: clamp(22px, 3vw, 32px); display: grid; gap: 10px; align-content: start; }
.cap .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cap h3 { margin: 0; color: var(--ink); font-weight: 300; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.025em; line-height: 1.15; }
.cap p { margin: 0; }
@media (max-width: 760px) { .caps { grid-template-columns: 1fr; } }

.rows { padding: 6px clamp(18px, 3vw, 30px); }
.row {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) auto; gap: 6px 24px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.row:last-child { border-bottom: 0; }
.row .role { color: var(--ink); font-size: 17px; font-weight: 400; letter-spacing: -0.01em; }
.row .co { color: var(--body); }
.row .when { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: 2px; } .row .when { text-align: left; } }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.principle { margin: 0; padding: clamp(22px, 3vw, 32px); display: grid; gap: 14px; align-content: space-between; }
.principle blockquote { margin: 0; color: var(--ink); font-weight: 300; font-size: clamp(19px, 2vw, 23px); line-height: 1.35; letter-spacing: -0.02em; text-wrap: pretty; }
.principle figcaption { font-size: 13.5px; color: var(--muted); }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fact { padding: 22px 24px; display: grid; gap: 6px; align-content: start; }
.fact .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.fact .v { color: var(--ink); font-size: 16px; line-height: 1.45; }
.fact .v span { display: block; color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr; } }
.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack .tag { font-size: 12px; padding: 6px 12px; color: var(--body); }
.stack-groups { display: grid; gap: 18px; }
.stack-group { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 24px; align-items: start; }
.stack-group .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 8px; }
@media (max-width: 640px) { .stack-group { grid-template-columns: 1fr; } }

/* ---------- The gate diagram ---------- */
.gate { padding: clamp(24px, 4vw, 48px); display: grid; gap: clamp(22px, 3vw, 34px); }
.gate-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(10px, 2vw, 22px); }
.gate-node { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--rule-strong); background: var(--glass-hi); }
.gate-node .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.gate-node b { color: var(--ink); font-weight: 400; font-size: 17px; letter-spacing: -0.01em; }
.gate-node span { font-size: 13.5px; color: var(--muted); }
.gate-node.right { text-align: right; }
.gate-core { display: grid; justify-items: center; gap: 10px; position: relative; }
.gate-core .ring {
  width: clamp(76px, 9vw, 104px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), transparent 45%), conic-gradient(from var(--gate-a, 20deg), #f6d3e4, #d6e0ff, #cdf5ea, #f5ecc6, #e1d5ff, #cdeeff, #f6d3e4);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 18px 40px -16px rgba(0, 0, 0, 0.6), 0 0 60px -10px rgba(205, 245, 234, 0.35);
  color: #15161b; font: 500 10.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  animation: gate-spin 14s linear infinite;
}
@property --gate-a { syntax: "<angle>"; inherits: false; initial-value: 20deg; }
@keyframes gate-spin { to { --gate-a: 380deg; } }
.gate-core .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.gate-flow .wire { position: relative; height: 1px; background: var(--rule-strong); }
.gate-rows { display: grid; gap: 0; }
.gate-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 6px 28px; padding: 16px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.gate-row .sys { color: var(--ink); font-size: 16px; }
.gate-row .how { color: var(--body); font-size: 15px; }
.gate-row .irr { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); text-align: right; }
@media (max-width: 820px) {
  .gate-flow { grid-template-columns: 1fr; justify-items: stretch; }
  .gate-node.right { text-align: left; }
  .gate-row { grid-template-columns: 1fr; }
  .gate-row .irr { text-align: left; }
}

/* ---------- Work ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature { padding: clamp(24px, 3.4vw, 40px); display: grid; gap: 16px; align-content: start; grid-template-rows: auto auto 1fr auto; text-decoration: none; color: var(--body); transition: transform 0.45s var(--ease); }
a.feature:hover { transform: translateY(-3px); }
.feature.wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-rows: auto; gap: 24px clamp(24px, 4vw, 56px); align-items: center; }
.feature .meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.feature .kind { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.feature h3 { margin: 0; font-weight: 200; font-size: clamp(38px, 4.8vw, 64px); letter-spacing: -0.05em; line-height: 1; color: var(--ink); }
.feature h3 small { display: block; font-size: 0.34em; letter-spacing: -0.01em; font-weight: 300; color: var(--muted); margin-top: 10px; line-height: 1.3; }
.feature p { margin: 0; max-width: 50ch; }
.feature .foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--rule); }
.feature .copy { display: grid; gap: 16px; }
.feature .more { font-size: 14px; color: var(--ink); display: inline-flex; gap: 8px; }
.feature .more .ar { transition: transform 0.35s var(--ease); }
a.feature:hover .more .ar { transform: translateX(4px); }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } .feature.wide { grid-template-columns: 1fr; } }

.arch { display: grid; gap: 10px; justify-items: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.arch .n { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--rule-strong); background: var(--glass-hi); color: var(--ink); text-align: center; min-width: 0; line-height: 1.4; }
.arch .n span { display: block; color: var(--muted); font-size: 10.5px; }
.arch .n.core { background: linear-gradient(160deg, var(--card-2), var(--card)); color: var(--card-ink); border-color: rgba(255, 255, 255, 0.1); }
.arch .n.core span { color: var(--card-muted); }
.arch .fan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.arch .v { width: 1px; height: 16px; background: var(--rule-strong); }

.list { display: grid; }
.list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 170px; gap: 8px 32px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--body);
}
.list-row:first-child { border-top: 1px solid var(--rule); }
.list-row h3 { margin: 0; font-weight: 300; font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -0.025em; color: var(--ink); line-height: 1.15; }
.list-row h3 small { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.45; letter-spacing: 0; color: var(--muted); font-weight: 350; }
.list-row p { margin: 0; }
.list-row .stat { text-align: right; min-width: 0; }
.list-row .stat b { display: block; font-weight: 200; font-size: 34px; letter-spacing: -0.04em; color: var(--ink); line-height: 1; white-space: normal; text-wrap: balance; }
.list-row .stat span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
a.list-row h3 .ar { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 0.75em; transition: transform 0.35s var(--ease), color 0.3s; }
a.list-row:hover h3 .ar { transform: translateX(4px); color: var(--ink); }
@media (max-width: 820px) { .list-row { grid-template-columns: 1fr; } .list-row .stat { text-align: left; } }

/* Platform list, highlighted as a glass panel */
.list.panel { margin-top: 14px; padding: 6px clamp(20px, 3.4vw, 40px); }
.list.panel .list-row:first-child { border-top: 0; }
.list.panel .list-row:last-child { border-bottom: 0; }
a.list-row { transition: background 0.3s var(--ease); border-radius: 14px; }

/* chi-harness policy card */
.rulebook { border-radius: 16px; border: 1px solid var(--rule-strong); background: var(--glass-hi); padding: 16px 18px; display: grid; gap: 0; font-size: 13.5px; }
.rulebook.glass { padding: clamp(18px, 3vw, 28px) clamp(18px, 3.4vw, 34px); max-width: 860px; }
@media (min-width: 461px) { .rulebook.glass .rb-row { grid-template-columns: minmax(0, 190px) minmax(0, 1fr) auto; } }
.rb-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rb-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px dashed var(--rule); }
.rb-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.rb-row code { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.rb-row span { color: var(--muted); }
.rb-row b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--rule-strong); white-space: nowrap; }
.rb-row b.allow { color: var(--ok); }
.rb-row b.ask { color: var(--ink); border-color: transparent; background: linear-gradient(var(--glass-hi), var(--glass-hi)) padding-box, var(--foil) border-box; }
.rb-row b.deny { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
@media (max-width: 460px) { .rb-row { grid-template-columns: minmax(0, 1fr) auto; } .rb-row span { grid-column: 1; grid-row: 2; font-size: 12.5px; margin-top: -6px; } .rb-row b { grid-row: 1 / span 2; align-self: center; } }

/* AI scribe mini visual */
.scribe { border-radius: 16px; border: 1px solid var(--rule-strong); background: var(--glass-hi); padding: 16px 18px; display: grid; gap: 2px; font-size: 13.5px; }
.scribe-head, .scribe-foot { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.scribe-head { padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.scribe-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.scribe-row span { color: var(--muted); }
.scribe-row b { color: var(--ink); font-weight: 400; }
.scribe-row i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.scribe-foot { padding-top: 12px; align-items: center; }
.scribe-foot .sign { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink); background: var(--glass); }

.note { margin-top: 22px; font-size: 13.5px; color: var(--muted); max-width: 70ch; }

/* ---------- Case study ---------- */
.case-head { display: grid; gap: 0; }
.crumbs { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.case-title { font-weight: 200; color: var(--ink); letter-spacing: -0.045em; line-height: 1; font-size: clamp(42px, 7vw, 96px); margin: 18px 0 0; text-wrap: balance; max-width: 16ch; }
.spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 64px); }
.spec div { padding: 18px 22px 20px; display: grid; gap: 6px; align-content: start; border-left: 1px solid var(--rule); }
.spec div:first-child { border-left: 0; }
.spec .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.spec .v { color: var(--ink); font-size: 14.5px; line-height: 1.45; }
@media (max-width: 860px) {
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec div:nth-child(3) { border-left: 0; }
  .spec div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 460px) { .spec { grid-template-columns: 1fr; } .spec div { border-left: 0; } .spec div + div { border-top: 1px solid var(--rule); } }

.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.number { padding: 24px 26px; display: grid; gap: 8px; align-content: start; }
.number b { font-weight: 200; font-size: clamp(38px, 4.6vw, 58px); letter-spacing: -0.045em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.number span { font-size: 14px; color: var(--muted); line-height: 1.45; }
@media (max-width: 820px) { .numbers { grid-template-columns: 1fr; } }
.numbers.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.numbers.four .number b { font-size: clamp(34px, 3.8vw, 50px); }
@media (max-width: 980px) { .numbers.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .numbers.four { gap: 10px; }
  .numbers.four .number { padding: 18px 18px 20px; border-radius: 18px; }
  .numbers.four .number b { font-size: 34px; }
  .numbers.four .number span { font-size: 12.5px; }
  .list.panel { padding: 2px 20px; border-radius: 20px; }
  .list.panel .list-row { padding: 22px 0; gap: 10px; }
  .list-row .stat { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; order: -1; }
  .list-row .stat b { font-size: 30px; }
}

.prose { max-width: var(--read); }
.prose h2 { margin: clamp(48px, 7vw, 80px) 0 16px; color: var(--ink); font-weight: 300; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.03em; line-height: 1.12; text-wrap: balance; }
.prose h3 { margin: 32px 0 8px; color: var(--ink); font-weight: 400; font-size: 18px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 18px; font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.prose p strong, .prose li strong { color: var(--ink); font-weight: 450; }
.prose ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.prose li { padding-left: 20px; position: relative; font-size: 16.5px; line-height: 1.65; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 9px; height: 1px; background: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.86em; color: var(--ink); background: var(--glass-hi); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 6px; }
.pull { margin: clamp(36px, 5vw, 56px) 0; padding: clamp(24px, 3.4vw, 36px); }
.pull blockquote { margin: 0; color: var(--ink); font-weight: 300; font-size: clamp(21px, 2.4vw, 28px); line-height: 1.3; letter-spacing: -0.025em; text-wrap: balance; }
.pull figcaption { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.callout { margin: 28px 0; padding: 20px 22px; display: grid; gap: 6px; }
.callout .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.callout p { margin: 0; font-size: 15.5px; }
.decisions { display: grid; gap: 14px; margin: 24px 0 8px; }
.decision { padding: 22px 24px; display: grid; gap: 8px; }
.decision h3 { margin: 0; color: var(--ink); font-weight: 400; font-size: 18px; letter-spacing: -0.01em; }
.decision p { margin: 0; font-size: 15.5px; line-height: 1.65; }

.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(32px, 6vw, 88px); margin-top: clamp(48px, 7vw, 88px); align-items: start; }
.case-aside { position: sticky; top: 110px; display: grid; gap: 14px; }
.case-aside .glass { padding: 20px 22px; display: grid; gap: 10px; }
.case-aside .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.case-aside p { margin: 0; font-size: 14px; line-height: 1.55; }
@media (max-width: 980px) { .case-grid { grid-template-columns: 1fr; } .case-aside { position: static; } }

.next-case { margin-top: clamp(64px, 9vw, 112px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.next-case a { padding: 24px 26px; text-decoration: none; display: grid; gap: 6px; transition: transform 0.4s var(--ease); }
.next-case a:hover { transform: translateY(-2px); }
.next-case .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.next-case b { color: var(--ink); font-weight: 300; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.025em; }
.next-case .r { text-align: right; }
@media (max-width: 640px) { .next-case { grid-template-columns: 1fr; } .next-case .r { text-align: left; } }

/* ---------- Research ---------- */
.papers { display: grid; gap: 14px; }
.paper { padding: clamp(24px, 3.6vw, 44px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px clamp(24px, 4vw, 48px); align-items: start; }
.seal {
  width: clamp(84px, 11vw, 112px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 45%),
    conic-gradient(from var(--gate-a, 20deg), #f6d3e4, #d6e0ff, #cdf5ea, #f5ecc6, #e1d5ff, #cdeeff, #f6d3e4);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  color: #1b1c22; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; line-height: 1.5; font-weight: 500;
  position: relative; animation: gate-spin 18s linear infinite;
}
.seal::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed rgba(27, 28, 34, 0.35); }
.seal.plain { background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12), transparent 50%), linear-gradient(160deg, var(--card-2), var(--card)); color: var(--card-ink); animation: none; }
.seal.plain::after { border-color: rgba(255, 255, 255, 0.18); }
.paper .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.paper h3 { margin: 8px 0 12px; color: var(--ink); font-weight: 300; font-size: clamp(24px, 3.2vw, 38px); letter-spacing: -0.03em; line-height: 1.12; text-wrap: balance; }
.paper p { margin: 0 0 18px; max-width: 62ch; }
.paper cite { font-style: normal; color: var(--ink); }
@media (max-width: 640px) { .paper { grid-template-columns: 1fr; } }

/* ---------- Books ---------- */
.shelf-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.counts { display: flex; gap: clamp(20px, 4vw, 44px); }
.counts div { display: grid; }
.counts b { font-weight: 200; font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.04em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.counts div:first-child b { background: var(--foil-ink); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil-drift 9s ease-in-out infinite alternate; }
.counts span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* Cover wall: three rows of covers drifting on a tilted plane, full bleed */
.wall-clip { overflow: clip; }
.cover-wall {
  margin: clamp(40px, 6vw, 72px) 0 0; display: grid; gap: 14px; overflow: hidden; padding: 30px 0 38px;
  transform: perspective(1400px) rotateX(14deg) rotateZ(-3deg) scale(1.08);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.wall-row { overflow: visible; }
.wall-track { display: flex; gap: 14px; width: max-content; animation: wall 90s linear infinite; }
.wall-row:nth-child(2) .wall-track { animation-direction: reverse; animation-duration: 110s; }
.wall-row:nth-child(3) .wall-track { animation-duration: 75s; }
.wall-track img {
  width: clamp(92px, 9vw, 130px); height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px 8px 8px 4px; flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 18px 30px -16px rgba(0, 0, 0, 0.6);
}
@keyframes wall { to { transform: translateX(-50%); } }

.now-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.now-book { padding: 22px; display: grid; gap: 16px; align-content: start; }
.now-book .bt, .fav-book .bt { margin: 0; color: var(--ink); font-size: 16.5px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.25; }
.now-book p, .fav-book p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.now-book p.ba, .fav-book p.ba { margin-top: 3px; color: var(--body); }

.cover {
  aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07) inset, 0 24px 40px -22px rgba(0, 0, 0, 0.75);
  padding: 16px 14px 14px 22px; display: grid; align-content: space-between; color: var(--card-ink);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--foil); opacity: 0.85; z-index: 2; }
.cover::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.14) 46%, transparent 60%); pointer-events: none; }
.cover.photo { padding: 0; background: var(--card); }
.cover.photo::before { display: none; }
.cover.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.photo::after { z-index: 1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.16) 46%, transparent 60%), linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 7%, rgba(255, 255, 255, 0.08) 9%, transparent 14%); }
.cover .ct { font-size: 17px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; position: relative; }
.cover .ca { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--card-muted); text-transform: uppercase; position: relative; }

/* Favorites: a snapping strip */
.fav-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 18px; padding: 6px 0 4px; }
@media (max-width: 1000px) { .fav-strip { grid-auto-columns: 30%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 18px; } }
.fav-book { scroll-snap-align: start; display: grid; gap: 14px; align-content: start; }
.fav-book .cover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07) inset, 0 30px 50px -24px rgba(0, 0, 0, 0.8); }
.fav-book:hover .cover { transform: translateY(-4px) rotate(-1deg); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  appearance: none; cursor: pointer; font: 400 13px var(--sans); color: var(--muted); white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: transparent; background: linear-gradient(var(--glass-hi), var(--glass-hi)) padding-box, var(--foil) border-box; }
.chip .n { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 6px; }

/* The fifty: a cover grid */
.book-grid { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 22px; }
.book { display: grid; align-content: start; gap: 4px; }
.book .cover { margin-bottom: 12px; padding: 12px 10px 10px 18px; }
.book .cover .ct { font-size: 14.5px; }
.book:hover .cover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 34px 50px -24px rgba(0, 0, 0, 0.8); }
.book .bt { color: var(--ink); font-size: 15px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; }
.book .ba { font-size: 13px; color: var(--body); }
.book .bn { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.book .bm { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.book .bm .mk { color: var(--ink); }
.book .bm .mk::before { content: "● "; background: var(--foil-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.book[hidden] { display: none; }
.books .note { margin-top: 40px; }

@media (max-width: 1100px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .now-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .counts { width: 100%; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 18px; }
  .cover-wall { transform: perspective(900px) rotateX(12deg) rotateZ(-4deg) scale(1.12); gap: 10px; margin-top: 28px; }
  .wall-track { gap: 10px; }
  .wall-track img { width: 84px; }
  /* On the desk becomes a swipeable row of full covers */
  .now-grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 20px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .now-grid::-webkit-scrollbar, .fav-strip::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
  .now-book { scroll-snap-align: start; padding: 18px; }
  .fav-strip { grid-auto-columns: 46%; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px; scroll-padding-inline: var(--gutter); scrollbar-width: none; gap: 14px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 40px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 40px), transparent); }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
  .book .bn { -webkit-line-clamp: 2; }
}
@media (prefers-reduced-motion: reduce) { .wall-track { animation: none; } }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: grid; align-content: center; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

[hidden] { display: none !important; }
.prose > h2:first-child { margin-top: 0; }
