﻿@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:opsz@9..40&family=Manrope:wght@400;500;600;700;800&display=swap');

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

:root {
    --bg-page: #ECEFF1;
    --bg-panel: #F4F7FA;
    --bg-soft: #E3EAF0;
    --ink-strong: #102A43;
    --ink-main: #243B53;
    --ink-muted: #627D98;
    --brand: #1565C0;
    --brand-2: #90A4AE;
    --accent: #FF7043;
    --line: #CFD8DC;
    --shadow-sm: 0 8px 20px rgba(29, 44, 43, 0.08);
    --shadow-md: 0 18px 45px rgba(22, 39, 38, 0.14);
    --radius-lg: 18px;
    --radius-md: 12px;
    --nav-h: 68px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--ink-main);
    background:
        radial-gradient(circle at 12% -8%, rgba(21, 101, 192, 0.18), transparent 42%),
        radial-gradient(circle at 96% 2%, rgba(144, 164, 174, 0.25), transparent 40%),
        var(--bg-page);
    padding-top: calc(var(--nav-h) + 18px);
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: rgba(236, 239, 241, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(21, 101, 192, 0.18);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--nav-h);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.nav-brand {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: var(--ink-strong);
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav-link {
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--ink-strong);
    background-color: rgba(21, 101, 192, 0.10);
    border-color: rgba(21, 101, 192, 0.24);
}

.nav-link.active {
    color: #fff;
    background: linear-gradient(130deg, var(--brand), var(--brand-2));
    border-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.6rem;
}

.header {
    position: relative;
    text-align: center;
    padding: 5.5rem 2rem;
    /* Increased padding for better breathing space */
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.18), transparent 42%),
        radial-gradient(circle at 88% 85%, rgba(144, 164, 174, 0.22), transparent 45%),
        linear-gradient(130deg, #0D47A1 0%, #1565C0 45%, #546E7A 100%);
    /* Deeper, more sophisticated premium gradient */
    color: #FFFFFF;
    border-radius: calc(var(--radius-lg) + 6px);
    margin-bottom: 2.8rem;
    box-shadow: 0 25px 55px rgba(10, 31, 56, 0.18);
    /* More weighted shadow for the large banner */
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 112, 67, 0.35), transparent 68%);
    right: -80px;
    top: -72px;
    pointer-events: none;
}

.title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2.45rem, 5.6vw, 3.95rem);
    font-weight: 400;
    opacity: 0.99;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

.subtitle {
    font-size: clamp(1.2rem, 2.8vw, 2.6rem);
    font-weight: 500;
    opacity: 0.94;
    margin-bottom: 1.8rem;
    letter-spacing: 0.02em;
    line-height: 1.55;
}

.authors {
    font-size: 1.5rem;
    margin-bottom: 0.55rem;
    opacity: 0.94;
}

.author {
    margin: 0 0.45rem;
}

.affiliation {
    font-size: 1.25rem;
    opacity: 0.8;
    margin-bottom: 1.8rem;
}

.links {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.82rem 1.65rem;
    /* Larger buttons */
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(8px);
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.26);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.icon {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.icon-emoji {
    font-size: 19px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
}

.section {
    background-color: var(--bg-panel);
    border: 1px solid var(--line);
    padding: 1.7rem;
    margin-bottom: 1.6rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(1.4rem, 3.8vw, 2.15rem);
    font-weight: 400;
    margin-bottom: 1.2rem;
    color: var(--ink-strong);
    letter-spacing: 0.01em;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid var(--line);
}

.abstract {
    font-size: 1.03rem;
    line-height: 1.9;
    color: var(--ink-main);
    margin-bottom: 0.95rem;
    text-align: justify;
}

.brand-emphasis {
    color: #0b2239;
    font-weight: 800;
}

.method-overview {
    text-align: center;
    margin: 2rem 0;
}

.method-diagram {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.method-cards,
.features,
.risk-categories,
.technical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.card,
.feature,
.risk-card,
.tech-card {
    --card-tone: var(--brand);
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #F8FBFF 0%, #E9EFF5 100%);
    border: 1px solid #D6E0E7;
    border-radius: var(--radius-md);
    padding: 1.35rem;
    box-shadow: 0 8px 18px rgba(36, 54, 54, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover,
.feature:hover,
.risk-card:hover,
.tech-card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 101, 192, 0.30);
    box-shadow: 0 14px 28px rgba(28, 49, 49, 0.12);
}

.card h3,
.feature h3,
.risk-card h3,
.tech-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--ink-strong);
}

.card p,
.feature p,
.risk-card p,
.tech-card p,
.experiment-section p {
    color: var(--ink-main);
    line-height: 1.7;
}

.card::before,
.feature::before,
.risk-card::before,
.tech-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 6px;
    background: var(--card-tone);
}

.card {
    --card-tone: #1565c0;
}

.feature {
    --card-tone: #1565c0;
}

.tech-card {
    --card-tone: #1565c0;
}

.method-cards .card:nth-child(even),
.features .feature:nth-child(even),
.technical-grid .tech-card:nth-child(even) {
    --card-tone: #1565c0;
}

.method-cards .card:nth-child(odd),
.features .feature:nth-child(odd),
.technical-grid .tech-card:nth-child(odd) {
    --card-tone: #1565c0;
}

/* Section-specific card tone overrides */
#architecture .method-cards .card:nth-child(1) {
    --card-tone: #1565c0;
    background: linear-gradient(160deg, #eaf3ff 0%, #dbe9f9 100%);
    border-color: #bfd3eb;
}

#architecture .method-cards .card:nth-child(2) {
    --card-tone: #d68a73;
    background: linear-gradient(160deg, #f7f1ee 0%, #efe4de 100%);
    border-color: #ddcbc1;
}

