/* ----- Design tokens --------------------------------------------------- */

:root {
  color-scheme: light dark;

  --color-bg: #f7f4ee;
  --color-bg-deep: #ece6dc;
  --color-text: #1a1814;
  --color-muted: #6b6358;
  --color-accent: #b8472a;
  --color-accent-soft: rgba(184, 71, 42, 0.18);
  --color-border: rgba(26, 24, 20, 0.12);
  --color-chip-bg: rgba(255, 255, 255, 0.92);
  --color-chip-text: #1a1814;
  --color-chip-shadow: rgba(0, 0, 0, 0.18);

  --font-display: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;

  --shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.12);
  --shadow-stage: 0 12px 36px rgba(0, 0, 0, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14110d;
    --color-bg-deep: #0c0a07;
    --color-text: #f3ece0;
    --color-muted: #a89e8c;
    --color-accent: #e0764f;
    --color-accent-soft: rgba(224, 118, 79, 0.22);
    --color-border: rgba(243, 236, 224, 0.14);
    --color-chip-bg: rgba(28, 24, 19, 0.92);
    --color-chip-text: #f3ece0;
    --color-chip-shadow: rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover, a:focus-visible {
  text-decoration: underline;
}

/* ----- Site chrome (used on prose pages) ------------------------------- */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.site-header__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text);
}
.site-header__title span {
  color: var(--color-muted);
  font-style: italic;
  font-weight: 400;
}

.site-header__nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}
.site-header__nav a[aria-current="page"] {
  color: var(--color-text);
  border-bottom: 2px solid var(--color-accent);
}

.site-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}

/* ----- Prose pages (about, etc.) --------------------------------------- */

.page--text {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page--text main {
  flex: 1;
}

.prose {
  max-width: 42rem;
  padding: 2rem clamp(1rem, 4vw, 3rem) 4rem;
  line-height: 1.65;
  font-size: 1.05rem;
}
.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 2.5rem 0 0.5rem;
}
.prose code {
  background: var(--color-bg-deep);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}
.prose__back {
  margin-top: 3rem;
  font-size: 0.95rem;
}
