:root {
  /* ── ink palette ─────────────────────────────────────── */
  --ink:        #0a0a0a;
  --elev:       #0f0f10;
  --soft:       #131316;
  --line:       #1f1f23;
  --line-soft:  rgba(255,255,255,0.06);
  --muted:      #8a8a93;
  --dim:        #5e5e66;
  --fg:         #e5e5e5;

  /* ── accents ─────────────────────────────────────────── */
  --accent:     #5e6ad2;
  --accent-2:   #7c87e8;
  --accent-soft: rgba(94,106,210,0.18);
  --good:       #4cb782;
  --warn:       #f2c94c;

  /* ── radii ───────────────────────────────────────────── */
  --r:        4px;
  --r-pill:   999px;
}

/* ── reset + base ───────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background-color: var(--ink);
  color: var(--fg);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); color: var(--fg); }

/* ── Alpine x-cloak — hide pre-init content ─────────────── */
[x-cloak] { display: none !important; }

/* ── loading + error overlay states ────────────────────── */
.status-overlay {
  position: fixed;
  inset: 52px 0 0;             /* sit under the topbar */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 24px;
  background: var(--ink);
}
.status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 40px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  font-family: 'Geist Mono', ui-monospace, monospace;
  text-align: center;
  max-width: 480px;
}
.status-card--error {
  border-color: rgba(242, 201, 76, 0.4);
  background: linear-gradient(180deg, var(--elev), rgba(242, 201, 76, 0.04));
}
.status-title {
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
}
.status-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.status-hint code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  color: var(--fg);
}
.status-icon {
  font-size: 28px;
  color: var(--warn);
  line-height: 1;
}
.status-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-retry {
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  cursor: pointer;
  transition: background 140ms ease, transform 100ms ease;
}
.status-retry:hover {
  background: var(--accent);
  color: #fff;
}
.status-retry:active { transform: translateY(1px); }

/* ── shell ─────────────────────────────────────────────── */
.shell {
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
  padding: 0 24px;
}

/* ── brand mark ────────────────────────────────────────── */
.brand-mark {
  display: inline-grid;
  place-items: center;
  font-weight: 600;
  width: 22px; height: 22px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--elev);
  color: var(--accent);
  border-radius: var(--r);
}
.brand-mark--sm { width: 18px; height: 18px; font-size: 10px; }

/* ── topbar ────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(10,10,10,0.72);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 13px;
}
.brand-slash { color: var(--dim); }

/* ── command bar ───────────────────────────────────────── */
.cmd {
  display: flex;
  align-items: center;
  cursor: text;
  flex: 1;
  height: 32px;
  padding: 0 10px 0 12px;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--elev);
  border-radius: var(--r);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.cmd:hover { border-color: #2a2a30; }
.cmd.open {
  border-color: var(--accent);
  background: var(--elev);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cmd .ic { color: var(--dim); flex-shrink: 0; }
.cmd input {
  flex: 1;
  min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--fg); font: inherit; padding: 0;
}
.cmd input::placeholder { color: var(--dim); }
.cmd input::-webkit-search-cancel-button { display: none; }

.kbd {
  display: inline-flex;
  gap: 2px; padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px;
  color: var(--muted);
}
.cmd.open .kbd { border-color: var(--accent); color: var(--accent); }
.kbd kbd { font: inherit; }

.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 5px 10px;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px;
  color: var(--muted);
  border-radius: var(--r);
  transition: color 140ms ease, background 140ms ease;
}
.topnav a:hover { color: var(--fg); background: var(--soft); }

/* ── hero ──────────────────────────────────────────────── */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 22px;
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px; padding: 0 10px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--elev);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11.5px;
  color: var(--fg);
}
.pill.muted { color: var(--muted); }
.pill .dot {
  border-radius: 9999px;
  width: 6px; height: 6px;
  background: var(--good);
  box-shadow: 0 0 0 0 var(--good);
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--good); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 4px transparent; }
}

