/* ============================================================
   CodeCraft — styles.css
   Aesthetic: Dark terminal · neon accents · editorial code-punk
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:        #0a0c0f;
  --bg2:       #0f1217;
  --surface:   #141820;
  --surface2:  #1d2330;
  --border:    #252d3d;
  --accent:    #00e5a0;
  --accent2:   #38bdf8;
  --accent3:   #f472b6;
  --text:      #e8edf5;
  --muted:     #5d6b82;
  --muted2:    #8896ac;
  --danger:    #f87171;
  --success:   #4ade80;

  --font-mono: 'Space Mono', monospace;
  --font-sans: 'DM Sans', sans-serif;

  --radius:    10px;
  --radius-lg: 18px;
  --shadow:    0 4px 32px rgba(0,0,0,0.45);
  --glow-g:    0 0 32px rgba(0,229,160,0.18);
  --glow-b:    0 0 32px rgba(56,189,248,0.18);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Selection ──────────────────────────────────────────── */
::selection { background: rgba(0,229,160,0.2); color: var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 5vw;
  height: 64px;
  background: rgba(10,12,15,0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--muted2);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }

.nav-right { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-ghost {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); background: rgba(0,229,160,0.06); }

.btn-primary {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 20px rgba(0,229,160,0.3);
}
.btn-primary:hover {
  background: #00ffc3;
  box-shadow: 0 0 28px rgba(0,229,160,0.5);
  transform: translateY(-1px);
}

.btn-lg {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.8rem 2rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.btn-lg.primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 32px rgba(0,229,160,0.35);
}
.btn-lg.primary:hover {
  background: #00ffc3;
  box-shadow: 0 0 44px rgba(0,229,160,0.55);
  transform: translateY(-2px);
}
.btn-lg.ghost {
  background: transparent;
  color: var(--muted2);
  border: 1px solid var(--border);
}
.btn-lg.ghost:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(0,229,160,0.06);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 5vw 80px;
  overflow: hidden;
}

/* dot-grid background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 100%);
  pointer-events: none;
}

/* ambient glow */
.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0,229,160,0.12) 0%, rgba(56,189,248,0.07) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(1px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 2rem;
  animation: fadeSlideDown 0.6s ease both;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeSlideDown 0.7s 0.1s ease both;
}
.highlight  { color: var(--accent); }
.highlight2 { color: var(--accent2); }

.hero-sub {
  max-width: 560px;
  color: var(--muted2);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  animation: fadeSlideDown 0.7s 0.2s ease both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4rem;
  animation: fadeSlideDown 0.7s 0.3s ease both;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeSlideDown 0.7s 0.4s ease both;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
section {
  padding: 100px 5vw;
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted2);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 520px;
}

/* ============================================================
   COURSES GRID
   ============================================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.5s ease both;
}
.course-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,229,160,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.course-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), var(--glow-g);
}
.course-card:hover::before { opacity: 1; }

.course-emoji {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}

.course-level {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 99px;
  margin-bottom: 0.9rem;
}
.level-beginner   { background: rgba(74,222,128,0.12);  color: #4ade80;  border: 1px solid rgba(74,222,128,0.25); }
.level-intermediate { background: rgba(56,189,248,0.12); color: var(--accent2); border: 1px solid rgba(56,189,248,0.25); }
.level-advanced   { background: rgba(244,114,182,0.12); color: var(--accent3); border: 1px solid rgba(244,114,182,0.25); }

.course-title {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.course-desc {
  font-size: 0.87rem;
  color: var(--muted2);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}
.course-lessons { display: flex; align-items: center; gap: 0.35rem; }
.course-price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}
.course-price.free { color: #4ade80; }

.course-cta {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.65rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.course-card:hover .course-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ── Course card thumbnail ──────────────────────────────── */
.course-thumb {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) 0 0;
  position: relative;
  overflow: hidden;
  margin: -1.6rem -1.6rem 1.25rem;
  width: calc(100% + 3.2rem);
}
.course-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.course-card:hover .course-thumb-overlay { opacity: 1; }

