:root {
  --bg: #0a0a0f;
  --bg-soft: #101018;
  --bg-card: #13131d;
  --text: #f2f2f7;
  --text-muted: #9a9aad;
  --text-faint: #7e7e8c;
  --accent: #7c6af5;
  --accent-soft: rgba(124, 106, 245, 0.12);
  --accent-strong: #9485ff;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --radius: 14px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-soft: #f1f1f4;
  --bg-card: #ffffff;
  --text: #131318;
  --text-muted: #55555f;
  --text-faint: #70707b;
  --accent: #5d49e8;
  --accent-soft: rgba(93, 73, 232, 0.09);
  --accent-strong: #4a36d4;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

::selection { background: var(--accent); color: #fff; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo .caret { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-links a.active { color: var(--accent-strong); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 6px;
}

/* ---------- Nav dropdown ---------- */
.nav-links li.has-dropdown { position: relative; }

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: color 0.2s;
}

.nav-dropdown-toggle:hover,
.has-dropdown.open > .nav-dropdown-toggle { color: var(--text); }

.nav-dropdown-toggle.active { color: var(--accent-strong); }

.nav-dropdown-toggle i { transition: transform 0.25s ease; flex-shrink: 0; }

.has-dropdown.open > .nav-dropdown-toggle i { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 190px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 16px 38px -14px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 110;
}

.has-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu li { width: 100%; }

.dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.dropdown-menu a:hover,
.dropdown-menu a.active { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s, opacity 0.2s;
}

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

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ---------- Hero ---------- */
.hero {
  padding: 130px 0 110px;
  text-align: left;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-strong);
  letter-spacing: 0.4px;
  margin-bottom: 22px;
  display: block;
}

.eyebrow::before { content: "> "; opacity: 0.7; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -2px;
  margin-bottom: 26px;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.92em;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: -0.08em;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero p.lede {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 38px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 90px 0; }

section.alt { background: var(--bg-soft); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 18px;
}

h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-intro { max-width: 620px; color: var(--text-muted); margin-bottom: 54px; }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-3px); }

.card .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-strong);
  display: block;
  margin-bottom: 16px;
}

.card p { color: var(--text-muted); font-size: 15.5px; }

.card i { color: var(--accent-strong); margin-bottom: 16px; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.stat { text-align: center; }

.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  color: var(--accent-strong);
  display: block;
}

.stat .label {
  font-size: 13.5px;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

/* ---------- Testimonials ---------- */
.quote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px 30px;
}

.quote p { font-size: 16px; color: var(--text); margin-bottom: 14px; }

.quote .who {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Workshop cards ---------- */
.workshop-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  transition: border-color 0.25s ease;
}

.workshop-card:hover { border-color: var(--accent); }

.workshop-card .date {
  font-family: var(--font-mono);
  color: var(--accent-strong);
  font-size: 14px;
  min-width: 130px;
}

.workshop-card .details { flex: 1; min-width: 220px; }

.workshop-card .details .lib { font-weight: 600; font-size: 17px; }

.workshop-card .details .meta { color: var(--text-muted); font-size: 14.5px; }

.spots {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); }

.faq-item button.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  padding: 22px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item .faq-q i { transition: transform 0.25s ease; color: var(--text-faint); flex-shrink: 0; }

.faq-item.open .faq-q i { transform: rotate(45deg); color: var(--accent-strong); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--text-muted);
}

.faq-item.open .faq-a { max-height: 220px; }

.faq-a p { padding-bottom: 22px; font-size: 15.5px; }

/* ---------- Forms ---------- */
form { max-width: 560px; }

.field { margin-bottom: 22px; }

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

input, textarea, select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; min-height: 120px; }

.form-success {
  display: none;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 30px;
  color: var(--text);
}

.form-success.show { display: block; }

.form-success .check {
  font-family: var(--font-mono);
  color: var(--accent-strong);
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 44px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.footer-grid .col h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 14px;
}

.footer-grid .col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  margin-bottom: 9px;
  transition: color 0.2s;
}

.footer-grid .col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 13.5px;
  font-family: var(--font-mono);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Page transitions ---------- */
body { animation: pageIn 0.45s ease; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 34px; }
  .hero { padding: 90px 0 70px; }
  section { padding: 64px 0; }

  .hamburger { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 20px;
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a { display: block; padding: 12px 0; font-size: 16px; }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    min-width: 0;
    padding: 0 0 8px 14px;
    background: none;
    border: none;
    box-shadow: none;
  }

  .has-dropdown.open .dropdown-menu { display: flex; transform: none; }

  .dropdown-menu a { padding: 10px 0; font-size: 15px; }
}
