/* =========================================================
   PERSONAL PRESS — magazine / zine personal site
   Two variants share this file:
   body[data-variant="editorial"]  → warm paper, serif, asymmetric
   body[data-variant="zine"]       → high-contrast ink, punk grid
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* paper tones */
  --paper-cream: #ecdfc8;
  --paper-cream-2: #e4d4b5;
  --paper-bone: #f3ece0;
  --paper-bone-2: #e8dfcb;
  --paper-ink: #141210;
  --paper-ink-2: #0c0a08;

  /* ink tones */
  --ink: #1a1612;
  --ink-soft: #4a3f35;
  --ink-muted: #7a6a5a;
  --ink-line: rgba(26, 22, 18, 0.18);
  --ink-line-soft: rgba(26, 22, 18, 0.10);

  /* accent palette */
  --amber: #c46d2b;
  --amber-2: #9a4331;
  --ruby: #a3283a;
  --ruby-2: #6e1323;
  --olive: #5a6a3a;
  --olive-2: #3d4824;
  --cobalt: #2a4a8a;
  --cobalt-2: #15306a;
  --inkblk: #141210;
  --inkblk-2: #000000;

  /* active accent (set by JS) */
  --accent: var(--amber);
  --accent-2: var(--amber-2);

  /* active paper (set via body[data-paper]) */
  --paper: var(--paper-cream);
  --paper-2: var(--paper-cream-2);

  --serif: "Fraunces", "Noto Serif SC", Georgia, serif;
  --serif-display: "Instrument Serif", "Fraunces", "Noto Serif SC", Georgia, serif;
  --sans: "Inter", "Noto Serif SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 3vw, 36px);
  --col: calc((100% - 11 * var(--gutter)) / 12);
}

/* ---------- Typeset variants ---------- */
/* editorial — warm, wonky, literary (default-ish) */
body[data-typeset="editorial"] {
  --serif:         "Fraunces", "Noto Serif SC", Georgia, serif;
  --serif-display: "Instrument Serif", "Fraunces", "Noto Serif SC", Georgia, serif;
  --sans:          "Inter", "Noto Serif SC", system-ui, sans-serif;
  --mono:          "JetBrains Mono", ui-monospace, monospace;
}
/* classic — old-style book: Garamond + Work Sans */
body[data-typeset="classic"] {
  --serif:         "EB Garamond", "Noto Serif SC", Georgia, serif;
  --serif-display: "EB Garamond", "Noto Serif SC", Georgia, serif;
  --sans:          "Work Sans", "Noto Serif SC", system-ui, sans-serif;
  --mono:          "JetBrains Mono", ui-monospace, monospace;
}
/* quiet — calm editorial: Crimson Pro + Inter */
body[data-typeset="quiet"] {
  --serif:         "Crimson Pro", "Noto Serif SC", Georgia, serif;
  --serif-display: "Crimson Pro", "Noto Serif SC", Georgia, serif;
  --sans:          "Inter", "Noto Serif SC", system-ui, sans-serif;
  --mono:          "JetBrains Mono", ui-monospace, monospace;
}
/* modern — high-contrast display: DM Serif Display + Space Grotesk */
body[data-typeset="modern"] {
  --serif:         "Playfair Display", "Noto Serif SC", Georgia, serif;
  --serif-display: "DM Serif Display", "Playfair Display", "Noto Serif SC", Georgia, serif;
  --sans:          "Space Grotesk", "Noto Serif SC", system-ui, sans-serif;
  --mono:          "JetBrains Mono", ui-monospace, monospace;
}
/* plex — technical / neutral: IBM Plex Serif + Plex Sans */
body[data-typeset="plex"] {
  --serif:         "IBM Plex Serif", "Noto Serif SC", Georgia, serif;
  --serif-display: "IBM Plex Serif", "Noto Serif SC", Georgia, serif;
  --sans:          "IBM Plex Sans", "Noto Serif SC", system-ui, sans-serif;
  --mono:          "JetBrains Mono", ui-monospace, monospace;
}

/* ---------- Paper variants ---------- */
body[data-paper="cream"] { --paper: var(--paper-cream); --paper-2: var(--paper-cream-2); --ink: #1a1612; --ink-soft: #4a3f35; --ink-muted: #7a6a5a; --ink-line: rgba(26,22,18,.18); --ink-line-soft: rgba(26,22,18,.10); }
body[data-paper="bone"]  { --paper: var(--paper-bone);  --paper-2: var(--paper-bone-2);  --ink: #14110e; --ink-soft: #463c31; --ink-muted: #78685a; --ink-line: rgba(20,17,14,.16); --ink-line-soft: rgba(20,17,14,.09); }
body[data-paper="ink"]   { --paper: var(--paper-ink);   --paper-2: var(--paper-ink-2);   --ink: #f2e9d8; --ink-soft: #c9bba2; --ink-muted: #8f816c; --ink-line: rgba(242,233,216,.18); --ink-line-soft: rgba(242,233,216,.08); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  position: relative;
}

/* subtle printed-paper background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 10% -10%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 50%),
    radial-gradient(900px 700px at 110% 10%, color-mix(in oklab, var(--accent-2) 10%, transparent), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  z-index: -2;
}

/* paper grain + noise overlays */
.paper-grain {
  position: fixed; inset: -10%;
  background-image:
    radial-gradient(rgba(0,0,0,.06) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}
body[data-paper="ink"] .paper-grain {
  background-image:
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px);
  mix-blend-mode: screen;
}
.paper-noise {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  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='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
body[data-paper="ink"] .paper-noise { mix-blend-mode: screen; opacity:.25; }
body[data-grain="off"] .paper-grain,
body[data-grain="off"] .paper-noise { display:none; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
em, .it { font-family: var(--serif-display); font-style: italic; font-weight: 400; }

/* ---------- Cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  transition: opacity .2s;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--ink);
  border-radius: 50%;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: transform .18s ease-out, width .25s, height .25s, border-color .25s, background .25s;
}
body[data-paper="ink"] .cursor-dot,
body[data-paper="ink"] .cursor-ring { mix-blend-mode: screen; }
body[data-cursor="off"] .cursor-dot,
body[data-cursor="off"] .cursor-ring { display: none; }
body.cursor-hover .cursor-ring {
  width: 58px; height: 58px;
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  border-color: var(--accent);
}
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Page corner marks ---------- */
.page-corner {
  position: fixed;
  top: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-muted);
  z-index: 5;
  pointer-events: none;
}
.page-corner--tl { left: 18px; }
.page-corner--tr { right: 18px; }
.page-corner .rot { display: inline-block; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  margin: 64px clamp(16px, 5vw, 56px) 0;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--paper) 55%, transparent) 0%,
      color-mix(in oklab, var(--paper) 40%, transparent) 100%);
  backdrop-filter: blur(22px) saturate(175%) brightness(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(175%) brightness(1.04);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px -8px rgba(0, 0, 0, 0.15),
    0 20px 48px -20px rgba(0, 0, 0, 0.25);
  isolation: isolate;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 60% at 20% 0%,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0) 55%),
    radial-gradient(80% 40% at 80% 110%,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: -1;
}
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0) 70%,
    rgba(0, 0, 0, 0.04) 100%);
  pointer-events: none;
  z-index: -1;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--serif-display);
  font-size: 20px;
}
.brand__mark { color: var(--accent); font-size: 14px; }
.brand__name { font-style: italic; }
.brand__sub { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-muted); text-transform: uppercase; }