.play-btn {
  width: 3rem;
  height: 3rem;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding-left: 3px;
  box-shadow: 0 0 28px rgba(0,229,160,0.6);
  transform: scale(0.85);
  transition: transform 0.2s;
}
.course-card:hover .play-btn { transform: scale(1); }

.course-body { position: relative; }

/* ============================================================
   COURSE DETAIL MODAL
   ============================================================ */
.course-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.course-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.course-modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(980px, 100%);
  box-shadow: 0 32px 100px rgba(0,0,0,0.7);
  position: relative;
  overflow: hidden;
  transform: translateY(32px) scale(0.97);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1);
}
.course-modal-overlay.open .course-modal {
  transform: translateY(0) scale(1);
}

.course-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 10;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border);
  color: var(--muted2);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.course-modal-close:hover { border-color: var(--danger); color: var(--danger); }

/* Video embed */
.course-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 50%; /* 2:1 ratio — slightly shorter for a cinematic look */
  background: #000;
}
.course-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Below-video body */
.course-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.course-modal-left {
  padding: 2rem;
  border-right: 1px solid var(--border);
}

.course-modal-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.course-emoji-lg { font-size: 2.5rem; flex-shrink: 0; margin-top: 0.2rem; }

.course-modal-title {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.course-modal-desc {
  font-size: 0.88rem;
  color: var(--muted2);
  line-height: 1.6;
}

/* Stats row */
.course-modal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.cstat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.5rem;
  text-align: center;
}
.cstat-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.cstat-label {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* Instructor */
.course-instructor {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.instructor-avatar {
  font-size: 1.8rem;
  width: 3rem;
  height: 3rem;
  background: var(--surface2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.instructor-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.instructor-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Curriculum */
.course-modal-right { padding: 2rem; display: flex; flex-direction: column; }

.curriculum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.curriculum-heading {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
}
.curriculum-count {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.curriculum-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
  padding-right: 0.25rem;
  margin-bottom: 1.5rem;
}
.curriculum-list::-webkit-scrollbar { width: 3px; }
.curriculum-list::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 99px; }

.curriculum-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.18s;
  cursor: default;
}
.curriculum-item:hover { border-color: var(--accent2); }

.curriculum-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  flex-shrink: 0;
}
.curriculum-lesson {
  font-size: 0.83rem;
  flex: 1;
  line-height: 1.4;
}
.curriculum-free-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.25);
  color: var(--accent);
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  flex-shrink: 0;
}

.course-enroll-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--font-sans);
  box-shadow: 0 0 28px rgba(0,229,160,0.35);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  margin-top: auto;
}
.course-enroll-btn:hover {
  background: #00ffc3;
  box-shadow: 0 0 44px rgba(0,229,160,0.55);
  transform: translateY(-1px);
}

/* Responsive — course modal */
@media (max-width: 720px) {
  .course-modal-body { grid-template-columns: 1fr; }
  .course-modal-left { border-right: none; border-bottom: 1px solid var(--border); }
  .course-modal-stats { grid-template-columns: repeat(2, 1fr); }
  .course-video-wrap { padding-top: 56.25%; }
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
#howitworks { border-top: 1px solid var(--border); }

.steps {
  display: flex;
  gap: 0;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 2.1rem;
  left: calc(2rem + 1px);
  right: calc(2rem + 1px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3), var(--accent));
  opacity: 0.3;
}

.step {
  flex: 1;
  padding: 1.5rem 1.25rem 1.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform 0.2s;
}
.step:hover { transform: translateY(-4px); }

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.step:hover .step-icon {
  border-color: var(--accent);
  box-shadow: var(--glow-g);
}

.step h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 0.83rem;
  color: var(--muted2);
  line-height: 1.55;
}

/* ============================================================
   QUIZ
   ============================================================ */
#quiz { border-top: 1px solid var(--border); }

