﻿:root {
    --primary-color: #2f6fb0;
    --primary-light: #4f8fd1;
    --primary-dark: #1f4f84;
    --secondary-color: #cfe5ff;
    --accent-cream: #ffe4a6;
    --accent-mint: #c6e8cf;
    --accent-cyan: #c7e7ff;
    --text-main: #1a2432;
    --text-muted: #4f6073;
    --bg-white: #ffffff;
    --bg-light: #eff4fa;
    --border-color: #cfd8e6;
    --header-height: 84px;
    --footer-height: 88px;
    --shadow-sm: 0 1px 3px rgba(31, 79, 132, 0.08);
    --shadow-md: 0 6px 16px rgba(31, 79, 132, 0.12);
    --shadow-lg: 0 12px 30px rgba(31, 79, 132, 0.16);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 2.25rem;
}

/* Header & Nav */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(79, 95, 124, 0.12);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo .highlight {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 1.15rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--secondary-color);
    padding: 0.26rem 0.72rem;
    border-radius: 4px;
    color: var(--primary-dark) !important;
    font-size: 0.76rem;
    border: 1px solid rgba(111, 126, 160, 0.2);
}

.github-link:hover {
    background: var(--accent-mint);
}

/* Hero Section */
#hero {
    padding-top: 106px;
    padding-bottom: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(140deg, var(--accent-cream) 0%, var(--bg-white) 55%, var(--accent-cyan) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 95, 124, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background-color: var(--accent-mint);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-intro {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-card {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
}

.about-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

/* Accordion Styles */
.dataset-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.accordion-header:hover {
    background: var(--accent-mint);
}

.accordion-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.accordion-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-family: 'Outfit', sans-serif;
}

.accordion-count {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-weight: 500;
}

.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modality-badges {
    display: flex;
    gap: 0.5rem;
}

.modality-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: var(--bg-light);
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
}

.dataset-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.dataset-card-compact {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.dataset-card-compact:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.dataset-card-compact h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.dataset-card-compact p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.dataset-card-compact .card-stats {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-size: 0.75rem;
    gap: 0.5rem;
}

.dataset-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.85rem;
}

.card-stats span {
    color: var(--text-muted);
}

