/* ==========================================================================
   AlgoHub SMC - Global Styles & Design System (Dark SaaS Tech Theme)
   File: style.css (Variables, Typography, Reset)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@500;700;800&display=swap');

:root {
  /* Enterprise Tech Color Palette */
  --bg-dark: #0f172a;             /* Slate 900 - Professional Dark */
  --bg-surface: #1e293b;          /* Slate 800 - Cards/Surfaces */
  --bg-surface-elevated: #334155; /* Slate 700 - Modals/Dropdowns */
  
  --primary: #2563eb;             /* Enterprise Blue 600 */
  --primary-hover: #1d4ed8;       /* Enterprise Blue 700 */
  --secondary: #64748b;           /* Slate 500 - Professional Gray */
  --secondary-hover: #475569;     /* Slate 600 */
  --accent: #0ea5e9;              /* Sky Blue 500 - Highlights */
  
  --white: #ffffff;
  --black: #000000;
  
  /* Text Colors */
  --text-main: #f8fafc;           /* Crisp White */
  --text-muted: #94a3b8;          /* Slate 400 */
  --text-dark: #1e293b;           /* Inverse text */
  
  /* UI Colors */
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);
  --border-glow: rgba(37, 99, 235, 0.4);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing System */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-xxl: 8rem;

  /* Shadows (Glows for dark mode) */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
  --glow-primary: 0 0 20px rgba(37, 99, 235, 0.3);
  --glow-secondary: 0 0 20px rgba(100, 116, 139, 0.3);
  
  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-dark) !important;
  background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

img {
  max-width: 100%;
  height: auto;
}

/* Bootstrap Background Overrides (Crucial for applying dark mode without editing all HTML files manually if they use Bootstrap bg-* classes) */
.bg-white, .bg-light, .bg-light-gray { 
    background-color: var(--bg-surface) !important; 
}
.text-dark { color: var(--text-dark) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary-dark { background-color: var(--bg-dark) !important; }
.bg-primary { background-color: rgba(6, 182, 212, 0.1) !important; }
.bg-secondary { background-color: var(--secondary) !important; }

/* Navbar Overrides for Dark Theme */
.navbar-brand { color: var(--white) !important; }
.nav-link { color: var(--text-muted) !important; transition: color var(--transition-fast); }
.nav-link:hover, .nav-link:focus, .nav-link.active { color: var(--primary) !important; text-shadow: 0 0 8px rgba(6, 182, 212, 0.4); }
.navbar-toggler-icon { filter: invert(1); } /* Make toggler visible on dark bg */
.dropdown-menu { background-color: var(--bg-surface-elevated) !important; border: 1px solid var(--border-light) !important; }
.dropdown-item { color: var(--text-muted) !important; }
.dropdown-item:hover { background-color: rgba(6, 182, 212, 0.1) !important; color: var(--primary) !important; }
