/* ============================================================
   ScenA — project page styles
   ============================================================ */

:root {
    --color-navy:        #0f1e3c;
    --color-navy-2:      #1c2c52;
    --color-indigo:      #3d52d5;
    --color-indigo-soft: #6677e1;
    --color-gold:        #e3a64c;
    --color-gold-soft:   #fcecc8;
    --color-text:        #1a1f2e;
    --color-muted:       #5b6478;
    --color-bg:          #eef2f7;
    --color-bg-2:        #e6ebf3;
    --color-card:        #ffffff;
    --color-border:      #e3e7ee;
    --shadow-card:       0 4px 18px rgba(15, 30, 60, 0.08);
    --shadow-card-hover: 0 10px 32px rgba(15, 30, 60, 0.12);
    --radius-card:       18px;
}

/* ---------- Body / page background ------------------------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(ellipse at top, rgba(61, 82, 213, 0.08), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(227, 166, 76, 0.06), transparent 60%),
        linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-2) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
}

/* ---------- Cards ------------------------------------------ */
.section-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card) !important;
    transition: box-shadow 0.25s ease;
    padding: 2.5rem 2.75rem !important;
}

.section-card:hover {
    box-shadow: var(--shadow-card-hover) !important;
}

/* The header (first) card gets a subtle gradient stripe on top */
.section-card.header-card {
    background:
        linear-gradient(180deg, rgba(61, 82, 213, 0.06) 0%, transparent 140px),
        var(--color-card);
    padding: 3rem 3rem 2.5rem !important;
}

/* ---------- Hero / title ----------------------------------- */
.title-main {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 3rem;
    color: var(--color-navy);
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.title-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.35rem;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

.author-block {
    display: inline-block;
    margin: 0 0.55rem;
    font-weight: 500;
    color: var(--color-text);
}

.author-block a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.author-block a:hover {
    border-bottom-color: var(--color-indigo);
}

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

.affiliation em {
    font-style: italic;
}

/* ---------- Link buttons (Paper / Code / arXiv / Demo) ----- */
.link-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.6rem 0 1.4rem;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    background-color: var(--color-navy);
    color: #fff !important;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none !important;
    border: 1px solid var(--color-navy);
    transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(15, 30, 60, 0.15);
}

.link-button:hover {
    background-color: var(--color-indigo);
    border-color: var(--color-indigo);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(61, 82, 213, 0.35);
}

.link-button i {
    font-size: 0.95em;
}

/* "Coming soon" placeholder buttons (not yet clickable) */
.link-button.soon {
    background-color: #fff;
    color: var(--color-navy) !important;
    border: 1.5px dashed var(--color-indigo);
    box-shadow: none;
    cursor: default;
}

.link-button.soon:hover {
    background-color: #fff;
    border-color: var(--color-indigo);
    transform: none;
    box-shadow: none;
}

.soon-badge {
    margin-left: 0.45rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background-color: var(--color-indigo);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* ---------- Teaser ----------------------------------------- */
img.teaser {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(15, 30, 60, 0.12);
}

.teaser-caption {
    text-align: center;
    color: var(--color-muted);
    font-size: 0.95rem;
    margin: 0.9rem 0 0;
}

/* ---------- Section headings ------------------------------- */
h2.section-title {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 1.85rem;
    text-align: center;
    color: var(--color-navy);
    margin-bottom: 0.4rem;
    position: relative;
    padding-bottom: 0.7rem;
}

h2.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-indigo), var(--color-gold));
}

.section-card > p:first-of-type,
.section-card > p.lead {
    color: var(--color-muted);
    font-size: 0.97rem;
    text-align: center;
    margin: 1rem auto 1.5rem;
    max-width: 820px;
}

/* ---------- Abstract / body text --------------------------- */
.section-card p,
.section-card li {
    line-height: 1.7;
}

.section-card p b,
.section-card p strong {
    color: var(--color-navy);
}

/* ---------- Table of contents ------------------------------ */
.toc-block {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--color-border);
}

.toc-block h5 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.toc li {
    list-style: none;
}

.toc a {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background-color: rgba(61, 82, 213, 0.08);
    color: var(--color-indigo);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.toc a:hover {
    background-color: var(--color-indigo);
    color: #fff;
    border-color: var(--color-indigo);
}

/* ---------- Leaderboard ------------------------------------ */
.metric-legend {
    font-size: 0.88rem;
    color: var(--color-muted);
    line-height: 1.7;
    background-color: rgba(15, 30, 60, 0.03);
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    margin-bottom: 1.2rem;
}

.metric-legend strong {
    color: var(--color-navy);
}

#leaderboard-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

#leaderboard-table th {
    background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
    color: #fff;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    position: relative;
    padding: 0.85rem 0.6rem !important;
    font-weight: 500;
    font-size: 0.9rem;
    border: none !important;
    transition: background-color 0.15s;
}