.nav {
  display: flex; justify-content: center; gap: 22px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
}
.nav a {
  display: inline-flex; align-items: baseline; gap: 6px;
  position: relative;
  transition: color .2s;
}
.nav a em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: .1em;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.time-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 100%);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 2px 6px -2px rgba(0, 0, 0, 0.12);
}
.time-chip__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 28%, transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 28%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in oklab, var(--accent) 8%, transparent); }
}

/* ---------- Sheet (main content) ---------- */
.sheet {
  margin: 0 clamp(16px, 5vw, 56px);
  padding-top: 40px;
  position: relative;
  z-index: 1;
}

/* ======================================================
   HERO
   ====================================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 24px 48px;
  align-items: start;
  padding: 60px 0 40px;
  min-height: 92vh;
  position: relative;
}

.hero__meta {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; gap: 12px;
}
.hero__meta .rule {
  height: 1px; background: var(--ink);
  transform-origin: left;
}
.kicker {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.kicker span:nth-child(odd) { color: var(--ink); }

.hero__title {
  grid-column: 1;
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(5rem, 13vw, 12rem);
  line-height: .88;
  letter-spacing: -0.02em;
  color: var(--ink);
  position: relative;
}
.hero__title .line {
  display: block;
  position: relative;
}
.hero__title .line-1 { padding-left: 0; }
.hero__title .line-2 { padding-left: 8vw; }
.hero__title .line-3 { padding-left: 2vw; display: flex; align-items: baseline; gap: 24px; }

.hero__title .word { display: inline-block; }
.word--italic { font-family: var(--serif-display); font-style: italic; color: var(--ink-soft); padding-right: .3em; }
.word--outline {
  -webkit-text-stroke: 1.5px var(--ink);
  color: transparent;
  font-style: italic;
  transition: color .35s, -webkit-text-stroke-color .35s;
}
.word--outline:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.word--big { color: var(--accent); font-style: italic; }

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.7em) rotate(-2deg);
  animation: charIn .65s cubic-bezier(.2,.8,.2,1) forwards;
  will-change: transform, opacity;
}
@keyframes charIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.hero__asterisk {
  font-family: var(--serif-display);
  font-size: .3em;
  color: var(--accent);
  display: inline-block;
  animation: spinSlow 14s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* side column */
.hero__side {
  grid-column: 2;
  display: flex; flex-direction: column; gap: 22px;
  align-self: end;
  max-width: 460px;
  padding-top: 40px;
}

.hero__stamp {
  width: 108px; height: 108px;
  margin-bottom: 4px;
}
.hero__stamp svg {
  width: 100%; height: 100%;
  animation: spinSlow 22s linear infinite;
}
.stamp-text {
  font-family: var(--mono);
  font-size: 9.2px;
  letter-spacing: .18em;
  fill: var(--ink);
  text-transform: uppercase;
}
.stamp-center {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 28px;
  fill: var(--accent);
}
.stamp-small {
  font-family: var(--mono);
  font-size: 8px;
  fill: var(--ink-muted);
  letter-spacing: .2em;
}

.hero__lede {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 42ch;
}
.hero__lede em { color: var(--accent); }

.hero__ticker {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  width: fit-content;
  max-width: 100%;
  background: color-mix(in oklab, var(--paper) 60%, transparent);
}
.hero__ticker-label {
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--ink);
}
.hero__ticker-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .2s, color .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { transform: translateY(-2px); background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--ghost:hover { transform: translateY(-2px); background: var(--ink); color: var(--paper); }

.scroll-hint {
  position: absolute;
  left: 0; bottom: 8px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--ink-muted);
}
.scroll-hint__arr {
  display: inline-block;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ======================================================
   MARQUEE divider
   ====================================================== */
.marquee {
  margin: 20px calc(-1 * clamp(16px, 5vw, 56px));
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--ink);
  background: var(--paper);
}
.marquee__track {
  display: inline-flex;
  gap: 32px;
  white-space: nowrap;
  animation: marq 38s linear infinite;
  padding-left: 20px;
}
.marquee__track span { display: inline-block; }
.marquee__track span:nth-child(odd) { color: var(--accent); }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ======================================================
   ABOUT
   ====================================================== */
