/* ============================================
   CODE NEST STUDIOS - GRADE 9 SCIENCE
   Premium Dark Theme v2.0
   ============================================ */

:root {
  /* === Core Palette === */
  --bg-body: #080d1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);

  /* === Brand Colors === */
  --primary: #6c63ff;
  --primary-light: #8b83ff;
  --primary-glow: rgba(108, 99, 255, 0.35);
  --accent: #00d4aa;
  --accent-glow: rgba(0, 212, 170, 0.3);
  --danger: #ff4757;
  --success: #2ed573;
  --warning: #ffa502;

  /* === Text === */
  --text-primary: #f0f4ff;
  --text-secondary: #94a3c0;
  --text-muted: #5a6a85;
  --text-main: #f0f4ff;

  /* === Gradients === */
  --gradient-primary: linear-gradient(135deg, #6c63ff, #00d4aa);
  --gradient-hero: linear-gradient(135deg, #6c63ff 0%, #a855f7 50%, #00d4aa 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);

  /* === Typography === */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* === Spacing === */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* === Base Styles === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-body);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(108, 99, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 212, 170, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-top: 0;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* === Layout === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }
.section { padding: 80px 0; }

.bg-secondary { background: rgba(255, 255, 255, 0.02); }
.mb-md { margin-bottom: 1.5rem; }
.mb-lg { margin-bottom: 2rem; }
.mb-xl { margin-bottom: 4rem; }
.mt-xl { margin-top: 4rem; }

/* === Gradient Text === */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* === Grid System === */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* === Subject Cards === */
.subject-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.subject-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  transition: transform 0.3s;
}

.subject-card:hover .subject-icon {
  transform: scale(1.1);
}

/* === Animations === */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
  50%       { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(168, 85, 247, 0.2); }
}

/* === Glass Panel === */
.glass-panel {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
}

/* === Stats Badge === */
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-badge strong {
  color: var(--accent);
}

/* === Responsive Base === */
@media (max-width: 768px) {
  /* Standardize mobile flow and touch targets (min 44px) */
  .navbar-menu a, .footer a, .footer-col a, .btn, .card a, .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .footer a, .footer-col a {
    padding: 8px 0;
  }

  h1 { font-size: 2.2rem !important; }
  h2 { font-size: 1.8rem; }
  .section { padding: 50px 0; }
  .grid-2, .grid-3 { gap: 16px; }
  .container { padding: 0 16px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.9rem !important; }
  .hero-buttons { flex-direction: column; align-items: center; }
}