/* ============================================================
   JOSHUA A. RUSOW — personal academic site
   Theme: "8-bit academia" — clean scholarly layout,
   handcrafted pixel accents. No frameworks, no images,
   one webfont (Press Start 2P, accents only).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* paper + ink (light mode) */
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #f3efe5;
  --ink: #1c1f33;
  --muted: #5b5f75;
  --line: #1c1f33;
  --shadow: rgba(28, 31, 51, 0.18);

  /* brand accents */
  --accent: #5246d6;            /* console indigo */
  --accent-soft: #e7e4fb;

  /* quest-line colors */
  --c-heart: #d9455f;           /* mental health */
  --c-shield: #b97c0a;          /* relationships & violence prevention */
  --c-chip: #0f8b8d;            /* digital health + AI */
  --c-flask: #3e8e41;           /* sexual health & HIV */

  --c-heart-soft: #fbe9ec;
  --c-shield-soft: #f8efdc;
  --c-chip-soft: #e2f3f3;
  --c-flask-soft: #e6f2e6;

  /* pride strip */
  --pride: linear-gradient(90deg,
    #e40303 0 16.6%, #ff8c00 16.6% 33.3%, #f5c400 33.3% 50%,
    #008026 50% 66.6%, #24408e 66.6% 83.3%, #732982 83.3% 100%);

  --font-px: "Press Start 2P", "Courier New", monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1080px;
  --radius: 0px;                /* pixels have corners */
}

[data-theme="dark"] {
  --bg: #12141f;
  --surface: #1b1e2e;
  --surface-2: #232740;
  --ink: #eceaf6;
  --muted: #a6a9c0;
  --line: #eceaf6;
  --shadow: rgba(0, 0, 0, 0.55);

  --accent: #8d83f0;
  --accent-soft: #2b2d4d;

  --c-heart: #ff7e95;
  --c-shield: #ffb84d;
  --c-chip: #46cfd2;
  --c-flask: #6fd97a;

  --c-heart-soft: #38222b;
  --c-shield-soft: #382e1c;
  --c-chip-soft: #1b3537;
  --c-flask-soft: #1e3320;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 100; font-family: var(--font-px); font-size: 0.7rem;
}
.skip-link:focus { left: 8px; top: 8px; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Pixel primitives ---------- */
.px-label {
  font-family: var(--font-px);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.8;
}

.eyebrow {
  font-family: var(--font-px);
  font-size: 0.66rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.px-card {
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
}

.pride-rule {
  height: 4px;
  background: var(--pride);
  border: 0;
  margin: 0;
}

.btn {
  display: inline-block;
  font-family: var(--font-px);
  font-size: 0.7rem;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 18px 12px;
  border: 3px solid var(--line);
  background: var(--ink);
  color: var(--bg);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { color: var(--bg); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }

.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 3px solid var(--line);
}
.site-head .bar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  max-width: var(--wrap); margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-px); font-size: 0.72rem;
  letter-spacing: 0.02em;
  margin-right: auto;
  white-space: nowrap;
}
.brand:hover { color: var(--accent); }
.brand svg { width: 26px; height: 22px; flex: none; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-family: var(--font-px); font-size: 0.62rem;
  text-decoration: none; color: var(--ink);
  padding: 10px 10px 8px;
  border-bottom: 4px solid transparent;
  text-transform: uppercase;
}
.site-nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.theme-toggle, .nav-toggle {
  background: transparent; border: 3px solid var(--line);
  color: var(--ink); cursor: pointer;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  box-shadow: 3px 3px 0 var(--shadow);
  flex: none;
}
.theme-toggle:active, .nav-toggle:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon, [data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 3px; background: var(--ink); position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 840px) {
  .nav-toggle { display: grid; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 3px solid var(--line);
    padding: 8px 12px 14px;
  }
  .site-nav a { border-bottom: 0; border-left: 4px solid transparent; padding: 14px 10px; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-left-color: var(--accent); }
  .nav-open .site-nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; }
.hero .cols {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 40px; align-items: center;
}
.hero h1 { margin-bottom: 10px; }
.hero .tagline { font-size: 1.2rem; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 0; }

.hero-art { justify-self: center; }
.hero-art svg { width: min(250px, 56vw); height: auto; }

