/* =========================================================
   DUAL-MODE PORTFOLIO — Engineer ↔ Cinematographer
   ========================================================= */

:root {
  /* shared */
  --accent: oklch(0.75 0.19 62);   /* sodium-lamp orange */
  --accent-deep: oklch(0.6 0.18 52);
  --accent-soft: oklch(0.75 0.19 62 / 0.15);
  --danger: oklch(0.68 0.2 28);

  /* engineer (default) */
  --bg: #0e0e10;
  --bg-2: #131317;
  --bg-3: #191920;
  --ink: #e9e8e3;
  --ink-dim: #8a8a85;
  --ink-mute: #55554f;
  --rule: #22222a;
  --rule-2: #2c2c36;

  --body: "Geist", "Neue Haas Grotesk", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --serif: "Newsreader", "GT Sectra", Georgia, serif;

  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --dur: 800ms;
}

/* cinematographer mode — warmer, paper, serif-forward */
body.mode-cine {
  --bg: #14100c;
  --bg-2: #1a150f;
  --bg-3: #221b13;
  --ink: #f1ead9;
  --ink-dim: #b8ae99;
  --ink-mute: #6e6554;
  --rule: #2a2218;
  --rule-2: #352a1e;
  --accent: oklch(0.78 0.17 55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
body {
  font-family: var(--body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  font-size: 15px;
}

/* grain — higher in cine mode */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 200;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  transition: opacity var(--dur) var(--ease);
}
body.mode-cine .grain { opacity: 0.16; }

/* =========================================================
   LAYOUT
   ========================================================= */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 72px) 0 clamp(80px, 7vw, 120px);
  position: relative;
}

/* left spine — timeline */
.spine {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: clamp(60px, 6vw, 100px);
  border-right: 1px solid var(--rule);
  z-index: 40;
  background: var(--bg);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.spine .spine-head {
  padding: 22px 0 28px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.spine .timeline {
  flex: 1;
  padding: 32px 0;
  display: flex; flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.spine .timeline::before {
  content: "";
  position: absolute;
  top: 40px; bottom: 40px;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, var(--rule), var(--rule-2), var(--rule));
  transform: translateX(-0.5px);
}
.spine .node {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  z-index: 1;
}
.spine .node .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--ink-mute);
  transition: all 0.3s;
}
.spine .node.active .dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.spine .node .yr {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.spine .node.active .yr { color: var(--ink); }
.spine .node .lbl {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.spine .node.active .lbl { color: var(--accent); }

.spine .spine-foot {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin: 0 auto;
}
@media (max-width: 820px) {
  .spine { display: none; }
  .page { padding-left: clamp(20px, 4vw, 32px); }
}

/* =========================================================
   TOP BAR — mode toggle
   ========================================================= */
.topbar {
  position: fixed;
  top: 0; right: 0; left: clamp(60px, 6vw, 100px);
  z-index: 50;
  padding: 18px clamp(24px, 4vw, 48px);
  display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(18px);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
@media (max-width: 820px) { .topbar { left: 0; } }
.topbar.scrolled { border-bottom-color: var(--rule); }
.topbar .who {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.topbar .who .name, .topbar .who .role { white-space: nowrap; }
@media (max-width: 900px) { .topbar .who .role, .topbar .who .sep { display: none; } }
.topbar .who .sig {
  width: 24px; height: 24px;
  border: 1px solid var(--accent);
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}
.topbar .who .name { color: var(--ink); }
.topbar .who .sep { color: var(--ink-mute); }
.topbar .who .role { color: var(--ink-dim); }

/* mode toggle */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--rule-2);
  padding: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  position: relative;
}
.mode-toggle button {
  background: transparent;
  border: none;
  color: var(--ink-dim);
  padding: 8px 12px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  z-index: 1;
  transition: color 0.4s;
}
.mode-toggle button.on { color: var(--bg); }
.mode-toggle .slider {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 4px;
  width: 92px;
  background: var(--accent);
  transition: transform var(--dur) var(--ease);
  z-index: 0;
}
body.mode-cine .mode-toggle .slider { transform: translateX(92px); width: 140px; }

/* =========================================================
   COMMIT TICKER
   ========================================================= */
.ticker {
  margin-top: 80px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
}
.ticker .tag {
  flex-shrink: 0;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  padding-right: 18px;
  border-right: 1px solid var(--rule);
}
.ticker .tag .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s infinite;
  box-shadow: 0 0 10px var(--accent);
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.ticker .stream {
  flex: 1;
  overflow: hidden;
  color: var(--ink-dim);
  mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.ticker .stream-track {
  display: inline-flex;
  gap: 40px;
  animation: scroll 80s linear infinite;
}
@keyframes scroll { to { transform: translateX(-50%); } }
.ticker .commit .sha { color: var(--accent); }
.ticker .commit .msg { color: var(--ink); }
.ticker .commit .t { color: var(--ink-mute); margin-left: 10px; }
.ticker .total {
  flex-shrink: 0;
  padding-left: 18px;
  border-left: 1px solid var(--rule);
  color: var(--ink);
}
.ticker .total .n { color: var(--accent); font-weight: 500; }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: 110px 0 100px; position: relative; }

/* Scroll-scrubbed hero: top content (name/headline/ticker) is fully visible at load.
   The terminal + teaser below start slightly transparent + 3D-tilted, then solidify
   as the user scrolls toward them. Auto-sized so no blank space; just enough under
   the first viewport to hint at more. */
.hero.scrubbed {
  min-height: auto;
  padding: 90px 0 24px;
  perspective: 1800px;
  perspective-origin: 50% 30%;
  transform-style: preserve-3d;
}
/* Subtle scroll hint — pinned to the viewport while hero is in range */
.hero-scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.4s var(--ease);
}
.hero-scroll-hint i {
  display: inline-block;
  animation: hero-hint-bob 2.2s var(--ease) infinite;
}
@keyframes hero-hint-bob {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(4px); opacity: 0.9; }
}
/* (legacy hero ::after hint — removed, replaced by .hero-scroll-hint) */
.hero.scrubbed::after { content: none; }

