@charset "UTF-8";

/* ── Design tokens ───────────────────────────────────────── */
:root {
    --bg: #FFFDFA;
    /* page background */
    --bg-alt: #F6F1E7;
    /* alternating section background */
    --card: #FFFFFF;
    --ink: #1f1c1a;
    --ink-body: #3a3733;
    --ink-soft: #6b655e;
    --accent: #3273dc;
    --accent-soft: #eef3ff;
    --border: rgba(31, 28, 26, 0.10);
    --sidebar-w: 220px;
    /* left navigation width */
    --sidebar-gap: 1.5rem;
    /* space around the floating nav panel */
    --content-max: 1120px;
    /* main content width */
}

/* ── General ─────────────────────────────────────────────── */
html {
    font-size: 17px;
    /* base type scaled up one step (was 16px) */
    scroll-behavior: smooth;
    scroll-padding-top: 1.5rem;
    overscroll-behavior-y: none;
}

body {
    font-family: "Google Sans", "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink-body);
    font-size: 1rem;
    overscroll-behavior-y: none;
}

/* Reserve equal space on both sides so the content stays centered on
       the viewport instead of being pushed off-center by the sidebar. */
.page {
    padding-left: calc(var(--sidebar-w) + var(--sidebar-gap) * 2);
    padding-right: calc(var(--sidebar-w) + var(--sidebar-gap) * 2);
    background: var(--bg);
}

/* !important is needed to beat Bulma's higher-specificity
       .container:not(.is-max-desktop)... breakpoint rules */
.container {
    width: 82%;
    max-width: var(--content-max) !important;
}

.section {
    padding: 3.5rem 1.5rem;
}

/* ── Page progress bar ───────────────────────────────────── */
.page-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(31, 28, 26, 0.06);
    z-index: 101;
    pointer-events: none;
}

.page-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.08s ease-out;
}

/* ── Left sidebar navigation ─────────────────────────────── */
.side-nav {
    position: fixed;
    top: var(--sidebar-gap);
    left: var(--sidebar-gap);
    bottom: var(--sidebar-gap);
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.1rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(31, 28, 26, 0.07);
    z-index: 100;
}

.side-nav-brand {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink) !important;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.side-nav-brand:hover {
    color: var(--accent) !important;
}

.side-nav-tagline {
    font-size: 0.78rem;
    color: var(--ink-soft);
    line-height: 1.45;
    margin-bottom: 1.75rem;
}

.side-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    overflow-y: auto;
}

.side-nav-links a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color 0.18s ease, background 0.18s ease;
}

.side-nav-links a .icon {
    font-size: 0.8rem;
    opacity: 0.75;
    width: 1rem;
}

.side-nav-links a:hover {
    color: var(--accent);
    background: rgba(50, 115, 220, 0.06);
}

.side-nav-links a.is-active-section {
    color: var(--accent);
    background: rgba(50, 115, 220, 0.10);
}

.side-nav-links a.is-active-section::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 0.55rem;
    bottom: 0.55rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.side-nav-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.side-nav-footer .side-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.side-nav-footer .side-nav-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--card);
    transition: all 0.18s ease;
}

.side-nav-footer .side-nav-actions a:hover {
    color: var(--accent);
    border-color: rgba(50, 115, 220, 0.4);
}

.side-nav-note {
    font-size: 0.72rem;
    color: var(--ink-soft);
    line-height: 1.4;
}

.side-nav-burger {
    display: none;
}

/* Mobile: sidebar collapses into a top bar with a drawer */
@media (max-width: 1023px) {
    html {
        font-size: 16.5px;
        scroll-padding-top: 4rem;
    }

    .page {
        padding-left: 0;
        padding-right: 0;
        padding-top: 3.5rem;
    }

    .side-nav {
        top: 0;
        left: 0;
        bottom: auto;
        right: 0;
        width: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.65rem 1rem;
        height: 3.5rem;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
        background: rgba(255, 253, 250, 0.96);
        backdrop-filter: blur(6px);
    }

    .side-nav-tagline,
    .side-nav-footer {
        display: none;
    }

    .side-nav-brand {
        margin-bottom: 0;
        font-size: 1.15rem;
    }

    .side-nav-burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 2.25rem;
        height: 2.25rem;
        align-items: center;
        background: none;
        border: none;
        cursor: pointer;
    }

    .side-nav-burger span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: var(--ink);
    }

    .side-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex: none;
        padding: 0.5rem 1rem 1rem;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 20px rgba(31, 28, 26, 0.08);
    }

    .side-nav.is-open .side-nav-links {
        display: flex;
    }

    .side-nav-links a.is-active-section::before {
        display: none;
    }
}