.name {
  font-weight: 600;
  margin: 14px 0 0;
  font-size: 57.6px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.name .accent { color: var(--accent); }

.role {
  font-family: 'Geist Mono', ui-monospace, monospace;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.role .prompt { color: #5e6e75; }
.role .accent { color: var(--accent); font-weight: 600; }

/* ── neural bio typewriter ─────────── */
/* typing state: slightly narrower line-height so the block doesn't jump
   as characters land, and the caret sits flush at the writing edge */
.bio--typing {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13.5px;
  line-height: 1.72;
  letter-spacing: -0.005em;
  transition: opacity 220ms ease-out;
  caret-color: transparent;
}
.bio accent { color: var(--accent); }

/* blinking caret — inline-block, height locked to the line box so it
   doesn't stretch the paragraph while typing */
.bio-caret {
  display: inline-block;
  vertical-align: -0.16em;
  width: 6px;
  height: 1.05em;
  margin-left: 1px;
  background: var(--accent);
  border-radius: 1px;
  animation: bioBlink 1s steps(2, start) infinite;
}
@keyframes bioBlink { 0%, 100% { opacity: 0.9; } 50% { opacity: 0; } }

.bio {
  font-family: 'Geist Mono', ui-monospace, monospace;
  line-height: 1.72;
  margin: 14px 0 0;
  max-width: 700px;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--fg);
}
.bio .accent { color: var(--accent); font-weight: 500; }

/* ── sections ──────────────────────────────────────────── */
.block { margin-top: 32px; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.block-title {
  font-family: 'Geist Mono', ui-monospace, monospace;
  margin: 0;
  font-size: 14px;
  color: var(--fg);
}
.block-title .hash { color: var(--accent); }
.block-meta {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* ── skill bars ────────────────────────────────────────── */
.bars {
  border-radius: var(--r);
  overflow: hidden;
  margin: 0; padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--elev);
}
.bar {
  display: grid;            /* explicit — @apply grid не работает в CDN */
  align-items: center;
  grid-template-columns: minmax(180px, 1fr) 2fr auto;
  gap: 14px;
  padding: 11px 14px;
  border-top: 1px solid var(--line-soft);
}
.bar:first-child { border-top: 0; }
.bar-label { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; color: var(--fg); }
.bar-track {
  position: relative;       /* explicit — anchor for absolute bar-fill */
  overflow: hidden;
  height: 6px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.bar-fill {
  position: absolute;       /* explicit — fills the track */
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--r-pill);
  box-shadow: 0 0 12px var(--accent-soft);
  transition: width 1.2s cubic-bezier(.22,1,.36,1);
}
.bar-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  background: var(--ink);
}
.bar-tag.accent { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.bar-tag.muted { color: var(--dim); }

/* ── chips ─────────────────────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.chip {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--muted);
  background: var(--elev);
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ── nav rows (sections) ───────────────────────────────── */
.rows {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--elev);
}
.row {
  display: grid;            /* explicit */
  align-items: center;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--line-soft);
  transition: background 160ms ease, transform 160ms ease;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--soft); transform: translateX(2px); }
.row .arrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  color: var(--dim); font-size: 13px;
  transition: transform 200ms ease, color 200ms ease;
}
.row:hover .arrow { color: var(--accent); transform: translateX(3px); }
.row .label { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.row .key { color: var(--fg); font-weight: 500; }
.row .dash { color: var(--dim); font-family: 'Geist Mono', ui-monospace, monospace; }
.row .desc {
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row .tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.row .tag.accent { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ── projects ──────────────────────────────────────────── */
.projects {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--elev);
}
.proj {
  display: grid;            /* explicit */
  align-items: center;
  grid-template-columns: 24px 28px 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  transition: background 160ms ease, transform 160ms ease;
}
.proj:first-child { border-top: 0; }
.proj:hover { background: var(--soft); transform: translateX(2px); }
.proj .arrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  color: var(--dim); font-size: 13px;
  transition: transform 200ms ease, color 200ms ease;
}
.proj:hover .arrow { color: var(--accent); transform: translateX(3px); }
.proj .ico {
  display: grid;            /* explicit */
  place-items: center;
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--muted);
  border-radius: var(--r);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px;
}
.proj .name { margin: 0; font-size: 14px; color: var(--fg); }
.proj .em   { color: var(--muted); font-weight: 400; }
.proj .desc {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--dim);
  margin-top: 2px;
}
.proj .meta {
  display: inline-flex;
  gap: 1px;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; color: var(--muted);
}
.status-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  background: var(--ink);
}
.status-tag.prod     { color: var(--good); border-color: rgba(76,183,130,0.4); background: rgba(76,183,130,0.08); }
.status-tag.shipped  { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.status-tag.internal { color: var(--muted); }
.status-tag.wip      { color: var(--warn); border-color: rgba(242,201,76,0.4); background: rgba(242,201,76,0.08); }

/* ── utility ─────────────────────── */
/* .is-hidden hides reliably even if Tailwind CDN classes are absent;
   `[hidden]` alone loses to `display:grid` on .block/.photos */
.is-hidden { display: none !important; }

/* ── character tiles (characters index) ─────────── */
.char-gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}
.char-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--elev);
  overflow: hidden;
  transition: transform 240ms ease, border-color 240ms ease,
              box-shadow 260ms ease;
}
.char-tile:hover {
  transform: translateY(-4px);
  border-color: var(--c);
  box-shadow: 0 16px 40px -22px var(--c);
}

