:root {
  --bg: #060913;
  --bg-elevated: #0d1426;
  --surface: #111a2e;
  --surface-2: #19243d;
  --border: rgba(148, 163, 184, 0.18);
  --border-glow: rgba(56, 189, 248, 0.45);
  --text: #e2e8f0;
  --text-bright: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --green: #34d399;
  --amber: #fbbf24;
  --code-bg: #030712;
  --radius: 12px;
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.14), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(129, 140, 248, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

/* Shared Top Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 9, 19, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-bright);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #040812;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
}

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

.header-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--text-bright);
  background: rgba(148, 163, 184, 0.12);
  text-decoration: none;
}

.header-cta {
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #030712 !important;
  font-weight: 700 !important;
  padding: 8px 16px !important;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.25);
}

.header-cta:hover {
  filter: brightness(1.08);
}

/* Landing Page (Welcome) */
.landing-main {
  flex: 1;
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 76px 24px 56px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-glow);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 58ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.96rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #030712;
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-bright);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-glow);
}

.hero-code-card {
  background: var(--code-bg);
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.code-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-code-card pre {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px;
}

.section-header {
  max-width: 680px;
  margin-bottom: 32px;
}

.section-header h2 {
  margin: 0 0 10px;
  border: none;
  padding: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  color: var(--text-bright);
}

.section-header p {
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.feature-card {
  background: linear-gradient(180deg, rgba(25, 36, 61, 0.65), rgba(13, 20, 38, 0.9));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.feature-card h3 {
  margin: 0 0 8px;
  color: var(--text-bright);
  font-size: 1.12rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.curriculum-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.curriculum-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.curriculum-item:hover {
  border-color: var(--border-glow);
  text-decoration: none;
}

.curriculum-item strong {
  color: var(--text-bright);
  font-size: 0.98rem;
}

.curriculum-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Wiki Guide Layout */
.layout {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  flex: 1;
}

.sidebar {
  background: rgba(13, 20, 38, 0.72);
  border-right: 1px solid var(--border);
  padding: 26px 18px;
  position: sticky;
  top: 61px;
  height: calc(100vh - 61px);
  overflow-y: auto;
}

.version-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}

.nav-group {
  margin-bottom: 20px;
}

.nav-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-list a {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: 0.9rem;
}

.nav-list a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.nav-list a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.content {
  padding: 40px clamp(20px, 5vw, 56px);
  max-width: 920px;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.badge.beginner {
  background: rgba(52, 211, 153, 0.14);
  color: var(--green);
}

.badge.intermediate {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.advanced {
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
}

.content h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  line-height: 1.2;
  color: var(--text-bright);
}

.content h2 {
  margin-top: 38px;
  margin-bottom: 12px;
  font-size: 1.35rem;
  color: var(--text-bright);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: #f1f5f9;
}

p {
  margin: 0 0 14px;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 26px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.card h3 {
  margin-top: 0;
}

.callout {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px;
  margin: 18px 0;
  color: var(--text);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87rem;
  line-height: 1.55;
  margin: 14px 0 20px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 2px 5px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.92rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

th {
  background: var(--surface);
  color: var(--text-bright);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pager a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-weight: 600;
}

.pager a:hover {
  border-color: var(--border-glow);
  text-decoration: none;
}

/* Shared Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: var(--text-bright);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col a,
.footer-col p {
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}
