/* ==========================================================================
   MARIUM KUMAIL — EdTech Learning Design & Course Architecture
   Design System & Core Styles
   ========================================================================== */

:root {
  /* Core Color Palette - Authority, Tech, and Learning Precision */
  --bg-primary: #070B11;
  --bg-secondary: #0D1622;
  --bg-tertiary: #132030;
  --bg-elevated: #18283D;
  --bg-glass: rgba(13, 22, 34, 0.72);
  --bg-glass-card: rgba(19, 32, 48, 0.65);
  --bg-glass-hover: rgba(26, 44, 66, 0.85);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-gold: rgba(212, 163, 72, 0.35);
  --border-emerald: rgba(16, 185, 129, 0.35);
  --border-crimson: rgba(239, 68, 68, 0.35);

  /* Accents & Brand Colors */
  --gold-primary: #D4A348;
  --gold-light: #E6B85C;
  --gold-dark: #A87D2C;
  --gold-glow: rgba(212, 163, 72, 0.22);

  --emerald-primary: #10B981;
  --emerald-light: #34D399;
  --emerald-dark: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.2);

  --navy-deep: #080E18;
  --navy-card: #0F1D2E;
  --navy-accent: #1E3A5F;
  --blue-glow: rgba(30, 58, 95, 0.35);

  --crimson-alert: #EF4444;
  --crimson-glow: rgba(239, 68, 68, 0.25);

  /* Typography Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #8494A7;
  --text-dim: #4B5B6D;
  --text-gold: #E6B85C;
  --text-emerald: #34D399;

  /* Fonts */
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing System */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6rem;

  /* Motion & Easings (Emil Kowalski Philosophy) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration-fast: 160ms;
  --duration-normal: 240ms;
  --duration-smooth: 360ms;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 30px rgba(212, 163, 72, 0.2);
  --shadow-emerald: 0 8px 30px rgba(16, 185, 129, 0.2);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Base Reset & Smoothness */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Modern Selection */
::selection {
  background-color: var(--gold-primary);
  color: #070B11;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* Background Atmosphere Grids & Radial Spotlights */
.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(30, 58, 95, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(212, 163, 72, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 70%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}

.bg-grid-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
}

/* Typography Hierarchy */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.85rem, 3.8vw, 2.9rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.3;
}

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

p.lead {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-secondary);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

/* Highlight helpers */
.text-gold {
  color: var(--gold-light);
}

.text-emerald {
  color: var(--emerald-light);
}

.text-crimson {
  color: var(--crimson-alert);
}

.text-gradient-gold {
  background: linear-gradient(135deg, #FBE094 0%, #D4A348 60%, #9B7023 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #A7F3D0 0%, #10B981 60%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 3vw, 2.5rem);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 860px;
}

.container-wide {
  max-width: 1380px;
}

section {
  position: relative;
  padding-block: clamp(4rem, 8vw, 7rem);
  z-index: 1;
}

/* Section Header Component */
.section-header {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(212, 163, 72, 0.08);
  border: 1px solid rgba(212, 163, 72, 0.25);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.section-tag.emerald {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--emerald-light);
}

.section-tag.crimson {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #F87171;
}

/* Interactive Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--duration-fast) var(--ease-out), 
              background-color var(--duration-normal) var(--ease-out), 
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #E6B85C 0%, #D4A348 100%);
  color: #070B11;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(212, 163, 72, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FBE094 0%, #E6B85C 100%);
  box-shadow: 0 8px 28px rgba(212, 163, 72, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-glass-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--gold-light);
  color: var(--gold-light);
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1.05rem 2.2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

/* Badges & Pulsing Dots */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald-light);
  position: relative;
  display: inline-block;
}

.dot-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--emerald-light);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.dot-pulse.gold {
  background-color: var(--gold-light);
}
.dot-pulse.gold::after {
  border-color: var(--gold-light);
}

.dot-pulse.crimson {
  background-color: var(--crimson-alert);
}
.dot-pulse.crimson::after {
  border-color: var(--crimson-alert);
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Glass Card Foundation */
.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.glass-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background-color var(--duration-normal) var(--ease-out),
              backdrop-filter var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              padding var(--duration-normal) var(--ease-out);
}

.navbar.scrolled {
  background: rgba(7, 11, 17, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-monogram {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.brand-title {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.8rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-light);
  transition: width var(--duration-fast) var(--ease-out);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Sound Mute Toggle */
.sound-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}

.sound-toggle-btn:hover {
  color: var(--gold-light);
  border-color: var(--border-gold);
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
}

/* Mobile Navigation Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(7, 11, 17, 0.95);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity var(--duration-smooth) var(--ease-out),
              transform var(--duration-smooth) var(--ease-out);
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.mobile-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-drawer-link {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.mobile-drawer-link:hover {
  color: var(--gold-light);
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
