:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Font sizes — fluid scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --container-max: 1100px;
  --container-narrow: 680px;
  --border-radius: 8px;
  --border-radius-sm: 4px;

  /* Light theme (default) */
  --color-bg: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-code: #f1f5f9;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-bg: #eff6ff;
  --color-accent-light: #dbeafe;

  /* Gradient accents */
  --gradient-primary: linear-gradient(135deg, #2563eb, #7c3aed);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --gradient-cool: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-subtle: linear-gradient(135deg, #f8fafc, #eff6ff);

  /* Category colors (all pass WCAG AA 4.5:1 on white and their bg) */
  --color-cat-ai: #6d28d9;
  --color-cat-ai-bg: #f5f3ff;
  --color-cat-llm: #1d4ed8;
  --color-cat-llm-bg: #eff6ff;
  --color-cat-tools: #0e7490;
  --color-cat-tools-bg: #ecfeff;
  --color-cat-infra: #047857;
  --color-cat-infra-bg: #ecfdf5;
  --color-cat-making: #be123c;
  --color-cat-making-bg: #fff1f2;
  --color-cat-career: #b45309;
  --color-cat-career-bg: #fffbeb;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0a0a0a;
    --color-bg-secondary: #111111;
    --color-bg-code: #161616;
    --color-text: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #848e9c;
    --color-border: #1e293b;
    --color-border-light: #162032;
    --color-accent: #3b82f6;
    --color-accent-hover: #60a5fa;
    --color-accent-bg: #172554;
    --color-accent-light: #1e3a5f;

    --gradient-subtle: linear-gradient(135deg, #0f172a, #172554);

    /* Dark mode category colors — lighter tints for contrast on dark backgrounds */
    --color-cat-ai: #a78bfa;
    --color-cat-ai-bg: #2e1065;
    --color-cat-llm: #60a5fa;
    --color-cat-llm-bg: #172554;
    --color-cat-tools: #22d3ee;
    --color-cat-tools-bg: #164e63;
    --color-cat-infra: #34d399;
    --color-cat-infra-bg: #064e3b;
    --color-cat-making: #fb7185;
    --color-cat-making-bg: #4c0519;
    --color-cat-career: #fbbf24;
    --color-cat-career-bg: #451a03;
  }
}
