* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f6f8;
    --bg-alt: #e9eef2;
    --card: #ffffff;
    --ink: #10212b;
    --muted: #4e606d;
    --line: #d2dce3;
    --brand: #0077b6;
    --brand-dark: #015f92;
    --accent: #00a896;
    --warn: #f18f01;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 14px 40px rgba(16, 33, 43, 0.08);
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'Manrope', sans-serif;
    --title: 'Space Grotesk', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: linear-gradient(170deg, #f7fafc 0%, #ecf2f7 46%, #f2f7fb 100%);
    line-height: 1.65;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.page-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 14%, rgba(0, 119, 182, 0.16), transparent 32%),
        radial-gradient(circle at 86% 20%, rgba(0, 168, 150, 0.12), transparent 28%),
        radial-gradient(circle at 50% 85%, rgba(241, 143, 1, 0.09), transparent 34%);
    z-index: -1;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(248, 252, 255, 0.74);
    border-bottom: 1px solid rgba(210, 220, 227, 0.75);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.brand {
    text-decoration: none;
    font-family: var(--title);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.93rem;
}

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

.menu-btn {
    display: none;
    border: 0;
    background: transparent;
    padding: 6px;
    cursor: pointer;
}

.menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    margin: 5px 0;
}

.hero {
    padding: 72px 0 44px;
}

.hero-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    margin: 0 0 12px;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-dark);
}

h1 {
    margin: 0;
    display: grid;
    gap: 6px;
}

.wordmark {
    font-family: var(--title);
    font-size: clamp(2.2rem, 5.2vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: clamp(1rem, 2.1vw, 1.36rem);
    color: var(--muted);
    max-width: 720px;
}

.authors {
    margin: 20px 0 6px;
    font-weight: 600;
}

.affiliation {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.cta-row {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background: var(--brand-dark);
}

.btn-secondary {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--muted);
}

.stats {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stats > div {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.stat-value {
    margin: 0;
    font-family: var(--title);
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--brand-dark);
}

.stat-label {
    margin: 2px 0 0;
    font-size: 0.83rem;
    color: var(--muted);
}

.hero-media {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}

.hero-media-teaser {
    max-width: 100%;
}

.hero-media-teaser img {
    width: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

.section {
    padding: 70px 0;
}

.section-alt {
    background: linear-gradient(180deg, rgba(8, 40, 58, 0.03), rgba(8, 40, 58, 0.01));
    border-top: 1px solid rgba(210, 220, 227, 0.65);
    border-bottom: 1px solid rgba(210, 220, 227, 0.65);
}

.section-head {
    margin-bottom: 24px;
}

.kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    color: var(--brand-dark);
    font-weight: 800;
}

h2 {
    margin: 6px 0 0;
    font-family: var(--title);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.01em;
}

.overview-grid,
.family-grid,
.metric-grid,
.resource-grid {
    display: grid;
    gap: 12px;
}

.overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.family-card,
.metric-card,
.resource-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.card h3,
.metric-card h3,
.resource-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-family: var(--title);
}

.card p,
.family-card p,
.metric-card p,
.resource-card p,
.note,
figcaption {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.key-emph {
    color: var(--ink);
    font-weight: 800;
    background: linear-gradient(transparent 58%, rgba(0, 168, 150, 0.22) 58%);
    padding: 0 2px;
}

.abstract-block {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px;
}

.family-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.family-name {
    font-family: var(--title);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ink);
}

.family-count {
    font-family: var(--mono);
    color: var(--brand-dark);
    font-size: 0.84rem;
    margin-bottom: 8px;
}

.figure-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.figure-card {
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.figure-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.figure-wide {
    margin-top: 14px;
}

.figure-fullrow {
    margin-top: 16px;
}

.figure-fullrow img {
    width: 100%;
    aspect-ratio: 1.85 / 1;
    object-fit: cover;
}

.figure-wide img {
    aspect-ratio: 2.14 / 1;
    object-fit: contain;
    background: #ffffff;
}

.metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-tags {
    margin-top: 10px;
    font-family: var(--mono);
    color: var(--brand-dark);
    font-size: 0.8rem;
}

.table-shell {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 11px 13px;
    border-bottom: 1px solid #e8edf2;
    font-size: 0.9rem;
    text-align: left;
}

th {
    background: #f6f9fc;
    font-family: var(--title);
}

.note {
    margin-top: 10px;
}

.resource-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-card {
    text-decoration: none;
}

.resource-card h3 i {
    color: var(--brand-dark);
}

.bibtex-shell {
    background: #0f1f29;
    color: #d4e0e9;
    border-radius: var(--radius);
    overflow: hidden;
}

.bibtex-toolbar {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.82rem;
}

.bibtex-toolbar button {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 10px;
}

.bibtex-shell pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
}

.bibtex-shell code {
    font-family: var(--mono);
    font-size: 0.84rem;
    line-height: 1.65;
}

.site-footer {
    padding: 24px 0 32px;
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 2px 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.showcase-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.showcase-type {
    margin: 0 0 8px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--brand-dark);
}

.showcase-card model-viewer {
    width: 100%;
    height: 280px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f0f6fb 100%);
    --progress-bar-color: var(--brand);
}

.showcase-pair-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.showcase-pair-grid-mask {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.showcase-viewer-block {
    background: #fcfeff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 8px;
}

.viewer-label {
    margin: 0 0 8px;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--brand-dark);
}

.showcase-viewer-block model-viewer {
    height: 220px;
}

.showcase-file {
    margin: 10px 0 0;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
    word-break: break-all;
}

.showcase-instruction {
    margin: 8px 0 0;
    font-size: 0.92rem;
    color: var(--ink);
}

@media (max-width: 980px) {
    .hero-grid,
    .overview-grid,
    .figure-grid,
    .metric-grid,
    .resource-grid,
    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-pair-grid {
        grid-template-columns: 1fr;
    }

    .family-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .nav-links {
        position: absolute;
        right: 4vw;
        top: 62px;
        flex-direction: column;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 10px;
        display: none;
        min-width: 170px;
    }

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

    .menu-btn {
        display: block;
    }
}

@media (max-width: 560px) {
    .family-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 56px;
    }

    .cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .hero-media-teaser img {
        aspect-ratio: auto;
        object-fit: contain;
    }

    .figure-wide img {
        aspect-ratio: auto;
    }

    .figure-fullrow img {
        aspect-ratio: auto;
        object-fit: contain;
    }
}
