:root {
  --bg: #0f1226;
  --bg-soft: #161a35;
  --surface: #1c2142;
  --surface-2: #232a52;
  --border: #2c3461;
  --text: #e8ebff;
  --text-dim: #a6acd8;
  --primary: #7c83ff;
  --primary-strong: #9aa0ff;
  --accent: #38e0c4;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 131, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(56, 224, 196, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: rgba(15, 18, 38, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0f1226;
  font-weight: 800;
  letter-spacing: -0.5px;
  box-shadow: var(--shadow);
}
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-sub { color: var(--text-dim); font-weight: 500; }

.site-nav { display: flex; gap: 1.2rem; }
.site-nav a { color: var(--text-dim); font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* Main */
.site-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
}
.hero .eyebrow {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 1.1rem 0 0.8rem;
  letter-spacing: -1px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--primary-strong), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 1.1rem;
}
.hero-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0f1226;
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-top: 2.5rem;
}
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card .ico {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* Section */
.section { margin-top: 3.5rem; }
.section h2 {
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.3rem;
}
.section .lead { color: var(--text-dim); margin-top: 0; }

/* Links list */
.link-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.link-list li {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 0.7rem;
  transition: border-color 0.15s ease;
}
.link-list li:hover { border-color: var(--primary); }
.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  color: var(--text);
}
.link-list a:hover { text-decoration: none; }
.link-list .arrow { color: var(--text-dim); }

/* Prose (inner doc pages) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 2.2rem; letter-spacing: -0.5px; margin-top: 0; }
.prose h2 {
  margin-top: 2.2rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.prose h3 { margin-top: 1.6rem; }
.prose code {
  background: var(--surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
}
.prose pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  overflow: auto;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1.1rem;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  color: var(--text-dim);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
}
.prose th { background: var(--surface); }

/* Footer */
.site-footer {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  padding: 1.4rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .hero { padding-top: 2rem; }
}

/* Docs layout: sidebar + content */
.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2.2rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.2rem 1.5rem 4rem;
}
.docs-sidebar nav {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-title {
  margin: 0 0 0.6rem;
  padding: 0 0.7rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.docs-sidebar a {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.docs-sidebar a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.docs-sidebar a.active { background: var(--surface-2); color: var(--text); }
.docs-main { min-width: 0; }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 1.2rem; }
  .docs-sidebar { display: none; }
}
