/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --text-primary: #ededed;
    --text-secondary: #999999;
    --accent: #ffffff;
    --border: #222222;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.version {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.nav-link {
    padding: 0.75rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-right: 2px solid transparent;
}

.nav-link:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: var(--accent);
    border-right-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Main Content Area */
.content {
    flex-grow: 1;
    padding: 4rem 5rem;
    max-width: 900px;
}

/* Hero Section */
.hero {
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.hero-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, var(--border), transparent);
    margin-top: 3rem;
}

/* Content Sections */
.doc-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.sub-heading {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 2rem 0 1rem;
    color: #dfdfdf;
}

.doc-section p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: #cccccc;
}

/* Feature Lists */
.feature-list {
    list-style-type: none;
    margin-bottom: 2rem;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: #cccccc;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
}

.feature-list strong {
    color: var(--accent);
    font-weight: 600;
}

/* Code Blocks */
.code-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    position: relative;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #333, transparent);
}

pre {
    margin: 0;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #e6e6e6;
    line-height: 1.5;
}

p code {
    background: var(--bg-card);
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85em;
}

/* Architecture Cards */
.architecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.arch-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.arch-card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

.arch-card h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.arch-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .content {
        padding: 4rem 3rem;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
    }
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    .nav-link {
        white-space: nowrap;
        border-right: none;
        border-bottom: 2px solid transparent;
        padding: 0.5rem 1rem;
    }
    .nav-link.active {
        border-right-color: transparent;
        border-bottom-color: var(--accent);
    }
    .content {
        padding: 2rem 1.5rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}
