/* ---- Maple Mono, loaded from disk ---- */
/* friendship is magic ✦ — you found the secret. curl the site for more. */
@font-face {
  font-family: 'Maple Mono';
  src: url('/fonts/MapleMono-Regular.ttf.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Maple Mono';
  src: url('/fonts/MapleMono-Italic.ttf.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Maple Mono';
  src: url('/fonts/MapleMono-SemiBold.ttf.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Maple Mono';
  src: url('/fonts/MapleMono-Bold.ttf.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070609;
  --fg: #e8e6ee;
  --dim: #8a8494;
  --accent: #f0b8d0;        /* soft pink */
  --accent-strong: #ff9ec7; /* brighter pink for hover/emphasis */
  --muted-pink: #a06b80;    /* muted pink */
  --mauve: #6e4a58;         /* deep muted pink for subtle hints */
  --panel: rgba(12, 10, 14, 0.88);
  /* --panel composited over --bg, as a solid color: used anywhere a panel
     sits over the animating starfield, where backdrop-filter would force
     a re-rasterization of the blurred region on every rAF frame */
  --panel-opaque: #0c0a0e;
  --border: #2a222c;
  --cyan: #9fd8d0;

  /* code syntax palette — deliberately not all pink, so the code block
     reads as syntax highlighting rather than as UI chrome */
  --syn-key: #f0b8d0;   /* pink     — keys */
  --syn-str: #f5f3f8;   /* white    — strings (keeps long addresses legible) */
  --syn-num: #9fd8d0;   /* cyan     — numbers, booleans, null */
  --syn-punct: #6e6678; /* dim      — braces, colons, commas */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Maple Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- starfield canvas ---- */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

/* subtle scanline / vignette overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px);
}

.page {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

/* ---- top bar ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
  /* opaque, not backdrop-filter: the starfield canvas animates every frame,
     and a blurred backdrop over it would force re-rasterization per frame */
  background: var(--bg);
}

.prompt { color: var(--fg); font-weight: 400; white-space: nowrap; border-bottom: none; }
.prompt:hover { color: var(--fg); }

/* subtle glow + shimmer across the prompt */
.prompt .user,
.prompt .host {
  text-shadow: 0 0 8px rgba(255, 158, 199, 0.35);
  animation: prompt-shimmer 4.5s ease-in-out infinite;
}
.prompt .host { animation-delay: 1.2s; }

@keyframes prompt-shimmer {
  0%, 100% { text-shadow: 0 0 6px rgba(255, 158, 199, 0.25); }
  50%      { text-shadow: 0 0 14px rgba(255, 158, 199, 0.6); }
}
.prompt .user { color: var(--accent-strong); }
.prompt .host { color: var(--accent); }
.prompt .path { color: var(--dim); }
.prompt .cursor {
  display: inline-block;
  width: 9px; height: 17px;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

nav { display: flex; flex-wrap: wrap; }
nav a {
  color: var(--dim);
  text-decoration: none;
  border-bottom: none;
  margin-left: 22px;
  transition: color 0.2s;
}
nav a:hover { color: var(--accent-strong); }

/* ---- hero ---- */
.hero {
  margin-bottom: 72px;
  position: relative;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}

/* heading stack: ghost wordmark behind the title */
.heading-stack { position: relative; display: block; isolation: isolate; }
.wordmark-ghost {
  position: absolute;
  left: 0.06em;
  top: 0.12em;
  font-size: clamp(52px, 10vw, 120px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(160, 107, 128, 0.22);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: -1;
}

/* easter egg: ghost hex + zk proof transcripts floating in the hero */
.ghost-hex,
.zk-ghost {
  position: absolute;
  font-size: 10px;
  line-height: 1.5;
  color: rgba(160, 107, 128, 0.10);
  user-select: none;
  pointer-events: none;
  white-space: pre;
  z-index: 0;
  overflow: hidden;
  max-width: 100%;
}
.ghost-hex {
  top: -30px;
  right: 0;
  text-align: right;
  mask-image: linear-gradient(to left, black 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(to left, black 30%, transparent 95%);
}
.zk-ghost {
  bottom: -10px;
  left: 0;
  mask-image: linear-gradient(to right, black 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(to right, black 30%, transparent 95%);
}
.zk-ghost-right {
  left: auto;
  right: 0;
  bottom: -40px;
  text-align: right;
  mask-image: linear-gradient(to left, black 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(to left, black 30%, transparent 95%);
}

/* keep hero content above the ghosts */
.hero-main,
.avatar-panel { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(52px, 10vw, 120px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #f5f3f8;
  word-break: break-word;
  text-wrap: balance;
}

/* subtle iridescent sheen drifting across the wordmark */
.glitch {
  position: relative;
  display: inline-block;
  text-shadow: 0 0 34px rgba(240, 184, 208, 0.22);
  animation: iridescence 9s ease-in-out infinite;
}

@keyframes iridescence {
  0%, 100% { text-shadow: 0 0 34px rgba(240, 184, 208, 0.22), 0 0 60px rgba(200, 170, 230, 0.0); }
  33%      { text-shadow: 0 0 34px rgba(200, 170, 230, 0.28), 0 0 60px rgba(159, 216, 208, 0.12); }
  66%      { text-shadow: 0 0 34px rgba(159, 216, 208, 0.24), 0 0 60px rgba(240, 184, 208, 0.12); }
}

/* ================= glitch logo ================= */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.glitch::before { color: var(--accent-strong); }
.glitch::after  { color: var(--cyan); }

/* idle: periodic glitches; hover: livelier */
.glitch::before { animation: glitch-a 6.5s infinite steps(1); }
.glitch::after  { animation: glitch-b 6.5s infinite steps(1); }
.glitch:hover::before { animation-duration: 1.4s; }
.glitch:hover::after  { animation-duration: 1.4s; }

@keyframes glitch-a {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  91%   { opacity: 0.8; transform: translate(-4px, 2px);  clip-path: inset(12% 0 58% 0); }
  93%   { opacity: 0.8; transform: translate(3px, -1px);  clip-path: inset(52% 0 18% 0); }
  95%   { opacity: 0.8; transform: translate(-3px, 1px);  clip-path: inset(78% 0 4% 0); }
  97%   { opacity: 0.8; transform: translate(4px, -2px);  clip-path: inset(30% 0 42% 0); }
  99%   { opacity: 0.8; transform: translate(-2px, 2px);  clip-path: inset(8% 0 70% 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  92%   { opacity: 0.75; transform: translate(4px, -2px);  clip-path: inset(4% 0 76% 0); }
  94%   { opacity: 0.75; transform: translate(-3px, 2px);  clip-path: inset(44% 0 30% 0); }
  96%   { opacity: 0.75; transform: translate(3px, 1px);   clip-path: inset(64% 0 10% 0); }
  98%   { opacity: 0.75; transform: translate(-4px, -1px); clip-path: inset(20% 0 62% 0); }
}

.phonetic { color: var(--dim); margin-top: 6px; font-size: 15px; }

.tagline {
  display: inline-block;
  /* the wordmark-ghost overflows the heading-stack downward by ~0.12em;
     keep real clearance between them so they never visually overlap */
  margin-top: 36px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--panel-opaque);
  color: var(--fg);
}
.tagline em { color: var(--accent); font-style: normal; }

/* ================= vibe alchemist sorcery backdrop ================= */
.sorcery {
  position: relative;
  display: inline-block;
  padding: 0 2px;
  cursor: default;
}

/* text glows and shimmers slightly on hover */
.sorcery:hover {
  color: var(--accent-strong);
  animation: sorcery-shimmer 3s ease-in-out infinite;
}

@keyframes sorcery-shimmer {
  0%, 100% { text-shadow: 0 0 6px rgba(255, 158, 199, 0.3); }
  50%      { text-shadow: 0 0 14px rgba(255, 158, 199, 0.65); }
}

/* text column + avatar panel; the panel is vertically centered against the
   whole hero, so tighten the tagline->bio gap to keep one clear center */
.hero-main { flex: 1 1 auto; min-width: 0; }
.bio { max-width: 560px; color: #b6b2c0; margin-top: 22px; }
.bio p { margin-bottom: 18px; }
.bio strong { color: #f0edf5; font-weight: 600; }
.bio em { color: var(--accent); font-style: italic; }
.bio .credits { color: var(--dim); font-size: 13px; }

.avatar-panel { flex: 0 0 auto; width: clamp(200px, 26vw, 300px); }
.avatar-panel img { display: block; width: 100%; height: auto; }

/* floating-window mode (upgraded by /js/avatar-window.js; no-JS stays in-flow) */
.avatar-panel.floating { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
.avatar-panel.floating .panel-title .lang { margin-left: auto; }
.avatar-panel.floating .panel-title {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.window-close {
  background: none;
  border: none;
  padding: 0 2px;
  font: inherit;
  line-height: 1;
  color: var(--dim);
  cursor: pointer;
}
.window-close:hover { color: var(--accent-strong); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted rgba(240, 184, 208, 0.45);
}
a:hover { color: var(--accent-strong); border-bottom-color: var(--accent-strong); }

/* visible keyboard focus, pink to match palette */
a:focus-visible,
.prompt:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- grid layout ---- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 56px;
}

.panel {
  /* opaque, not backdrop-filter: the starfield canvas animates every frame,
     and a blurred backdrop over it would force re-rasterization per frame */
  background: var(--panel-opaque);
  border: 1px solid var(--border);
  padding: 22px 24px;
  position: relative;
  min-width: 0; /* allow pre to shrink in grid */
}
.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 60%);
  opacity: 0.55;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.panel-title .label { color: var(--fg); }

/* ---- metadata.json as a code block ---- */
/* code panels stretch their body so the inset bg reaches the bottom edge */
.codeblock {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.codeblock > pre.json,
.codeblock > .md { flex: 1 1 auto; }

/* editor-style header bar */
.codeblock .panel-title {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.022);
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
}
.codeblock .panel-title .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 400; /* defend against UA h1 bold: weblog index labels are h1 */
  color: var(--fg);
}
/* small pink file dot, like an editor tab marker */
.codeblock .panel-title .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(240, 184, 208, 0.5);
  flex-shrink: 0;
}
.codeblock .panel-title .lang {
  font-size: 10.5px;
  color: var(--muted-pink);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

pre.json {
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
  color: #a49eae;
  margin: 0;
  padding: 14px 14px 12px 0;
  background: rgba(0, 0, 0, 0.28);
  tab-size: 2;
}
pre.json:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: -2px;
}

/* line-number gutter (spans emitted by src/lib/render-json.ts) */
.json .ln {
  display: inline-block;
  width: 3.2em;
  padding-right: 1em;
  margin-right: 0.85em;
  text-align: right;
  color: #4e4657;
  border-right: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.json .k { color: var(--syn-key); }
.json .s { color: var(--syn-str); }
.json .n { color: var(--syn-num); }
.json .p { color: var(--syn-punct); }

/* themed, visible scrollbars (webkit + firefox) */
pre.json {
  scrollbar-width: thin;
  scrollbar-color: var(--mauve) #17121a;
}
pre.json::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
pre.json::-webkit-scrollbar-track {
  background: #17121a;
  border: 1px solid var(--border);
}
pre.json::-webkit-scrollbar-thumb {
  background: var(--mauve);
  border: 2px solid #17121a;
  border-radius: 6px;
}
pre.json::-webkit-scrollbar-thumb:hover {
  background: var(--muted-pink);
}

/* page-level scrollbar, matching theme */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--mauve) var(--bg);
}
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--bg); }
body::-webkit-scrollbar-thumb {
  background: var(--mauve);
  border: 2px solid var(--bg);
  border-radius: 6px;
}
body::-webkit-scrollbar-thumb:hover { background: var(--muted-pink); }

/* ---- connect.md, styled as rendered markdown ---- */
.md {
  padding: 20px 22px 22px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1.75;
  color: #b6b2c0;
}

/* document title, with the usual rendered-md underline */
.md h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #f5f3f8;
  padding-bottom: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* section headings: white, hierarchy carried by size/weight (not color) */
.md h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
  margin: 20px 0 9px;
}
.md h3:first-of-type { margin-top: 0; }

.md ul {
  list-style: disc;
  padding-left: 1.35em;
  margin: 0;
}
/* list punctuation is dim, matching the json block's punctuation */
.md li {
  padding: 2.5px 0;
  color: #6e6678;
}
.md li::marker { color: var(--mauve); }

/* pink = label/key, consistent with the json block's keys */
.md strong {
  color: var(--accent);
  font-weight: 600;
}

/* white = value, consistent with the json block's strings */
.md a {
  color: var(--fg);
  border-bottom: 1px dotted rgba(232, 230, 238, 0.28);
  word-break: break-all;
}
.md a:hover {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

/* ---- latest post ---- */
.post { margin-bottom: 56px; }
.post .panel {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 18px;
  flex-wrap: wrap;
}
.post a { font-size: 15px; }
.post time { color: var(--dim); font-size: 12px; white-space: nowrap; }
.post .desc { width: 100%; color: var(--dim); font-size: 13px; }

/* ================= weblog index ================= */
.blog-index { margin-bottom: 56px; }

.blog-index .rss-link {
  display: inline-flex;
  align-items: center;
  color: var(--dim);
  border-bottom: none;
}
.blog-index .rss-link:hover { color: var(--accent-strong); }
.blog-index .rss-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-empty {
  padding: 20px 22px;
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  background: rgba(0, 0, 0, 0.28);
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.28);
}
.post-list li {
  display: grid;
  grid-template-columns: minmax(9ch, auto) minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: baseline;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: 0; }

.post-date { color: var(--dim); font-size: 12px; white-space: nowrap; }

.post-body { min-width: 0; }
.post-title { font-size: 14.5px; }
.post-desc {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-size: 12.5px;
}
.post-tag { color: var(--muted-pink); font-size: 11.5px; white-space: nowrap; }

/* ================= weblog article ================= */
.post-article {
  max-width: 900px;
  margin: 0 auto 56px;
  background: var(--panel-opaque);
  border: 1px solid var(--border);
  position: relative;
}
.post-article::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 60%);
  opacity: 0.55;
}

.post-header {
  padding: clamp(20px, 4vw, 32px);
  border-bottom: 1px solid var(--border);
}

.post-back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--dim);
  font-size: 12.5px;
  border-bottom: none;
}
.post-back:hover { color: var(--accent-strong); }

/* AGENTS.md gotcha: never let a global/hero h1 rule restyle post titles.
   The hero h1 is scoped to .hero h1, but keep .post-h1 fully explicit so
   future generic h1 rules can't bleed in. */
.post-h1 {
  margin: 0 0 10px;
  padding: 0;
  color: #f5f3f8;
  font-size: clamp(22px, 3.5vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-transform: none;
  max-width: none;
  text-shadow: none;
  animation: none;
}

.post-description {
  margin: 4px 0 12px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

/* ---- rendered markdown body ---- */
.prose {
  padding: clamp(20px, 4vw, 32px);
  color: #b6b2c0;
  font-size: 14.5px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.prose h2,
.prose h3 {
  color: #f5f3f8;
  letter-spacing: -0.015em;
  font-weight: 600;
  text-transform: none;
  max-width: none;
}

.prose h2 {
  margin: 38px 0 14px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.2;
}
.prose h2:first-child { margin-top: 0; }
.prose h2::before {
  content: '#';
  margin-right: 8px;
  color: var(--accent);
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.25;
}
.prose h3::before {
  content: '##';
  margin-right: 7px;
  color: var(--accent);
  opacity: 0.7;
}

.prose p { margin: 0 0 16px; }

.prose a {
  color: var(--accent);
  border-bottom: 1px dotted rgba(240, 184, 208, 0.45);
}
.prose a:hover {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

.prose strong { color: #f0edf5; font-weight: 600; }
.prose em { font-style: italic; }

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--mauve); }

.prose code {
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
  font-size: 0.88em;
  font-family: 'Maple Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

.prose pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #b6b2c0;
  font: 400 12.5px/1.65 'Maple Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  tab-size: 2;
}
.prose pre code {
  padding: 0;
  background: none !important;
  border: none;
  color: inherit;
  font-size: inherit;
}

/* Shiki overrides — keep token colors, reset background */
.prose pre .line { color: #b6b2c0; }

.prose blockquote {
  margin: 0 0 16px;
  padding: 8px 16px;
  border-left: 2px solid var(--accent);
  color: var(--dim);
}

.prose hr {
  margin: 32px 0;
  border: none;
  border-top: 1px solid var(--border);
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

.prose table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
}
.prose th,
.prose td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
}
.prose th { color: #f5f3f8; font-weight: 600; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--dim);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer .hint { color: var(--muted-pink); }

/* ---- floating hex decoration ---- */
.hexdeco {
  position: fixed;
  bottom: 16px; right: 20px;
  z-index: 2;
  color: rgba(138, 132, 148, 0.35);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
  pointer-events: none;
  user-select: none;
  white-space: pre;
}

::selection { background: rgba(240, 184, 208, 0.3); color: #fff; }

/* ================= responsive ================= */

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { margin-bottom: 44px; }
  .hero { margin-bottom: 56px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .avatar-panel { width: min(260px, 70%); }
}

@media (max-width: 600px) {
  body { font-size: 13.5px; }
  .page { padding: 0 16px 90px; }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 4px;
  }
  nav a { margin-left: 0; margin-right: 18px; }

  .hero h1,
  .wordmark-ghost { font-size: clamp(44px, 15vw, 72px); }
  .tagline { font-size: 12.5px; }

  .panel { padding: 18px 16px; }
  .codeblock { padding: 0; }
  pre.json { font-size: 11px; }
  .md { font-size: 12.5px; padding: 16px 16px 18px; }
  .md h2 { font-size: 19px; }
  /* tighter json gutter on small screens */
  .json .ln {
    width: 2.2em;
    padding-right: 0.6em;
    margin-right: 0.6em;
  }

  .post-list li { grid-template-columns: 1fr; gap: 4px; }
  .post-tag { white-space: normal; }

  .hexdeco,
  .wordmark-ghost,
  .ghost-hex,
  .zk-ghost { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .prompt .cursor { animation: none; }
  .prompt .user,
  .prompt .host { animation: none; }
  .glitch { animation: none; }
  .glitch::before,
  .glitch::after { animation: none; }
  .sorcery:hover { animation: none; }
}

/* Print — strip dark theme, decorative motion, and chrome */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  #stars,
  .overlay,
  .hexdeco,
  .topbar,
  footer,
  .ghost-hex,
  .zk-ghost,
  .cursor,
  .wordmark-ghost { display: none; }
  .page { max-width: 100%; padding: 0; }
  a { color: #000; border-bottom: 1px solid #000; }
  .prose pre { background: #f5f5f5 !important; border: 1px solid #ccc; }
  .panel,
  .post-article { border: 1px solid #ccc; background: #fff; box-shadow: none; }
  h1, h2, h3, .post-h1 { color: #000; }
  .prose { color: #333; }
}
