/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #ffffff;
    --color-surface: #f8f9fa;
    --color-border: #e1e4e8;
    --color-text: #1a1a2e;
    --color-text-secondary: #586069;
    --color-accent: #16a085;
    --color-accent-light: #e8f8f5;
    --color-accent-hover: #138d75;
    --color-code-bg: #f0f2f5;
    --color-placeholder-bg: #f0f2f5;
    --color-placeholder-border: #d0d5dd;
    --color-highlight-row: #e8f8f5;
    --color-table-header: #eafaf1;
    --max-width: 960px;
    --font-sans: 'Lato', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}


html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* === Layout === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* === Hero / Header === */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.venue-badge {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}

.title-logo {
    height: 3.5rem;
    width: auto;
    vertical-align: middle;
    margin-right: 0.5rem;
    border-radius: 4px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.25;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* === Authors === */
.authors {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.author a {
    color: var(--color-text);
    font-weight: 500;
}

.author a:hover {
    color: var(--color-accent);
}

.affiliations {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.affiliations span {
    margin: 0 0.75rem;
}

.author-email {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
}

/* === Link Buttons === */
.links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-surface);
    transition: all 0.2s;
}

.btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-bg);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn i {
    font-size: 1rem;
}

/* === Sections === */
.section {
    margin-top: 3.5rem;
}

.section h2 {
    font-size: 1.65rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.section-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.subsection-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

/* === Abstract === */
.abstract-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    text-align: justify;
}

/* === Images === */
.full-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.fig-small {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* === Figures === */
.figure {
    margin: 0;
}

.caption {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-top: 0.75rem;
    text-align: center;
}

/* === Teaser === */
.teaser {
    margin-top: 2rem;
}

.teaser .full-img {
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

/* === Pipeline === */
.pipeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.pipeline-stage {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pipeline-stage:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 12px rgba(22, 160, 133, 0.08);
}

.stage-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.pipeline-stage h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pipeline-stage p {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
}

/* === Dataset Overview Grid === */
.dataset-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.dataset-overview-grid .figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.diversity-table-figure {
    justify-content: center;
}

.diversity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    line-height: 1.5;
}

.diversity-table caption {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.diversity-table th {
    background: var(--color-table-header);
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid var(--color-border);
}

.diversity-table td {
    padding: 0.5rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.diversity-table strong {
    color: var(--color-accent);
}

/* === Table Grid (dataset comparisons) === */
.table-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: stretch;
}

.table-grid .figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--color-surface);
}

.table-grid .full-img {
    border: none;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

/* === Architecture Details === */
.arch-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.arch-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.arch-card:hover {
    border-color: var(--color-accent);
}

.arch-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
}

.arch-card p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

.arch-card p:last-child {
    margin-bottom: 0;
    margin-top: 0.5rem;
    font-style: italic;
    font-size: 0.84rem;
}

/* === Results Tables === */
.table-container {
    overflow-x: auto;
    margin-top: 1.25rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    line-height: 1.5;
}

.results-table caption {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    text-align: left;
    font-style: italic;
}

.results-table th {
    background: var(--color-table-header);
    padding: 0.6rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}

.results-table th:nth-child(2) {
    text-align: left;
}

.results-table td {
    padding: 0.5rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.results-table td.method-name {
    text-align: left;
    font-weight: 500;
}

.split-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    text-align: center !important;
    vertical-align: middle;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    white-space: nowrap;
}

.highlight-row {
    background: var(--color-highlight-row);
}

.highlight-row td {
    font-weight: 600;
}

.results-table strong {
    color: var(--color-accent);
}

/* === BibTeX === */
.bibtex {
    background: var(--color-code-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}

.bibtex code {
    font-family: var(--font-mono);
    color: var(--color-text-secondary);
}

/* === Footer === */
.footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

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

    .subtitle {
        font-size: 1rem;
    }

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

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

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

    .arch-details {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 2rem 0 1.5rem;
    }

    .section {
        margin-top: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 1rem 3rem;
    }

    .title {
        font-size: 1.35rem;
    }

    .links {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .results-table {
        font-size: 0.8rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.4rem 0.5rem;
    }
}