.char-tile-avatar {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--soft)), var(--ink));
}
.char-tile-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms ease;
}
.char-tile:hover .char-tile-avatar img { transform: scale(1.06); }
.char-tile-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 50% 100%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}
.char-tile:hover .char-tile-glow { opacity: 1; }

.char-tile-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 7px; }
.char-tile-name {
  font-size: 19px; font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.char-tile-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--c);
}
.char-tile-bio {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.char-tile-swatches { display: flex; gap: 4px; margin-top: 2px; }
.tile-swatch {
  position: relative;
  flex: 1;
  height: 14px;
  padding: 0;
  border-radius: 3px;
  border: 1px solid rgb(255 255 255 / 0.07);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 200ms ease;
}
.tile-swatch:hover { transform: translateY(-2px) scaleY(1.25); box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.8); }
.tile-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile-swatch.copied { box-shadow: 0 0 0 2px var(--accent); transform: scaleY(1.3); }
.char-tile-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  color: var(--dim);
}
.dot-sep { opacity: 0.5; }
.char-tile-arrow {
  position: absolute;
  top: 12px; right: 14px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 15px;
  color: var(--c);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.char-tile:hover .char-tile-arrow { opacity: 1; transform: translateX(0); }

/* ── project groups + cards (projects page) ─────────── */
.proj-group { margin-bottom: 22px; }
.proj-group:last-child { margin-bottom: 0; }
.proj-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 9px;
}
.proj-group-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.proj-group-desc {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--dim);
}

.proj-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proj-card {
  display: grid;
  align-items: center;
  grid-template-columns: 20px 1fr auto;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  transition: background 180ms ease, transform 180ms ease,
              border-color 180ms ease, box-shadow 220ms ease;
}
.proj-card:hover {
  background: var(--soft);
  transform: translateX(3px);
  border-color: var(--accent);
  box-shadow: -3px 0 0 0 var(--accent);
}
.proj-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.proj-card-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; }
.proj-card-name { font-size: 14.5px; font-weight: 600; color: var(--fg); }
.proj-card-desc { font-size: 12.5px; color: var(--muted); }
.proj-card-detail {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim);
}
.proj-card:hover .arrow { color: var(--accent); transform: translateX(3px); }
.proj-card-meta { display: flex; align-items: center; gap: 8px; }
.proj-card-year {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}

/* ── knows grid (about page) ─────────── */
.knows-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}
.knows-card {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
}
.knows-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.knows-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
}
.knows-list li {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--ink);
  white-space: nowrap;
}

/* ── scroll reveal (all pages) ─────────── */
/* .will-reveal is added by app.js right before observing, so with JS off
   or reduced-motion the page renders fully visible — never a blank page. */
.will-reveal {
  opacity: 0;
  will-change: transform, opacity;
}
.will-reveal.is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity 420ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── character cards (index grid) ─────────── */
.chars {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}
.char-card {
  display: grid;
  align-items: center;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  transition: background 160ms ease, transform 160ms ease,
              border-color 160ms ease, box-shadow 200ms ease;
}
.char-card:hover {
  background: var(--soft);
  transform: translateY(-2px);
  border-color: var(--c);
  box-shadow: 0 6px 22px -12px var(--c);
}
.char-avatar {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--line);
}
.char-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.char-name {
  font-size: 14px; font-weight: 600; color: var(--fg);
  letter-spacing: -0.01em;
}
.char-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.char-card:hover .arrow { color: var(--c); transform: translateX(3px); }

