@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Fonts */
    --font-sans: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Theme Colors: Dark Purple/Black Elegance */
    --bg-app: #0A0A0C;
    /* Very dark, almost black */
    --bg-sidebar: #0F0F12;
    /* Slightly lighter for contrast */
    --bg-card: #141419;
    /* Subtle card background */
    --bg-input: #1C1C22;

    --border-subtle: #27272F;
    --border-strong: #3F3F4E;

    /* Text Colors */
    --text-primary: #EDEDF0;
    --text-secondary: #A0A0B0;
    --text-tertiary: #707080;

    /* Accents */
    --accent-primary: #8B5CF6;
    /* Violet */
    --accent-glow: rgba(139, 92, 246, 0.15);
    --accent-hover: #7C3AED;

    /* Functional */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Spacing & Layout */
    --sidebar-width: 280px;
    --content-max-width: 1000px;
    --header-height: 60px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden;
    /* Main scroll is inside main element */
}

@media (max-width: 900px) {
    body {
        height: auto;
        overflow-y: auto;
    }
}

/* Layout */
.layout {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid transparent;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.brand-logo {
    height: 40px;
    width: auto;
    width: auto;
    border-radius: var(--radius-sm);
}

.toc-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    padding-top: 1rem;
}

.nav-group {
    margin-bottom: 2rem;
}

.nav-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

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

.nav-link.active {
    color: var(--text-primary);
    background-color: var(--accent-glow);
    border-left-color: var(--accent-primary);
    font-weight: 500;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text-primary);
}

/* Mobile Social Actions (Hidden by default) */
.mobile-social-actions {
    display: none;
    flex-direction: row;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 4rem 2rem;
    scroll-behavior: smooth;
}

.content-wrapper {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* Typography & Prose */
h1 {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #a5a5a5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text-primary);
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.75;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.text-highlight {
    color: var(--text-primary);
    font-weight: 600;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: rgba(255, 255, 255, 0.06);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: #E2E8F0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Components */
.badge-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-subtle);
    margin: 4rem 0;
}

.meta-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-top: 2rem;
    display: flex;
    gap: 3rem;
}

.meta-row {
    display: flex;
    flex-direction: column;
}

.meta-key {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.meta-val {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Project Cards/Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

/* Tags */
.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-difficulty {
    background-color: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.tag-medium {
    background-color: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 0;
    /* Removed card styling for simpler look */
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
}

.spec-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.avatar-stack {
    display: flex;
    gap: 0.25rem;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--border-strong);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    border: 2px solid var(--bg-card);
    cursor: default;
}

/* Scope List */
.scope-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.scope-item {
    display: flex;
    gap: 1rem;
    /* align-items: start; */
}

.scope-badge {
    flex-shrink: 0;
    width: 50px;
    text-align: center;
    font-size: 0.75rem;
    padding: 0.2rem 0;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.scope-badge.medium {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.scope-badge.large {
    background-color: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
}

.scope-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.checklist li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--text-secondary);
    font-weight: normal;
}

.checklist strong {
    color: var(--text-primary);
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-top: 4rem;
    padding-bottom: 2rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Responsive */
@media (max-width: 900px) {
    .layout {
        flex-direction: column;
        height: auto;
        overflow-y: visible;
        display: block;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 100;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 0.75rem 1.5rem;
        background-color: rgba(15, 15, 18, 0.95);
        backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
    }

    .sidebar-header {
        padding: 0;
        border: none;
        width: 100%;
    }

    .toc-nav {
        display: none !important;
    }

    .sidebar-footer {
        display: none;
    }

    .mobile-social-actions {
        display: flex;
    }

    .footer-link span {
        display: inline;
        /* Ensure text is visible for mobile footer */
    }

    .main-content {
        padding: 2rem 1.5rem;
        overflow-y: visible;
        height: auto;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }
}
