/* ─── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #081018;
  --bg-dark:    #0F172A;
  --bg-card:    #0D1B2E;
  --bg-card2:   #132235;
  --cyan:       #22D3EE;
  --cyan-dim:   #0E7490;
  --purple:     #8B5CF6;
  --blue-light: #38BDF8;
  --text:       #E2E8F0;
  --text-muted: #94A3B8;
  --text-dim:   #64748B;
  --border:     rgba(34,211,238,0.12);
  --grad:       linear-gradient(135deg, #0E7490 0%, #22D3EE 45%, #8B5CF6 100%);
  --grad-bg:    linear-gradient(180deg, #081018 0%, #0F172A 100%);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--grad-bg);
  min-height: 100vh;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { opacity: 0.8; }

/* ─── GRID OVERLAY ─────────────────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,211,238,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ─── NAV ──────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,16,24,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}

.nav-brand-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--cyan); opacity: 1; }

.nav-cta {
  background: var(--grad);
  color: #fff !important;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
}

/* ─── LAYOUT ───────────────────────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ─── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ─── PATHWAY GRID ─────────────────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
  text-align: center;
}

.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 80px;
}

.pathway-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.pathway-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .2s;
}

.pathway-card:hover { border-color: rgba(34,211,238,0.3); transform: translateY(-2px); opacity: 1; }
.pathway-card:hover::before { opacity: 1; }

.pathway-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.pathway-title {
  font-size: 17px;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 8px;
}

.pathway-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.pathway-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pathway-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.15);
  color: var(--cyan);
}

.pathway-tag.purple {
  background: rgba(139,92,246,0.08);
  border-color: rgba(139,92,246,0.2);
  color: var(--purple);
}

.pathway-tag.green {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.2);
  color: #4ADE80;
}

.pathway-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--text-dim);
  font-size: 18px;
  transition: color .2s, transform .2s;
}

.pathway-card:hover .pathway-arrow {
  color: var(--cyan);
  transform: translateX(3px);
}

/* ─── PROGRESS BAR ─────────────────────────────────────────────────────────── */
.progress-wrap {
  margin-top: 12px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.progress-bar {
  height: 4px;
  background: rgba(34,211,238,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 2px;
  transition: width .4s ease;
}

/* ─── MODULE LIST ──────────────────────────────────────────────────────────── */
.pathway-header {
  padding: 56px 0 40px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
  transition: color .2s;
}

.back-link:hover { color: var(--cyan); opacity: 1; }

.pathway-header h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.pathway-header p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
}

.modules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 64px;
}

.module-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, background .2s;
}

.module-item:hover { border-color: rgba(34,211,238,0.3); background: var(--bg-card2); opacity: 1; }

.module-item.locked { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.module-num {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
}

.module-num.complete {
  background: rgba(34,211,238,0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

.module-info { flex: 1; }

.module-title {
  font-size: 15px;
  font-weight: 600;
  color: #F8FAFC;
  margin-bottom: 3px;
}

.module-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.module-status {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.module-status.done { color: var(--cyan); }

/* ─── LESSON PAGE ──────────────────────────────────────────────────────────── */
.lesson-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 40px 0 80px;
  align-items: start;
}

.lesson-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.sidebar-modules {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-module {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.sidebar-module:hover { background: rgba(34,211,238,0.05); color: var(--text); opacity: 1; }
.sidebar-module.active { background: rgba(34,211,238,0.08); color: var(--cyan); }
.sidebar-module.done { color: var(--text-dim); }

.sidebar-module-num {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(34,211,238,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
  font-family: 'Courier New', monospace;
}

.sidebar-module.active .sidebar-module-num {
  background: rgba(34,211,238,0.2);
}

/* ─── LESSON CONTENT ───────────────────────────────────────────────────────── */
.lesson-content {
  min-width: 0;
}

.lesson-progress {
  margin-bottom: 32px;
}

.lesson-progress-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.lesson-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.lesson-module-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}

.lesson-header h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 10px;
  color: #F8FAFC;
}

.lesson-meta {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
}

.lesson-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.lesson-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: #F8FAFC;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.lesson-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan);
  margin: 24px 0 10px;
}

.lesson-body p { margin-bottom: 18px; color: #CBD5E1; }

.lesson-body ul, .lesson-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
  color: #CBD5E1;
}

.lesson-body li { margin-bottom: 6px; }

.callout {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
  color: #CBD5E1;
}

.callout strong { color: var(--cyan); }

.callout.warning { border-left-color: #F59E0B; }
.callout.warning strong { color: #FCD34D; }

/* ─── KEY TERMS ────────────────────────────────────────────────────────────── */
.key-terms {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin: 40px 0;
}

.key-terms-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.term-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.term-item:last-child { border-bottom: none; }

.term-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--cyan);
  font-family: 'Courier New', monospace;
  min-width: 140px;
  flex-shrink: 0;
}

.term-def {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── RESOURCES ────────────────────────────────────────────────────────────── */
.resources {
  margin: 40px 0;
}

.resources-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s;
}

.resource-item:hover { border-color: rgba(34,211,238,0.3); opacity: 1; }

.resource-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.resource-info { flex: 1; }
.resource-name { font-size: 14px; font-weight: 600; color: #F8FAFC; }
.resource-desc { font-size: 12px; color: var(--text-dim); }
.resource-dl { font-size: 12px; color: var(--purple); font-weight: 600; }

/* ─── QUIZ ─────────────────────────────────────────────────────────────────── */
.quiz {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  margin: 40px 0;
}

.quiz-title {
  font-size: 16px;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-question {
  font-size: 15px;
  color: #CBD5E1;
  margin-bottom: 16px;
  font-weight: 500;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #CBD5E1;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.quiz-option:hover { border-color: rgba(34,211,238,0.3); background: rgba(34,211,238,0.04); }
.quiz-option.selected { border-color: var(--cyan); background: rgba(34,211,238,0.08); color: var(--text); }
.quiz-option.correct  { border-color: #4ADE80; background: rgba(74,222,128,0.08); color: #4ADE80; }
.quiz-option.wrong    { border-color: #F87171; background: rgba(248,113,113,0.08); color: #F87171; }

.quiz-radio {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color .15s;
}

.quiz-option.selected .quiz-radio { border-color: var(--cyan); background: var(--cyan); }

.quiz-feedback {
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  display: none;
}

.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.2); color: #4ADE80; }
.quiz-feedback.wrong   { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); color: #F87171; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
}

.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--grad); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: rgba(34,211,238,0.4); color: var(--text); }

/* ─── LESSON NAV ───────────────────────────────────────────────────────────── */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* ─── FOOTER ───────────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--cyan); opacity: 1; }

/* ─── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    position: static;
    display: none;
  }

  .pathway-grid {
    grid-template-columns: 1fr;
  }

  .nav-links { display: none; }
}
