/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&family=Fira+Code:wght@400;500&display=swap');

/* === CSS VARIABLES === */
:root {
  --blue-900: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --cyan:     #22d3ee;
  --text:     #e2e8f0;
  --muted:    #8b9ec4;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --bg-deep:  #020c1b;
  --bg-dark:  #05102a;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 10% 5%,  rgba(29,78,216,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 90% 90%,  rgba(34,211,238,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 60% 40%,  rgba(59,130,246,0.06) 0%, transparent 60%),
    linear-gradient(160deg, #020c1b 0%, #05102a 50%, #020a18 100%);
  z-index: -1;
  pointer-events: none;
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2, 12, 27, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(59,130,246,0.12);
  transition: padding 0.3s var(--ease), background 0.3s var(--ease);
}

nav.scrolled {
    padding: 10px 48px;
    background: rgba(2, 12, 27, 0.95);
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-300), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
  text-decoration: none;
}

.nav-brand span {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 10px;
  background: none;
  -webkit-text-fill-color: initial;
}

.nav-welcome {
    font-size: 0.9rem;
    color: var(--text);
    margin-right: 15px;
}

.nav-dashboard-link {
    font-size: 0.9rem;
    color: var(--blue-600);
    text-decoration: none;
    margin-right: 20px;
    font-weight: 600;
}

.btn-logout {
    padding: 8px 24px;
    background: #fff;
    color: #000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #e2e8f0;
}

/* Evolution Badge */
.evolution-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: var(--cyan);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 100px;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.evolution-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 32px;
    background: linear-gradient(to bottom, #fff 40%, var(--blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.hero-subtitle {
    max-width: 650px;
    margin: 0 auto 48px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.btn-hero-primary {
    padding: 16px 48px;
    background: var(--blue-600);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.btn-hero-primary:hover {
    box-shadow: 0 0 60px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

.btn-hero-secondary {
    padding: 16px 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.stats-container {
    display: flex;
    gap: 64px;
    margin-top: 100px;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s var(--ease);
}

.nav-links a:hover {
    color: var(--cyan);
}

.btn-get-started {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: white;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-get-started:hover {
    background: linear-gradient(135deg, var(--blue-500), var(--cyan));
    color: #020c1b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.4);
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  animation: fadeUp 0.9s var(--ease);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.25);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, var(--blue-300) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.75;
  margin-bottom: 52px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.cta-btn {
    padding: 15px 35px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s var(--ease);
}

.cta-primary {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: white;
    box-shadow: 0 10px 25px rgba(29, 78, 216, 0.4);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(29, 78, 216, 0.5);
}

.cta-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ---- STATS ---- */
.stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-300), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---- SECTION HEADERS ---- */
.section-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: 10px;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 60px;
  background: linear-gradient(135deg, #fff, var(--blue-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- COURSES GRID ---- */
.courses-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
    .courses-section { padding: 80px 24px; }
}

.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
    .courses-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; }
}

/* ---- COURSE CARD ---- */
.course-card {
  background: rgba(8, 20, 62, 0.4);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 24px;
  padding: 40px 32px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease);
}

.course-card:hover {
  transform: translateY(-12px);
  border-color: rgba(96,165,250,0.4);
  background: rgba(12, 30, 85, 0.6);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.course-card:hover::before {
    transform: translateX(100%);
}

.card-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(29,78,216,0.15);
  border: 1px solid rgba(59,130,246,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 15px;
  margin-bottom: 10px;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  padding: 5px 12px;
  border-radius: 20px;
  align-self: flex-start;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

.card-meta {
  display: flex;
  gap: 20px;
  margin-top: 5px;
}

.card-meta span {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-meta span::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--blue-400);
  border-radius: 50%;
}

.card-btn {
  margin-top: 10px;
  padding: 14px 24px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 12px;
  color: var(--blue-200);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s var(--ease);
}

.course-card:hover .card-btn {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-500);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-enroll {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-enroll:hover {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-enroll:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-enroll:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

/* ---- FEATURES SECTION ---- */
.features-section {
    padding: 120px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-box {
    padding: 48px 40px;
    border-radius: 32px;
    background: rgba(10, 20, 47, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(20px);
    transition: all 0.4s var(--ease);
}

.feature-box:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(15, 30, 70, 0.6);
    transform: translateY(-8px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 32px;
    display: block;
}

.feature-box h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 700;
}

.feature-box p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ---- FOOTER ---- */
footer {
  text-align: center;
  padding: 60px 24px 40px;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid rgba(59,130,246,0.1);
}

footer .brand {
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    display: block;
}

footer .links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

footer .links a {
    text-decoration: none;
    color: var(--muted);
    transition: color 0.3s var(--ease);
}

footer .links a:hover {
    color: var(--cyan);
}

footer .heart {
  color: #ef4444;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInBody { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.5; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  nav .nav-links { display: none; }
  .hero { padding: 120px 20px 60px; }
  .hero h1 { font-size: 3rem; }
  .hero-cta { flex-direction: column; width: 100%; max-width: 300px; }
  .stats { gap: 30px; }
}