.status-line {
  font-family: var(--font-px);
  font-size: 0.6rem;
  line-height: 2.1;
  color: var(--muted);
  margin-top: 28px;
  overflow-wrap: anywhere;
}
.status-line b { color: var(--c-flask); font-weight: 400; }

@media (max-width: 760px) {
  .hero { padding: 40px 0 32px; }
  .hero .cols { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { order: -1; }
  .hero-art svg { width: 140px; }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.hero-art .beat { animation: heartbeat 2.4s steps(2, jump-none) infinite; transform-origin: 50% 45%; }

/* ---------- HUD stats ---------- */
.hud {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin: 8px 0 0;
}
.hud .stat {
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--shadow);
  padding: 18px 16px 14px;
  text-align: center;
}
.hud .num {
  font-family: var(--font-px);
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  display: block; margin-bottom: 8px;
  color: var(--accent);
}
.hud .lbl {
  font-family: var(--font-px); font-size: 0.55rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  line-height: 1.7;
}
.hud-caption { text-align: right; margin-top: 10px; }
@media (max-width: 720px) {
  .hud { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0 16px; }
.section-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.section-head .more {
  font-family: var(--font-px); font-size: 0.62rem;
  margin-left: auto; text-decoration: none; text-transform: uppercase;
}
.section-head .more:hover { text-decoration: underline; }

/* ---------- Quest cards (research areas) ---------- */
.quests {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.quest {
  position: relative;
  display: block;
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 22px 22px 18px;
  text-decoration: none; color: var(--ink);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.quest:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--shadow); color: var(--ink); }
.quest .icon { width: 52px; height: 52px; margin-bottom: 14px; }
.quest h3 { margin-bottom: 6px; }
.quest p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.quest .go {
  font-family: var(--font-px); font-size: 0.58rem;
  margin-top: 14px; display: inline-block; text-transform: uppercase;
}
.quest[data-area="heart"]  { border-top: 8px solid var(--c-heart); }
.quest[data-area="shield"] { border-top: 8px solid var(--c-shield); }
.quest[data-area="chip"]   { border-top: 8px solid var(--c-chip); }
.quest[data-area="flask"]  { border-top: 8px solid var(--c-flask); }
.quest[data-area="heart"] .go,  .quest[data-area="heart"] .icon  { color: var(--c-heart); }
.quest[data-area="shield"] .go, .quest[data-area="shield"] .icon { color: var(--c-shield); }
.quest[data-area="chip"] .go,   .quest[data-area="chip"] .icon   { color: var(--c-chip); }
.quest[data-area="flask"] .go,  .quest[data-area="flask"] .icon  { color: var(--c-flask); }

/* research page: area sections */
.area-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.area-section { padding-top: 24px; margin-top: 28px; border-top: 3px solid var(--line); }
.area-section .area-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.area-section .area-head svg { width: 40px; height: 40px; flex: none; }
.area-section .area-head h2 { margin: 0; }
.area-section[data-area="heart"]  .area-head svg { color: var(--c-heart); }
.area-section[data-area="shield"] .area-head svg { color: var(--c-shield); }
.area-section[data-area="chip"]   .area-head svg { color: var(--c-chip); }
.area-section[data-area="flask"]  .area-head svg { color: var(--c-flask); }
.findings { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.findings li { padding: 12px 16px; background: var(--surface); border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--shadow); font-size: 0.95rem; }
.findings li::before { content: "▸ "; font-family: var(--font-px); font-size: 0.7em; }
.area-section[data-area="heart"]  .findings li::before { color: var(--c-heart); }
.area-section[data-area="shield"] .findings li::before { color: var(--c-shield); }
.area-section[data-area="chip"]   .findings li::before { color: var(--c-chip); }
.area-section[data-area="flask"]  .findings li::before { color: var(--c-flask); }
.repwork { font-size: 0.9rem; color: var(--muted); }
.repwork a { text-decoration: none; }
.repwork a:hover { text-decoration: underline; }
@media (max-width: 720px) { .quests { grid-template-columns: 1fr; } }

/* ---------- Project cards ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.project h3 { margin: 0; font-size: 1.05rem; }
.project p { margin: 0; font-size: 0.92rem; color: var(--muted); flex: 1; }
.chip {
  align-self: flex-start;
  font-family: var(--font-px); font-size: 0.52rem;
  padding: 6px 8px 4px;
  border: 2px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--surface-2);
}
.chip.live   { background: var(--c-flask-soft); color: var(--c-flask); border-color: var(--c-flask); }
.chip.review { background: var(--c-shield-soft); color: var(--c-shield); border-color: var(--c-shield); }
.chip.team   { background: var(--c-chip-soft); color: var(--c-chip); border-color: var(--c-chip); }
@media (max-width: 860px) { .projects { grid-template-columns: 1fr; } }

/* ---------- Publication list ---------- */
.pub-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 26px; }
.filter-chip {
  font-family: var(--font-px); font-size: 0.56rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 9px 10px 7px;
  cursor: pointer;
}
.filter-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filter-chip:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow); }
.pub-count { margin-left: auto; font-family: var(--font-px); font-size: 0.6rem; color: var(--muted); }

