/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B1712;
    --primary-light: #a82820;
    --text-color: #000000;
    --light-gray: #f8f8f8;
    --border-color: #e5e5e5;
    --link-color: #000000;
    --link-hover: #666666;
    --max-width: 800px;
    --spacing-unit: 1.5rem;
    --red-team-color: #BD1712;
    --blue-team-color: #1D1E71;
    --green-team-color: #206A2D;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

strong, b {
    color: var(--primary-color);
    font-weight: 700;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 1rem;
    text-align: center;
}

.authors {
    font-size: 1rem;
    color: #444;
    margin-bottom: 1rem;
}

.author-row {
    margin-bottom: 0.3rem;
}

.author {
    margin: 0 0.5rem;
}

.red-team {
    color: var(--red-team-color);
}

.blue-team {
    color: var(--blue-team-color);
}

.green-team {
    color: var(--green-team-color);
}

.affiliations {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.affiliations div {
    margin-bottom: 0.3rem;
}

.team-legend {
    font-size: 0.85rem;
    color: #888;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 0;
    flex-wrap: wrap;
    font-size: 1.1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    opacity: 0.7;
}

.nav-separator {
    color: #ccc;
    font-weight: 300;
    margin: 0 0.5rem;
}

.paper-icon {
    width: 22px;
    height: 22px;
}

.github-logo {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Main Content */
main {
    margin-bottom: 4rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: justify;
}

/* Lists */
ul, ol {
    margin: 1rem 0 1.5rem 2rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    text-align: justify;
}

ol li {
    padding-left: 0.5rem;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* Figures */
.figure {
    margin: 3rem 0;
    text-align: center;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.caption {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #666;
    font-style: normal;
    text-align: left;
    line-height: 1.5;
}

.hero-caption {
    margin-top: 1rem;
    font-size: 1rem;
    color: #555;
    text-align: justify;
    line-height: 1.6;
}

/* Citation Box */
.citation-box {
    background: var(--light-gray);
    border: none;
    border-radius: 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.citation-box pre {
    margin: 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.citation-box code {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--primary-color);
    font-family: inherit;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0 2rem;
    border-top: none;
    color: #666;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    nav {
        gap: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }
}

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

    h1 {
        font-size: 2rem;
    }

    nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

/* Image Lightbox */
.figure img {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.figure img:hover {
    opacity: 0.9;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.7;
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        max-width: 100%;
    }

    nav, footer {
        display: none;
    }

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