/* ============================================
   QUANT RESEARCHER PREP — Design Tokens

   Theme: "Signal & Noise"
   Deep space aesthetic inspired by terminal screens
   and the precision of quantitative research.
   ============================================ */

:root {
  /* ---- Core Palette ---- */
  --bg-primary: #060a10;
  --bg-secondary: #0b1018;
  --bg-card: #10151f;
  --bg-card-hover: #151c2a;
  --bg-elevated: #1a2335;
  --bg-surface: #0d1219;

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #8392a7;
  --text-muted: #4b5c72;
  --text-bright: #f1f5f9;
  --text-inverse: #060a10;

  /* Accent — Electric blue */
  --accent: #4c8bf5;
  --accent-hover: #3a78e4;
  --accent-light: rgba(76, 139, 245, 0.08);
  --accent-glow: rgba(76, 139, 245, 0.20);
  --accent-border: rgba(76, 139, 245, 0.30);

  /* Secondary — Emerald */
  --accent-green: #22c55e;
  --accent-green-light: rgba(34, 197, 94, 0.08);

  /* Gold */
  --accent-gold: #f5b731;
  --accent-gold-light: rgba(245, 183, 49, 0.08);

  /* Difficulty */
  --color-easy: #22c55e;
  --color-easy-bg: rgba(34, 197, 94, 0.08);
  --color-medium: #f5b731;
  --color-medium-bg: rgba(245, 183, 49, 0.08);
  --color-hard: #f43f5e;
  --color-hard-bg: rgba(244, 63, 94, 0.08);

  /* Tags */
  --tag-blue: #4c8bf5;
  --tag-blue-bg: rgba(76, 139, 245, 0.08);
  --tag-purple: #a78bfa;
  --tag-purple-bg: rgba(167, 139, 250, 0.08);
  --tag-teal: #2dd4bf;
  --tag-teal-bg: rgba(45, 212, 191, 0.08);
  --tag-pink: #f472b6;
  --tag-pink-bg: rgba(244, 114, 182, 0.08);

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.08);

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

  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;

  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* 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;
  --space-24: 6rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(76, 139, 245, 0.12);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width: 1280px;
  --nav-height: 52px;
  --sidebar-width: 260px;
}

/* ---- Light Theme Overrides ---- */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #f8fafc;
  --bg-surface: #f5f5f5;
  --bg-main: #f1f5f9;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-bright: #0f172a;
  --text-inverse: #ffffff;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);

  --accent-light: rgba(76, 139, 245, 0.06);
  --accent-glow: rgba(76, 139, 245, 0.12);

  --color-easy-bg: rgba(34, 197, 94, 0.1);
  --color-medium-bg: rgba(245, 183, 49, 0.1);
  --color-hard-bg: rgba(244, 63, 94, 0.1);

  --tag-blue-bg: rgba(76, 139, 245, 0.1);
  --tag-purple-bg: rgba(167, 139, 250, 0.1);
  --tag-teal-bg: rgba(45, 212, 191, 0.1);
  --tag-pink-bg: rgba(244, 114, 182, 0.1);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 40px rgba(76, 139, 245, 0.08);
}

/* Light theme: remove invert filter from logos */
[data-theme="light"] .logo-carousel__item img {
  filter: none;
}
[data-theme="light"] .logo-carousel__item-text {
  color: var(--text-secondary);
}

::selection {
  background: var(--accent);
  color: white;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }
