@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #050510;
    --bg-surface: #0a0a1a;
    --bg-card: #0f0f24;
    --bg-card-hover: #141430;
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(123, 47, 242, 0.3);
    --accent: #7B2FF2;
    --accent-light: #9B5FF5;
    --accent-glow: rgba(123, 47, 242, 0.15);
    --text: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --success: #34d399;
    --info: #60a5fa;
    --warning: #fbbf24;
    --pink: #f472b6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 1.05rem;
    -webkit-font-smoothing: antialiased;
}

/* ================================================ */
/* SCROLLBAR                                        */
/* ================================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* ================================================ */
/* NAVBAR                                           */
/* ================================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.nav-brand img {
    width: 36px;
    height: 36px;
}



.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--accent-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.gtranslate_wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

.btn-lang {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.btn-lang:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* ================================================ */
/* LAYOUT                                           */
/* ================================================ */
.page {
    padding-top: 64px;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ================================================ */
/* ARTICLE / PAPER STYLES                           */
/* ================================================ */
.article-header {
    padding: 5rem 0 3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    line-height: 1.8;
}

.article-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.section {
    padding: 3rem 0;
}

.section+.section {
    border-top: 1px solid var(--border);
}

.section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--accent-light);
}

.section p {
    font-size: 1rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.section ul {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.section li {
    font-size: 1rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.section li strong {
    color: var(--text);
}

/* ================================================ */
/* CARDS                                            */
/* ================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.card p {
    font-size: 0.95rem !important;
    color: var(--text-muted) !important;
    line-height: 1.6;
}

.card-grid {
    display: grid;
    gap: 1.25rem;
}

.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--text-dim);
}

/* ================================================ */
/* CODE BLOCKS                                      */
/* ================================================ */
.code-block {
    background: #0c0c1e;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #c4b5fd;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.code-block .comment {
    color: var(--text-dim);
}

.code-block .keyword {
    color: #c084fc;
}

.code-block .type {
    color: #60a5fa;
}

.code-block .string {
    color: #34d399;
}

.code-block .number {
    color: #fbbf24;
}

/* ================================================ */
/* IMAGE FIGURES                                    */
/* ================================================ */
.figure {
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-surface);
}

.figure img {
    width: 100%;
    display: block;
}

.figure-caption {
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    font-style: italic;
}

/* ================================================ */
/* CALLOUT / ADMONITION                             */
/* ================================================ */
.callout {
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-left: 3px solid;
    font-size: 0.9rem;
}

.callout-purple {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: #c4b5fd;
}

.callout-blue {
    border-color: var(--info);
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
}

.callout-green {
    border-color: var(--success);
    background: rgba(52, 211, 153, 0.1);
    color: #6ee7b7;
}

.callout-yellow {
    border-color: var(--warning);
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
}

/* ================================================ */
/* PIPELINE DIAGRAM                                 */
/* ================================================ */
.pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 2rem 0;
    overflow-x: auto;
    padding: 1rem 0;
}

.pipeline-step {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 140px;
}

.pipeline-step .step-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pipeline-step .step-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
}

.pipeline-step .step-detail {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.pipeline-arrow {
    flex-shrink: 0;
    color: var(--text-dim);
    font-size: 1.25rem;
    padding: 0 0.5rem;
}

/* ================================================ */
/* TABLE                                            */
/* ================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.85rem;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.data-table tr:hover td {
    background: var(--bg-card);
}

/* ================================================ */
/* PROGRESS BARS                                    */
/* ================================================ */
.metric-bar {
    margin-bottom: 1rem;
}

.metric-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.metric-bar-label {
    color: var(--text-muted);
    font-weight: 500;
}

.metric-bar-value {
    color: var(--text);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.metric-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1s ease;
}

/* ================================================ */
/* HERO (index only)                                */
/* ================================================ */
.hero {
    padding: 8rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(123, 47, 242, 0.12) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    max-width: 700px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-cta:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

/* ================================================ */
/* FOOTER                                           */
/* ================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ================================================ */
/* ANIMATIONS                                       */
/* ================================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================ */
/* RESPONSIVE                                       */
/* ================================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        display: none;
        /* Controlled by JS */
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 1rem;
        width: 100%;
        text-align: center;
    }

    .card-grid-2,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .pipeline {
        flex-direction: column;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }
}