/* site.css: shared tokens, base, header, page title and footer for the inner pages
   (about, projects, updates, media). Page-specific rules stay in each page's <style>.
   index.html and ludwig.html keep their own styles (landing animation, Ludwig identity). */

/* ─── Tokens ─── */
:root {
  --bg:      #0d0d0b;
  --surface: #151513;
  --border:  rgba(255,255,255,0.07);
  --rule-strong: rgba(255,255,255,0.12);
  --text:    #ede8df;
  --muted:   #8a877e;
  --dim:     #4a4844;
  --gold:    #b9a888;   /* accent: muted tan/khaki (name is a leftover) */
  --chip:    rgba(255,255,255,0.05);
  --hover:   rgba(237,232,223,0.035);
}
:root.light {
  --bg:      #f5f3ee;
  --surface: #edeae4;
  --border:  rgba(0,0,0,0.08);
  --rule-strong: rgba(0,0,0,0.14);
  --text:    #1a1916;
  --muted:   #63615a;
  --dim:     #a09c94;
  --gold:    #7d6b4f;
  --chip:    rgba(0,0,0,0.045);
  --hover:   rgba(26,25,22,0.03);
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}
.page {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
a:focus-visible, button:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

/* ─── Header (matches index) ─── */
.header { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.header-logo a { display: flex; align-items: center; text-decoration: none; }
.mark-wrap { width: 36px; }
.mark-svg { width: 100%; height: auto; display: block; }
.mark-svg .cls-1 { stroke: var(--text); fill: var(--text); transition: stroke 0.3s, fill 0.3s; }
.mark-svg path.p1 { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 30; }
.header-right { display: flex; align-items: center; gap: 20px; }
.theme-btn {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; color: var(--dim); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
:root.light .theme-btn { color: var(--muted); }
.theme-btn:hover { color: var(--gold); border-color: var(--gold); }
.header-nav { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); transition: color 0.15s;
}
.nav-link:hover { color: var(--gold); }
.nav-link.active { color: var(--text); }
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; width: 30px; height: 30px;
}
.hamburger span { display: block; width: 100%; height: 1px; background: var(--muted); transition: background 0.15s; }
.hamburger:hover span { background: var(--gold); }
.mobile-nav { display: none; flex-direction: column; border-top: 1px solid var(--border); padding: 8px 0; margin-bottom: 8px; }
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); padding: 12px 0; border-bottom: 1px solid var(--border); transition: color 0.15s;
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:hover { color: var(--gold); }
.mobile-nav-link.active { color: var(--text); }

/* ─── Page title + lede: one rhythm for every inner page ─── */
.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 400; letter-spacing: -0.02em;
  line-height: 1; color: var(--text);
  margin: 28px 0 44px;
}
.page-title em { color: var(--gold); }
.lede {
  font-family: 'Geist Mono', monospace; font-size: 13px; color: var(--muted);
  margin: -28px 0 44px;
}

/* ─── Footer (same typography as the landing page footer) ─── */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 22px 0 26px; margin-top: 96px;
  border-top: 1px solid var(--border);
}
.foot-brand { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.1em; color: var(--dim); }
:root.light .foot-brand { color: var(--muted); }
.foot-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.foot-links a {
  font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; display: flex; align-items: center; transition: color 0.15s;
}
.foot-links a:hover { color: var(--gold); }
.foot-links a[aria-current="page"] { color: var(--text); }

/* ─── Shared entrance ─── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .page { padding: 0 20px; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .page-title { margin: 16px 0 32px; }
  .lede { margin: -20px 0 36px; }
  .foot { margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
