/* CSS Custom Properties */
:root {
  --bg-primary: #06080c;
  --bg-secondary: #0c1018;
  --bg-tertiary: #111822;
  --bg-card: #0f1520;
  --bg-card-hover: #141c2a;
  --text-primary: #d8d4cc;
  --text-secondary: #9a958c;
  --text-dim: #5c584f;
  --accent: #c4956a;
  --accent-light: #dbb89a;
  --accent-dim: #7a5d42;
  --blue: #5b7fa6;
  --blue-dim: #2a3d52;
  --green: #6a9a7a;
  --red: #a66a5b;
  --border: #1a2333;
  --border-light: #253045;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html.light {
  --bg-primary: #f5f1eb;
  --bg-secondary: #ece7df;
  --bg-tertiary: #e3ddd4;
  --bg-card: #eae5dc;
  --bg-card-hover: #e0dad0;
  --text-primary: #2a2520;
  --text-secondary: #5c554a;
  --text-dim: #9a938a;
  --accent: #8a6340;
  --accent-light: #6b4c2e;
  --accent-dim: #b89470;
  --blue: #3d6590;
  --blue-dim: #b5c8dc;
  --green: #3d7a52;
  --red: #904040;
  --border: #d4cec4;
  --border-light: #c0b8ac;
}

html.light ::selection {
  background: #d4b896;
  color: #2a2520;
}

html.light nav {
  background: rgba(245, 241, 235, 0.88);
}

html.light .hero-equation {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--accent);
}

html.light .hero-bg canvas {
  opacity: 0.08;
}

html.light .zone-safe { background: #5a9a6a; }
html.light .zone-weak { background: #7a9a5a; }
html.light .zone-caution { background: #b0a04a; }
html.light .zone-problem { background: #c0784a; }
html.light .zone-critical { background: #b04a4a; }

html.light .threshold-zone { color: #fff; }

html.light .code-block {
  background: #e3ddd4;
  border-color: var(--border);
}

html.light .code-block .comment { color: #9a938a; }
html.light .code-block .keyword { color: #3d6590; }
html.light .code-block .string { color: #3d7a52; }
html.light .code-block .func { color: #8a6340; }

html.light .modal-overlay {
  background: rgba(42, 37, 32, 0.4);
}

html.light .modal-panel {
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

html.light .modal-badge.status-validated { background: rgba(61,122,82,0.08); }
html.light .modal-badge.status-plausible { background: rgba(138,99,64,0.08); }
html.light .modal-badge.group-badge { background: rgba(61,101,144,0.08); }

html.light .nav-logo {
  filter: brightness(0.6) saturate(1.2);
}

html.light .quote-block {
  border-left-color: var(--accent);
  background: rgba(138, 99, 64, 0.05);
}

html.light .evidence-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

html.light .contact-link {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

html.light .synergy-step {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

html.light .context-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

nav, .problem-card, .evidence-card, .domain-tag, .code-block,
.synergy-step, .contact-link, .context-card, .quote-block,
.equation-block, .modal-panel {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