.hero.scrubbed .line-3d {
  display: block;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}
.hero.scrubbed .artifact,
.hero.scrubbed .graph-teaser,
.hero.scrubbed .hero-ticker,
.hero.scrubbed .hero-name,
.hero.scrubbed .hero-statement {
  will-change: transform, opacity;
}

/* Background depth layers — grid + accent glow drifting with scroll */
.hero-depth {
  position: absolute;
  inset: -80px 0 -120px 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.hero-depth .hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--ink) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 0%, transparent 70%);
}
.hero-depth .hero-glow {
  position: absolute;
  left: 50%; top: 20%;
  width: 900px; height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 14%, transparent) 0%, transparent 60%);
  filter: blur(40px);
}

.hero.scrubbed > *:not(.hero-depth) { position: relative; z-index: 1; }

.hero-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 40px;
}
.hero-name .me { color: var(--ink); }

.hero-statement {
  font-family: var(--body);
  font-size: clamp(36px, 5.5vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 400;
  max-width: 16ch;
  color: var(--ink);
  margin-bottom: 48px;
  transition: font-family var(--dur) var(--ease);
}
body.mode-cine .hero-statement { font-family: var(--serif); font-style: italic; font-weight: 400; }
.hero-statement .accent { color: var(--accent); }
.hero-statement .line { display: block; }
.hero-statement .line-3d { display: block; }
.hero-ticker { margin-top: 42px; }

/* dual artifact — terminal OR film slate */
.artifact {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: stretch;
}
@media (max-width: 900px) { .artifact { grid-template-columns: 1fr; } }

.term {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  min-height: 340px;
  display: flex; flex-direction: column;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.term .bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-mute);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.term .bar .dots { display: flex; gap: 5px; }
.term .bar .dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rule-2);
  display: inline-block;
}
.term .bar .dots i.live { background: var(--accent); }
.term .bar .title { flex: 1; }
.term .bar .shell { color: var(--ink-dim); }
.term .body {
  padding: 16px 18px;
  flex: 1;
  overflow: hidden;
}
.term .line { display: block; }
.term .prompt { color: var(--accent); margin-right: 8px; }
.term .com { color: var(--ink); }
.term .out { color: var(--ink-dim); }
.term .dim { color: var(--ink-mute); }
.term .ok { color: oklch(0.72 0.15 145); }
.term .warn { color: oklch(0.78 0.16 75); }
.term .cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* slate (cinema variant of artifact) */
.slate {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  position: relative;
  min-height: 340px;
}
.slate::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  background: repeating-linear-gradient(
    45deg,
    var(--ink-mute) 0 14px,
    var(--bg-2) 14px 28px
  );
  opacity: 0.35;
}
.slate-head { padding-top: 16px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.slate-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 12px 0; }
.slate-main .title { font-family: var(--serif); font-size: 36px; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); font-style: italic; }
.slate-rows { display: grid; grid-template-columns: auto 1fr; gap: 4px 24px; font-family: var(--mono); font-size: 11px; }
.slate-rows .k { color: var(--ink-mute); letter-spacing: 0.12em; text-transform: uppercase; }
.slate-rows .v { color: var(--ink); }
.slate-foot { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px dashed var(--rule-2); color: var(--ink-mute); font-family: var(--mono); font-size: 10px; }