.quiz-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 680px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.quiz-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.quiz-question {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  min-height: 3em;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.quiz-opt {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}
.quiz-opt:hover:not(.locked) { border-color: var(--accent2); background: rgba(56,189,248,0.06); }
.quiz-opt.selected { border-color: var(--accent2); background: rgba(56,189,248,0.1); }
.quiz-opt.correct  { border-color: var(--success); background: rgba(74,222,128,0.1); }
.quiz-opt.wrong    { border-color: var(--danger);  background: rgba(248,113,113,0.1); }
.quiz-opt.locked   { cursor: default; }

.opt-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  transition: border-color 0.18s, color 0.18s;
}
.quiz-opt.correct .opt-key { border-color: var(--success); color: var(--success); }
.quiz-opt.wrong   .opt-key { border-color: var(--danger);  color: var(--danger); }
.quiz-opt.selected .opt-key { border-color: var(--accent2); color: var(--accent2); }

.quiz-feedback {
  font-size: 0.88rem;
  min-height: 1.5em;
  margin-bottom: 1.1rem;
  font-family: var(--font-mono);
  transition: opacity 0.3s;
}
.quiz-feedback.correct { color: var(--success); }
.quiz-feedback.wrong   { color: var(--danger); }

.quiz-next {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 0 18px rgba(0,229,160,0.3);
}
.quiz-next:hover { background: #00ffc3; box-shadow: 0 0 28px rgba(0,229,160,0.5); }
.quiz-next:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

/* ============================================================
   PROGRESS DASHBOARD
   ============================================================ */
#progress { border-top: 1px solid var(--border); }

.dashboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}
.dash-header h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.xp-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.85rem;
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.25);
  color: var(--accent);
  border-radius: 99px;
}

.dash-courses { padding: 0.5rem 0; }

.dash-course {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.dash-course:last-child { border-bottom: none; }
.dash-course:hover { background: var(--bg2); }

.dash-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.dash-info { flex: 1; min-width: 0; }
.dash-name {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.dash-prog-text {
  font-size: 0.78rem;
  color: var(--muted2);
  margin-bottom: 0.6rem;
}
.dash-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.dash-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 1s cubic-bezier(.22,1,.36,1);
}

.dash-pct {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 2.5rem;
  text-align: right;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 2.5rem 5vw;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: min(440px, 90vw);
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-close {
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted2);
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); }

.modal h2 {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

#modal-sub {
  font-size: 0.9rem;
  color: var(--muted2);
  margin-bottom: 1.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted2);
  font-family: var(--font-mono);
}
.form-group input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder { color: var(--muted); }
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,160,0.1);
}

.modal-submit {
  width: 100%;
  padding: 0.8rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  box-shadow: 0 0 24px rgba(0,229,160,0.3);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.modal-submit:hover {
  background: #00ffc3;
  box-shadow: 0 0 36px rgba(0,229,160,0.5);
  transform: translateY(-1px);
}

.modal-divider {
  text-align: center;
  margin: 1.1rem 0;
  font-size: 0.8rem;
  color: var(--muted);
  position: relative;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}
.modal-divider::before { left: 0; }
.modal-divider::after  { right: 0; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .steps { flex-wrap: wrap; gap: 1.5rem; }
  .steps::before { display: none; }
  .step { flex: 1 1 calc(50% - 1.5rem); }
  .hero-stats { gap: 2rem; }
}

@media (max-width: 640px) {
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; }

  .hero { padding: 96px 1.25rem 60px; }
  .hero h1 { font-size: 2.2rem; }

  section { padding: 60px 1.25rem; }

  .step { flex: 1 1 100%; }
  .quiz-box { padding: 1.5rem; }
  .quiz-question { font-size: 0.95rem; }

  .dash-course { padding: 1rem 1.25rem; }
  .dash-header { padding: 1rem 1.25rem; }

  .hero-stats { gap: 1.5rem; }
  .stat-num { font-size: 1.4rem; }
}