/* ── photos ────────────────────────────────────────────── */
.photos {
  display: grid;            /* explicit */
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}
.photo {
  position: relative;
  display: grid;            /* explicit */
  place-items: center;
  aspect-ratio: 4/3;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--soft), var(--ink));
  color: var(--dim);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px;
  text-align: center;
  padding: 8px;
  overflow: hidden;
  transition: transform 300ms ease;
}
.photo:hover { transform: translateY(-2px); }
.photo .caption { font-size: 10px; color: var(--dim); margin-top: 4px; }

/* ── socials ───────────────────────────────────────────── */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ── footer ────────────────────────────────────────────── */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 60px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--dim);
}
footer .blip { color: var(--accent); }

/* ── command palette ───────────────────────────────────── */
.palette {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px));
  max-height: 70vh;
  z-index: 100;
  display: none;
  flex-direction: column;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px var(--line) inset;
  overflow: hidden;
}
.palette.open { display: flex; }
.palette.appearing { animation: paletteAppear 220ms cubic-bezier(.22,1,.36,1); }
@keyframes paletteAppear {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(.985); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10,10,10,0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 200ms ease;
}
.palette-backdrop.open { opacity: 1; pointer-events: auto; }

.palette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}
.palette-head .count strong { color: var(--accent); }

.palette-list {
  list-style: none;
  margin: 0;
  padding: 6px 4px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r);
  cursor: pointer;
  transition: background 100ms ease;
}
.palette-item + .palette-item { margin-top: 1px; }
.palette-item:hover, .palette-item.active { background: var(--soft); }
.palette-item.active { box-shadow: inset 0 0 0 1px var(--accent); }
.palette-item .item-icon {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--muted);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
}
.palette-item.active .item-icon { color: var(--accent); border-color: var(--accent); }
.palette-item .item-body { flex: 1; min-width: 0; }
.palette-item .item-title {
  font-size: 13.5px; color: var(--fg); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.palette-item .item-desc {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px; color: var(--dim);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.palette-item .item-tags {
  display: flex;
  flex-shrink: 0;
  gap: 1px;
}
.palette-item .item-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  background: var(--ink);
}
.palette-item .item-tag.ai       { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.palette-item .item-tag.prod    { color: var(--good); border-color: rgba(76,183,130,0.4); }
.palette-item .item-tag.shipped { color: var(--accent); }
.palette-item .item-tag.section { color: var(--muted); }
.palette-item .item-tag.external { color: var(--warn); border-color: rgba(242,201,76,0.4); }

.palette-item mark {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 1px;
  border-radius: 2px;
  font-weight: 600;
}

.palette-empty {
  text-align: center;
  padding: 28px 18px;
  color: var(--dim);
  font-size: 12.5px;
}
.palette-empty strong { color: var(--fg); font-weight: 500; }
.palette-empty .hint {
  display: block;
  margin-top: 6px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
}

.palette-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--dim);
}
.palette-foot .spacer { flex: 1; }
.palette-foot .brand { color: var(--accent); }
.palette-foot kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--elev);
  color: var(--muted);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
}

/* ── typed.js cursor ───────────────────────────────────── */
.typed-cursor { color: var(--accent); font-weight: 600; }
.typed-cursor.no-cursor { display: none; }

/* ── particle canvas ───────────────────────────────────── */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.shell, .topbar, footer { position: relative; z-index: 1; }

/* ── reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── payment cards (donate page) ────────────────────────── */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}
.payment-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}
.payment-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.payment-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-size: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink);
}
.payment-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}
.payment-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.payment-recipient {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: var(--ink);
}
.payment-recipient code {
  flex: 1; min-width: 0;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--fg);
  word-break: break-all;
}
.payment-recipient-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}
.copy-btn {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  cursor: pointer;
}
.payment-cta {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  text-align: center;
  transition: background 140ms ease, color 140ms ease;
  align-self: flex-start;
}
.payment-cta:hover {
  background: var(--accent);
  color: #fff;
}
.hint-block {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: rgba(94,106,210,0.04);
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
}
.hint-block strong { color: var(--accent); }