/* right column of hero: now module */
.now-card {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  min-height: 340px;
}
.now-card .now-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
}
.now-card .now-head .live { display: flex; align-items: center; gap: 6px; color: var(--ink-mute); }
.now-card .now-head .live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.72 0.15 145);
  box-shadow: 0 0 8px oklch(0.72 0.15 145);
  animation: pulse 1.4s infinite;
}
.now-row { display: flex; flex-direction: column; gap: 4px; }
.now-row .k {
  color: var(--ink-mute);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.now-row .v { color: var(--ink); font-size: 13px; line-height: 1.4; }
.now-row .sub { color: var(--ink-dim); font-size: 11px; }

/* =========================================================
   SECTION HEAD (inline, not number-heavy)
   ========================================================= */
.shead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 24px 0 40px;
  border-top: 1px solid var(--rule);
  margin-top: 80px;
}
.shead .idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.shead .t {
  font-family: var(--body);
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
}
body.mode-cine .shead .t { font-family: var(--serif); font-style: italic; }
.shead .meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* =========================================================
/* =========================================================
   BENTO INSTRUMENTS (stats)
   ========================================================= */
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (max-width: 820px) { .bento { grid-template-columns: 1fr 1fr; } }
.cell {
  background: var(--bg);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 170px;
  position: relative;
}
.cell.center { align-items: center; text-align: center; justify-content: flex-start; }
.cell.center .k { width: 100%; justify-content: center; gap: 8px; }
.cell.center .sub { max-width: 24ch; }
.cell.center .fcounter { align-self: center; }
.cell .k {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; justify-content: space-between;
}
.cell .k .hint { color: var(--ink-mute); }
.cell .v {
  font-family: var(--body);
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
body.mode-cine .cell .v { font-family: var(--serif); }
.cell .v .unit { color: var(--accent); font-size: 0.45em; margin-left: 4px; }
.cell .sub { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); letter-spacing: 0.08em; }
.cell.wide { grid-column: span 1; grid-row: span 2; }
@media (min-width: 821px) {
  .bento { grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .cell.wide { grid-column: 1; grid-row: span 2; }
}

/* heatmap */
.hm-row { display: flex; align-items: flex-start; gap: 22px; flex: 1; min-height: 0; }
.hm-v {
  font-family: var(--body);
  font-size: clamp(36px, 4.2vw, 52px);
  line-height: 1; color: var(--ink);
  display: flex; flex-direction: column; gap: 6px;
  letter-spacing: -0.02em;
}
.hm-v .unit { color: var(--accent); font-size: 0.45em; margin-left: 2px; }
.hm-v .hm-lbl {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.14em;
  text-transform: uppercase;
}
.heatmap {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  min-height: 120px;
  max-height: 160px;
  align-self: stretch;
}
.heatmap i {
  border-radius: 2px;
  transition: opacity 0.5s var(--ease), background 0.3s;
}
.hm-0 { background: color-mix(in oklch, var(--rule) 70%, transparent); }
.hm-1 { background: color-mix(in oklch, var(--accent) 18%, var(--bg)); }
.hm-2 { background: color-mix(in oklch, var(--accent) 40%, var(--bg)); }
.hm-3 { background: color-mix(in oklch, var(--accent) 65%, var(--bg)); }
.hm-4 { background: var(--accent); }
.hm-legend {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.1em;
  margin-top: 8px;
}
.hm-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.hm-legend span:first-child { margin-right: 4px; }
.hm-legend span:last-child { margin-left: 4px; }

/* sparkline */
.spark {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 80px;
  padding-top: 10px;
}
.spark i {
  flex: 1;
  background: linear-gradient(to top, var(--accent-deep), var(--accent));
  opacity: 0.85;
  border-radius: 1px 1px 0 0;
  transition: height 0.9s var(--ease);
}

/* dial */
.dial {
  width: 120px; height: 120px;
  position: relative;
  margin: 4px 0;
}
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial svg circle { fill: none; stroke-width: 2.5; }
.dial svg .track { stroke: var(--rule-2); }
.dial svg .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease); }
.dial .dial-v {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 8px;
  color: var(--ink-mute);
  letter-spacing: 0.14em;
  text-align: center;
  gap: 2px;
}
.dial .dial-v b {
  display: block;
  font-family: var(--body);
  font-size: 28px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* frame counter */
.fcounter {
  display: inline-flex;
  gap: 3px;
  padding: 6px 8px;
  background: var(--bg-3);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.04em;
  align-self: flex-start;
}

/* =========================================================
   SKILLS (minimal, honest)
   ========================================================= */
.skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
@media (max-width: 900px) { .skills { grid-template-columns: 1fr; gap: 40px; } }
.skill {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.skill .name { font-size: 15px; color: var(--ink); }
.skill .v { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); letter-spacing: 0.1em; }
.skill .bar {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--rule-2);
  position: relative;
  overflow: hidden;
}
.skill .bar::before {
  content: "";
  position: absolute; inset: 0;
  width: var(--w, 0%);
  background: var(--accent);
  transition: width 1.4s var(--ease);
}

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-family: var(--mono); font-size: 9.5px;
  padding: 3px 7px;
  border: 1px solid var(--rule-2);
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.stack-block { margin-bottom: 14px; }
.stack-grid {
  column-count: 2;
  column-gap: 20px;
}
.stack-grid .stack-block { margin-bottom: 10px; break-inside: avoid; display: block; }
@media (max-width: 820px) {
  .stack-grid { column-count: 1; }
}
.stack-block h5 {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 6px;
  font-weight: 400;
}

