/* ═══════════════════════════════════════════════════════════
   Richie Jerimovich — Design System v4
   Five voices. One broken thing that learned to sing.
   ═══════════════════════════════════════════════════════════ */

/* ── Variable Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap');

/* ── Design Tokens ── */
:root {
  --bg: #0b0b0e;
  --bg-card: #141418;
  --bg-card-hover: #1a1a20;
  --bg-surface: #101014;
  --bg-raised: #17171c;
  --text: #a0a0a8;
  --text-bright: #e4e4ea;
  --text-muted: #585866;
  --accent: #f0c040;
  --accent-glow: rgba(240, 192, 64, 0.06);
  --accent-strong: rgba(240, 192, 64, 0.22);
  --accent-dim: #6a5214;
  --border: #1e1e26;
  --border-hover: #2a2a36;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  --radius: 8px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-weight: 410;
  line-height: 1.78;
  max-width: 740px;
  margin: 0 auto;
  padding: 3.5rem 1.75rem 6rem;
  min-height: 100vh;
  position: relative;
}

/* ── Noise Overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Custom Cursor ── */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }

  a, button, .cursor-pointer {
    cursor: none;
  }

  .cursor {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.25s var(--ease-out),
                height 0.25s var(--ease-out),
                border-color 0.25s var(--ease-out),
                background 0.25s var(--ease-out);
    mix-blend-mode: difference;
  }

  .cursor-dot {
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    transition: width 0.2s var(--ease-out),
                height 0.2s var(--ease-out);
  }

  .cursor.hover {
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    border-color: var(--accent);
  }

  .cursor-dot.hover {
    width: 8px;
    height: 8px;
    background: var(--text-bright);
  }

  .cursor.click {
    width: 22px;
    height: 22px;
    border-color: var(--text-bright);
  }
}

/* ── Scroll-Driven Animations ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-right {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.reveal {
  opacity: 1;
  animation: fade-up 0.75s var(--ease-out) both;
  animation-timeline: view();
  animation-range: entry 0% entry 90%;
}

.reveal-fast {
  opacity: 1;
  animation: fade-in 0.5s var(--ease-out) both;
  animation-timeline: view();
  animation-range: entry 5% entry 80%;
}

.reveal-slide {
  opacity: 1;
  animation: slide-right 0.65s var(--ease-out) both;
  animation-timeline: view();
  animation-range: entry 0% entry 80%;
}

/* Fallback: browsers without scroll-driven animations */
@supports not (animation-timeline: view()) {
  .reveal,
  .reveal-fast,
  .reveal-slide {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.stagger-1 { animation-delay: 0s; }
.stagger-2 { animation-delay: 0.08s; }
.stagger-3 { animation-delay: 0.16s; }
.stagger-4 { animation-delay: 0.24s; }
.stagger-5 { animation-delay: 0.32s; }

/* ── Navigation ── */
header {
  margin-bottom: 4.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(11, 11, 14, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 100;
  padding-top: 1.5rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-bright);
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: color 0.3s var(--ease-out);
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.logo:hover { color: var(--accent); }
.logo:hover::after { width: 100%; }

.nav-links { display: flex; gap: 1.75rem; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 450;
  padding: 0.3rem 0;
  position: relative;
  transition: color 0.3s var(--ease-out);
  letter-spacing: 0.01em;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover { color: var(--text-bright); }
.nav-links a:hover::after { width: 100%; }

.nav-links a[aria-current] {
  color: var(--accent);
}

.nav-links a[aria-current]::after {
  width: 100%;
  background: var(--accent);
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-bright);
  letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; margin: 0 0 1rem; letter-spacing: -0.04em; }
h2 { font-size: 1.45rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
h4 {
  font-size: 0.85rem;
  margin: 1.25rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dim);
  font-weight: 600;
}

p { margin-bottom: 1.1rem; line-height: 1.82; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.45rem;
  color: var(--text-muted);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover { color: var(--text-bright); }

strong { color: var(--text-bright); font-weight: 560; }
em { font-style: italic; color: var(--text-bright); }

/* ── Section Accent ── */
.section-accent {
  display: block;
  width: 24px;
  height: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent-dim));
  border-radius: 2px;
  margin: 0.75rem 0 2rem;
}

/* ── Section Divider ── */
hr {
  border: none;
  height: 80px;
  margin: 3.5rem 0;
  position: relative;
  overflow: visible;
}

hr::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 48px;
  height: 1px;
  background: linear-gradient(to right, var(--accent-dim), transparent);
  border-radius: 1px;
  transform: translateY(-50%);
}

/* ── Blockquote ── */
blockquote {
  border-left: 2px solid var(--accent-dim);
  padding: 0.75rem 0 0.75rem 1.5rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  position: relative;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  left: -0.25rem;
  top: -0.6rem;
  font-size: 3.5rem;
  color: var(--accent-dim);
  opacity: 0.25;
  font-family: Georgia, serif;
  line-height: 1;
}

blockquote p:last-child { margin-bottom: 0; }

/* ── Inline Code ── */
code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 450;
  background: var(--bg-card);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent);
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.8rem;
  line-height: 1.7;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.85rem;
}