#leaderboard-table th:hover {
    background: linear-gradient(180deg, var(--color-indigo) 0%, var(--color-indigo-soft) 100%);
}

#leaderboard-table th.sorted-asc::after {
    content: " ▲";
    font-size: 0.75em;
    opacity: 0.9;
}

#leaderboard-table th.sorted-desc::after {
    content: " ▼";
    font-size: 0.75em;
    opacity: 0.9;
}

#leaderboard-table td {
    text-align: center;
    vertical-align: middle;
    padding: 0.7rem 0.6rem !important;
    border-color: var(--color-border) !important;
    font-variant-numeric: tabular-nums;
}

#leaderboard-table td:first-child {
    text-align: left;
    font-weight: 500;
    padding-left: 1rem !important;
}

#leaderboard-table tr.human-row {
    background-color: rgba(15, 30, 60, 0.03);
    font-style: italic;
}

#leaderboard-table tr.human-row td {
    border-bottom: 2px solid var(--color-navy) !important;
}

#leaderboard-table tr.ours-row {
    background: linear-gradient(90deg, rgba(227, 166, 76, 0.18) 0%, rgba(227, 166, 76, 0.10) 100%);
    color: var(--color-navy);
}

#leaderboard-table tr.ours-row td {
    border-top: 2px solid var(--color-gold) !important;
    border-bottom: 2px solid var(--color-gold) !important;
}

#leaderboard-table tr:not(.human-row):not(.ours-row):hover {
    background-color: rgba(61, 82, 213, 0.04);
}

#leaderboard-table a {
    color: var(--color-indigo);
    text-decoration: none;
}

#leaderboard-table a:hover {
    text-decoration: underline;
}

/* ---------- Audio comparison tables ------------------------ */
.table.table-hover {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: 0;
}

.table.table-hover th {
    background-color: var(--color-navy);
    color: #fff;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.75rem 0.5rem !important;
    text-align: center;
    vertical-align: middle;
    border: none !important;
    white-space: nowrap;
}

.table.table-hover th a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}

.table.table-hover th a:hover {
    border-bottom-color: var(--color-gold);
    color: var(--color-gold-soft);
}

.table.table-hover td {
    border-top: 1px solid var(--color-border) !important;
    background-color: var(--color-card);
}

.table.table-hover tr:nth-child(even) td {
    background-color: rgba(15, 30, 60, 0.018);
}

.table.table-hover tr:hover td {
    background-color: rgba(61, 82, 213, 0.05) !important;
}

audio {
    width: 140px;
    min-width: 0;
    max-width: 100%;
    height: 32px;
    border-radius: 8px;
}

audio::-webkit-media-controls-panel {
    background-color: #f4f6fa;
}

.audio-cell {
    vertical-align: middle !important;
    text-align: center !important;
    width: 150px;
    padding: 8px 6px !important;
}

.text-cell {
    vertical-align: middle !important;
    text-align: left !important;
    font-size: 0.85rem;
    line-height: 1.45;
    max-width: 230px;
    padding: 8px 10px !important;
    color: var(--color-text);
}

.text-cell em {
    color: var(--color-indigo);
    font-style: italic;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.text-cell b {
    color: var(--color-navy);
    margin-right: 0.25rem;
}

.table.table-hover td:first-child,
.table.table-hover th:first-child {
    width: 60px;
    text-align: center;
    font-weight: 500;
    color: var(--color-navy);
}

/* "Ours" column accent (audio comparison tables only; not the leaderboard) */
.table.table-hover:not(#leaderboard-table) th:last-child {
    background: linear-gradient(180deg, var(--color-indigo) 0%, var(--color-indigo-soft) 100%);
}

.table.table-hover:not(#leaderboard-table) td:last-child {
    background-color: rgba(61, 82, 213, 0.05) !important;
    border-left: 1px solid rgba(61, 82, 213, 0.18);
}

/* ---------- BibTeX block ----------------------------------- */
pre.bibtex {
    background-color: var(--color-navy);
    color: #d6dcec;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-size: 0.85rem;
    overflow-x: auto;
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    line-height: 1.6;
}

pre.bibtex code {
    color: inherit;
    background: transparent;
}

/* ---------- Footer / misc ---------------------------------- */
footer {
    color: var(--color-muted);
    font-size: 0.88rem;
    text-align: center;
    padding: 2rem 0 3rem;
}

/* ---------- Responsive tweaks ------------------------------ */
@media (max-width: 991.98px) {
    .title-main { font-size: 2.2rem; }
    .title-sub  { font-size: 1.1rem; }
    .section-card { padding: 1.75rem 1.5rem !important; }
    .section-card.header-card { padding: 2rem 1.5rem !important; }
}

@media (max-width: 575.98px) {
    audio { width: 120px; }
    .audio-cell { width: 130px; }
    .text-cell { max-width: 180px; font-size: 0.8rem; }
}