.folio {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--ink-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
}

.section-title {
  margin: 16px 0 28px;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.015em;
}
.section-title em {
  color: var(--accent);
  font-style: italic;
}

.pill {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--ink);
  background: color-mix(in oklab, var(--accent) 18%, transparent);
}

.about {
  display: grid;
  grid-template-columns: 3fr 6fr 3fr;
  gap: 32px 48px;
  padding: 100px 0 60px;
  border-top: 1px solid var(--ink-line);
  position: relative;
}
.about__aside { display: flex; flex-direction: column; gap: 14px; }
.about__aside .about__tag {
  margin: 0;
  font-family: var(--serif-display);
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.about__col { max-width: 58ch; }
.dropcap p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 18px;
}
.dropcap p em { color: var(--accent-2); font-style: italic; }
.drop {
  float: left;
  font-family: var(--serif-display);
  font-size: 5.2rem;
  line-height: .82;
  padding: 6px 10px 0 0;
  color: var(--accent);
  font-style: italic;
}

.about__facts { display: grid; gap: 14px; align-content: start; }
.fact {
  border-top: 1px solid var(--ink);
  padding-top: 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.fact__k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--ink-muted);
}
.fact__v {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.avail-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3aa35f;
  box-shadow: 0 0 0 3px rgba(58,163,95,.2);
}

/* ======================================================
   STACK
   ====================================================== */
.stack {
  padding: 80px 0 60px;
  border-top: 1px solid var(--ink-line);
}
.stack__head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: end; margin-bottom: 32px; }
.stack__head .section-title { margin: 10px 0 0; }
.stack__sub {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 42ch;
  justify-self: end;
  text-align: right;
}

.stack__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
}
.stack__group {
  padding: 24px 20px 28px;
  border-right: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
.stack__group:last-child { border-right: 0; }
.stack__group h3 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.chips {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px 8px;
}
.chips li {
  font-family: var(--serif);
  font-size: 1rem;
  padding: 4px 12px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.chips li:hover {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
  transform: translateY(-1px);
}

.stack__pullquote {
  margin-top: 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  max-width: 780px;
}
.pq-open {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 6rem;
  line-height: .7;
  color: var(--accent);
}
.stack__pullquote p {
  margin: 18px 0 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.25;
  color: var(--ink);
}

/* ======================================================
   WORK
   ====================================================== */
.work { padding: 80px 0 60px; border-top: 1px solid var(--ink-line); }
.work__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}
.work__head .section-title { margin: 10px 0 0; }
.filters { display: flex; gap: 8px; justify-self: end; }
.filter {
  padding: 8px 14px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: background .2s, color .2s, border-color .2s;
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.is-active {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: 24px;
}
.work-card {
  grid-column: span 4;
  border: 1px solid var(--ink-line);
  border-radius: 18px;
  background: color-mix(in oklab, var(--paper) 85%, transparent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  color: inherit;
  text-decoration: none;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s, border-color .3s;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 50px -28px rgba(0,0,0,.3);
  border-color: var(--ink);
}

/* Hero card — full row, split cover+body side-by-side */
.work-card--hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0;
}
.work-card--hero .work-card__cover {
  aspect-ratio: auto;
  height: 100%;
  min-height: 420px;
  border-bottom: 0;
  border-right: 1px solid var(--ink-line);
}
.work-card--hero .work-card__body {
  padding: 34px 38px 32px;
  display: flex; flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.work-card--hero .work-card__body h3 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

/* Medium cards — 3 per row below the hero */
.work-card--med { grid-column: span 4; }

/* Legacy — keep old --feature class working as hero-equivalent just in case */
.work-card--feature { grid-column: 1 / -1; }

.work-card.is-hidden { display: none; }

.work-card__cover {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ink-line);
  background: var(--paper-2);
}
.work-card__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s;
  filter: saturate(.9) contrast(1.02);
}
.work-card:hover .work-card__img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }
.cover-claude {
  position: absolute;
  top: 50%; left: 50%;
  width: auto; height: 60%;
  max-width: 38%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.18));
}
.work-card--feature .work-card__cover { aspect-ratio: 21 / 8; }
.work-card--hero .work-card__cover { aspect-ratio: auto; }

.work-card__cover--life {
  background:
    radial-gradient(ellipse at 50% 40%, #1b2433 0%, #0b0f17 75%);
  overflow: hidden;
}
.work-card__cover--life::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: calc(100% / 22) calc(100% / 8);
}
.life-grid {
  position: absolute; inset: 0;
}
.life-grid span {
  position: absolute;
  width: calc(100% / 22);
  height: calc(100% / 8);
  left: calc(var(--x) * 100% / 22);
  top: calc(var(--y) * 100% / 8);
  background: radial-gradient(circle at 50% 50%, #7ee0ff 0%, #58a6ff 55%, transparent 80%);
  box-shadow: 0 0 12px rgba(88, 166, 255, .6);
  animation: life-pulse 2.4s ease-in-out infinite;
  animation-delay: calc((var(--x) + var(--y)) * 80ms);
}
@keyframes life-pulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50%      { opacity: 1;   transform: scale(1);   }
}
.life-caption {
  position: absolute; left: 14px; bottom: 10px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(180, 210, 255, .7);
}
.work-card:hover .life-grid span { animation-duration: 1.2s; }

.work-card__cover--1 {
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--accent) 35%, var(--paper)) 0%, var(--paper) 100%);
}
.cover-type {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-family: var(--serif-display);
  color: var(--ink);
}
.cover-type span {
  font-family: var(--mono); font-size: 12px; letter-spacing: .3em;
  color: var(--ink-muted); text-transform: uppercase; margin-bottom: 8px;
}
.cover-type em {
  font-size: clamp(3rem, 8vw, 6.5rem); line-height: .9; color: var(--accent);
  text-shadow: 0 2px 0 color-mix(in oklab, var(--ink) 10%, transparent);
}
.cover-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--ink-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