/* =========================================================
   DEPENDENCY GRAPH — projects
   ========================================================= */
/* =========================================================
   DEPENDENCY GRAPH — projects
   Scroll-scrubbed version: outer .graph-section is tall so
   there's scroll budget, .graph-pin sticks to viewport top.
   ========================================================= */
.graph-section {
  position: relative;
  width: 100%;
}
/* Unpinned variant: section flows naturally, no sticky container, no extra scroll budget */
.graph-section.unpinned {
  padding: 60px 0 40px;
}
.graph-section.unpinned .graph-pin {
  position: static;
  height: auto;
  display: block;
  overflow: visible;
}
.graph-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.graph-pin-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}
.graph-pin-inner .shead,
.graph-pin-inner .gstats,
.graph-pin-inner .graph-wrap {
  will-change: transform, opacity;
}

.graph-progress {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.14em; text-transform: uppercase;
  margin-top: 4px;
}
.graph-progress .gp-track {
  flex: 1; height: 2px; background: var(--rule); position: relative; overflow: hidden;
}
.graph-progress .gp-fill {
  position: absolute; inset: 0 auto 0 0;
  background: var(--accent);
  transition: width 0.1s linear;
}
.graph-progress .gp-lbl { color: var(--accent); white-space: nowrap; }

@media (max-width: 820px) {
  .graph-pin-inner { padding: 20px 14px; gap: 10px; }
}