/* Code */
.code-block-wrapper {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.code-block-wrapper h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

pre {
    background: transparent;
    overflow-x: auto;
    color: #e0e0e0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.95rem;
}

/* Citation */
.citation-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

.citation-box pre {
    color: var(--text-main);
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-copy {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.btn-copy:hover {
    background: var(--accent-mint);
}

/* Footer */
footer {
    background: var(--bg-white);
    color: var(--text-muted);
    padding: 0.48rem 0;
    min-height: var(--footer-height);
    font-size: 0.76rem;
    border-top: 1px solid var(--border-color);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

footer p {
    margin: 0;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.footer-links a {
    color: var(--primary-dark);
    font-size: 0.76rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-divider {
    width: 1px;
    height: 10px;
    background: var(--border-color);
}

footer p a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

footer p a:hover {
    color: var(--primary-color);
}

/* Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    footer .container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .modality-badges {
        display: none;
    }

}

/* Documentation Page */
.dataset-doc-hero {
    padding-top: 102px;
    padding-bottom: 60px;
    background: linear-gradient(140deg, var(--accent-cream) 0%, var(--bg-white) 60%, var(--accent-cyan) 100%);
    text-align: center;
}

.dataset-doc-hero h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.dataset-doc-hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.doc-overview {
    text-align: center;
    margin-bottom: 3rem;
}

.overview-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.doc-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.doc-section h2 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.dataset-doc-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.dataset-doc-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.dataset-doc-card h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.dataset-details {
    list-style: none;
    padding: 0;
}

.dataset-details li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
}

.dataset-details li strong {
    color: var(--primary-dark);
}

.dataset-details li a {
    color: var(--primary-color);
    text-decoration: underline;
}

.dataset-details li a:hover {
    color: var(--primary-light);
}

.back-home {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

/* Inline Link */
.inline-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
    transition: var(--transition);
}

.inline-link:hover {
    color: var(--primary-light);
}

/* Code Structure Layout */
.code-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.structure-block {
    margin-top: 0 !important;
    background: white !important;
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
}

.structure-block h3 {
    color: var(--primary-dark) !important;
}

.structure-block pre {
    background: transparent !important;
    color: var(--primary-dark) !important;
}

.structure-block code {
    color: var(--text-main);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

@media (max-width: 768px) {
    .code-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Theme Overrides */
:root {
    --primary-color: #1f4b7a;
    --primary-light: #2f649c;
    --primary-dark: #153553;
    --secondary-color: #e8eff7;
    --accent-cream: #f2f5f9;
    --accent-mint: #edf3f9;
    --accent-cyan: #eef4fb;
    --text-main: #1f2937;
    --text-muted: #5a687a;
    --bg-white: #ffffff;
    --bg-light: #f6f8fb;
    --border-color: #d5deea;
    --header-height: 56px;
    --footer-height: 88px;
}

body {
    background: var(--bg-light);
}

.site-header {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border-color);
}

nav {
    height: var(--header-height);
}

.logo {
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.nav-links a {
    font-size: 0.83rem;
}

.github-link {
    border-radius: 6px;
    background: #f3f7fc;
}

.mobile-menu-btn {
    font-size: 0.78rem;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.52rem;
    border-radius: 6px;
    color: var(--primary-dark);
}

#hero {
    background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
    padding-top: 92px;
    padding-bottom: 72px;
}

#hero h1 {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
}

.subtitle {
    color: var(--text-muted);
}

.btn {
    border-radius: 7px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
}

.btn-secondary {
    background: #fff;
}

.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-title {
    font-size: 2rem;
}

.about-card,
.accordion-item,
.dataset-card-compact,
.citation-box,
.code-block-wrapper,
.dataset-doc-card {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.about-card,
.dataset-card-compact,
.dataset-doc-card {
    background: #fff;
}

.about-card:hover,
.dataset-card-compact:hover,
.dataset-doc-card:hover {
    transform: none;
    border-color: #bcc9d9;
    box-shadow: 0 4px 14px rgba(31, 75, 122, 0.08);
}

.accordion-header {
    background: #fff;
}

.accordion-header:hover {
    background: #f8fbff;
}

.accordion-header-right::after {
    content: "▾";
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.3rem;
    transition: transform 0.2s ease;
}

.accordion-item.active .accordion-header-right::after {
    transform: rotate(180deg);
}

.modality-badge {
    background: #eef3f9;
    color: #3d536c;
    border: 1px solid #d8e2ee;
    text-transform: none;
    letter-spacing: 0;
}

.code-block-wrapper {
    background: #f8fbff;
}

.code-block-wrapper h3 {
    color: var(--primary-dark);
    opacity: 1;
    border-bottom-color: var(--border-color);
}

pre {
    color: #36485f;
}

.btn-copy {
    border-radius: 6px;
    background: #f3f7fc;
    border: 1px solid var(--border-color);
}

footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    min-height: var(--footer-height);
    padding: 1rem 0;
    font-size: 0.92rem;
}

footer p,
footer p a,
.footer-links a {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    #hero {
        padding-top: 84px;
    }

    .nav-links {
        top: var(--header-height);
        border-top: 1px solid var(--border-color);
    }
}

/* Global width consistency */
.citation-box {
    width: 100%;
    max-width: none;
    margin: 0;
}

.fusion-tree {
    width: 100%;
    max-width: none;
}

/* Final Visual Refresh */
:root {
    --primary-color: #3f6798;
    --primary-light: #6d8fbb;
    --primary-dark: #27466d;
    --secondary-color: #e8eff9;
    --accent-cream: #fff3ce;
    --accent-mint: #d6e9d5;
    --accent-cyan: #d9e7fc;
    --text-main: #1f2b3b;
    --text-muted: #5f6f83;
    --bg-light: #f6f8fc;
    --border-color: #d8e1ed;
    --card-radius: 12px;
    --card-padding: 1.2rem;
}

body {
    background: linear-gradient(180deg, #fbfcff 0%, var(--bg-light) 35%, #f7f9fd 100%);
    color: var(--text-main);
}

.main-content {
    padding-bottom: 0;
}

.section {
    padding: 76px 0 68px;
}

.section + .section {
    margin-top: 2px;
}

.section .container {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.section-title {
    text-align: left;
    font-size: clamp(1.85rem, 2vw, 2.25rem);
    color: var(--primary-dark);
    letter-spacing: -0.01em;
    margin-bottom: 0.55rem;
}

.section-title::after {
    content: "";
    display: block;
    width: 68px;
    height: 3px;
    margin: 0.65rem 0 0;
    border-radius: 99px;
    background: linear-gradient(90deg, rgba(63, 103, 152, 0.95), rgba(109, 143, 187, 0.55));
}

.section-intro {
    text-align: left;
    width: 100%;
    max-width: none;
    margin: 0 0 2.05rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.74;
}

.about-card,
.accordion-item,
.dataset-card-compact,
.citation-box,
.code-block-wrapper,
.dataset-doc-card {
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(30, 58, 96, 0.06);
    background: #ffffff;
}

.about-card,
.dataset-card-compact,
.dataset-doc-card {
    padding: var(--card-padding);
}

.about-card:hover,
.dataset-card-compact:hover,
.dataset-doc-card:hover {
    border-color: #c7d5e6;
    box-shadow: 0 6px 16px rgba(30, 58, 96, 0.09);
    transform: translateY(-2px);
}

.about-grid,
.dataset-grid-compact {
    gap: 1rem;
}

.about-card {
    text-align: left;
}

.about-card h3,
.dataset-card-compact h4,
.dataset-doc-card h3,
.code-block-wrapper h3,
.structure-block h3 {
    font-size: 1.03rem;
    line-height: 1.45;
    margin-bottom: 0.45rem;
    color: var(--primary-dark);
}

.about-card p,
.dataset-card-compact p,
.dataset-doc-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.dataset-grid-compact {
    padding: 1.2rem;
}

.dataset-card-link,
.dataset-card-compact {
    height: 100%;
}

.dataset-card-compact {
    display: flex;
    flex-direction: column;
    min-height: 184px;
}

.dataset-card-compact .card-stats {
    margin-top: auto;
}

.accordion-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid transparent;
}

.accordion-item.active .accordion-header {
    border-bottom-color: var(--border-color);
}

.accordion-title {
    font-size: 1.02rem;
    color: var(--primary-dark);
}

.accordion-content {
    background: #fbfdff;
}

.code-block-wrapper,
.structure-block {
    background: #fbfdff !important;
}

.code-block-wrapper h3 {
    border-bottom-color: #e7edf6;
}

.citation-box {
    max-width: none;
    margin: 0;
}

.code-content-grid > * {
    min-width: 0;
}

#usage .structure-block pre {
    white-space: pre-wrap;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#usage .structure-block code {
    white-space: inherit;
    overflow-wrap: anywhere;
    word-break: break-word;
}

footer {
    background: #ffffff;
    min-height: 0;
    padding: 0.55rem 0;
    margin: 0;
}

/* Paradigms */
#paradigms .fusion-tree {
    margin: 2rem 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
}

#paradigms .fusion-tree ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#paradigms .tree-level-1 {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: flex-start;
    column-gap: 2.35rem;
}

#paradigms .tree-level-1 > li {
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

#paradigms .tree-category {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    text-align: left;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

#paradigms .tree-category strong {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-family: 'Outfit', sans-serif;
    display: block;
    margin-bottom: 0.2rem;
}

#paradigms .tree-category .category-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

#paradigms .tree-category::after {
    content: '';
    position: absolute;
    left: 1.5rem;
    height: 2rem;
    bottom: -2rem;
    width: 2px;
    background: #e1e4e8;
    z-index: 1;
}