.work-card__cover--2 {
  background:
    radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent-2) 30%, var(--paper)), var(--paper));
  display: flex; align-items: center; justify-content: center;
}
.cover-typo {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--ink);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.work-card:hover .cover-typo { transform: scale(1.08) rotate(-3deg); color: var(--accent); }

.work-card__cover--3 {
  background: var(--paper-2);
  padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.cover-mono {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.7;
}
.cover-mono span { display: block; }
.cover-mono span:first-child { color: var(--accent); }

.work-card__cover--4 {
  background: var(--paper-2);
  position: relative;
}
.cover-lines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 22px,
    var(--ink-line) 22px 23px
  );
  opacity: .8;
}
.work-card__cover--4::after {
  content: "Jan 14 — notes"; position: absolute; top: 16px; left: 20px;
  font-family: var(--serif-display); font-style: italic; font-size: 1.4rem; color: var(--ink);
}

.work-card__cover--5 {
  background: color-mix(in oklab, var(--accent) 22%, var(--paper));
  position: relative;
  overflow: hidden;
}
.cover-sun {
  position: absolute;
  left: 50%; bottom: -35%;
  width: 120%; aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    var(--accent) 0 8px,
    color-mix(in oklab, var(--accent) 70%, var(--paper)) 8px 16px
  );
  opacity: .55;
  filter: blur(.3px);
}

/* --- Paper Figure Studio cover --- */
.work-card__cover--pf {
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--accent) 10%, var(--paper)) 0%,
      var(--paper) 100%);
  padding: 22px 22px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.pf-frame {
  position: relative;
  flex: 1;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  overflow: hidden;
  min-height: 140px;
}
.pf-frame__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.95) contrast(1.02);
}
.pf-frame__label {
  position: absolute; top: 8px; left: 10px;
  font-family: var(--serif); font-weight: 700; font-style: italic;
  font-size: 18px; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.pf-frame__scale {
  position: absolute; bottom: 10px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  letter-spacing: .08em;
}
.pf-frame__scale i {
  display: inline-block; width: 36px; height: 3px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.pf-frame__arrow {
  position: absolute; top: 42%; left: 48%;
  width: 28%; height: 2px; background: var(--accent);
  transform: rotate(-18deg); transform-origin: left center;
}
.pf-frame__arrow::after {
  content: ""; position: absolute; right: -2px; top: -5px;
  border-left: 10px solid var(--accent);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.pf-caption {
  font-family: var(--serif);
  font-size: 12px; line-height: 1.45;
  color: var(--ink);
}
.pf-caption strong { font-weight: 700; }
.pf-caption em { font-style: italic; color: var(--accent); }

/* ---- Resume Hub feature cover ---- */
.work-card__cover--rh {
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--accent) 8%, var(--paper)) 0%,
      var(--paper) 100%);
  padding: 22px 22px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.rh-paper {
  position: relative;
  flex: 1;
  background: #fdfdfb;
  border: 1px solid var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 8px 8px 0 -4px color-mix(in oklab, var(--accent) 22%, transparent);
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px;
  overflow: hidden;
}
.rh-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 25%, transparent);
}
.rh-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%,
      color-mix(in oklab, var(--accent) 70%, #fff) 0%,
      var(--accent) 60%,
      color-mix(in oklab, var(--accent) 60%, var(--ink)) 100%);
  border: 1px solid var(--ink);
  flex: 0 0 auto;
}
.rh-name { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.rh-line {
  display: block; height: 6px; border-radius: 3px;
  background: color-mix(in oklab, var(--ink) 70%, transparent);
}
.rh-line--title { width: 55%; height: 9px; background: var(--ink); }
.rh-line--sub   { width: 78%; height: 5px; background: color-mix(in oklab, var(--ink) 45%, transparent); }
.rh-line--short { width: 40%; }
.rh-section {
  display: flex; flex-direction: column; gap: 5px;
  position: relative;
  padding-left: 36px;
}
.rh-tag {
  position: absolute; left: 0; top: 1px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  color: var(--accent); font-weight: 700;
}
.rh-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rh-chips i {
  display: inline-block; width: 32px; height: 12px; border-radius: 6px;
  background: color-mix(in oklab, var(--accent) 22%, var(--paper));
  border: 1px solid color-mix(in oklab, var(--accent) 50%, var(--ink));
}
.rh-chips i:nth-child(2) { width: 44px; }
.rh-chips i:nth-child(3) { width: 26px; }
.rh-chips i:nth-child(4) { width: 38px; }
.rh-stamp {
  position: absolute; right: 8px; bottom: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  color: var(--accent);
  border: 1px dashed var(--accent);
  padding: 2px 6px;
  transform: rotate(-6deg);
  opacity: .85;
}
.rh-caption {
  font-family: var(--serif);
  font-size: 12px; line-height: 1.45;
  color: var(--ink);
}
.rh-caption strong { font-weight: 700; }
.rh-caption em { font-style: italic; color: var(--accent); }
.work-card:hover .rh-paper { transform: translateY(-2px); transition: transform .35s ease; }
@media (max-width: 720px) {
  .work-card__cover--rh { padding: 12px; }
  .rh-caption { display: none; }
}

.work-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-card__meta {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.work-card h3 {
  margin: 2px 0 4px;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 1.9vw, 1.9rem);
  line-height: 1.05;
  color: var(--ink);
}
.work-card--med h3 {
  font-size: clamp(1.2rem, 1.4vw, 1.45rem);
}
.work-card--med p {
  font-size: .92rem;
  line-height: 1.5;
}
.work-card p {
  margin: 0;
  font-family: var(--serif);
  font-size: .98rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.work-card__cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.work-card__cta svg { width: 12px; height: 12px; }

.work-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.work-card__tags span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 4px 9px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--paper) 70%, transparent);
}
.work-card p code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 1px 6px;
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  background: color-mix(in oklab, var(--paper) 60%, transparent);
  color: var(--ink-soft);
}

