/* ==========================================================================
   BASE STYLES, DESIGN TOKENS & COSMIC THEME ENGINE
   ========================================================================== */

:root {
  --bg-base: #060913;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-hover: rgba(30, 41, 59, 0.88);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-main: #f8fafc;
  --text-soft: #94a3b8;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-cyan: #38bdf8;
  --accent-emerald: #34d399;
  --accent-gold: #fbbf24;
  --accent-rose: #f43f5e;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
  --accent-glow: rgba(99, 102, 241, 0.28);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(248, 250, 252, 1);
  --border: #e2e8f0;
  --border-focus: #4f46e5;
  --text-main: #0f172a;
  --text-soft: #64748b;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-gold: #d97706;
  --accent-rose: #e11d48;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #0284c7 100%);
  --accent-glow: rgba(79, 70, 229, 0.16);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

*:focus, *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(6, 9, 19, 0.75) 0%, rgba(6, 9, 19, 0.98) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

[data-theme="light"] body {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(79, 70, 229, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(2, 132, 199, 0.05) 0%, transparent 45%),
    linear-gradient(to bottom, #ffffff 0%, #f1f5f9 100%);
  color: #0f172a;
}

#bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.85;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

[data-theme="light"] a:hover {
  color: #4f46e5;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main.container {
  flex: 1;
  padding-top: 1.75rem;
  padding-bottom: 4rem;
}

/* Lucide and SVG Defaults */
svg.lucide, i[data-lucide], span[data-lucide] {
  display: inline-flex;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin="round";
  flex-shrink: 0;
}

/* Theme Icons */
[data-theme="light"] .theme-icon-sun { display: none !important; }
[data-theme="light"] .theme-icon-moon { display: inline-block !important; }
:root:not([data-theme="light"]) .theme-icon-sun { display: inline-block !important; }
:root:not([data-theme="light"]) .theme-icon-moon { display: none !important; }

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(6, 9, 19, 0.95);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.6) 0%, rgba(56, 189, 248, 0.6) 100%);
  border-radius: 9999px;
}
