/* axon labs — shared styles */

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

:root {
    --bg: #0a0a0a;
    --surface: #111;
    --text: #999;
    --text-bright: #d4d4d4;
    --accent: #fff;
    --dim: #505050;
    --border: #1a1a1a;
    --code-bg: #141414;
    --sidebar-w: 240px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    z-index: 100;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

a:hover { opacity: 0.7; }

/* ---- landing ---- */

.layout-landing main {
    max-width: 700px;
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
}

.landing-header h1 {
    color: var(--text-bright);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.landing-header .tagline {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.landing-projects { margin-top: 3rem; }

.project-card {
    display: block;
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: border-color 0.2s ease;
    color: inherit;
}

.project-card:hover {
    border-color: #2a2a2a;
    opacity: 1;
}

.project-card-name {
    color: var(--text-bright);
    font-weight: 700;
    font-size: 0.9rem;
}

.project-card-desc {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    line-height: 1.7;
}

.project-card-links {
    margin-top: 0.6rem;
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
}

.project-card-links a {
    color: var(--dim);
    transition: color 0.15s ease;
}

.project-card-links a:hover {
    color: var(--accent);
    opacity: 1;
}

/* ---- docs layout ---- */

.sidebar {
    position: fixed;
    top: 2px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    padding: 2rem 1.5rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 50;
}

.sidebar-brand {
    display: block;
    color: var(--dim);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    transition: color 0.15s ease;
}

.sidebar-brand:hover { color: var(--accent); opacity: 1; }

.sidebar-project {
    color: var(--text-bright);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar-nav a {
    display: block;
    color: var(--text);
    font-size: 0.8rem;
    padding: 0.3rem 0;
    transition: color 0.15s ease;
}

.sidebar-nav a:hover { color: var(--accent); opacity: 1; }

.sidebar-divider {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid var(--border);
}

.sidebar-label {
    display: block;
    color: var(--dim);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.sidebar-other {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar-other a {
    color: var(--dim);
    font-size: 0.75rem;
    padding: 0.2rem 0;
    transition: color 0.15s ease;
}

.sidebar-other a:hover { color: var(--accent); opacity: 1; }
.sidebar-other a.current { color: var(--text-bright); }

.layout-docs main {
    margin-left: var(--sidebar-w);
    padding: 3rem 3rem 4rem;
    max-width: calc(var(--sidebar-w) + 780px);
    width: 100%;
}

/* ---- doc content ---- */

.layout-docs h1 {
    color: var(--text-bright);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.doc-subtitle {
    margin-top: 0.4rem;
    font-size: 0.85rem;
}

.doc-badges {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.6rem;
    font-size: 0.75rem;
}

.doc-badges a {
    color: var(--dim);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.doc-badges a:hover {
    color: var(--accent);
    border-color: var(--dim);
    opacity: 1;
}

.layout-docs section { margin-top: 3rem; }

.layout-docs h2 {
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 1.2rem;
}

.layout-docs h3 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
}

.layout-docs p {
    font-size: 0.85rem;
    line-height: 1.75;
    margin-bottom: 0.8rem;
}

.layout-docs ul, .layout-docs ol {
    font-size: 0.85rem;
    line-height: 1.75;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
}

.layout-docs li { margin-bottom: 0.3rem; }

code {
    background: var(--code-bg);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    font-size: 0.82rem;
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1rem 1.2rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    line-height: 1.65;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: var(--text-bright);
}

/* ---- params ---- */

.param {
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
}

.param-name {
    color: var(--text-bright);
    font-weight: 700;
}

.param-type {
    color: var(--dim);
    font-size: 0.75rem;
}

/* ---- footer ---- */

footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--dim);
}

footer a { color: var(--dim); }
footer a:hover { color: var(--accent); opacity: 1; }

/* ---- mobile ---- */

.menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-bright);
    font-family: inherit;
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 3px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .sidebar-open .sidebar { transform: translateX(0); }

    .sidebar-open .menu-toggle { left: calc(var(--sidebar-w) + 10px); }

    .layout-docs main {
        margin-left: 0;
        padding: 3.5rem 1.2rem 2rem;
    }

    .layout-landing main { padding: 3.5rem 1rem 2rem; }
    .landing-header h1 { font-size: 1.25rem; }
}