#paradigms .tree-level-2 {
    position: relative;
    padding-left: 0;
    margin-top: 0;
}

#paradigms .tree-level-2::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 1rem;
    width: 2px;
    background: #e1e4e8;
    z-index: 1;
}

#paradigms .tree-level-2 > li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
}

#paradigms .tree-level-2 > li::after {
    content: '';
    position: absolute;
    left: 1.5rem;
    width: 1.5rem;
    top: 1.3rem;
    height: 2px;
    background: #e1e4e8;
}

#paradigms .tree-level-2 > li:last-child::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 1.3rem;
    bottom: 0;
    width: 2px;
    background: white;
    z-index: 2;
}

#paradigms .tree-level-2 > li strong {
    display: block;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    line-height: 1.5;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 0.4rem;
    transition: all 0.2s;
}

#paradigms .tree-level-2 > li strong:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#paradigms .method-list {
    padding-left: 0.2rem;
}

#paradigms .method-list code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--primary-color);
    background: rgba(0, 70, 140, 0.04);
    border: 1px solid transparent;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    display: inline-block;
    margin-right: 0.3rem;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}

#paradigms .tree-level-1 > li:nth-child(2) .tree-level-2 > li {
    margin-bottom: 0.8rem;
}

@media (max-width: 1200px) {
    #paradigms .tree-level-1 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 1.8rem;
    }
}