/* ── allocation cards ──────────────────────────────────── */
.alloc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.alloc-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  transition: border-color 160ms ease;
}
.alloc-card:hover { border-color: var(--accent); }
.alloc-pct {
  font-family: 'Geist Mono', monospace;
  font-size: 22px;
  color: var(--accent);
  font-weight: 600;
}
.alloc-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-top: 2px;
}
.alloc-detail {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* ── CTA buttons ────────────────────────────────────────── */
.cta-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 18px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

/* icon slot — fills the flex row; hidden entirely when no `icon:` in YAML */
.cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 15px;
  height: 15px;
}
.cta-icon[style*="display: none"] { display: none; }
.cta-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* a nudge on hover so the glyph feels attached to the label */
.cta-btn:hover .cta-icon { transform: translateX(1px); }
.cta-icon { transition: transform 160ms ease; }
.cta-btn:hover { background: var(--accent); color: #fff; }
.cta-btn:active { transform: translateY(1px); }
.cta-btn--secondary {
  border-color: var(--line);
  background: var(--elev);
  color: var(--fg);
}
.cta-btn--secondary:hover {
  border-color: var(--accent);
  background: var(--elev);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   PRICE PAGE — animation hooks + micro-interactions
   Elements start hidden ONLY when JS animation will run: the
   .price-anim class is added by app.js, so with JS off (or
   reduced-motion) everything renders normally.
   ═══════════════════════════════════════════════════════════ */

/* initial hidden state — applied just before anime starts */
.price-anim .block:first-of-type .pill,
.price-anim .block:first-of-type .name,
.price-anim .block:first-of-type .bio,
.price-anim .block-head,
.price-anim .pricing-card,
.price-anim .pricing-features li,
.price-anim .faq-item,
.price-anim .cta-btn {
  will-change: transform, opacity;
}

/* ── card hover: lift + glow follows the accent ── */
.pricing-card {
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--accent) 13%, transparent),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}
.pricing-card:hover::before { opacity: 1; }
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

/* thin accent rail that wipes in on hover */
.pricing-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.pricing-card:hover::after { transform: scaleY(1); }

.pricing-card--featured::after { transform: scaleY(1); }

/* breathing glow on the featured card (class added by app.js when
   anime is available — without it the card just sits still) */
.pricing-card--pulse {
  animation: featuredPulse 3.6s ease-in-out 1.1s infinite;
}
@keyframes featuredPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(94, 106, 210, 0);
    border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(94, 106, 210, 0.5),
      0 18px 46px -20px rgba(94, 106, 210, 0.75);
    border-color: var(--accent);
  }
}

/* featured badge shimmer */
.pricing-card--featured .pricing-name {
  position: relative;
  display: inline-block;
  background: linear-gradient(100deg,
    var(--fg) 0%, var(--fg) 38%,
    color-mix(in srgb, var(--accent) 90%, #fff) 50%,
    var(--fg) 62%, var(--fg) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: priceShimmer 5.5s ease-in-out 1.2s infinite;
}
@keyframes priceShimmer {
  0%, 100% { background-position: 130% 0; }
  50%      { background-position: -30% 0; }
}


/* ── price digits: tabular so ticking doesn't reflow ── */
.pricing-price { font-variant-numeric: tabular-nums; }

/* ── FAQ: chevron + smooth height via grid trick ── */
.faq-summary::after {
  content: "+";
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 15px;
  line-height: 1;
  color: var(--dim);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms ease;
}
.faq-item[open] .faq-summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-summary:hover { background: var(--soft); color: var(--fg); }
.faq-item[open] .faq-summary { color: var(--accent); }
.faq-body {
  overflow: hidden;
  animation: faqReveal 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CTA buttons: sheen sweep ── */
.cta-btn {
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease,
              background 200ms ease;
}
.cta-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.14), transparent);
  transition: left 620ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.cta-btn:hover::after { left: 130%; }
.cta-btn:hover { transform: translateY(-2px); }

/* ── pricing cards (price page) ─────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.pricing-card {
  display: flex; flex-direction: column;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  transition: border-color 200ms ease, transform 200ms ease;
}
.pricing-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.pricing-card--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(94,106,210,0.06), var(--elev));
}
.pricing-card--featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px var(--accent);
}
.pricing-name {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}
.pricing-card--featured .pricing-name { color: var(--accent); }
.pricing-headline {
  margin-top: 6px;
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}
.pricing-price {
  margin-top: 14px;
  font-family: 'Geist Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.pricing-price-suffix {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}
.pricing-features {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}
.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
  display: flex; align-items: flex-start; gap: 8px;
}
.pricing-features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.75;
  opacity: 0.55;
  transition: opacity 220ms ease, transform 220ms ease;
}
.pricing-card:hover .pricing-features li::before { opacity: 1; }
.pricing-features li:hover { color: var(--fg); }
.pricing-features li:hover::before { transform: scale(1.2); }
.pricing-cta {
  margin-top: auto;
  padding-top: 18px;
  display: block;
  text-align: center;
}
.pricing-cta a {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--fg);
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.pricing-cta a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.pricing-card--featured .pricing-cta a {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.pricing-card--featured .pricing-cta a:hover {
  background: var(--accent);
  color: #fff;
}

/* ── FAQ (price page) ───────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
  overflow: hidden;
}
.faq-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--fg);
  font-weight: 500;
  transition: background 140ms ease;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary:hover { background: var(--soft); }
.faq-summary::after {
  content: '+';
  font-family: 'Geist Mono', monospace;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  transition: transform 200ms ease, color 200ms ease;
}
.faq-item[open] .faq-summary::after {
  content: '−';
  color: var(--accent);
}
.faq-body {
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.faq-body code {
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--ink);
  color: var(--fg);
}

/* ── text link helper (used in bio text on inner pages) ─── */
.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 2px;
  transition: text-decoration-color 140ms ease;
}
.text-link:hover { text-decoration-color: var(--accent); }