#architecture .method-cards .card:nth-child(3) {
    --card-tone: #cfb15d;
    background: linear-gradient(160deg, #f8f4e8 0%, #f1e9d0 100%);
    border-color: #e2d6ae;
}

#validation .method-cards .card {
    --card-tone: #1565c0;
    background: linear-gradient(160deg, #edf5ff 0%, #e1ebf8 100%);
    border-color: #c6d8ec;
}

.risk-categories .risk-card:nth-child(1) {
    --card-tone: #0d47a1;
    background: linear-gradient(160deg, #e9f2ff 0%, #d8e8fb 100%);
    border-color: #b8d3f2;
}

.risk-categories .risk-card:nth-child(2) {
    --card-tone: #1565c0;
    background: linear-gradient(160deg, #edf5ff 0%, #deebfb 100%);
    border-color: #bfd4ee;
}

.risk-categories .risk-card:nth-child(3) {
    --card-tone: #1e88e5;
    background: linear-gradient(160deg, #f0f6ff 0%, #e3edf9 100%);
    border-color: #c8d9ee;
}

.risk-categories .risk-card:nth-child(4) {
    --card-tone: #546e7a;
    background: linear-gradient(160deg, #f2f6fb 0%, #e5edf5 100%);
    border-color: #cddae6;
}

.risk-categories .risk-card:nth-child(5) {
    --card-tone: #607d8b;
    background: linear-gradient(160deg, #eef4fa 0%, #e0e9f2 100%);
    border-color: #cad7e4;
}

.risk-categories .risk-card:nth-child(6) {
    --card-tone: #78909c;
    background: linear-gradient(160deg, #f3f7fc 0%, #e6eef6 100%);
    border-color: #d0dce8;
}

.risk-categories .risk-card:nth-child(7) {
    --card-tone: #90a4ae;
    background: linear-gradient(160deg, #edf4ff 0%, #dfeaf8 100%);
    border-color: #c6d7ec;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.formula {
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed rgba(19, 78, 74, 0.35);
    padding: 0.9rem;
    border-radius: 10px;
    margin-top: 0.9rem;
    overflow-x: auto;
}

.experiment-section {
    margin-bottom: 2.2rem;
}

.experiment-section h3 {
    font-size: 1.35rem;
    color: var(--brand);
    margin-bottom: 0.7rem;
}

.result-figure {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.9rem;
}

.figure-caption {
    color: var(--ink-muted);
}

.key-findings {
    background: linear-gradient(140deg, #EAF3FF 0%, #DCE8F5 100%);
    border: 1px solid rgba(21, 101, 192, 0.22);
    padding: 1.6rem;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
}

.key-findings h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: #0F4C9B;
}

.key-findings ul {
    list-style: none;
    padding: 0;
}

.key-findings li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.7rem;
}

.key-findings li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 800;
}

.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    background: #F7FAFD;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    white-space: nowrap;
}

caption {
    caption-side: top;
    text-align: left;
    margin-bottom: 0.8rem;
    color: var(--ink-main);
}

th,
td {
    padding: 0.65rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid #D7E1EA;
}

th {
    background-color: #E3ECF5;
    color: var(--ink-strong);
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

.header-group {
    border-bottom: 2px solid #C9D9E6;
}

.provider-header {
    background: #DDE8F2;
    color: var(--ink-strong);
    font-weight: 800;
    text-align: center !important;
}

.model-name {
    text-align: left;
    font-weight: 600;
}

.sub-header {
    font-size: 0.82rem;
    color: var(--ink-muted);
}

.best-score {
    color: #0f6f45;
    font-weight: 800;
}

.worst-score {
    color: #D84315;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1.2rem;
    margin: 2.2rem 0;
    align-items: start;
}

.citation {
    background-color: #ECF2F7;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.2rem;
    overflow-x: auto;
}

.citation code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.0rem;
    /* Increased to match body text density */
    line-height: 1.5;
    /* Slightly tighter for formal code structure */
    color: var(--ink-strong);
    /* Sharper contrast for readability */
}

.footer {
    text-align: center;
    padding: 1.8rem 0.8rem;
    color: var(--ink-muted);
    border-top: 1px solid var(--line);
    margin-top: 2rem;
}

.section.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(130deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1100;
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
}

::selection {
    background-color: rgba(19, 78, 74, 0.3);
    color: var(--ink-strong);
}

@media (max-width: 900px) {
    body {
        padding-top: calc(var(--nav-h) + 10px);
    }

    .container {
        padding: 1rem;
    }

    .header {
        padding: 2.6rem 1.1rem;
        border-radius: 14px;
    }

    .title {
        font-size: clamp(2.05rem, 7vw, 2.8rem);
    }

    .subtitle {
        font-size: clamp(1.05rem, 3.8vw, 1.4rem);
    }

    .authors {
        font-size: 1.08rem;
    }

    .affiliation {
        font-size: 0.98rem;
    }

    .section {
        padding: 1.15rem;
        border-radius: 14px;
    }

    .links {
        gap: 0.6rem;
    }

    .btn {
        justify-content: center;
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    :root {
        --nav-h: 60px;
    }

    .nav-inner {
        padding: 0 0.75rem;
    }

    .nav-brand {
        font-size: 0.92rem;
    }

    .nav-links {
        gap: 0.25rem;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.62rem;
    }

    .authors {
        font-size: 1rem;
    }

    .affiliation {
        font-size: 0.9rem;
    }

    .grid-2-col,
    .method-cards,
    .features,
    .risk-categories,
    .technical-grid {
        grid-template-columns: 1fr;
    }
}