:root {
  --bg: #070a12;
  --bg-elevated: #0e1422;
  --bg-card: rgba(16, 22, 36, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eef9;
  --muted: #94a3b8;
  --cyan: #5bdeff;
  --violet: #a78bfa;
  --pink: #f472b6;
  --accent: linear-gradient(135deg, #5bdeff 0%, #a78bfa 55%, #f472b6 100%);
  --radius: 14px;
  --max: 1120px;
  --sidebar: 240px;
  --font: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(91, 222, 255, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(167, 139, 250, 0.14), transparent 50%),
    var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

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

a:hover {
  color: #9aecff;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 10, 18, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(91, 222, 255, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
}

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

.nav .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b1220 !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
}

.menu-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ── Landing ── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(91, 222, 255, 0.28);
  background: rgba(91, 222, 255, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--accent);
  color: #0b1220 !important;
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(91, 222, 255, 0.35);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  backdrop-filter: blur(10px);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

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

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.stack-list li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  color: var(--muted);
}

.preview-block {
  margin-top: 1rem;
}

.preview-block img {
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.shot-grid figure {
  margin: 0;
}

.shot-grid figcaption {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.note {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: rgba(167, 139, 250, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--violet);
}

/* ── Guide layout ── */
.guide-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 4.25rem;
  max-height: calc(100vh - 5rem);
  overflow: auto;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.sidebar h2 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc a {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.toc a:hover,
.toc a.active {
  color: var(--text);
  background: rgba(91, 222, 255, 0.08);
}

.content {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 2.5rem;
}

.content h1 {
  margin-top: 0;
  font-size: 1.75rem;
}

.content h2 {
  margin-top: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 1.3rem;
  scroll-margin-top: 5rem;
}

.content h3 {
  margin-top: 1.4rem;
  font-size: 1.05rem;
  scroll-margin-top: 5rem;
}

.content h2:first-of-type {
  border-top: none;
}

.content p,
.content li {
  color: #c9d4e8;
}

.content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--violet);
  background: rgba(167, 139, 250, 0.08);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.content th,
.content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.content th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.content pre {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #05070e;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

.content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(91, 222, 255, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

/* ── Mobile ── */
@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1rem;
    background: rgba(7, 10, 18, 0.96);
    border-bottom: 1px solid var(--border);
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 3.5rem 0.75rem auto;
    z-index: 40;
    display: none;
    max-height: 70vh;
  }

  .sidebar.open {
    display: block;
  }

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

  .content {
    padding: 1.15rem 1rem 2rem;
  }
}