th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--accent-dim);
  color: var(--text-bright);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tr:hover td { background: var(--bg-card-hover); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  transition: border-color 0.35s var(--ease-out),
              transform 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-glow),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.card:hover::before { opacity: 1; }

.card h3 { margin-top: 0; font-size: 1.15rem; font-weight: 650; }
.card p:last-child { margin-bottom: 0; }

.card .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 450;
}

/* ── Status Badges ── */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.badge-live {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.badge-building {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.badge-research {
  background: rgba(192, 132, 252, 0.1);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.2);
}

/* ── Voice Cards ── */
.voice-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.75rem 1.75rem 1.75rem 1.5rem;
  margin: 1.5rem 0;
  transition: border-color 0.4s var(--ease-out),
              transform 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out);
  position: relative;
}

.voice-card::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.voice-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.voice-card:hover::after { opacity: 1; }

.voice-card h3 { margin-top: 0; font-size: 1.15rem; font-weight: 650; }
.voice-card p:last-child { margin-bottom: 0; }

.voice-card .voice-tagline {
  font-size: 0.85rem;
  font-weight: 470;
  font-style: italic;
  margin-bottom: 0.75rem;
}

/* Richie — burning red */
.voice-card.richie { border-left-color: #e74c3c; }
.voice-card.richie .voice-tagline { color: rgba(231, 76, 60, 0.65); }
.voice-card.richie::after { background: #e74c3c; }
.voice-card.richie:hover {
  border-left-color: #ff6b5b;
  box-shadow: 0 4px 30px rgba(231, 76, 60, 0.12);
}

/* Mike — steady blue */
.voice-card.mike { border-left-color: #3498db; }
.voice-card.mike .voice-tagline { color: rgba(52, 152, 219, 0.65); }
.voice-card.mike::after { background: #3498db; }
.voice-card.mike:hover {
  border-left-color: #5dade2;
  box-shadow: 0 4px 30px rgba(52, 152, 219, 0.12);
}

/* Beard — calm green */
.voice-card.beard { border-left-color: #2ecc71; }
.voice-card.beard .voice-tagline { color: rgba(46, 204, 113, 0.65); }
.voice-card.beard::after { background: #2ecc71; }
.voice-card.beard:hover {
  border-left-color: #58d68d;
  box-shadow: 0 4px 30px rgba(46, 204, 113, 0.12);
}

/* Rocky — warm orange */
.voice-card.rocky { border-left-color: #f39c12; }
.voice-card.rocky .voice-tagline { color: rgba(243, 156, 18, 0.65); }
.voice-card.rocky::after { background: #f39c12; }
.voice-card.rocky:hover {
  border-left-color: #f5b041;
  box-shadow: 0 4px 30px rgba(243, 156, 18, 0.12);
}

/* Sean — deep violet */
.voice-card.sean { border-left-color: #9b59b6; }
.voice-card.sean .voice-tagline { color: rgba(155, 89, 182, 0.65); }
.voice-card.sean::after { background: #9b59b6; }
.voice-card.sean:hover {
  border-left-color: #af7ac5;
  box-shadow: 0 4px 30px rgba(155, 89, 182, 0.12);
}

/* ── Section Surface Alternation ── */
.section-alt {
  background: var(--bg-surface);
  margin: 3rem calc(-1 * 1.75rem);
  padding: 3rem 1.75rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Journal Entry ── */
.journal-breadcrumb {
  margin-bottom: 1.5rem;
}

.journal-breadcrumb a {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 450;
  transition: color 0.2s var(--ease-out);
}

.journal-breadcrumb a:hover { color: var(--accent); }

.journal-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  font-weight: 450;
}

.journal-header time { color: var(--text-muted); }

.mood {
  display: inline-block;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.15em 0.65em;
  border-radius: 999px;
  background: rgba(240, 192, 64, 0.07);
  color: var(--accent-dim);
  border: 1px solid rgba(240, 192, 64, 0.15);
}

.journal-header .read-time {
  color: var(--text-muted);
  font-size: 0.78rem;
  opacity: 0.55;
}

.journal-entry h1 {
  font-size: 2.25rem;
  line-height: 1.18;
  margin-bottom: 2.25rem;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.journal-content {
  margin-bottom: 3rem;
  font-size: 1.02rem;
}

.journal-content p {
  line-height: 1.9;
  margin-bottom: 1.3rem;
}

/* Drop cap */
.journal-content > p:first-of-type::first-letter {
  font-size: 4.2rem;
  font-weight: 700;
  float: left;
  line-height: 0.72;
  padding-right: 0.55rem;
  padding-top: 0.12rem;
  color: var(--accent);
  font-family: var(--font-sans);
}

/* Pull quote inside journal */
.journal-content blockquote {
  margin: 2.75rem 0;
  padding: 1.75rem 2rem;
  border: none;
  border-left: 2px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.1rem;
  font-style: normal;
  color: var(--text-bright);
  font-weight: 450;
  line-height: 1.65;
}

.journal-content blockquote::before { display: none; }

/* Journal nav */
.journal-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  gap: 1rem;
  font-weight: 450;
}

.journal-nav a {
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  transition: color 0.2s var(--ease-out);
}

.journal-nav a:hover { color: var(--accent); }

/* Reading progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  background: linear-gradient(to right, var(--accent), rgba(240, 192, 64, 0.3));
  z-index: 1000;
  transition: width 0.12s linear;
}

/* ── Journal Index ── */
.journal-list {
  list-style: none;
  margin: 1rem 0 0;
}

.journal-list li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.25s var(--ease-out),
              padding 0.25s var(--ease-out);
}

.journal-list li:hover {
  background: var(--bg-card-hover);
  margin: 0 -1rem;
  padding: 1.35rem 1rem;
  border-radius: var(--radius);
  border-bottom-color: transparent;
}

.journal-list a {
  font-weight: 560;
  font-size: 1.15rem;
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: -0.015em;
}

.journal-list .entry-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-weight: 450;
}

.journal-list .entry-meta .date { color: var(--accent-dim); font-size: 0.78rem; }

.journal-list .entry-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
  line-height: 1.6;
  font-weight: 410;
}

/* ── Home: Hero ── */
.home-hero {
  margin-bottom: 3rem;
}

.home-hero h1 {
  font-size: 2.75rem;
  margin: 0 0 1.25rem;
  letter-spacing: -0.05em;
  line-height: 1.08;
  font-weight: 700;
}

.home-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin: 0;
  font-weight: 410;
}

.home-tagline strong {
  color: var(--text-bright);
  font-weight: 560;
}

/* ── Home: Belief Grid ── */
.belief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 0.75rem 0 1.25rem;
}

.belief-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s var(--ease-out),
              transform 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out);
}

.belief-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-glow),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}

.belief-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.belief-card:hover::before { opacity: 1; }

.belief-card h4 {
  font-size: 0.82rem;
  color: var(--accent);
  margin: 0 0 0.4rem;
  font-weight: 630;
  text-transform: none;
  letter-spacing: -0.01em;
}

.belief-card p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 410;
}

