:root {
    --bg: #0d0f12;
    --bg-2: #121519;
    --surface: #171b21;
    --surface-2: #1d222a;
    --border: #272d37;
    --text: #e7eaef;
    --muted: #9aa3b0;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --accent-soft: rgba(245, 158, 11, 0.14);
    --radius: 14px;
    --maxw: 1080px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

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

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
}

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

.brand img {
    width: 28px;
    height: 28px;
}

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

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

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

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

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

.btn-primary {
    background: var(--accent);
    color: #1a1206;
}

.btn-primary:hover {
    background: var(--accent-2);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.9rem;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 110px 0 90px;
}

.hero::before {
    content: "";
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
    pointer-events: none;
}

.hero h1 {
    position: relative;
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    line-height: 1.1;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero p {
    position: relative;
    max-width: 620px;
    margin: 0 auto 32px;
    font-size: 1.15rem;
    color: var(--muted);
}

.hero-cta {
    position: relative;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Sections ---- */
section {
    padding: 64px 0;
}

.section-title {
    font-size: 1.9rem;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

.section-lead {
    color: var(--muted);
    margin: 0 0 40px;
    max-width: 640px;
}

/* ---- Feature groups ---- */
.feature-group {
    margin-bottom: 56px;
}

.feature-group:last-child {
    margin-bottom: 0;
}

.feature-group > h3 {
    font-size: 1.3rem;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-group > h3 .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.feature-group > .group-lead {
    color: var(--muted);
    margin: 0 0 22px;
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.14s ease, border-color 0.14s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.card h4 {
    margin: 0 0 6px;
    font-size: 1.02rem;
}

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

/* ---- Code blocks ---- */
pre {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    max-width: 100%;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.88rem;
    line-height: 1.55;
    color: #d7dde6;
}

/* Syntax highlighting — Ayu Dark palette */
pre .cmt {
    color: #5c6773;
    font-style: italic;
}

pre .kw {
    color: #ff8f40;
}

pre .cls {
    color: #59c2ff;
}

pre .fn {
    color: #ffb454;
}

pre .prop {
    color: #ffd173;
}

pre .str {
    color: #aad94c;
}

pre .num {
    color: #d2a6ff;
}

code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 6px;
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.code-grid figcaption {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

figure {
    margin: 0;
}

/* ---- Tech pills ---- */
.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.88rem;
    color: var(--muted);
}

/* ---- Get Started page ---- */
.doc h2 {
    font-size: 1.5rem;
    margin: 48px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.doc h3 {
    font-size: 1.15rem;
    margin: 28px 0 10px;
}

.doc p {
    color: var(--text);
}

.doc ul {
    color: var(--muted);
}

.callout {
    background: var(--accent-soft);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 18px 0;
    color: var(--text);
    font-size: 0.95rem;
}

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

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

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

/* ---- Responsive ---- */
@media (max-width: 760px) {
    .container {
        padding: 0 16px;
    }

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

    .code-grid figure {
        min-width: 0;
    }

    .nav {
        gap: 14px;
    }

    .nav .nav-link-hide {
        display: none;
    }

    section {
        padding: 48px 0;
    }

    .hero {
        padding: 80px 0 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