/* ── nav active state ──────────────────────────────────── */
.topnav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ── responsive trim ───────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════
   CHARACTER PAGE — characters.html
   ═══════════════════════════════════════════════════════════ */
.char-page { --accent: #ff7a45; }

.char-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 22px 0 4px;
}
.char-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--elev);
  font-size: 12.5px;
  color: var(--muted);
  transition: all 180ms ease;
}
.char-tab img {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}
.char-tab:hover { color: var(--fg); border-color: var(--line); background: var(--soft); }
.char-tab.active {
  color: var(--c);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}

/* ── hero ─────────────────────────── */
.char-hero {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: center;
  margin: 18px 0 34px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 8% 0%, color-mix(in srgb, var(--c) 13%, transparent), transparent 62%),
    var(--elev);
  overflow: hidden;
}
.char-hero-glow {
  position: absolute;
  top: -120px; left: -60px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 26%, transparent), transparent 68%);
  filter: blur(28px);
  pointer-events: none;
}
.char-hero-avatar {
  position: relative;
  width: 200px; height: 200px;
  border-radius: 22px;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid color-mix(in srgb, var(--c) 34%, var(--line));
  box-shadow: 0 18px 48px -22px var(--c);
}
.char-hero-text { position: relative; min-width: 0; }
.char-name-big {
  margin: 12px 0 10px;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--fg);
}
.char-name-big .accent { color: var(--c); }
.accent-pill {
  color: var(--c);
  border-color: color-mix(in srgb, var(--c) 40%, transparent);
  background: color-mix(in srgb, var(--c) 11%, transparent);
}
.accent-pill .dot { background: var(--c); }

/* ── stats ─────────────────────────── */
.char-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.char-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
}
.char-stat-value {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 17px; font-weight: 600;
  color: var(--c);
  line-height: 1.2;
}
.char-stat-label {
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.01em;
}