.graph-wrap {
  position: relative;
  padding: 20px 0;
}
.graph {
  width: 100%;
  height: 620px;
  position: relative;
  border: 1px solid var(--rule);
  background:
    linear-gradient(var(--bg-2), var(--bg-2)),
    repeating-linear-gradient(0deg, transparent 0 39px, var(--rule) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--rule) 39px 40px);
  background-blend-mode: multiply;
  overflow: hidden;
}
.graph svg.edges {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.graph svg.edges path { fill: none; stroke: var(--rule-2); stroke-width: 1; transition: stroke 0.3s, stroke-width 0.3s; }
.graph svg.edges path.hot { stroke: var(--accent); stroke-width: 1.5; }
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.node .id { color: var(--ink-mute); font-size: 9px; letter-spacing: 0.12em; }
.node .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-mute);
}
.node.kind-platform .dot { background: var(--accent); }
.node.kind-safety .dot { background: oklch(0.7 0.18 28); }
.node.kind-dev .dot { background: oklch(0.72 0.15 145); }
.node.kind-cine .dot { background: oklch(0.68 0.18 300); }
.node:hover, .node.active {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--accent);
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 0 24px oklch(0.75 0.19 62 / 0.3);
  z-index: 3;
}
.node .count {
  font-size: 9px;
  color: var(--ink-mute);
  margin-left: 4px;
}

/* cluster labels */
.cluster-lbl {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  pointer-events: none;
}

/* legend */
.graph-legend {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-top: none;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-dim); letter-spacing: 0.1em;
}
.graph-legend .keys { display: flex; gap: 18px; flex-wrap: wrap; }
.graph-legend .key { display: flex; align-items: center; gap: 6px; }
.graph-legend .key i {
  width: 7px; height: 7px; border-radius: 50%;
}

/* detail panel under graph */
.project-detail {
  margin-top: 20px;
  border: 1px solid var(--rule);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  min-height: 200px;
  transition: border-color 0.3s;
}
@media (max-width: 820px) { .project-detail { grid-template-columns: 1fr; gap: 20px; } }
.project-detail .pd-left { display: flex; flex-direction: column; gap: 14px; }
.project-detail .pd-cat {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.project-detail .pd-title {
  font-family: var(--body);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}
body.mode-cine .project-detail .pd-title { font-family: var(--serif); font-style: italic; }
.project-detail .pd-idx {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.14em;
}
.project-detail .pd-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-dim);
}
.project-detail .pd-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 18px;
}

@media (max-width: 820px) { .graph { height: 500px; } }

/* Inside the pinned wrapper, shrink graph so everything fits in 100vh */
.graph-pin-inner .graph {
  height: min(58vh, 560px);
}
@media (max-width: 820px) {
  .graph-pin-inner .graph { height: min(50vh, 440px); }
}

/* =========================================================
   INCIDENT — scroll-triggered supply chain timeline
   ========================================================= */
