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

:root {
    /* Stanford Brand Colors */
    --primary-color: #8C1515; /* Stanford Cardinal Red */
    --primary-dark: #6B0F0F; /* Darker Cardinal */
    --primary-light: #B81D1D; /* Lighter Cardinal */
    --secondary-color: #2E2D29; /* Stanford Cool Grey */
    --text-primary: #2E2D29; /* Cool Grey for text */
    --text-secondary: #4E4E4E; /* Medium grey */
    --bg-primary: #ffffff;
    --bg-secondary: #F8F8F8; /* Light grey background */
    --bg-alt: #F0F0F0; /* Alternate background */
    --border-color: #D5D5D5; /* Light border */
    --accent-color: #8C1515; /* Cardinal for accents */
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background:
        radial-gradient(circle at 5% 10%, rgba(140, 21, 21, 0.06), transparent 28%),
        radial-gradient(circle at 95% 2%, rgba(46, 45, 41, 0.06), transparent 22%),
        var(--bg-primary);
}

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

/* Header */
header {
    background: linear-gradient(120deg, #7f1212 0%, #8C1515 45%, #5d1010 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    border-bottom: 4px solid var(--primary-dark);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.2), transparent 30%),
        radial-gradient(circle at 90% 100%, rgba(255, 255, 255, 0.12), transparent 35%);
    pointer-events: none;
}

header .container {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
    line-height: 1.1;
}

.subtitle {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    opacity: 0.95;
    line-height: 1.45;
}

.venue {
    font-size: 0.98rem;
    opacity: 0.85;
    margin-top: 0.75rem;
    letter-spacing: 0.01em;
}

.header-links {
    margin-top: 1.25rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-paper,
.btn-github {
    display: inline-block;
    padding: 0.68rem 1.35rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12));
    color: white;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-paper:hover,
.btn-github:hover {
    background-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.stanford-branding {
    margin-bottom: 1.5rem;
}

.stanford-label {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.6rem;
    padding: 0.85rem 0;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.alt-bg {
    background-color: var(--bg-secondary);
}

.section h2 {
    font-size: 2.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.section h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-dark);
    font-family: var(--font-heading);
    line-height: 1.2;
}

.section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}

.section p {
    margin-bottom: 0.9rem;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.75;
}

.section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.dataset-figure {
    margin: 1rem 0 2rem;
    text-align: center;
}

.dataset-figure img {
    width: 100%;
    max-width: 900px;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.dataset-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.overview-panel {
    margin: 1rem 0 2rem;
}

.overview-panel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.overview-panel-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.overview-panel figcaption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.gradcam-figure {
    margin: 1.5rem auto 1rem;
    max-width: 980px;
}

.gradcam-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.gradcam-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.gradcam-figure figcaption {
    margin-top: 0.85rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.gradcam-note {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    background: linear-gradient(180deg, #fff7f7, #fdf1f1);
    border: 1px solid #edd1d1;
    border-radius: 10px;
    font-size: 0.98rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

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

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

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

/* Stats Box */
.stats-box {
    background: linear-gradient(165deg, #ffffff 0%, #fdf6f6 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stats-box h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.stats-box ul {
    list-style: none;
    margin: 0;
}

.stats-box li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-box li:last-child {
    border-bottom: none;
}

.stats-box strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: linear-gradient(170deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.stat-card ul {
    list-style: none;
    margin: 0;
}

.stat-card li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.task-card {
    background: linear-gradient(170deg, #ffffff 0%, #fcf7f7 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.task-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.task-card p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.prevalence {
    display: inline-block;
    background-color: var(--bg-alt);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Architecture Grid */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.arch-card {
    background: linear-gradient(170deg, #ffffff 0%, #fdf8f8 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.arch-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.arch-card ul {
    list-style: none;
    margin: 0;
}

.arch-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.arch-card li:last-child {
    border-bottom: none;
}

/* Results */
.results-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.result-card {
    background: linear-gradient(170deg, #ffffff 0%, #fcf8f8 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.result-card.highlight {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8e8e8 100%);
}

.result-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.metric {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.model {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Results Table */
.results-table {
    margin-top: 2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

thead {
    background: linear-gradient(120deg, var(--primary-dark), var(--primary-color));
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tbody tr:hover {
    background-color: var(--bg-secondary);
}

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

/* Download Section */
.download-info {
    background: linear-gradient(170deg, #ffffff 0%, #fdf7f7 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.download-info ul {
    margin-top: 1rem;
}

/* Citation */
.citation-box {
    background: linear-gradient(170deg, #f8f6f6 0%, #f2eded 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1rem;
}

.citation-box pre {
    margin: 0;
    overflow-x: auto;
}

.citation-box code {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.citation-note {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2E2D29 0%, #1f1f1c 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.stanford-footer {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

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

    .subtitle {
        font-size: 1.25rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

