/* BASE CSS - Lil.Wide.Codes V3 | Purpose: Reset, design system, theme variables, typography */

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

/* CSS VARIABLES */
:root {
  /* HSL Color System - Default Dark Theme */
  --bg-raw: 224 25% 5%;
  --surface-raw: 224 20% 9%;
  --surface-hover-raw: 224 18% 13%;
  --accent-cyan-raw: 180 100% 50%;
  --accent-blue-raw: 217 100% 60%;
  --accent-purple-raw: 263 90% 65%;
  --accent-orange-raw: 16 100% 60%;
  
  --color-bg: hsl(var(--bg-raw));
  --color-surface: hsl(var(--surface-raw));
  --color-surface-hover: hsl(var(--surface-hover-raw));
  --color-surface-glass: rgba(13, 17, 25, 0.7);
  
  --color-text-primary: hsl(220 30% 96%);
  --color-text-secondary: hsl(218 15% 75%);
  --color-text-muted: hsl(218 12% 50%);
  
  --color-accent-cyan: hsl(var(--accent-cyan-raw));
  --color-accent-blue: hsl(var(--accent-blue-raw));
  --color-accent-purple: hsl(var(--accent-purple-raw));
  --color-accent-orange: hsl(var(--accent-orange-raw));
  
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-glow: rgba(0, 242, 254, 0.15);
  
  /* Fonts */
  --font-primary: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Layout */
  --max-width: 1200px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-xxl: 2.25rem;
  --text-xxxl: 3.5rem;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 5rem;
}

/* Light Theme Variable Overrides */
body.light-theme {
  --bg-raw: 220 30% 95%;
  --surface-raw: 220 20% 90%;
  --surface-hover-raw: 220 18% 84%;
  --accent-cyan-raw: 195 100% 40%;
  --accent-blue-raw: 217 100% 45%;
  --accent-purple-raw: 263 70% 50%;
  --accent-orange-raw: 16 95% 45%;
  
  --color-bg: hsl(var(--bg-raw));
  --color-surface: hsl(var(--surface-raw));
  --color-surface-hover: hsl(var(--surface-hover-raw));
  --color-surface-glass: rgba(235, 238, 243, 0.8);
  
  --color-text-primary: hsl(220 40% 12%);
  --color-text-secondary: hsl(220 20% 32%);
  --color-text-muted: hsl(220 15% 50%);
  
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-glow: rgba(0, 150, 200, 0.2);
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: var(--text-md);
  min-height: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Theme Switching Smooth Fade */
body, header, footer, section, .card, .project-card, .case-card, .learn-card, .terminal-window, .nav-overlay, .btn, .nav-links a {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 120, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-blue);
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2.2rem, 5vw, var(--text-xxxl));
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(1.6rem, 3vw, var(--text-xxl));
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  max-width: 68ch;
}

/* Links */
a {
  color: var(--color-text-primary);
  text-decoration: none;
}

/* UTILITIES */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue) 50%, var(--color-accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-orange {
  background: linear-gradient(135deg, var(--color-accent-orange), #ff416c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.muted-text {
  color: var(--color-text-muted);
}

.interactive-glow {
  position: relative;
  overflow: hidden;
}