.incident {
  margin: 120px 0 40px;
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  padding: 40px clamp(24px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}
.incident::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--danger) 0 20px, transparent 20px 40px);
  opacity: 0.7;
}
.incident .i-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.incident .i-tag {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--danger);
  padding: 5px 9px;
  border: 1px solid var(--danger);
}
.incident .i-title {
  font-family: var(--body);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
body.mode-cine .incident .i-title { font-family: var(--serif); font-style: italic; }
.incident .i-when {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.12em;
}
.incident .i-steps {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
.i-step {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--rule);
  opacity: 0.25;
  transform: translateX(-16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
@media (max-width: 820px) { .i-step { grid-template-columns: 80px 1fr; } .i-step .log { display: none; } }
.i-step.in { opacity: 1; transform: translateX(0); }
.i-step .t {
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.1em;
}
.i-step .what { font-size: 14px; color: var(--ink); line-height: 1.5; }
.i-step .what .sub { display: block; color: var(--ink-dim); font-size: 12px; margin-top: 3px; }
.i-step .log {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); line-height: 1.5;
  padding: 8px 10px;
  background: var(--bg-3);
  border: 1px solid var(--rule);
  max-height: 60px; overflow: hidden;
}

/* =========================================================
   CINEMA — filmstrip
   ========================================================= */
.strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 820px) { .strip { grid-template-columns: 1fr; } }
.reel {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  display: flex; align-items: flex-end;
  transition: transform 0.4s var(--ease);
}
.reel:hover { transform: translateY(-3px); }
.reel::before {
  content: "";
  position: absolute; inset: 0;
  opacity: 0.9;
}
.reel.hawaii::before {
  background:
    linear-gradient(180deg, transparent 10%, var(--bg) 100%),
    radial-gradient(ellipse at 40% 60%, oklch(0.7 0.22 40 / 0.8), transparent 55%),
    radial-gradient(ellipse at 70% 80%, oklch(0.55 0.2 28 / 0.9), transparent 55%),
    linear-gradient(180deg, oklch(0.25 0.05 35), oklch(0.1 0.04 25));
}
.reel.burning::before {
  background:
    linear-gradient(180deg, transparent 10%, var(--bg) 100%),
    radial-gradient(ellipse at 50% 50%, oklch(0.75 0.14 70 / 0.5), transparent 55%),
    linear-gradient(180deg, oklch(0.4 0.08 60), oklch(0.18 0.04 45));
}
.reel.world::before {
  background:
    linear-gradient(180deg, transparent 10%, var(--bg) 100%),
    radial-gradient(ellipse at 60% 40%, oklch(0.6 0.1 200 / 0.6), transparent 55%),
    linear-gradient(180deg, oklch(0.25 0.05 230), oklch(0.08 0.03 230));
}
.reel::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence baseFrequency='1.2' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.6;
}
/* filmstrip perfs */
.reel .perfs {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
  display: flex; gap: 4px;
  padding: 0 4px;
  z-index: 2;
}
.reel .perfs i {
  flex: 1;
  background: var(--bg);
  height: 10px;
  margin-top: 2px;
  opacity: 0.65;
}
.reel .meta {
  position: relative; z-index: 3;
  padding: 24px;
  width: 100%;
}
.reel .cat-line {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.reel .cat-line .cat { color: var(--accent); }
.reel h4 {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 6px;
}
.reel .caption { font-size: 13px; color: var(--ink-dim); max-width: 34ch; line-height: 1.5; }
.reel .tech {
  margin-top: 14px;
  display: flex; gap: 10px;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.1em;
}
.reel .tech b { color: var(--ink-dim); font-weight: 400; }

/* soundtrack */
.sound {
  margin-top: 28px;
  padding: 22px 28px;
  border: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px;
}
.sound .left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sound .eq { display: flex; gap: 3px; height: 22px; align-items: flex-end; }
.sound .eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.sound .eq i:nth-child(1) { height: 50%; }
.sound .eq i:nth-child(2) { height: 85%; animation-delay: -0.15s; }
.sound .eq i:nth-child(3) { height: 100%; animation-delay: -0.3s; }
.sound .eq i:nth-child(4) { height: 60%; animation-delay: -0.45s; }
.sound .eq i:nth-child(5) { height: 80%; animation-delay: -0.6s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.2); transform-origin: bottom; }
  50% { transform: scaleY(1); transform-origin: bottom; }
}
.sound .artists { color: var(--ink); letter-spacing: 0.04em; }
.sound .artists .sep { color: var(--accent); margin: 0 8px; }
.sound .label { color: var(--ink-mute); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }

/* =========================================================
   PERIPHERALS + CONTACT + FOOTER
   ========================================================= */