/* ── facts + palette ─────────────────────────── */
.facts-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}
.fact {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--elev);
}
.fact-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--dim);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.fact-value { grid-column: 1; font-size: 13.5px; color: var(--fg); }
.fact-dot {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  width: 14px; height: 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.10), 0 0 14px -2px currentColor;
  transition: transform 160ms ease, box-shadow 200ms ease;
}
.fact-dot:hover { transform: scale(1.22); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.28), 0 0 18px -2px currentColor; }
.fact-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.palette-strip {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.swatch {
  flex: 1;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  background: var(--sw);
  border: 1px solid rgb(255 255 255 / 0.08);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 200ms ease;
}
.swatch:hover { transform: translateY(-3px); box-shadow: 0 6px 18px -8px var(--sw); }
.swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* click feedback — copyColor() adds .copied + data-copied for ~1.6s.
   The hex bubbles out of the swatch via ::after so no inner text is needed. */
.fact-dot.copied, .swatch.copied {
  transform: scale(1.16);
  box-shadow: 0 0 0 2px var(--accent), 0 0 22px -2px var(--sw);
}
.swatch { position: relative; overflow: visible; }
.swatch::after {
  content: attr(data-copied);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translate(-50%, -4px);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--ink);
  color: var(--fg);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.swatch.copied::after { opacity: 1; transform: translate(-50%, 0); }
/* give the strip breathing room so the tooltip has somewhere to land */
.palette-strip { margin-bottom: 26px; }
.swatch.copied--err::after { color: #ff6b6b; border-color: #ff6b6b; }

/* the dot is too small for a tooltip label — it just pulses */
.fact-dot.copied::after { content: none; }

/* ── gallery tabs ─────────────────────────── */
.gal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gal-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  transition: all 160ms ease;
}
.gal-tab:hover { color: var(--fg); background: var(--soft); }
.gal-tab.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  background: var(--accent-soft);
}
.gal-tab-n {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  color: var(--dim);
}
.gal-tab.active .gal-tab-n { color: var(--accent); }

/* ── gallery grid ─────────────────────────── */
.gal-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}
.gal-grid--wide { grid-template-columns: repeat(5, 1fr); }
.gal-item {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
  cursor: zoom-in;
  aspect-ratio: 1;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.gal-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 320ms ease;
}
.gal-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 26px -14px var(--accent);
}
.gal-item:hover img { transform: scale(1.05); }
.gal-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 8px 5px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.82), transparent);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  color: #e5e5e5;
  text-align: left;
}
.gal-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--dim);
  line-height: 1.6;
}

/* ── lightbox ─────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 8px;
  padding: 40px 16px;
  background: rgb(6 6 8 / 0.93);
  backdrop-filter: blur(10px);
  animation: lb-fade 200ms ease;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-height: 100%;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 132px);
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ink);
}
.lightbox-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--muted);
}
.lb-count { color: var(--dim); }
.lightbox-nav {
  justify-self: center;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--elev);
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all 160ms ease;
}
.lightbox-nav:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 20px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--elev);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: all 160ms ease;
}
.lightbox-close:hover { color: #ff6b6b; border-color: #ff6b6b; }
body.modal-open { overflow: hidden; }

@media (max-width: 720px) {
  .name { font-size: 42px; }
  .knows-grid { grid-template-columns: 1fr; }
  .proj-card { grid-template-columns: 18px 1fr; }
  .proj-card-meta { grid-column: 2; margin-top: 2px; }
  .proj-card-year { display: none; }
  .photos { grid-template-columns: repeat(2, 1fr); }
  .bar   { grid-template-columns: 1fr 2fr auto; }
  .proj  { grid-template-columns: 20px 24px 1fr; }
  .proj .meta { display: none; }
  .topnav a { padding: 5px 7px; }
  /* topbar must never push the page wider than the viewport on phones */
  .topbar-inner { gap: 8px; overflow: hidden; }
  .topnav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { white-space: nowrap; }
  .cmd { min-width: 0; }
  .cmd input { min-width: 0; }
  .pricing-price { font-size: 24px; }
  .alloc-grid { grid-template-columns: 1fr 1fr; }
  .chars { grid-template-columns: 1fr; }
  .char-gallery { grid-template-columns: 1fr; }

  /* character page */
  .char-hero { grid-template-columns: 1fr; text-align: center; padding: 22px 18px; gap: 18px; }
  .char-hero-avatar { width: 148px; height: 148px; margin: 0 auto; }
  .char-name-big { font-size: 38px; }
  .char-hero-text .meta-row { justify-content: center; }
  .char-stats { justify-content: center; }
  .facts-grid { grid-template-columns: 1fr; }
  .gal-grid, .gal-grid--wide { grid-template-columns: repeat(2, 1fr); }
  .lightbox { grid-template-columns: 1fr; padding: 56px 12px 20px; }
  .lightbox-nav { position: absolute; bottom: 18px; }
  .lightbox-prev { left: 22px; }
  .lightbox-next { right: 22px; }
  .lightbox-figure img { max-height: calc(100vh - 150px); }
}