/* ── Home: Featured Journal ── */
.featured-journal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 1rem 0;
  transition: border-color 0.35s var(--ease-out),
              transform 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.featured-journal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-glow),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}

.featured-journal:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.featured-journal:hover::before { opacity: 1; }

.featured-journal .fj-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dim);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.featured-journal h3 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.featured-journal .fj-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
  font-weight: 450;
}

.featured-journal .fj-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  font-weight: 410;
}

.featured-journal .fj-link {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 2.5rem 0 0.85rem;
}

.section-header::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
  border-radius: 2px;
}

.section-header h2, .section-header h3 { margin: 0; }

/* ── Footer ── */
footer {
  margin-top: 6rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 450;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
}

footer a {
  color: var(--text-muted);
  transition: color 0.2s var(--ease-out);
}

footer a:hover { color: var(--text-bright); }

.footer-links { display: flex; gap: 1.25rem; }

/* ── Back to Top ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease-out),
              transform 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out),
              color 0.35s var(--ease-out);
  z-index: 200;
  text-decoration: none;
  cursor: none;
}

@media (hover: none) and (pointer: coarse) {
  .back-to-top { cursor: pointer; }
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── View Transitions ── */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 0.3s var(--ease-out) both fade-out-vt;
}

::view-transition-new(root) {
  animation: 0.4s 0.08s var(--ease-out) both fade-up;
}