.year-block { margin: 0 0 8px; }
.year-tag {
  font-family: var(--font-px); font-size: 0.85rem;
  color: var(--accent);
  margin: 26px 0 14px;
  display: flex; align-items: center; gap: 14px;
}
.year-tag::after { content: ""; height: 3px; background: var(--line); flex: 1; opacity: 0.15; }

ul.pubs { list-style: none; margin: 0; padding: 0; }
.pub {
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 16px 18px;
  margin: 0 0 14px;
  font-size: 0.95rem;
}
.pub .cite { margin: 0 0 8px; }
.pub .cite .me { font-weight: 800; }
.pub .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub .doi {
  font-family: var(--font-px); font-size: 0.52rem;
  text-decoration: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 5px 7px 3px;
  text-transform: uppercase;
}
.pub .doi:hover { background: var(--accent); color: #fff; }
.tag {
  font-family: var(--font-px); font-size: 0.5rem;
  padding: 5px 7px 3px;
  border: 2px solid;
  text-transform: uppercase;
}
.tag.heart  { color: var(--c-heart);  border-color: var(--c-heart);  background: var(--c-heart-soft); }
.tag.shield { color: var(--c-shield); border-color: var(--c-shield); background: var(--c-shield-soft); }
.tag.chip-t { color: var(--c-chip);   border-color: var(--c-chip);   background: var(--c-chip-soft); }
.tag.flask  { color: var(--c-flask);  border-color: var(--c-flask);  background: var(--c-flask-soft); }
.pub.hidden, .year-block.hidden { display: none; }

.legend { font-size: 0.875rem; color: var(--muted); margin-bottom: 6px; }

/* ---------- Course / teaching cards ---------- */
.courses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.course {
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 22px;
}
.course .when { font-family: var(--font-px); font-size: 0.55rem; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.course h3 { margin-bottom: 8px; }
.course p { font-size: 0.95rem; color: var(--muted); margin-bottom: 0; }
.course .hl { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .courses { grid-template-columns: 1fr; } }

.quote {
  border-left: 8px solid var(--accent);
  background: var(--surface);
  border-top: 3px solid var(--line); border-right: 3px solid var(--line); border-bottom: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 22px 26px;
  margin: 0 0 30px;
  font-size: 1.15rem;
}

/* ---------- Timeline (level map) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 4px; background: var(--line); opacity: 0.25;
}
.timeline li { position: relative; padding: 0 0 26px 42px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 16px; height: 16px;
  background: var(--accent);
  border: 3px solid var(--line);
  box-shadow: 2px 2px 0 var(--shadow);
}
.timeline li.lvl-up::before { background: var(--c-shield); }
.timeline .t-when { font-family: var(--font-px); font-size: 0.6rem; color: var(--accent); display: block; margin-bottom: 4px; }
.timeline h3 { margin-bottom: 2px; font-size: 1.05rem; }
.timeline p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Explainer (study guide) styles ---------- */
.cartridges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cartridge {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 0 0 18px;
  text-decoration: none; color: var(--ink);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
a.cartridge:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--shadow); color: var(--ink); }
.cartridge .top {
  height: 14px; border-bottom: 3px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--surface-2) 0 10px, var(--surface) 10px 20px);
}
.cartridge .body { padding: 6px 18px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cartridge h3 { margin: 0; font-size: 1.02rem; }
.cartridge .sub { font-size: 0.85rem; color: var(--muted); flex: 1; }
.cartridge .meta-line { font-family: var(--font-px); font-size: 0.5rem; color: var(--muted); text-transform: uppercase; }
.cartridge.soon { opacity: 0.62; border-style: dashed; box-shadow: none; }
@media (max-width: 860px) { .cartridges { grid-template-columns: 1fr; } }

.guide-head { padding: 48px 0 8px; }
.guide-head .paper-meta { font-size: 0.95rem; color: var(--muted); }

.tldr {
  background: var(--accent-soft);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 22px 24px;
  margin: 26px 0 34px;
}
.tldr .px-label { color: var(--accent); display: block; margin-bottom: 8px; }
.tldr p { margin: 0; font-size: 1.1rem; }

.guide h2 {
  font-family: var(--font-px); font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin: 42px 0 16px;
}
.guide { max-width: 760px; }

.stat-callouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.stat-callout {
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 16px 14px 12px;
  text-align: center;
}
.stat-callout .big { font-family: var(--font-px); font-size: 1.15rem; display: block; margin-bottom: 8px; }
.stat-callout .what { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.stat-callout.heart .big { color: var(--c-heart); }
.stat-callout.shield .big { color: var(--c-shield); }
.stat-callout.chip-c .big { color: var(--c-chip); }
.stat-callout.flask .big { color: var(--c-flask); }
@media (max-width: 640px) { .stat-callouts { grid-template-columns: 1fr; } }

.support-box {
  background: var(--c-heart-soft);
  border: 3px solid var(--c-heart);
  padding: 18px 22px;
  margin: 34px 0;
  font-size: 0.95rem;
}
.support-box .px-label { color: var(--c-heart); display: block; margin-bottom: 6px; }
.support-box p { margin: 0; }

.cite-box {
  background: var(--surface-2);
  border: 2px dashed var(--line);
  padding: 16px 20px;
  font-size: 0.875rem;
  margin: 30px 0;
}
.cite-box .px-label { display: block; margin-bottom: 6px; color: var(--muted); }

/* ---------- About / contact ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

.side-card { padding: 22px; }
.side-card h3 { font-family: var(--font-px); font-size: 0.7rem; color: var(--accent); text-transform: uppercase; }
.side-card ul { margin: 0; padding: 0; list-style: none; }
.side-card li { padding: 8px 0; border-bottom: 2px dotted var(--shadow); font-size: 0.95rem; }
.side-card li:last-child { border-bottom: 0; }
.side-card a { text-decoration: none; }
.side-card a:hover { text-decoration: underline; }

.service-list { columns: 2; column-gap: 36px; margin: 0; padding-left: 20px; font-size: 0.95rem; }
.service-list li { margin-bottom: 10px; break-inside: avoid; }
@media (max-width: 720px) { .service-list { columns: 1; } }

/* ---------- Footer ---------- */
.site-foot { margin-top: 72px; border-top: 3px solid var(--line); background: var(--surface); }
.site-foot .inner {
  max-width: var(--wrap); margin: 0 auto; padding: 30px 20px 40px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
}
.site-foot .who { margin-right: auto; max-width: 30em; }
.site-foot .who strong { font-family: var(--font-px); font-size: 0.7rem; }
.site-foot nav { display: flex; flex-direction: column; gap: 6px; }
.site-foot nav a { font-size: 0.9rem; text-decoration: none; }
.site-foot nav a:hover { text-decoration: underline; }
.site-foot .foot-label { font-family: var(--font-px); font-size: 0.55rem; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.site-foot .colophon { width: 100%; font-size: 0.8rem; color: var(--muted); border-top: 2px dotted var(--shadow); padding-top: 16px; }
.foot-heart { display: inline-block; vertical-align: -2px; }

/* ---------- CRT mode (footer toggle) ---------- */
.crt-toggle {
  font-family: var(--font-px);
  font-size: 0.55rem;
  background: var(--surface);
  color: var(--muted);
  border: 2px solid var(--muted);
  padding: 5px 8px 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.crt-toggle:hover { color: var(--ink); border-color: var(--ink); }
.crt-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

body.crt::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(18, 16, 16, 0) 0 2px, rgba(0, 0, 0, 0.14) 2px 4px);
  mix-blend-mode: multiply;
}
body.crt { filter: saturate(1.25) contrast(1.05); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 10000;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-px); font-size: 0.62rem;
  padding: 14px 18px;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 3px var(--shadow);
  text-align: center;
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .site-head, .site-foot, .pub-tools, .btn, .hero .cta { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .pub, .px-card, .quest, .course, .project { box-shadow: none; border-width: 1px; }
  a { color: #000; text-decoration: none; }
}
