/* ═══════════════════════════════════════
   site.css — Shared styles for all pages
   ═══════════════════════════════════════ */

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

:root {
  --bg: #121215;
  --bg-elevated: #18181b;
  --text: #d0cdc6;
  --text-bright: #e8e5de;
  --text-muted: #6b6860;
  --accent: #b5a07a;
  --accent-dim: #7d6f55;
  --accent-soft: #a89570;
  --accent-glow: rgba(181, 160, 122, 0.05);
  --border: #1e1d1a;
  --border-warm: #2a2518;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --cjk: 'Noto Serif SC', serif;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2e #121215;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(181, 160, 122, 0.2);
  color: var(--text-bright);
}

/* ─── Navigation ─── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(18, 18, 21, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}

nav.scrolled { padding: 0.8rem 2rem; }

.nav-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-title span { color: #3a3830; margin: 0 0.4rem; }

.nav-author {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-author:hover { color: var(--accent-soft); }

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}

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

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

/* ─── Mobile Menu ─── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.3s;
  line-height: 1;
}

.menu-toggle:hover { color: var(--text-bright); }

/* ─── Page Header ─── */
.page-header {
  padding: 10rem 2rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.page-header h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ─── Sections ─── */
section {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-warm), transparent);
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.8rem;
  color: var(--text-bright);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

p {
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

p.lead {
  font-size: 1.1rem;
  color: var(--text-bright);
  line-height: 1.9;
}

/* ─── Divider ─── */
.divider {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-warm), transparent);
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

footer span {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

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

.footer-links a {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent-soft); }

/* ─── Mobile ─── */
@media (max-width: 768px) {
  html { font-size: 16px; }

  nav {
    padding: 1rem 1.2rem;
    flex-wrap: wrap;
  }

  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    font-size: 0.72rem;
    padding: 0.3rem 0;
  }

  /* Story page nav layout */
  .nav-left { flex: 1; }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .nav-right .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(18, 18, 21, 0.95);
    backdrop-filter: blur(12px);
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-top: 0;
    z-index: 100;
  }

  .font-sizer { display: none; }

  .page-header {
    padding: 7rem 1.5rem 3rem;
  }

  .page-header h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  section { padding: 2rem 1.5rem 4rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
