/* ── Radiant Core Docs — Shared Stylesheet ── */
/* Matches the main site theme from index.html */

:root {
    --bg: #0a0e17;
    --surface: #111827;
    --surface-hover: #1a2332;
    --border: #1e2d3d;
    --border-light: #2a3a4d;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-dim: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --green: #34d399;
    --orange: #fb923c;
    --purple: #a78bfa;
    --red: #f87171;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #7dd3fc; }

/* ── NAV ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
}
.nav-brand img { height: 36px; width: 36px; border-radius: 8px; }
.nav-links { display: flex; gap: 8px; list-style: none; flex-wrap: wrap; }
.nav-links a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-cta {
    background: var(--accent-dim) !important;
    color: #fff !important;
    font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent) !important; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ── ARTICLE LAYOUT ── */
.doc-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.doc-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.doc-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}
.doc-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ── CONTENT ── */
.doc-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 48px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.doc-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text);
}
.doc-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--text-muted);
}
.doc-content p {
    margin: 0 0 16px;
    color: var(--text);
}
.doc-content ul, .doc-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}
.doc-content li {
    margin-bottom: 6px;
    color: var(--text);
}
.doc-content li::marker {
    color: var(--text-muted);
}
.doc-content strong { color: var(--text); }
.doc-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}
.doc-content blockquote {
    border-left: 3px solid var(--accent);
    background: var(--surface);
    padding: 16px 20px;
    margin: 0 0 16px;
    border-radius: 0 8px 8px 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.doc-content blockquote p:last-child { margin-bottom: 0; }

/* ── TABLES ── */
.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
    font-size: 0.88rem;
    overflow-x: auto;
    display: block;
}
.doc-content thead th {
    text-align: left;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.doc-content tbody td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: var(--text);
}
.doc-content tbody tr:hover {
    background: var(--surface);
}

/* ── CODE ── */
.doc-content code {
    background: rgba(56, 189, 248, 0.08);
    color: var(--accent);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
    font-size: 0.85em;
}
.doc-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    margin: 0 0 20px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.6;
}
.doc-content pre code {
    background: none;
    color: var(--green);
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* ── CALLOUT BOXES ── */
.callout {
    border-radius: 8px;
    padding: 16px 20px;
    margin: 0 0 20px;
    font-size: 0.9rem;
}
.callout-info {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.2);
}
.callout-warn {
    background: rgba(251, 146, 60, 0.06);
    border: 1px solid rgba(251, 146, 60, 0.2);
}

/* ── BREADCRUMB ── */
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--border-light); }

/* ── TOC SIDEBAR (optional) ── */
.doc-toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin: 0 0 32px;
}
.doc-toc h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 0 0 12px;
}
.doc-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.doc-toc li {
    margin-bottom: 6px;
}
.doc-toc a {
    color: var(--text-muted);
    font-size: 0.88rem;
    display: block;
    padding: 4px 0;
    transition: color 0.15s;
}
.doc-toc a:hover { color: var(--accent); }

/* ── FOOTER ── */
.doc-footer {
    border-top: 1px solid var(--border);
    margin-top: 64px;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

/* ── DOCS HUB GRID ── */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 32px;
}
.doc-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.25s;
    text-decoration: none;
}
.doc-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.doc-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.doc-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}
.doc-card .tag {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.tag-getting-started { background: rgba(52,211,153,0.12); color: var(--green); }
.tag-developer { background: rgba(251,146,60,0.12); color: var(--orange); }
.tag-user { background: rgba(167,139,250,0.12); color: var(--purple); }
.tag-security { background: rgba(248,113,113,0.12); color: var(--red); }
.tag-reference { background: rgba(56,189,248,0.12); color: var(--accent); }

/* ── ASCII ART / DIAGRAMS ── */
.doc-content pre.diagram {
    font-size: 0.72rem;
    line-height: 1.3;
    overflow-x: auto;
    color: var(--text-muted);
}
.doc-content pre.diagram code {
    color: var(--text-muted);
}

/* ── DOCS HUB SPECIFIC ── */
.doc-hub-header { text-align: center; border-bottom: none; margin-bottom: 24px; }
.doc-hub-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.doc-hub-header h1 { margin-bottom: 12px; }
.nav-active { color: var(--accent) !important; font-weight: 600 !important; }
.section-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    margin: 40px 0 16px;
    border: none;
    padding: 0;
}
.section-label:first-of-type { margin-top: 32px; }
.docs-grid-flush { margin-top: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 4px;
    }
    .hamburger { display: block; }
    .doc-container { padding: 32px 16px 60px; }
    .doc-header h1 { font-size: 1.75rem; }
    .doc-content h2 { font-size: 1.3rem; }
    .docs-grid { grid-template-columns: 1fr; }
    .doc-footer { flex-direction: column; text-align: center; }
}
