/* Copyright (c) 2026 Yu Chen. All rights reserved. */
/* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 */

/*
 * Site chrome for the benchmark dashboard: sticky top navbar, section headers and the
 * Download view. The navbar and card styling follow the
 * glass/pill design of https://aibluefisher.github.io/ (navbar + publications).
 */

/* ===== Top navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px clamp(16px, 3vw, 30px);
    background: var(--navbar-bg);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    box-shadow: 0 4px 14px var(--shadow-color);
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 2px 8px var(--shadow-color);
}

.navbar-logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.navbar-menu::-webkit-scrollbar {
    display: none;
}

.navbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.navbar-link i {
    font-size: 0.8rem;
    color: var(--primary);
    opacity: 0.7;
}

.navbar-link:hover,
.navbar-link:focus-visible {
    background: var(--hover-bg);
    color: var(--primary);
    outline: none;
}

.navbar-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.navbar-link.active i {
    color: #fff;
    opacity: 1;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media screen and (max-width: 900px) {
    .navbar-container {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
    }
}

/* ===== Section header (publications-style) ===== */
.section-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.section-header .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(247, 37, 133, 0.1));
}

.section-header .icon-wrapper i {
    font-size: 1.2rem;
    color: var(--primary);
}

.section-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-header .badge {
    padding: 6px 12px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    background: var(--tag-bg);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
}

/* SpatialArena logo: the coloured Colosseum mark on its own, no badge behind it */
.navbar-logo-icon:has(.navbar-logo-mark) {
    width: auto;
    height: 36px;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.navbar-logo-mark {
    display: block;
    filter: drop-shadow(0 1px 2px var(--shadow-color));
}

/* ===== Download view ===== */
:root {
    --download-code-bg: #f3f5fb;
    --download-code-border: rgba(67, 97, 238, 0.14);
}

[data-theme="dark"] {
    --download-code-bg: #1d2029;
    --download-code-border: rgba(255, 255, 255, 0.08);
}

.download-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.download-intro-text {
    flex: 1 1 460px;
    min-width: 0;
}

.download-intro h2 {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.download-intro p,
.download-note,
.download-licenses li {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.download a {
    color: var(--primary);
    text-decoration: none;
}

.download a:hover {
    text-decoration: underline;
}

.download code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    color: var(--text-primary);
    background: var(--download-code-bg);
    border-radius: 6px;
    padding: 1px 6px;
}

.download-facts {
    display: flex;
    gap: 12px;
    margin: 0;
}

.download-facts div {
    min-width: 96px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--tag-bg);
    text-align: center;
}

.download-facts dt {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.download-facts dd {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

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

.download-step h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 650;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.download-step-number {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.download-note {
    margin-bottom: 12px;
}

.download-code {
    position: relative;
    margin-top: 10px;
}

.download-code pre {
    margin: 0;
    padding: 14px 104px 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--download-code-border);
    background: var(--download-code-bg);
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

.download-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.download-copy:hover,
.download-copy:focus-visible {
    color: var(--primary);
    border-color: var(--primary);
}

.download-copy.copied {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.download-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.download-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.download-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 14px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: var(--tag-bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.download-chip:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.download-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.download-scope .download-chip.active {
    background: var(--hover-bg);
    color: var(--primary);
}

.download-size {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.download-contents th[scope="row"] {
    color: var(--text-primary);
    font-weight: 650;
    white-space: nowrap;
    vertical-align: middle;
}

.download-datasets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.download-dataset {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--tag-bg);
    color: var(--text-primary);
    font-size: 13px;
}

.download-dataset small {
    color: var(--text-secondary);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.download-dataset.is-ours {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.download-licenses ul {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
}

@media screen and (max-width: 600px) {
    .download-facts {
        width: 100%;
    }

    .download-facts div {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
    }

    .download-code pre {
        padding-right: 16px;
        padding-top: 44px;
    }
}