/* Code Narrative */
#code .code-experience {
    margin-top: 0.22rem;
}

#code .code-narrative {
    max-width: none;
    width: 100%;
    margin-bottom: 0.92rem;
    padding-bottom: 0;
    border-bottom: 0;
}

#code .code-narrative p {
    margin: 0 0 0.75rem;
    color: var(--text-muted);
    line-height: 1.72;
    font-size: 0.92rem;
}

#code .code-narrative p:last-child {
    margin-bottom: 0;
}

#code .code-module-mosaic {
    margin-top: 0.45rem;
    display: grid;
    gap: 2.2rem;
}

#code .mosaic-module {
    padding: 0.35rem 0 1.7rem;
    border: 0;
}

#code .mosaic-module:last-child {
    padding-bottom: 0;
}

#code .mosaic-module h3 {
    margin: 0 0 0.62rem;
    color: var(--primary-dark);
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.32;
}

#code #code-loaders h3 {
    margin-top: 0.28rem;
}

#code .mosaic-module p {
    margin: 0;
    color: #4f6278;
    font-size: 0.95rem;
    line-height: 1.86;
    width: 100%;
    max-width: none;
}

#code .mosaic-module p:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .section {
        padding: 62px 0 54px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-intro {
        font-size: 0.92rem;
    }

    .dataset-card-compact {
        min-height: 0;
    }

    #paradigms .tree-level-1 {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }

    #paradigms .tree-level-1 > li {
        width: 100%;
        min-width: auto;
        max-width: none;
    }

    #code .code-module-mosaic {
        gap: 1.45rem;
    }

    #code .mosaic-module {
        padding-bottom: 1.2rem;
    }
}

/* ===== Merged from leaderboard.css ===== */

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar-outline {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 236px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    z-index: 900;
    overflow-y: auto;
    padding: 1.45rem 1.15rem;
    scrollbar-width: thin;
    scrollbar-color: #c9ced8 transparent;
    flex-shrink: 0;
}

.sidebar-outline::-webkit-scrollbar {
    width: 4px;
}

.sidebar-outline::-webkit-scrollbar-thumb {
    background: #c9ced8;
    border-radius: 0;
}

.sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--primary-color);
    margin-bottom: 1.1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #c9d8eb;
}

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

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.42rem 0.58rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    font-weight: 500;
    line-height: 1.35;
    border-radius: 6px;
}

.sidebar-nav a:hover {
    color: var(--primary-dark);
    background: #f3f7fc;
}

