/* ═══ STRUCTURAL TOKENS ═══ */
/* Single source — not duplicated per theme */

:root {
  --font-display: 'Domine', Georgia, serif;
  --font-body: 'Rubik', -apple-system, 'Lato', 'Open Sans', BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif;
  --font-ui: 'Barlow', sans-serif;
  --font-logo: 'Rajdhani', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ═══ LIGHT THEME ═══ */

[data-theme="light"] {
  /* Backgrounds */
  --bg: #fff;
  --bg-elevated: #f8f8f8;
  --bg-subtle: #f7f7f7;
  --bg-input: #fff;
  --bg-code: #1b1d1f;
  --bg-code-inline: #f5f5f5;
  --bg-kbd: #f7f7f7;
  --bg-selection: #fef9c3;
  --bg-mark: rgba(0, 183, 255, 0.1);
  --bg-gradient-base: 255, 255, 255;

  /* Text */
  --text: #303133;
  --text-heading: #1b1d1f;
  --text-bold: #111;
  --text-secondary: #555;
  /* WCAG AA on white: #6D6D6D = 5.0:1, #767676 = 4.54:1. Previous values
     (#999, #bbb) failed axe at 2.84:1 and 1.91:1 respectively. */
  --text-muted: #6D6D6D;
  --text-dim: #666;
  --text-faint: #767676;
  --text-code: #c7254e;
  --text-code-block: #e0e0e0;

  /* Borders */
  --border: #e0e0e0;
  --border-strong: #dddddd;
  --border-kbd: #d0d0d0;

  /* Shadows */
  --shadow-card: rgba(230, 230, 230, 1);
  --shadow-subtle: rgba(0, 0, 0, 0.06);
  --shadow-overlay: rgba(0, 0, 0, 0.4);

  /* Accent & brand */
  --accent: #ff4d00;
  /* Darker accent for inline text/links on light backgrounds. Pure
     --accent (#ff4d00) is 3.37:1 on #fff and 3.13:1 on #f8f8f8 — below
     AA's 4.5:1 for normal text. --accent-text (#B83A00) is ~5.2:1 on
     white. */
  --accent-text: #B83A00;
  --social-substack: #FF6719;
  --social-linkedin: #0A66C2;
  --social-github: #0FBF3E;

  /* Fixed */
  --white: #fff;
}

/* ═══ DARK THEME ═══ */

[data-theme="dark"] {
  /* Backgrounds */
  --bg: #121212;
  --bg-elevated: #1e1e1e;
  --bg-subtle: #1a1a1a;
  --bg-input: #1e1e1e;
  --bg-code: #1b1d1f;
  --bg-code-inline: #1e1e1e;
  --bg-kbd: #1e1e1e;
  --bg-selection: #fef9c3;
  --bg-mark: rgba(0, 183, 255, 0.2);
  --bg-gradient-base: 18, 18, 18;

  /* Text */
  --text: #e0e0e0;
  --text-heading: #e0e0e0;
  --text-bold: #fff;
  --text-secondary: #aaa;
  --text-muted: #777;
  --text-dim: #555;
  --text-faint: #666;
  --text-code: #e07070;
  --text-code-block: #e0e0e0;

  /* Borders */
  --border: #2a2a2a;
  --border-strong: #333;
  --border-kbd: #444;

  /* Shadows */
  --shadow-card: rgba(0, 0, 0, 0.4);
  --shadow-subtle: rgba(0, 0, 0, 0.3);
  --shadow-overlay: rgba(0, 0, 0, 0.4);

  /* Accent & brand */
  --accent: #ff4d00;
  /* --accent on dark #121212 is ~5.4:1 — passes AA directly, so
     --accent-text mirrors --accent in dark mode. */
  --accent-text: #ff4d00;
  --social-substack: #FF6719;
  --social-linkedin: #0A66C2;
  --social-github: #0FBF3E;
}
