/*
  tokens.css
  ----------
  Every color, font, radius and spacing value on the site lives here.
  Restyle the site by changing these values. Nothing in main.js depends on them.

  Layout concept: a left-aligned ledger. A narrow label column on the left,
  content on the right, the way a research note or a resume is ruled.
  The drifting 3D forms are the one loud element. Everything else stays quiet.
*/
:root {
  /* Color: light theme (cool paper, navy ink, brass accent taken from the tie) */
  --bg: #f4f6f9;
  --bg-raised: #ffffff;
  --bg-sunken: #e9edf3;
  --ink: #0e1a2b;
  --ink-soft: #45546a;
  --ink-faint: #7a8799;
  --rule: #d5dbe5;
  --rule-strong: #b3bdcc;
  --accent: #8c6a1f;
  --accent-soft: #f0e7d2;
  --on-accent: #ffffff;
  --up: #1c7a4d;
  --up-soft: #dff1e7;
  --down: #b3362b;
  --down-soft: #f7e1de;
  --flat: #56657a;
  --flat-soft: #e4e9f0;
  --focus: #1f5fd1;
  --nav-bg: rgba(244, 246, 249, 0.82);
  --portrait-a: #dfe5ee;
  --portrait-b: #c6d0de;

  /* 3D forms (read by scene.js) */
  --shape-main: #b7c3d4;
  --shape-accent: #a87a1f;
  --shape-deep: #24364f;
  --shape-opacity: 0.9;

  /* Type */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.25rem;
  --text-hero: clamp(2.75rem, 1.6rem + 5.2vw, 5.25rem);

  /* Space and shape */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 22px;
  --page-max: 72rem;
  --label-col: 13rem;
}

/* Dark theme: follows the system unless the visitor picked light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1422;
    --bg-raised: #121e31;
    --bg-sunken: #08101b;
    --ink: #e9edf3;
    --ink-soft: #a9b5c6;
    --ink-faint: #7b889b;
    --rule: #223249;
    --rule-strong: #35496a;
    --accent: #d3b06a;
    --accent-soft: #2b2718;
    --on-accent: #0b1422;
    --up: #4cc38a;
    --up-soft: #0f2b21;
    --down: #f0796d;
    --down-soft: #351917;
    --flat: #a9b5c6;
    --flat-soft: #1a273b;
    --focus: #8ab4ff;
    --nav-bg: rgba(11, 20, 34, 0.8);
    --portrait-a: #1a2a43;
    --portrait-b: #101b2d;
    --shape-main: #2a3e5c;
    --shape-accent: #d3b06a;
    --shape-deep: #6f87ab;
    --shape-opacity: 0.85;
    color-scheme: dark;
  }
}

/* Dark theme: the visitor picked dark with the toggle */
:root[data-theme="dark"] {
  --bg: #0b1422;
  --bg-raised: #121e31;
  --bg-sunken: #08101b;
  --ink: #e9edf3;
  --ink-soft: #a9b5c6;
  --ink-faint: #7b889b;
  --rule: #223249;
  --rule-strong: #35496a;
  --accent: #d3b06a;
  --accent-soft: #2b2718;
  --on-accent: #0b1422;
  --up: #4cc38a;
  --up-soft: #0f2b21;
  --down: #f0796d;
  --down-soft: #351917;
  --flat: #a9b5c6;
  --flat-soft: #1a273b;
  --focus: #8ab4ff;
  --nav-bg: rgba(11, 20, 34, 0.8);
  --portrait-a: #1a2a43;
  --portrait-b: #101b2d;
  --shape-main: #2a3e5c;
  --shape-accent: #d3b06a;
  --shape-deep: #6f87ab;
  --shape-opacity: 0.85;
  color-scheme: dark;
}
