/* =============================================================
   shared.css — The Made Self
   Variables · Reset · Body · Nav · Animations
   Linked by every page on the site.
   ============================================================= */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:       #0e0d0c;
  --bg2:      #161513;
  --bg3:      #1e1c1a;
  --border:   rgba(255,255,255,0.07);
  --text:     #e8e4dc;
  --muted:    #7a7670;
  --accent:   #c9a96e;
  --accent2:  #8b6f47;
  --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'DM Sans', system-ui, sans-serif;
  --ease:     0.4s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg:       #f5f2ec;
  --bg2:      #ede9e1;
  --bg3:      #e4dfd5;
  --border:   rgba(0,0,0,0.08);
  --text:     #1a1917;
  --muted:    #7a7670;
  --accent:   #8b6030;
  --accent2:  #b8843f;
}

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

html {
  scroll-behavior: smooth;
}

/* ── Base ────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  transition: background var(--ease), color var(--ease);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 1000;
}

/* ── Navigation ──────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; z-index: 90;
  width: 100%;
  max-width: var(--max-w);
  padding: 22px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, var(--bg) 55%, transparent);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}
.nav-logo:hover { color: var(--text); }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: border-color var(--ease), color var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }

/* Sun/moon icon visibility */
.icon-sun                     { display: none; }
[data-theme="dark"] .icon-sun  { display: inline; }
[data-theme="dark"] .icon-moon { display: none; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; opacity: 1 !important; }
}
