:root {
    --bg: #0D0D0D;
    --bg-card: #161616;
    --bg-code: #1A1A1A;
    --primary: #E0690D;
    --primary-glow: rgba(224, 105, 13, 0.25);
    --secondary: #E0D3C2;
    --text: #C8C8C8;
    --text-muted: #888;
    --border: #2A2A2A;
    --rust: #CE422B;
    --success: #2ECC71;
    --radius: 8px;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

/* ─── Navigation ─── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}
nav .inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px;
}
nav .logo { font-weight: 700; font-size: 1.25rem; color: var(--secondary); }
nav .logo span { color: var(--primary); }
nav .links { display: flex; gap: 2rem; list-style: none; }
nav .links a {
    color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
    transition: color 0.2s; font-weight: 500;
}
nav .links a:hover, nav .links a.active { color: var(--primary); }

/* ─── Layout ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ─── Hero ─── */
.hero {
    padding: 8rem 2rem 5rem;
    text-align: center;
}
.hero img.logo-hero { width: 350px; margin-bottom: 1.5rem; }
.hero h1 {
    font-size: 3rem; font-weight: 800; color: var(--secondary);
    letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.hero h1 span { color: var(--primary); }
.hero .tagline { font-size: 1.25rem; color: var(--text-muted); max-width: 650px; margin: 0 auto 2rem; }
.hero .cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-block; padding: 0.75rem 1.75rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.95rem; text-decoration: none;
    transition: all 0.2s; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #FFF; border: 2px solid var(--primary); }
.btn-primary:hover { background: #c85b0b; border-color: #c85b0b; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--secondary); border: 2px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Badges ─── */
.badges { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0 0; }
.badges img, .badges a { height: 22px; border-radius: 4px; }

/* ─── Sections ─── */
section { padding: 4rem 0; }
.section-title {
    font-size: 2rem; font-weight: 700; color: var(--secondary);
    margin-bottom: 1rem; letter-spacing: -0.01em;
}
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2.5rem; }

/* ─── Cards ─── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem;
    transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card h3 { color: var(--secondary); font-size: 1.15rem; margin-bottom: 0.75rem; }
.card h3 .icon { color: var(--primary); margin-right: 0.4rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.card a { color: var(--primary); text-decoration: none; font-weight: 600; }
.card a:hover { text-decoration: underline; }

/* ─── Code Blocks ─── */
pre {
    background: var(--bg-code); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; overflow-x: auto;
    font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.55;
    margin: 1.5rem 0;
}
code {
    font-family: var(--font-mono); font-size: 0.9em;
    background: var(--bg-code); padding: 0.15em 0.4em; border-radius: 4px;
}
pre code { background: none; padding: 0; font-size: inherit; }
.hl-kw { color: #C678DD; }      /* keyword */
.hl-fn { color: #61AFEF; }       /* function */
.hl-str { color: #98C379; }      /* string */
.hl-cmt { color: #5C6370; font-style: italic; } /* comment */
.hl-ty { color: #E5C07B; }       /* type */
.hl-attr { color: #D19A66; }     /* attribute */
.hl-num { color: #D19A66; }      /* number */
.hl-macro { color: #56B6C2; }    /* macro */

/* ─── Feature Table ─── */
.feat-table { width: 100%; border-collapse: collapse; margin: 2rem 0; }
.feat-table th {
    text-align: left; color: var(--secondary); font-weight: 600;
    padding: 0.75rem 1rem; border-bottom: 2px solid var(--border);
}
.feat-table td {
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.feat-table td:first-child { color: var(--secondary); font-weight: 500; }
.feat-check { color: var(--success); }
.feat-muted { color: var(--text-muted); }

/* ─── Footer ─── */
footer {
    border-top: 1px solid var(--border); padding: 3rem 0 2rem;
    text-align: center; color: var(--text-muted); font-size: 0.9rem;
    margin-top: 2rem;
}
footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ─── API section ─── */
.api-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; margin-bottom: 2rem;
}
.api-item h3 { color: var(--primary); font-size: 1.3rem; margin-bottom: 0.5rem; font-family: var(--font-mono); }
.api-item .desc { color: var(--text-muted); margin-bottom: 1rem; }

/* ─── Contributing ─── */
.step-list { counter-reset: step; list-style: none; }
.step-list li {
    counter-increment: step; padding: 1.5rem 0 1.5rem 3.5rem;
    border-bottom: 1px solid var(--border); position: relative;
}
.step-list li::before {
    content: counter(step);
    position: absolute; left: 0; top: 1.3rem;
    width: 2.2rem; height: 2.2rem;
    background: var(--primary); color: #FFF;
    border-radius: 50%; text-align: center; line-height: 2.2rem;
    font-weight: 700; font-size: 0.9rem;
}
.step-list h4 { color: var(--secondary); margin-bottom: 0.4rem; }

/* ─── Mobile ─── */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 5rem 1.5rem 3rem; }
    nav .links { gap: 1.2rem; }
    .container { padding: 0 1rem; }
    .grid { grid-template-columns: 1fr; }
}

/* ─── Link styles ─── */
a.inline { color: var(--primary); text-decoration: none; font-weight: 500; }
a.inline:hover { text-decoration: underline; }