.peripherals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 24px;
}
@media (max-width: 820px) { .peripherals { grid-template-columns: 1fr 1fr; } }
.per {
  background: var(--bg);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.per .k {
  font-family: var(--mono); font-size: 9px;
  color: var(--ink-mute); letter-spacing: 0.16em; text-transform: uppercase;
}
.per .v { font-size: 14px; color: var(--ink); line-height: 1.4; }

.contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  margin-top: 20px;
}
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; gap: 20px; } }
.contact .left .big {
  font-family: var(--body);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 13ch;
  margin-bottom: 28px;
}
body.mode-cine .contact .left .big { font-family: var(--serif); font-style: italic; }
.contact .left .big em { color: var(--accent); font-style: normal; }
body.mode-cine .contact .left .big em { font-style: italic; }
.contact .left p {
  font-size: 15px; color: var(--ink-dim);
  line-height: 1.6; max-width: 44ch;
}
.contact .right {
  display: flex; flex-direction: column;
  border: 1px solid var(--rule);
}
.contact .right a {
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  display: flex; justify-content: space-between; align-items: baseline;
  transition: background 0.2s, color 0.2s;
  font-family: var(--mono); font-size: 11px;
}
.contact .right a:last-child { border-bottom: none; }
.contact .right a:hover { background: var(--bg-2); color: var(--accent); }
.contact .right a .k { color: var(--ink-mute); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }
.contact .right a .v { font-size: 13px; }
.contact .right a .arr { color: var(--accent); margin-left: 8px; }

.footer {
  margin-top: 80px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.12em;
}
.footer .dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); margin: 0 8px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* Parallax wrapper for sections — scroll-scrubbed 3D lift */
.px-block {
  will-change: transform, opacity;
  transform-style: preserve-3d;
}
/* Inside parallax-controlled blocks, disable the old binary .reveal transitions
   (parallax drives opacity/transform from scroll instead) */
.px-block .reveal,
.px-block .reveal.in {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* reduce motion: skip heavy transitions */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { transform: none !important; transition: opacity 0.3s ease !important; }
  .hero.scrubbed { min-height: auto !important; }
  .hero.scrubbed * { transform: none !important; opacity: 1 !important; }
  .px-block { transform: none !important; opacity: 1 !important; }
  .graph-section { height: auto !important; }
  .graph-pin { position: relative !important; height: auto !important; }
  .gt-svg .gt-edges path,
  .gt-svg .gt-nodes circle { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }
}