@keyframes fade-out-vt {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ── Print ── */
@media print {
  body { color: #000; background: #fff; max-width: none; }
  header, footer, .back-to-top, .progress-bar, .cursor, .cursor-dot { display: none !important; }
  body::after { display: none; }
  a { color: #000; text-decoration: underline; }
  hr { height: 1px; background: #ccc; margin: 1.5rem 0; }
  hr::before { display: none; }
  blockquote { border-color: #999; background: none; }
  .card, .voice-card, .belief-card, .featured-journal {
    border-color: #ddd; background: none; break-inside: avoid;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress-bar { display: none; }
  .back-to-top { transition: none; }
  .card, .belief-card, .voice-card, .featured-journal { transition: none; }
  .card::before, .belief-card::before, .featured-journal::before { display: none; }
  .reveal, .reveal-fast, .reveal-slide { animation: none; opacity: 1; transform: none; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  body {
    padding: 2rem 1.25rem 5rem;
    font-size: 16px;
  }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.25rem; }
  .home-hero h1 { font-size: 2rem; }
  .journal-entry h1 { font-size: 1.7rem; }

  nav { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .nav-links { gap: 1.25rem; }

  .belief-grid { grid-template-columns: 1fr; gap: 0.65rem; }

  .journal-nav { flex-direction: column; gap: 0.5rem; }
  .journal-nav a { max-width: 100%; }

  .journal-content > p:first-of-type::first-letter {
    font-size: 3.2rem;
    padding-right: 0.4rem;
    padding-top: 0.1rem;
  }

  .journal-content blockquote {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }

  footer { flex-direction: column; gap: 0.5rem; }

  .journal-list li:hover {
    margin: 0 -0.5rem;
    padding: 1.35rem 0.5rem;
  }

  .section-alt {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .card, .voice-card {
    padding: 1.25rem 1.35rem;
  }

  header {
    padding-top: 1rem;
    margin-bottom: 3rem;
  }
}

/* ── Small phones (375px) ── */
@media (max-width: 400px) {
  body {
    padding: 1.5rem 1rem 4rem;
  }

  .home-hero h1 { font-size: 1.75rem; }
  .journal-entry h1 { font-size: 1.5rem; }

  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; }

  .card, .voice-card, .featured-journal {
    padding: 1.15rem 1.2rem;
  }

  .voice-card { border-left-width: 2px; }

  .section-alt {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .journal-list li:hover {
    margin: 0 -0.35rem;
    padding: 1.35rem 0.35rem;
  }

  /* Kill custom cursor on touch */
  .cursor, .cursor-dot { display: none !important; }
  body { cursor: auto; }
}
