/* ─── Fonts (self-hosted, SIL OFL; latin subset) ──────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

/* ─── Tokens ──────────────────────────────────────────── */
:root {
  --background: oklch(96% 0.002 260);
  --card: oklch(98% 0.001 260);
  --foreground: oklch(18% 0.005 260);
  --muted: oklch(48% 0.005 260);
  --border: oklch(90% 0.002 260);
  --border-soft: oklch(94% 0.002 260);
  --primary: oklch(18% 0.005 260);
  --primary-fg: oklch(98% 0.001 260);
  --accent: oklch(50% 0.13 240);
  --accent-soft: oklch(50% 0.13 240 / 0.25);
  --accent-faint: oklch(50% 0.13 240 / 0.08);
  --ring: oklch(50% 0.13 240);

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px 0 oklch(18% 0.005 260 / 0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { color: var(--foreground); margin: 0; }
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
h2 { font-family: var(--sans); font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; line-height: 1.4; }

p { margin: 0.5rem 0; }
ul { margin: 0.5rem 0; padding-left: 1.1rem; }
li { margin: 0.3rem 0; color: var(--muted); }

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

/* ─── Layout ──────────────────────────────────────────── */
.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow { max-width: 44rem; }

main { padding-top: 5rem; padding-bottom: 5rem; min-height: calc(100vh - 8rem); }

/* ─── Site nav (fixed top) ────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: oklch(96% 0.002 260 / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .spiral {
  color: var(--accent);
  width: 22px;
  height: 22px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.brand:hover .spiral { opacity: 1; }

/* ─── Header nav links ────────────────────────────────── */
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--foreground);
}

/* ─── Skip link ───────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.85rem;
}
.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* ─── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2rem 0;
  background: var(--background);
}
.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-mark .brand { font-size: 1rem; }
.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--accent);
}
.footer-meta { display: flex; gap: 1.25rem; align-items: center; }
.footer-meta a, .footer-meta span {
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-meta a { text-decoration: none; }
.footer-meta a:hover { color: var(--accent); }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 720px) {
  main { padding-top: 4rem; padding-bottom: 3rem; }
}