/* tweak panel mirrored */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  width: 260px;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(20px);
  border: 1px solid var(--rule-2);
  padding: 16px;
  font-family: var(--mono); font-size: 11px;
  display: none;
}
.tweaks.on { display: block; }
.tweaks .h { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
.tweaks .h .t { color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; }
.tweaks .row { margin-bottom: 12px; }
.tweaks label { display: block; color: var(--ink-dim); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.tweaks .hues { display: flex; gap: 4px; }
.tweaks .hue { flex: 1; height: 26px; border: 1px solid var(--rule-2); cursor: pointer; }
.tweaks .hue.on { border-color: var(--ink); }
.tweaks input[type=range] { width: 100%; accent-color: oklch(0.75 0.19 62); }

/* =========================================================
   FEED (In Public — LinkedIn-style timeline)
   ========================================================= */
.feed { margin-top: 40px; }
.feed-wrap {
  position: relative;
  margin-top: 24px;
  padding-left: 140px;
}
.feed-rail {
  position: absolute;
  left: 118px; top: 10px; bottom: 60px;
  width: 1px;
  background: var(--rule);
}
.f-post {
  position: relative;
  margin-bottom: 28px;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.f-post.in { opacity: 1; transform: translateY(0); }

.f-date {
  position: absolute;
  left: -140px; top: 18px;
  width: 116px;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.f-date .dot {
  position: absolute;
  right: -22px; top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.f-date .rel { color: var(--ink); font-size: 13px; letter-spacing: 0.08em; font-family: var(--body); }
.f-date .tag { color: var(--accent); font-size: 9px; }

.f-card {
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 22px 26px;
  transition: border-color 0.3s;
}
.f-card:hover { border-color: var(--rule-2); }

.f-h {
  font-family: var(--body);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 14px 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.f-diff {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--mono); font-size: 13px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: color-mix(in oklch, var(--accent) 3%, var(--bg));
  margin-bottom: 14px;
}
.f-diff .plus { color: oklch(0.72 0.15 145); font-weight: 500; }
.f-diff .minus { color: oklch(0.7 0.18 28); font-weight: 500; }
.f-diff-sub {
  color: var(--ink-mute);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: auto;
}

.f-body p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin: 0 0 10px 0;
  text-wrap: pretty;
}
.f-body p:last-child { margin-bottom: 0; }

.f-pull {
  margin: 16px 0 4px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  font-family: var(--body);
  font-size: 15px;
  font-style: italic;
  color: var(--ink);
  background: color-mix(in oklch, var(--accent) 4%, var(--bg));
  line-height: 1.5;
}

.f-code {
  margin: 14px 0 4px 0;
  padding: 14px 16px;
  background: color-mix(in oklch, var(--ink) 4%, var(--bg));
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}

.f-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.f-reacts {
  display: flex; gap: 18px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.1em;
}
.f-link {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); text-decoration: none;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.f-link:hover { color: var(--ink); }

.f-end {
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 26px;
  border: 1px dashed var(--rule);
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.12em;
}
.f-end a { color: var(--accent); text-decoration: none; }
.f-end a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .feed-wrap { padding-left: 0; }
  .feed-rail { display: none; }
  .f-date { position: static; width: auto; flex-direction: row; align-items: center; gap: 12px; margin-bottom: 10px; }
  .f-date .dot { display: none; }
}

/* =========================================================
   GRAPH STATS STRIP (above the graph, below the § heading)
   ========================================================= */
.gstats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-bottom: none;
  background: var(--bg);
  margin-top: 12px;
}
.gstat {
  padding: 22px 26px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 6px;
}
.gstat:last-child { border-right: none; }
.gs-v {
  font-family: var(--body);
  font-size: clamp(38px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.gs-v .unit { color: var(--accent); font-size: 0.5em; margin-left: 2px; }
.gs-k {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (max-width: 820px) {
  .gstats { grid-template-columns: 1fr 1fr; }
  .gstat:nth-child(2) { border-right: none; }
  .gstat:nth-child(1), .gstat:nth-child(2) { border-bottom: 1px solid var(--rule); }
}

/* =========================================================
   HERO → GRAPH TEASER
   ========================================================= */
.graph-teaser {
  display: grid;
  grid-template-columns: 1fr 280px;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
  padding: 22px 26px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink-dim);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s;
  position: relative;
}
.graph-teaser::after {
  content: "→";
  position: absolute; right: 18px; top: 18px;
  font-family: var(--mono); font-size: 14px;
  color: var(--ink-mute);
  transition: transform 0.3s, color 0.3s;
}
.graph-teaser:hover { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 4%, var(--bg)); }
.graph-teaser:hover::after { transform: translateX(6px); color: var(--accent); }
.graph-teaser:hover .gt-svg .gt-edges path { stroke: var(--accent); }

.gt-side { display: flex; flex-direction: column; gap: 8px; }
.gt-tag {
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.18em;
  text-transform: uppercase;
}
.gt-t {
  font-family: var(--body);
  font-size: clamp(20px, 2.1vw, 28px);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.gt-sub {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.08em;
}

.gt-svg { width: 100%; height: 120px; color: var(--rule-2); }
.gt-svg .gt-edges path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: gt-draw 2.4s var(--ease) forwards;
  transition: stroke 0.3s;
}
.gt-svg .gt-edges path:nth-child(1) { animation-delay: 0.1s; }
.gt-svg .gt-edges path:nth-child(2) { animation-delay: 0.4s; }
.gt-svg .gt-edges path:nth-child(3) { animation-delay: 0.7s; }
.gt-svg .gt-edges path:nth-child(4) { animation-delay: 1.0s; }
.gt-svg .gt-edges path:nth-child(5) { animation-delay: 1.3s; }
.gt-svg .gt-edges path:nth-child(6) { animation-delay: 1.6s; }
.gt-svg .gt-edges path:nth-child(7) { animation-delay: 1.9s; }
@keyframes gt-draw { to { stroke-dashoffset: 0; } }

.gt-svg .gt-nodes circle {
  fill: var(--accent);
  opacity: 0;
  animation: gt-pulse 2.6s var(--ease) infinite;
}
@keyframes gt-pulse {
  0%, 100% { opacity: 0.4; r: 3; }
  50%      { opacity: 1;   r: 5; }
}

@media (max-width: 820px) {
  .graph-teaser { grid-template-columns: 1fr; }
  .gt-svg { height: 90px; }
}
