/* Documentation Shell - Navbar + Sidebar + Iframe */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink-black: #0a0a0a;
    --deep-black: #000000;
    --ink-gray: #1a1a1a;
    --splash-white: #ffffff;
    --off-white: #f5f5f5;
    --accent-silver: #c0c0c0;
    --ember-red: rgba(200, 0, 0, 0.8);
    --dark-ember: rgba(120, 0, 0, 0.6);
    --glow-red: rgba(255, 40, 0, 0.9);
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --gray: #888;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--deep-black);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* ================================ */
/* HEADER & NAVIGATION              */
/* (Matching index.html styling)    */
/* ================================ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

header:hover {
    background: rgba(0, 0, 0, 0.98);
    border-bottom-color: var(--splash-white);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    flex-shrink: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--splash-white);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
    text-decoration: none;
}

/* Bluesky Social Link */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bluesky-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bluesky-link:hover {
    border-color: var(--ember-red);
    box-shadow: 0 0 28px rgba(200, 0, 0, 0.4);
}

.bluesky-icon {
    width: 32px;
    height: 32px;
    fill: rgba(128, 0, 0, 0.85);
    transition: fill 0.3s ease;
}

.bluesky-link:hover .bluesky-icon {
    fill: rgba(146, 22, 0, 0.95);
}


.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--accent-silver);
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    cursor: pointer;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ember-red);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--splash-white);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--splash-white);
}

.nav-links a.active::after {
    width: 100%;
    background: var(--glow-red);
}

.nav-cta-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-btn-outline {
    background: transparent;
    border: 1px solid var(--accent-silver);
    color: var(--accent-silver);
}

.cta-btn-outline:hover {
    border-color: var(--splash-white);
    color: var(--splash-white);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* ================================ */
/* SIDEBAR                          */
/* ================================ */
.toc-sidebar {
    position: fixed;
    top: 65px;
    left: 0;
    width: 280px;
    height: calc(100vh - 65px);
    background: rgba(10, 10, 10, 0.5);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 2rem 0;
    z-index: 100;
}

.toc-title {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.toc-section {
    margin-bottom: 1.5rem;
}

.toc-section-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--splash-white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toc-section-title .icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke: currentColor;
}

.toc-links {
    list-style: none;
}

.toc-links a {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 3rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    cursor: pointer;
}

.toc-links a:hover {
    color: var(--splash-white);
    background: rgba(255, 255, 255, 0.03);
}

.toc-links a.active {
    color: var(--splash-white);
    border-left-color: var(--ember-red);
    background: rgba(200, 0, 0, 0.1);
}

/* Sidebar scrollbar */
.toc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.toc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.toc-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ================================ */
/* IFRAME MAIN CONTENT              */
/* ================================ */
.doc-main {
    position: fixed;
    top: 65px;
    left: 280px;
    right: 0;
    bottom: 0;
}

.doc-main iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--deep-black);
}

/* ================================ */
/* MOBILE                           */
/* ================================ */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--splash-white);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle i {
    width: 24px;
    height: 24px;
}

@media (max-width: 1024px) {
    .toc-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background: rgba(10, 10, 10, 0.95);
    }

    .toc-sidebar.open {
        transform: translateX(0);
    }

    .doc-main {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1rem;
    }

    .nav-links {
        gap: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .cta-btn-outline {
        display: none;
    }

    .doc-main {
        top: 55px;
    }

    .toc-sidebar {
        top: 55px;
        height: calc(100vh - 55px);
    }
}