:root {
  --bg: #050509;
  --bg-elevated: #0c0c12;
  --bg-soft: #11111a;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f9fafb;
  --text-soft: #9ca3af;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --accent-strong: #6366f1;
  --danger: #f97373;
  --muted: #4b5563;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.6);
  --shadow-subtle: 0 1px 0 rgba(255, 255, 255, 0.04);
  --nav-height: 64px;
  --transition-fast: 150ms ease-out;
  --transition-slow: 220ms ease-out;
}

html[data-theme='light'] {
  --bg: #f3f4f6;
  --bg-elevated: #ffffff;
  --bg-soft: #f9fafb;
  --border-subtle: rgba(15, 23, 42, 0.06);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #020617;
  --text-soft: #4b5563;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-strong: #3730a3;
  --danger: #b91c1c;
  --muted: #6b7280;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-subtle: 0 1px 0 rgba(15, 23, 42, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text',
    'Inter', 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #111827 0, var(--bg) 42%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  padding-top: var(--nav-height);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 15, 0.92),
    rgba(5, 5, 15, 0.86),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: conic-gradient(
    from 220deg,
    #4f46e5,
    #22d3ee,
    #a855f7,
    #4f46e5
  );
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 12px 30px rgba(15, 23, 42, 0.9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.nav-links a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform 120ms ease-out;
}

.nav-links a:hover {
  background-color: rgba(148, 163, 184, 0.14);
  color: var(--text);
  transform: translateY(-1px);
}

.theme-toggle {
  position: relative;
  border-radius: 999px;
  width: 40px;
  height: 24px;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top, #1f2937 0, #020617 46%);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2px;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}

.theme-toggle .theme-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #facc15;
  transform: translateX(0);
  transition:
    transform var(--transition-slow),
    background-color var(--transition-slow),
    box-shadow var(--transition-slow);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.4),
    0 6px 14px rgba(15, 23, 42, 0.8);
}

.theme-icon-sun {
  position: absolute;
  inset: 3px auto 3px 3px;
}

.theme-icon-moon {
  position: absolute;
  inset: 3px 3px 3px auto;
  opacity: 0;
}

html[data-theme='light'] .theme-toggle .theme-icon {
  transform: translateX(0);
  background: #facc15;
}

html[data-theme='dark'] .theme-toggle .theme-icon {
  transform: translateX(16px);
  background: #38bdf8;
}

html[data-theme='dark'] .theme-icon-sun {
  opacity: 0;
}

html[data-theme='dark'] .theme-icon-moon {
  opacity: 1;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-soft);
  transition:
    transform 140ms ease-out,
    opacity 140ms ease-out;
  margin-inline: auto;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

.hero {
  padding-block: 2.75rem 2rem;
}

.hero-content {
  display: grid;
  gap: 2rem;
}

.hero-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.accent {
  color: var(--accent-strong);
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.hero-search {
  margin-bottom: 1.25rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.65rem 0.75rem;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #1e293b 0, #020617 55%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.search-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.search-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.search-input-wrapper input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background-color: var(--muted);
}

.section {
  padding-block: 0 3rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.section-header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.section-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.75rem 0 0.75rem;
}

.section-subheader h3 {
  font-size: 1rem;
  margin: 0;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 0.9rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 0.35rem;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.category-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.16),
    rgba(15, 23, 42, 0.9)
  );
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.category-card .card-link {
  display: block;
  padding: 1.1rem 1.2rem;
}

.category-card header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.4rem;
}

.category-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.4), #020617);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

.category-card h3 {
  margin: 0;
  font-size: 1rem;
}

.category-description {
  margin: 0.25rem 0 0.7rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.category-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.trail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.trail-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.96)
  );
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
  transition:
    transform 160ms ease-out,
    box-shadow 160ms ease-out,
    border-color 160ms ease-out,
    background-color 160ms ease-out;
}

.trail-card .card-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.95rem 1rem;
}

.trail-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.trail-card h4 {
  margin: 0;
  font-size: 0.98rem;
}

.trail-description {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.trail-footer {
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.trail-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(94, 234, 212, 0.3);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(94, 234, 212, 0.25);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill-soft {
  background-color: rgba(148, 163, 184, 0.16);
  color: var(--text-soft);
  border-color: transparent;
}

.pill-level-beginner {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.pill-level-intermediate {
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.pill-level-advanced {
  background-color: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.5);
  color: #f9a8d4;
}

.pill-level-neutral {
  background-color: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text-soft);
}

.pill-status-unlocked {
  background-color: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.pill-status-locked {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

.pill-status-future {
  background-color: rgba(234, 179, 8, 0.16);
  border-color: rgba(234, 179, 8, 0.5);
  color: #fde68a;
}

.empty-state {
  margin-top: 2.5rem;
  padding: 1.5rem 1.3rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, #1f2937, #020617);
  border: 1px dashed var(--border-subtle);
}

.empty-state h3,
.empty-state h1,
.empty-state h2 {
  margin: 0 0 0.4rem;
}

.empty-state p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #f9fafb;
  font-size: 0.85rem;
  margin-top: 1rem;
  cursor: pointer;
}

.page-trail {
  padding-block: 1.75rem 3rem;
}

.trail-header {
  margin-bottom: 1.75rem;
}

.trail-kicker {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

.trail-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.trail-subtitle {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  max-width: 40rem;
}

.trail-meta {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.modules-timeline {
  margin-top: 1.75rem;
}

.modules-header h2 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.modules-header p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.modules-list {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.module-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.75rem;
}

.module-step-indicator {
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-circle {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 8px 18px rgba(22, 163, 74, 0.55);
}

html[data-theme='light'] .step-circle {
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.3),
    0 6px 14px rgba(22, 163, 74, 0.4);
}

.step-number {
  font-size: 0.78rem;
  font-weight: 600;
  color: #ecfdf3;
}

.step-line {
  flex: 1;
  width: 2px;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    rgba(34, 197, 94, 0.5),
    rgba(34, 197, 94, 0)
  );
}

.module-item:last-child .step-line {
  opacity: 0;
}

.module-card {
  border-radius: var(--radius-lg);
  padding: 0.95rem 1rem 1rem;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, #0f172a, #020617);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.9);
}

.module-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.module-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.module-step-label {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.module-card h2 {
  margin: 0;
  font-size: 1rem;
}

.module-description {
  margin: 0.4rem 0 0.7rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.module-topics h3,
.module-resources h3 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.module-topics ul,
.module-resources ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.module-topics li + li,
.module-resources li + li {
  margin-top: 0.18rem;
}

.module-resources a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.module-status-unlocked {
  border-color: rgba(34, 197, 94, 0.5);
}

.module-status-locked {
  border-style: dashed;
  opacity: 0.78;
}

.module-status-future {
  border-style: dashed;
}

.future-section {
  margin-top: 2.25rem;
  padding: 1.3rem 1.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), #020617);
  border: 1px solid var(--border-subtle);
}

.future-section h2 {
  margin: 0 0 0.4rem;
}

.future-section p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.future-section ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-block: 1rem 1.3rem;
  margin-top: 1.5rem;
  background: radial-gradient(circle at top, #020617 0, #020617 40%);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.footer-right {
  opacity: 0.9;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

@media (min-width: 640px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .trail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .module-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-block: 3.25rem 2.5rem;
  }

  .trail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modules-list {
    gap: 1.25rem;
  }
}