.sidebar-nav a.active {
    color: var(--primary-dark);
    border-left-color: var(--primary-color);
    background: #ecf4fb;
    font-weight: 600;
}

.sidebar-nav .sidebar-sub {
    padding-left: 1.85rem;
    font-size: 0.8rem;
    color: #7d8798;
}

.sidebar-nav .sidebar-sub:hover {
    color: var(--primary-dark);
}

.sidebar-nav .sidebar-sub.active {
    color: var(--primary-dark);
    font-weight: 600;
}

.main-content {
    flex: 1;
    min-width: 0;
    margin-left: 236px;
    width: calc(100% - 236px);
}

/* ========================================
   LEADERBOARD SECTION
   ======================================== */
#leaderboard {
    padding: 76px 0 68px;
    margin-top: 0;
}

#leaderboard .section-title {
    text-align: left;
    font-size: clamp(1.85rem, 2vw, 2.25rem);
    margin-bottom: 0.55rem;
    color: var(--primary-dark);
}

#leaderboard .section-intro {
    text-align: left;
    margin-bottom: 2.05rem;
    color: var(--text-muted);
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    font-size: 0.98rem;
    line-height: 1.74;
}

.leaderboard-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(30, 58, 96, 0.06);
    margin-bottom: 2rem;
    overflow: hidden;
}

.table-title-block {
    padding: 1rem 1.1rem 0.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    background: #f8fbff;
    border-bottom: 1px solid var(--border-color);
}

.table-title-left {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: 260px;
}

.table-title-bar {
    width: 4px;
    min-height: 24px;
    background: var(--primary-color);
    border-radius: 999px;
    margin-right: 0.85rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.table-title-text h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.3rem 0;
    line-height: 1.35;
}

.table-note {
    font-size: 0.76rem;
    color: #667b91;
    margin: 0;
    line-height: 1.45;
    font-style: italic;
}

.table-note code {
    background: #edf3fb;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #677285;
    font-style: normal;
}

.table-scroll-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.55rem 1rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.table-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.leaderboard-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.85rem;
    table-layout: auto;
    border-radius: 8px;
}

.leaderboard-table th,
.leaderboard-table td {
    border-radius: 0;
}

.leaderboard-table thead {
    position: static;
}

.leaderboard-table thead th {
    background: #5f81ac;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 0.66rem 0.72rem;
    white-space: nowrap;
    font-size: 0.79rem;
    letter-spacing: 0.02em;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.28);
    position: static;
}

.leaderboard-table thead th:first-child {
    text-align: left;
    min-width: 160px;
}

.leaderboard-table thead th:last-child {
    border-right: none;
}

.leaderboard-table tbody td {
    padding: 0.58rem 0.72rem;
    text-align: center;
    border-bottom: 1px solid #e4ebf4;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: background 0.15s ease;
    color: var(--text-main);
}

.leaderboard-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    background: #f4f8fd;
    position: static;
    min-width: 160px;
    border-right: 1px solid #dde6f1;
}

.leaderboard-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.leaderboard-table tbody tr:nth-child(odd) {
    background: var(--bg-white);
}

.leaderboard-table tbody tr:nth-child(even) td:first-child {
    background: #eef4fb;
}

.leaderboard-table tbody tr:nth-child(odd) td:first-child {
    background: #f4f8fd;
}

.leaderboard-table tbody tr:last-child td:first-child,
.leaderboard-table tbody tr:last-child td:last-child {
    border-radius: 0;
}

.best-cell {
    background: #fff3ce !important;
    color: #6f561d !important;
    font-weight: 700;
}

.na-cell {
    color: #c2c8d2 !important;
    font-weight: 400;
}

.nav-links .leaderboard-link {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 1100px) {
    .sidebar-outline {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #leaderboard {
        padding: 62px 0 54px;
    }

    .table-title-block {
        padding: 1rem 1rem 0.65rem;
    }

    .table-scroll-wrapper {
        padding: 0.46rem 1rem 1.15rem;
    }
}
