/* Design tokens. Dark is the default; light is opt-in from Settings. */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", "Inter", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 120ms;
  --dur: 220ms;
  --dur-slow: 420ms;

  --rail-width: 84px;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090b10;
  --bg-glow-a: rgba(108, 125, 255, 0.16);
  --bg-glow-b: rgba(56, 214, 196, 0.08);
  --bg-elev: #10131a;
  --bg-sunken: #07080c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --surface-solid: #131722;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --ink: #eceef4;
  --ink-2: #c7ccd8;
  --muted: #8e97a9;
  --subtle: #5d6577;
  --accent: #8d9bff;
  --accent-2: #b4bdff;
  --accent-ink: #0b0d1a;
  --accent-soft: rgba(141, 155, 255, 0.14);
  --good: #4ade80;
  --good-soft: rgba(74, 222, 128, 0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
  --glass: rgba(16, 19, 27, 0.72);
  --scrim: rgba(3, 4, 8, 0.62);
  --grain-opacity: 0.035;

  /* Category hues */
  --cat-study: #7ea6ff;
  --cat-build: #ff9f6e;
  --cat-neetcode: #c39bff;
  --cat-applications: #3fd8a0;
  --cat-interview: #5bd3ec;
  --cat-behavioral: #ff7fbf;
  --cat-review: #f5cf52;
  --cat-capstone: #ff7a8a;
  --cat-dataannotation: #9aa7bd;
  --cat-homework: #b8ad9f;
  --cat-personal: #d0d4de;
  --block-class: rgba(148, 163, 184, 0.1);
  --block-gym: rgba(63, 216, 160, 0.09);
  --block-meal: rgba(245, 207, 82, 0.08);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f8;
  --bg-glow-a: rgba(108, 125, 255, 0.12);
  --bg-glow-b: rgba(56, 214, 196, 0.08);
  --bg-elev: #ffffff;
  --bg-sunken: #eceef3;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(15, 23, 42, 0.045);
  --surface-3: rgba(15, 23, 42, 0.08);
  --surface-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.15);
  --ink: #12151d;
  --ink-2: #2c3240;
  --muted: #5e6678;
  --subtle: #8c93a3;
  --accent: #4f5ff0;
  --accent-2: #3a48d6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 95, 240, 0.1);
  --good: #16a34a;
  --good-soft: rgba(22, 163, 74, 0.1);
  --warn: #c2850b;
  --warn-soft: rgba(217, 152, 11, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.09);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 10px 30px -14px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 30px 80px -24px rgba(15, 23, 42, 0.3);
  --glass: rgba(255, 255, 255, 0.82);
  --scrim: rgba(15, 18, 28, 0.35);
  --grain-opacity: 0.02;

  --cat-study: #2f6bff;
  --cat-build: #e8692c;
  --cat-neetcode: #8a4ff0;
  --cat-applications: #0f9d6b;
  --cat-interview: #0b93b3;
  --cat-behavioral: #d63a8a;
  --cat-review: #b88a00;
  --cat-capstone: #e0435a;
  --cat-dataannotation: #5e6a80;
  --cat-homework: #85776a;
  --cat-personal: #5d6372;
  --block-class: rgba(100, 116, 139, 0.1);
  --block-gym: rgba(15, 157, 107, 0.08);
  --block-meal: rgba(184, 138, 0, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur: 0ms;
    --dur-slow: 0ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
