:root {
  --bg: #0b0c10;
  --ink: #e5e7eb;
  --muted: #9ca3af;
  --accent: #f97316;
  --accent-strong: #fb923c;
  --card: #111318;
  --border: rgba(148, 163, 184, 0.16);
  --shadow: rgba(0, 0, 0, 0.5);
  --highlight: rgba(249, 115, 22, 0.12);
  --sidebar: #0f1116;
  --sidebar-muted: rgba(148, 163, 184, 0.8);
  --surface: #141720;
  --surface-strong: #1b2029;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.site-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(249, 115, 22, 0.12), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.12), transparent 40%),
    linear-gradient(180deg, #0b0c10 0%, #0f1116 100%);
  z-index: -1;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(15, 17, 22, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  margin-bottom: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--muted);
}

.top-logo {
  color: #f8fafc;
  font-weight: 700;
}

.top-divider {
  opacity: 0.5;
}

.top-section {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.topbar-center {
  display: flex;
  justify-content: center;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 12px;
  width: min(520px, 100%);
}

.top-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 14px;
}

.top-search input:focus {
  outline: none;
}

.search-hint {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.topbar-right {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.top-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.top-cta {
  background: var(--accent);
  color: #0b0c10;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  background: var(--sidebar);
  color: #f8fafc;
  padding: 24px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.6);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.2);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--sidebar-muted);
}

.sidebar-search label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sidebar-muted);
  display: block;
  margin-bottom: 6px;
}

.sidebar-search input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #e2e8f0;
}

.side-nav {
  display: grid;
  gap: 10px;
}

.side-nav a {
  color: #f8fafc;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 10px;
  background: transparent;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  transform: translateX(2px);
}

.sidebar-card {
  background: rgba(148, 163, 184, 0.08);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-card h4 {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--sidebar-muted);
}

.sidebar-card p {
  margin: 0 0 8px;
  font-size: 13px;
}

.sidebar-card code {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  padding: 32px;
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: 0 20px 50px -30px var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(249, 115, 22, 0.12), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-strong);
  margin: 0 0 12px;
}

h1 {
  font-size: 36px;
  margin: 0 0 16px;
  line-height: 1.1;
}

.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 720px;
  margin: 0;
}

.cta-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.cta-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
  margin-bottom: 8px;
}

code {
  font-family: "Courier New", monospace;
  background: rgba(148, 163, 184, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  color: #f8fafc;
}

.instructions,
.skills-section {
  background: var(--card);
  border-radius: 20px;
  padding: 24px 28px;
  border: 1px solid var(--border);
}

.skills-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header h2 {
  margin: 0 0 6px;
}

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

.instructions h2 {
  margin-top: 0;
}

.instructions ol,
.instructions ul {
  margin: 12px 0 0 20px;
  color: var(--muted);
}

.controls {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.control label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.control input,
.control select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: var(--surface);
  color: #e2e8f0;
}

.control.toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px -30px var(--shadow);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

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

.skill-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px -32px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(12px);
}

.skill-title {
  font-size: 20px;
  margin: 0;
}

.skill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 12px;
}

.badge.featured {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.skill-description {
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.skill-path {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.no-results {
  padding: 30px;
  text-align: center;
  background: var(--card);
  border-radius: 16px;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.site-footer {
  padding: 32px;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer h3 {
  margin: 0 0 8px;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #0b0c10;
  text-decoration: none;
  font-weight: 700;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

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

  .topbar-center {
    order: 3;
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .sidebar {
    position: relative;
    top: 0;
  }

  .side-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 32px;
  }

  .cta-row {
    grid-template-columns: 1fr;
  }
}

.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.toc-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 10px;
}

.toc-list {
  display: grid;
  gap: 8px;
}

.toc-list a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
}

.toc-list a:hover {
  color: var(--accent-strong);
}

.toc-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
