/* CSS Variables - Comprehensive Theme System */
:root {
  /* Colors - Primary Palette */
  --color-primary: #0066cc;
  --color-primary-rgb: 0, 102, 204;
  --color-primary-dark: #0052a3;
  --color-primary-light: #3385d6;
  
  /* Colors - Secondary Palette */
  --color-secondary: #00bcd4;
  --color-secondary-rgb: 0, 188, 212;
  --color-secondary-dark: #0097a7;
  --color-secondary-light: #33c9dc;
  
  /* Colors - Accent Palette */
  --color-accent: #00d4ff;
  --color-accent-rgb: 0, 212, 255;
  --color-accent-dark: #00a8cc;
  --color-accent-light: #33ddff;
  
  /* Background Colors */
  --bg-primary: #0a1929;
  --bg-secondary: #0f2338;
  --bg-tertiary: #152a47;
  --bg-card: rgba(15, 35, 56, 0.8);
  --bg-overlay: rgba(10, 25, 41, 0.95);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b0bec5;
  --text-muted: #78909c;
  --text-heading: #e3f2fd;
  
  /* Border Colors */
  --border-color: rgba(0, 188, 212, 0.2);
  --border-color-hover: rgba(0, 212, 255, 0.4);
  
  /* Status Colors */
  --color-success: #4caf50;
  --color-success-rgb: 76, 175, 80;
  --color-error: #f44336;
  --color-error-rgb: 244, 67, 54;
  --color-warning: #ff9800;
  --color-warning-rgb: 255, 152, 0;
  --color-info: #2196f3;
  --color-info-rgb: 33, 150, 243;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0066cc 0%, #00bcd4 100%);
  --gradient-secondary: linear-gradient(135deg, #00bcd4 0%, #00d4ff 100%);
  --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #0066cc 100%);
  --gradient-hero: linear-gradient(135deg, #0a1929 0%, #0066cc 50%, #00bcd4 100%);
  
  /* Typography */
  --font-family-primary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-heading: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-mono: 'Fira Code', 'Courier New', monospace;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
  --shadow-glow-hover: 0 0 30px rgba(0, 212, 255, 0.5);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-Index Layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-overlay: 900;
  --z-modal: 1000;
  --z-mobile-nav: 999;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
  padding-top: 93px; /* Account for fixed header height */
}

body.modal-open {
  overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-heading);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

h1, h2, h3 {
  scroll-margin-top: 80px;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-light);
}

ul, ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-xl);
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

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

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-3xl) 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-align: center;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--text-primary);
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-glow);
}

.card h3 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: var(--spacing-sm);
}

.card p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  hyphens: auto;
  color: var(--text-secondary);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--spacing-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* Responsive */

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
}

.fade-in-up-active {
  animation: fadeInUp 0.6s ease-out forwards;
}
@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
  h3 { font-size: var(--font-size-2xl); }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .section {
    padding: var(--spacing-2xl) 0;
  }
}