/* ── Title header (replaces the old video hero) ─────────── */
.title-header {
    padding-top: 4.5rem;
}

@media (max-width: 1023px) {
    .title-header {
        padding-top: 3rem;
    }
}

.title.paper-title {
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
}

.author-list {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--ink-body);
}

.author-list a {
    color: var(--accent);
    text-decoration: none;
}

.author-list a:hover {
    text-decoration: underline;
}

.affiliation-list {
    font-size: 1.1rem;
    color: var(--ink-soft);
}

/* ── Buttons ─────────────────────────────────────────────── */
.link-buttons {
    margin-top: 1.5rem;
}

.link-buttons .button {
    margin: 0.3rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ── Section headings ────────────────────────────────────── */
.section-heading {
    font-size: 1.95rem;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subheading {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: -1rem;
}

.section-divider {
    width: 64px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto 2.25rem;
    border-radius: 2px;
}

/* ── Abstract ────────────────────────────────────────────── */
.abstract-box {
    background: #FBF6EC;
    border-left: 4px solid var(--accent);
    padding: 1.75rem 2.25rem;
    border-radius: 0 8px 8px 0;
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: justify;
}

/* ── Media containers ────────────────────────────────────── */
.media-container {
    border-radius: 10px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(31, 28, 26, .07);
    transition: transform .2s, box-shadow .2s;
}

.media-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(31, 28, 26, .12);
}

.media-container video,
.media-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Caption strip under a figure */
.media-caption {
    padding: 0.5rem;
    text-align: center;
    font-size: 1.rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: #f5f0e7;
}

.media-caption.is-accent {
    color: var(--accent);
    background: var(--accent-soft);
}

/* Tighter grid layout for smaller figures */
.two-col-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Image left (narrower), video right (wider) */
.two-col-media.two-col-media--img-narrow-video-wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
}

/* Vertically center columns when figure heights differ */
.two-col-media.two-col-media--v-center {
    align-items: center;
}

.three-col-media {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 2rem 0;
}

.four-col-media {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin: 2rem 0;
}

@media (max-width: 1024px) {
    .three-col-media {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .four-col-media {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {

    .two-col-media,
    .two-col-media.two-col-media--img-narrow-video-wide {
        grid-template-columns: 1fr;
    }

    .three-col-media {
        grid-template-columns: 1fr;
    }

    .four-col-media {
        grid-template-columns: 1fr;
    }
}

/* Task switcher for the Simulation video grid */
.task-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.task-btn {
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-body);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.task-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.task-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Cards ───────────────────────────────────────────────── */
.card.clean {
    background: var(--card);
    box-shadow: 0 2px 12px rgba(31, 28, 26, .07);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.card.clean:hover {
    box-shadow: 0 4px 16px rgba(31, 28, 26, .12);
    transition: box-shadow 0.2s ease;
}

.card.clean .content {
    font-size: 1.02rem;
    line-height: 1.75;
}

.paper-abstract {
    line-height: 1.8;
    text-align: justify;
}

.metric-list li {
    margin-bottom: 0.75rem;
}

/* ── Keyword pill ────────────────────────────────────────── */
.keyword-pill {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid #b8cef5;
    border-radius: 20px;
    padding: 0.2rem 0.8rem;
    margin: 0.2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ── Section alternating backgrounds ────────────────────── */
.section.is-light-alt {
    background: var(--bg-alt);
}

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

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    background: #262119;
    color: rgba(255, 253, 250, .68);
    padding: 1.0rem 1.5rem;
}

.footer a {
    color: rgba(255, 253, 250, .85);
}

.footer a:hover {
    color: #fff;
}

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 768px) {
    .title.paper-title {
        font-size: 1.6rem;
    }

    .section-heading {
        font-size: 1.55rem;
    }

    .abstract-box {
        padding: 1.25rem 1.25rem;
        font-size: 1rem;
    }
}

.three-media-layout {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: stretch;
    margin: 2rem 0;
}

.left-media {
    flex: 1;
}

.right-media {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.left-media img,
.right-media img {
    width: 100%;
    display: block;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(31, 28, 26, .08);
}

.right-media img {
    flex: 1;
}

@media (max-width: 768px) {
    .three-media-layout {
        flex-direction: column;
    }
}