/* =========================================================
   Root To First Job — theme tokens
   ========================================================= */
:root {
  --bg: #0a0e14;
  --bg-alt: #0f1520;
  --surface: #131a26;
  --surface-hover: #182234;
  --border: #223049;
  --text: #e6edf5;
  --text-dim: #93a4bd;
  --text-faint: #5c6c85;
  --accent: #00d9ff;
  --accent-2: #00ff9d;
  --accent-3: #ff5d8f;
  --warn: #ffb454;
  --focus: #00d9ff;
  --radius: 10px;
  --radius-lg: 16px;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-glow: 0 0 0 1px rgba(0, 217, 255, 0.15), 0 8px 30px rgba(0, 217, 255, 0.08);
  --header-h: 64px;
}

[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-hover: #eef2f8;
  --border: #dbe2ec;
  --text: #101826;
  --text-dim: #4b5872;
  --text-faint: #8493ac;
  --shadow-glow: 0 0 0 1px rgba(0, 140, 168, 0.12), 0 8px 30px rgba(0, 140, 168, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

body.no-scroll { overflow: hidden; }

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #001018;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* =========================================================
   Scroll progress bar
   ========================================================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 1100;
  transition: width 0.1s linear;
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.85); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px;
  color: var(--accent);
}
.logo .accent { color: var(--accent-2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-hover);
  text-decoration: none;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.hamburger { display: none; }

/* Mobile nav */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 14px 16px; font-size: 1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .hamburger {
    display: inline-flex;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
  background:
    radial-gradient(650px 320px at 15% -10%, rgba(0, 217, 255, 0.14), transparent 60%),
    radial-gradient(600px 300px at 90% 0%, rgba(0, 255, 157, 0.10), transparent 60%);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 20px;
  max-width: 18ch;
  letter-spacing: -0.02em;
}
.hero h1 .gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-typed-wrap {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--text-dim);
  margin-bottom: 28px;
  min-height: 1.6em;
}
.hero-typed-wrap .prompt { color: var(--accent); }
.hero-typed-wrap .caret {
  display: inline-block;
  width: 9px; height: 1.1em;
  background: var(--accent-2);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero p.lead {
  max-width: 60ch;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #001018;
  box-shadow: 0 6px 24px rgba(0, 217, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(0, 217, 255, 0.35); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  max-width: 640px;
}
.hero-stat .num {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stat .num .accent { color: var(--accent-2); }
.hero-stat .label {
  font-size: 0.82rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================================
   Section chrome
   ========================================================= */
.path-overview {
  padding: 64px 0 24px;
}
.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-heading .kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}
.section-heading h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 12px; }
.section-heading p { color: var(--text-dim); margin: 0; }

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.path-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-glow); }
.path-card .emoji { font-size: 1.6rem; margin-bottom: 10px; display: block; }
.path-card h3 { font-size: 1rem; margin: 0 0 6px; }
.path-card .count { font-size: 0.82rem; color: var(--text-faint); font-family: var(--font-mono); }

/* =========================================================
   Course sections (the 5 pillars)
   ========================================================= */
.course-section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.course-section:nth-of-type(odd) { background: var(--bg-alt); }

.course-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.course-section-head .heading-block { max-width: 640px; }
.course-section-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 8px;
}
.course-section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.course-section-head p { color: var(--text-dim); margin: 0; }

.progress-ring-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.progress-ring-wrap svg { width: 30px; height: 30px; }
.progress-ring-bg { stroke: var(--border); }
.progress-ring-fill {
  stroke: var(--accent-2);
  transition: stroke-dashoffset 0.4s ease;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* Module list */
.module-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s ease;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.module-item:hover { border-color: var(--accent); }
.module-item.is-open { border-color: var(--accent); box-shadow: var(--shadow-glow); }

.module-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font: inherit;
}

.module-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.module-check svg {
  width: 15px; height: 15px;
  opacity: 0;
  transition: opacity 0.1s ease;
  color: #001018;
}
.module-check:hover { border-color: var(--accent-2); }
.module-check.checked {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.module-check.checked svg { opacity: 1; }

.module-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  flex-shrink: 0;
  width: 3.2ch;
}

.module-emoji { font-size: 1.2rem; flex-shrink: 0; }

.module-title-wrap { flex: 1; min-width: 0; }
.module-title { font-weight: 600; font-size: 0.98rem; }
.module-item.is-checked .module-title { color: var(--text-faint); text-decoration: line-through; text-decoration-color: var(--border); }

.module-status {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--warn);
  background: rgba(255, 180, 84, 0.1);
  border: 1px solid rgba(255, 180, 84, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chevron {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}
.module-item.is-open .chevron { transform: rotate(180deg); color: var(--accent); }

.module-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.module-item.is-open .module-panel { grid-template-rows: 1fr; }
.module-panel-inner { overflow: hidden; }
.module-panel-content {
  padding: 0 20px 22px 62px;
  color: var(--text-dim);
  font-size: 0.92rem;
  border-top: 1px dashed var(--border);
  margin-top: 0;
  padding-top: 16px;
}
.placeholder-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
  font-style: italic;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-alt);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-note { color: var(--text-faint); font-size: 0.85rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-dim); font-size: 0.85rem; }

/* =========================================================
   Utility / reveal animation
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