/* ======================================================
   TIMELINE
   ====================================================== */
.timeline { padding: 80px 0 60px; border-top: 1px solid var(--ink-line); }
.timeline__head { margin-bottom: 28px; }
.timeline__head .section-title { margin-top: 12px; }
.timeline__sub { margin: 8px 0 0; font-family: var(--serif); font-size: 1rem; color: var(--ink-soft); max-width: 52ch; }

.timeline__list {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--ink);
}
.t-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 28px 4px;
  border-bottom: 1px solid var(--ink-line);
  position: relative;
  transition: padding-left .4s cubic-bezier(.2,.7,.2,1), background .3s;
}
.t-item::before {
  content: ""; position: absolute;
  left: 0; top: 50%;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .45s cubic-bezier(.2,.7,.2,1);
}
.t-item:hover { padding-left: 28px; background: color-mix(in oklab, var(--accent) 6%, transparent); }
.t-item:hover::before { width: 20px; }

.t-item__year {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 2rem;
  color: var(--accent);
}
.t-item__body h4 {
  margin: 0 0 4px;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
}
.t-item__body p { margin: 0; font-family: var(--serif); color: var(--ink-soft); line-height: 1.6; max-width: 54ch; }
.t-item__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--ink-muted);
  padding: 4px 10px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
}

/* ======================================================
   JOURNAL
   ====================================================== */
.journal { padding: 80px 0 60px; border-top: 1px solid var(--ink-line); }
.journal__head { margin-bottom: 28px; }
.journal__head .section-title { margin-top: 12px; }
.journal__sub { margin: 8px 0 0; font-family: var(--serif); font-size: 1rem; color: var(--ink-soft); max-width: 52ch; }

.journal__list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--ink);
}
.entry {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 28px;
  align-items: baseline;
  padding: 24px 4px;
  border-bottom: 1px solid var(--ink-line);
  position: relative;
  transition: padding-left .35s cubic-bezier(.2,.7,.2,1);
}
.entry::after {
  content: "↗";
  position: absolute; right: 6px; top: 50%; transform: translate(10px, -50%);
  opacity: 0;
  font-size: 20px;
  color: var(--accent);
  transition: transform .3s, opacity .3s;
}
.entry:hover { padding-left: 24px; }
.entry:hover::after { opacity: 1; transform: translate(0, -50%); }
.entry:hover h3 { color: var(--accent); }

.entry__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--ink-muted);
}
.entry__body h3 {
  margin: 0 0 4px;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.7vw, 1.7rem);
  line-height: 1.15;
  color: var(--ink);
  transition: color .25s;
}
.entry__body p { margin: 0; font-family: var(--serif); color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.entry__body p em { color: var(--accent); font-style: italic; }
.entry__date, .entry__len {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink-muted);
}

/* ======================================================
   CONTACT
   ====================================================== */
.contact {
  padding: 64px 0 40px;
  border-top: 1px solid var(--ink-line);
}
.contact__inner { max-width: 720px; }
.contact__title {
  margin: 12px 0 12px;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: .98;
  letter-spacing: -0.02em;
}
.contact__title em { font-style: italic; color: var(--accent); }
.contact__lede {
  font-family: var(--serif);
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 24px;
}

.contact__icons {
  display: flex;
  gap: 14px;
  margin: 0 0 32px;
  flex-wrap: wrap;
}
.c-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: color-mix(in oklab, var(--paper) 70%, transparent);
  text-decoration: none;
  transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.c-icon svg { width: 18px; height: 18px; display: block; }
.c-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.colophon {
  padding: 18px 0 0;
  border-top: 1px dashed var(--ink-line);
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.colophon strong { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .25em; color: var(--ink); }

/* ======================================================
   FOOTER
   ====================================================== */
.footer {
  margin: 40px clamp(16px, 5vw, 56px) 0;
  padding: 60px 0 20px;
  border-top: 1px solid var(--ink);
  position: relative;
  z-index: 1;
}
.footer__connect {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--ink-line);
}
.footer__heading {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 22px;
}
.footer__links {
  list-style: none; padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 18px;
  background: color-mix(in oklab, var(--paper) 70%, transparent);
  transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.footer__links a svg { width: 20px; height: 20px; display: block; }
.footer__links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.footer__meta {
  margin-top: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.footer__row {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.footer__big {
  margin: 20px calc(-1 * clamp(16px, 5vw, 56px)) 0;
  overflow: hidden;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(3rem, 15vw, 14rem);
  line-height: .88;
  color: var(--ink);
  letter-spacing: -0.03em;
  opacity: .9;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.footer__big-track {
  display: inline-flex;
  gap: clamp(24px, 4vw, 64px);
  white-space: nowrap;
  padding-left: clamp(24px, 4vw, 64px);
  animation: footer-marq 80s linear infinite;
  will-change: transform;
}
.footer__big-track span { display: inline-block; }
@keyframes footer-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ======================================================
   TWEAKS PANEL
   ====================================================== */
.tweaks {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 50;
  width: 260px;
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.28);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
}
.tweaks[hidden] { display: none; }
.tweaks__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 16px;
}
.tweaks__close { width: 24px; height: 24px; font-size: 20px; line-height: 1; }
.tweaks__body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.tw-row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 10px; }
.tw-row label { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); }
.tw-seg {
  display: flex; gap: 4px;
  padding: 3px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--ink) 5%, transparent);
}
.tw-seg button {
  flex: 1;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.tw-seg button[data-val]:has(+ *):not([style]) { /* text buttons */ }
.tw-seg[data-key="accent"] button {
  width: 20px; height: 20px; padding: 0; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 1px var(--ink-line);
}
.tw-seg button.is-on {
  background: var(--ink); color: var(--paper);
}
.tw-seg[data-key="accent"] button.is-on {
  box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 2px var(--ink);
}

/* --- Personal Press cover --- */
.work-card__cover--press {
  background: var(--paper-2);
  padding: 22px 26px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.press-mast {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--serif-display); font-style: italic;
  text-align: center;
}
.press-mast__top {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1; color: var(--ink); letter-spacing: -0.01em;
}
.press-mast__rule {
  height: 1px; background: var(--ink);
  margin: 4px clamp(20px, 10%, 60px);
}
.press-mast__bot {
  font-family: var(--mono); font-style: normal;
  font-size: 10px; letter-spacing: .3em; color: var(--ink-soft);
  text-transform: uppercase;
}
.press-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 10px; margin-top: 14px;
}
.press-cols i {
  display: block; height: 64px;
  background:
    repeating-linear-gradient(180deg,
      var(--ink-soft) 0 1px, transparent 1px 4px);
  opacity: .35;
  border-radius: 1px;
}
.work-card:hover .press-cols i { opacity: .5; transition: opacity .4s; }

/* --- CLI scaffolds cover --- */
.work-card__cover--cli {
  background: var(--paper-2);
  padding: 20px;
  display: flex; align-items: center; justify-content: center;
}
.cli-frame {
  width: 100%; max-width: 340px;
  background: #14110e; color: #e8dcc4;
  border-radius: 8px; overflow: hidden;
  font-family: var(--mono); font-size: 12px;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.4);
}
.cli-bar {
  display: flex; gap: 6px; padding: 8px 10px;
  background: #1d1914;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.cli-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a342b; }
.cli-bar i:first-child { background: #d17060; }
.cli-bar i:nth-child(2) { background: #d6b35a; }
.cli-bar i:nth-child(3) { background: #78a36b; }
.cli-body {
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
  line-height: 1.55;
}
.cli-prompt { color: var(--accent); margin-right: 6px; font-weight: 500; }
.cli-dim { color: #a79a80; }
.cli-dim b { color: #e8dcc4; }
.cli-cursor { display: flex; align-items: center; }
.cli-blink {
  display: inline-block; width: 8px; height: 14px;
  background: #e8dcc4; margin-left: 2px;
  animation: cli-blink 1s steps(2) infinite;
}
@keyframes cli-blink { 50% { opacity: 0; } }

/* --- Reading journal cover --- */
.work-card__cover--read {
  background: color-mix(in oklab, var(--accent-2) 10%, var(--paper-2));
  padding: 24px 22px 20px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.read-stack {
  position: relative; flex: 1;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 6px;
}
.read-book {
  width: 42px; border-radius: 2px 2px 0 0;
  position: relative;
  box-shadow: 1px 0 0 rgba(0,0,0,.08);
}
.read-book span {
  display: block; height: 8px; margin-top: 12px;
  background: currentColor; opacity: .25;
  margin-left: 6px; margin-right: 6px;
}
.read-book--1 { height: 110px; background: color-mix(in oklab, var(--accent) 70%, var(--ink)); color: var(--paper); }
.read-book--2 { height: 140px; background: color-mix(in oklab, var(--ink) 85%, var(--accent)); color: var(--paper); width: 48px; }
.read-book--3 { height: 94px; background: color-mix(in oklab, var(--accent-2) 60%, var(--paper)); color: var(--ink); }
.read-bookmark {
  position: absolute; top: 0; left: calc(50% + 4px);
  width: 8px; height: 60px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.work-card:hover .read-book--1 { transform: translateY(-3px); transition: transform .4s; }
.work-card:hover .read-book--3 { transform: translateY(-2px); transition: transform .4s .05s; }
.read-caption {
  margin-top: 12px; font-family: var(--serif-display); font-style: italic;
  font-size: .9rem; color: var(--ink-soft); text-align: center;
}

/* --- Slow brand cover --- */
.work-card__cover--brand {
  background: var(--paper);
  padding: 22px 26px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--ink-line-soft);
}
.brand-mark {
  align-self: center; position: relative;
  width: 110px; height: 110px;
  display: grid; place-items: center;
}
.brand-mark__circle {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.brand-mark__letter {
  font-family: var(--serif-display); font-style: italic;
  font-size: 4.6rem; color: var(--ink);
  line-height: 1;
}
.brand-spec {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
}
.brand-spec__line { height: 1px; background: var(--ink-line); }
.work-card:hover .brand-mark { transform: rotate(-4deg); transition: transform .5s; }

/* --- Journal queue --- */
.journal__queue {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink-line);
}
.queue-card {
  padding: 22px 22px 26px;
  border-bottom: 1px solid var(--ink-line);
  position: relative;
}
.queue-card:nth-child(odd) { border-right: 1px solid var(--ink-line); }
.queue-card::before {
  content: ""; position: absolute; left: 22px; top: 22px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: .55;
}
.queue-card__num {
  display: block;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .25em; color: var(--ink-muted);
  text-transform: uppercase;
  padding-left: 16px;
  margin-bottom: 10px;
}
.queue-card h3 {
  margin: 0 0 8px;
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(1.3rem, 2.1vw, 1.6rem);
  color: var(--ink); font-weight: 400; line-height: 1.2;
}
.queue-card p {
  margin: 0;
  font-family: var(--serif);
  font-size: .95rem; line-height: 1.55;
  color: var(--ink-soft);
}
.journal__foot {
  margin: 22px 0 0;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.journal__foot-rule {
  flex: 0 0 56px; height: 1px; background: var(--ink);
}
.journal__foot a {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.journal__foot a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .journal__queue { grid-template-columns: 1fr; }
  .queue-card:nth-child(odd) { border-right: 0; }
  .queue-card { padding: 18px 4px 20px; }
  .queue-card::before { left: 4px; top: 22px; }
  .journal__foot { font-size: 10px; gap: 10px; margin-top: 18px; }
  .journal__foot-rule { flex-basis: 28px; }
  .press-cols i { height: 44px; }
  .cli-frame { font-size: 10px; }
  .read-book--1 { height: 80px; width: 34px; }
  .read-book--2 { height: 100px; width: 40px; }
  .read-book--3 { height: 68px; width: 34px; }
  .brand-mark { width: 86px; height: 86px; }
  .brand-mark__letter { font-size: 3.6rem; }
}

/* ---- busuanzi visitor counter ---- */
.counter {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-muted);
}
.counter b {
  font-weight: 500;
  color: var(--ink);
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0;
}

/* ======================================================
   Scroll reveals
   ====================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* parallax targets */
[data-parallax] { will-change: transform; transition: transform .15s linear; }

.tw-seg--type { flex-wrap: wrap; }
.tw-seg--type button { flex: 1 1 auto; min-width: 0; }

/* ======================================================
   Menu toggle (mobile)
   ====================================================== */
.menu-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.08) 100%);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 2px 6px -2px rgba(0, 0, 0, 0.12);
}
.menu-toggle span {
  display: block; width: 16px; height: 1.5px;
  background: var(--ink); position: relative;
  transition: transform .3s, background .3s;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s, top .3s;
}
.menu-toggle span::before { top: -5px; }
.menu-toggle span::after  { top:  5px; }
body.menu-open .menu-toggle span { background: transparent; }
body.menu-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
body.menu-open .menu-toggle span::after  { top: 0; transform: rotate(-45deg); }

/* ======================================================
   Responsive — tablet
   ====================================================== */
@media (max-width: 1100px) {
  .topbar { margin: 40px clamp(14px, 4vw, 32px) 0; padding: 12px 18px; gap: 16px; }
  .nav { gap: 16px; font-size: 13px; }
  .nav a em { display: none; }

  .hero { gap: 20px 32px; padding: 40px 0 32px; }
  .hero__title { font-size: clamp(4rem, 12vw, 9rem); }
  .hero__title .line-2 { padding-left: 6vw; }

  .about { grid-template-columns: 3fr 7fr; }
  .about__facts { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .about__facts .fact { border-top: 1px solid var(--ink); }

  .stack__grid { grid-template-columns: repeat(2, 1fr); }
  .stack__group:nth-child(2) { border-right: 0; }
  .stack__group:nth-child(1),
  .stack__group:nth-child(2) { border-bottom: 1px solid var(--ink-line); }
  .stack__group:nth-child(3),
  .stack__group:nth-child(4) { border-bottom: 0; }

  /* Tablet: 2 per row; hero stacks vertically */
  .work__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; gap: 20px; }
  .work-card { grid-column: span 1; }
  .work-card--feature { grid-column: span 2; }
  .work-card--feature .work-card__cover { aspect-ratio: 16 / 9; }
  .work-card--hero {
    grid-column: span 2;
    grid-template-columns: 1fr;
  }
  .work-card--hero .work-card__cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid var(--ink-line);
  }
  .work-card--hero .work-card__body { padding: 24px 24px 26px; }
  .work-card--med { grid-column: span 1; }

  /* Paper Figure cover: hide caption on narrow screens so shiba fills the frame */
  .work-card__cover--pf { padding: 10px; gap: 0; }
  .pf-caption { display: none; }
  .pf-frame { min-height: 0; }

  .sheet { margin: 0 clamp(14px, 4vw, 32px); }
  .footer { margin: 40px clamp(14px, 4vw, 32px) 0; }
  .footer__big { font-size: clamp(3rem, 14vw, 10rem); }
}

/* ======================================================
   Responsive — mobile
   ====================================================== */
@media (max-width: 720px) {
  /* top chrome */
  .page-corner { display: none; }
  .cursor-dot, .cursor-ring { display: none; }

  /* Disable backdrop-filter on topbar so the fixed fullscreen menu
     isn't trapped inside the topbar's containing block on mobile. */
  .topbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: color-mix(in oklab, var(--paper) 92%, transparent);
  }
  .topbar::before,
  .topbar::after { display: none; }

  .topbar {
    margin: 20px 12px 0;
    padding: 10px 14px;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    border-radius: 999px;
  }
  .brand { font-size: 17px; gap: 6px; }
  .brand__sub { display: none; }

  .nav {
    position: fixed;
    inset: 0 0 0 0;
    top: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
    background: color-mix(in oklab, var(--paper) 96%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 80px 24px 40px;
    font-family: var(--serif-display);
    font-style: italic;
    font-size: 2rem;
    color: var(--ink);
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .35s, transform .35s;
  }
  .nav a { padding: 8px 0; }
  .nav a em { display: inline; font-size: 11px; color: var(--ink-muted); margin-right: 10px; }
  .nav a::after { bottom: 0; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { opacity: 1; pointer-events: auto; transform: none; }

  .menu-toggle { display: inline-flex; }
  .time-chip { padding: 7px 11px; font-size: 10px; }
  .time-chip span:last-child { display: none; }

  /* sheet */
  .sheet { margin: 0 14px; padding-top: 28px; }
  .footer { margin: 40px 14px 0; padding: 30px 0 18px; }
  .footer__row { font-size: 10px; gap: 10px; }
  .footer__big { font-size: clamp(2.6rem, 16vw, 6rem); margin-top: 14px; line-height: .9; white-space: nowrap; }

  /* hero */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 0 20px;
    gap: 18px;
  }
  .hero__meta .kicker { font-size: 10px; letter-spacing: .15em; gap: 6px; }
  .hero__title {
    grid-column: 1;
    font-size: clamp(3.4rem, 18vw, 6rem);
    line-height: .9;
    letter-spacing: -0.02em;
  }
  .hero__title .line-1 { padding-left: 0; }
  .hero__title .line-2 { padding-left: 14vw; }
  .hero__title .line-3 { padding-left: 0; gap: 14px; }

  .hero__side {
    grid-column: 1;
    padding-top: 10px;
    max-width: none;
    gap: 18px;
  }
  .hero__stamp { width: 86px; height: 86px; align-self: flex-start; }
  .hero__lede { font-size: 1rem; line-height: 1.55; }
  .hero__ticker { font-size: 11px; padding: 9px 12px; gap: 10px; }
  .hero__actions { gap: 10px; }
  .btn { height: 44px; padding: 0 16px; font-size: 13px; flex: 1; justify-content: center; min-width: 0; }

  .scroll-hint { display: none; }

  /* marquee */
  .marquee {
    margin: 10px -14px;
    padding: 12px 0;
    font-size: 1.3rem;
  }
  .marquee__track { gap: 20px; }

  /* section titles */
  .section-title { font-size: clamp(2rem, 8vw, 2.8rem); margin: 12px 0 20px; }
  .folio { font-size: 10px; letter-spacing: .2em; }
  .pill { font-size: 9px; padding: 5px 10px; }

  /* about */
  .about {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 56px 0 28px;
  }
  .about__aside { gap: 10px; }
  .about__aside .about__tag { font-size: 1.05rem; }
  .drop { font-size: 3.8rem; padding: 2px 8px 0 0; }
  .dropcap p { font-size: 1rem; line-height: 1.6; }
  .about__facts {
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    margin-top: 10px;
  }
  .fact__v { font-size: .95rem; }

  /* stack */
  .stack { padding: 56px 0 30px; }
  .stack__head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
  .stack__sub { text-align: left; justify-self: start; font-size: .95rem; }
  .stack__grid { grid-template-columns: 1fr; }
  .stack__group { padding: 20px 0 22px; border-right: 0; }
  .stack__group:last-child { border-bottom: 0; }
  .chips li { font-size: .95rem; padding: 4px 11px; }
  .stack__pullquote { grid-template-columns: auto 1fr; gap: 8px; margin-top: 28px; }
  .pq-open { font-size: 4rem; }
  .stack__pullquote p { font-size: 1.2rem; margin-top: 10px; }

  /* work */
  .work { padding: 56px 0 30px; }
  .work__head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; }
  .filters {
    justify-self: start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; padding: 7px 12px; font-size: 10px; }

  .work__grid { grid-template-columns: 1fr; gap: 18px; }
  .work-card,
  .work-card--feature,
  .work-card--hero,
  .work-card--med,
  .work-card:nth-of-type(n) { grid-column: 1 / -1 !important; grid-row: auto !important; grid-template-columns: 1fr !important; }
  .work-card__cover,
  .work-card--feature .work-card__cover,
  .work-card--hero .work-card__cover { aspect-ratio: 16 / 10; min-height: 0; border-right: 0; border-bottom: 1px solid var(--ink-line); }
  .work-card--hero .work-card__body { padding: 18px 18px 20px; }
  .work-card h3 { font-size: 1.4rem; }
  .work-card p { font-size: .95rem; }
  .work-card__body { padding: 18px 18px 20px; gap: 8px; }

  /* timeline */
  .timeline { padding: 56px 0 30px; }
  .timeline__head .section-title { margin-top: 10px; }
  .t-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 4px;
  }
  .t-item:hover { padding-left: 4px; }
  .t-item:hover::before { width: 14px; }
  .t-item__year { font-size: 1.4rem; }
  .t-item__body h4 { font-size: 1.25rem; }
  .t-item__body p { font-size: .95rem; line-height: 1.55; }
  .t-item__tag { justify-self: start; font-size: 9px; padding: 3px 9px; }

  /* journal */
  .journal { padding: 56px 0 30px; }
  .entry {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    padding: 18px 4px;
  }
  .entry:hover { padding-left: 4px; }
  .entry::after { display: none; }
  .entry__num { grid-column: 1; grid-row: 1; font-size: 10px; }
  .entry__date { grid-column: 2; grid-row: 1; justify-self: end; font-size: 10px; }
  .entry__body { grid-column: 1 / -1; grid-row: 2; }
  .entry__body h3 { font-size: 1.2rem; }
  .entry__body p { font-size: .95rem; line-height: 1.55; }
  .entry__len { display: none; }

  /* footer connect */
  .footer__connect { padding-bottom: 28px; }
  .footer__links { gap: 10px; }
  .footer__links a { font-size: 16px; padding: 9px 14px; gap: 10px; }
  .footer__links a svg { width: 18px; height: 18px; }

  /* contact */
  .contact { padding: 48px 0 24px; }
  .contact__title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .contact__lede { font-size: .95rem; margin-bottom: 20px; }
  .c-icon { width: 38px; height: 38px; }
  .c-icon svg { width: 16px; height: 16px; }
  .colophon { font-size: .85rem; line-height: 1.6; padding-top: 14px; }

  /* tweaks */
  .tweaks {
    width: calc(100vw - 24px);
    right: 12px; bottom: 12px;
    max-height: 70vh;
    overflow-y: auto;
  }
  .tw-row { grid-template-columns: 56px 1fr; }
  .tw-seg button { padding: 6px 8px; }
}

/* ultra-narrow */
@media (max-width: 380px) {
  .hero__title { font-size: clamp(3rem, 19vw, 4.6rem); }
  .hero__title .line-2 { padding-left: 10vw; }
  .contact__title { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .footer__big { font-size: clamp(2.2rem, 16vw, 4rem); }
  .btn span { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .char, .marquee__track, .footer__big-track, .hero__asterisk, .hero__stamp svg, .time-chip__dot { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
