/* AI Inference Benchmark - GitHub Pages Style */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --code-bg: #1e293b;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.hero .tagline {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.badges {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge img {
    height: 28px;
}

/* Navigation */
.nav-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-bar .container {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    overflow-x: auto;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-bar a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.nav-bar a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

/* Sections */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.section:last-child {
    border-bottom: none;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text);
}

/* Abstract */
.abstract-text {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    max-width: 800px;
}

.key-findings {
    background: var(--bg-alt);
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    border-radius: 0 8px 8px 0;
}

.key-findings h3 {
    margin: 0 0 1rem 0;
    color: var(--primary);
}

.key-findings ul {
    margin: 0;
    padding-left: 1.5rem;
}

.key-findings li {
    margin-bottom: 0.5rem;
}

/* Method Grid */
.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.method-card {
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.method-card h3 {
    margin: 0 0 1rem 0;
    color: var(--primary);
}

/* Phases */
.phases {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.phase {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.phase-highlight {
    background: #dbeafe;
    border-color: var(--primary);
}

.phase-name {
    font-weight: 600;
    min-width: 80px;
    color: var(--primary);
}

.phase-desc {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Metrics Grid */
.metrics-explained {
    margin-top: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.metric {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.metric h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.metric code {
    display: inline-block;
    background: var(--code-bg);
    color: #a5f3fc;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.metric p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

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

.figure-full img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.figure-full figcaption {
    margin-top: 1rem;
    color: var(--text-light);
    font-style: italic;
}

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

.results-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-figure {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.result-figure img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.result-figure figcaption {
    margin-top: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Tables */
.scenario-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.scenario-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.scenario-table th,
.scenario-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.scenario-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
}

.scenario-table tr:hover {
    background: var(--bg-alt);
}

/* Setup Grid */
.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.setup-card {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.setup-card h3 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    font-size: 1.1rem;
}

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

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

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

/* Engine Table */
.engine-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.version-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.scenario-table code {
    font-size: 0.8rem;
    background: var(--code-bg);
    color: #a5f3fc;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.setup-note {
    background: #fef3c7;
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.setup-note p {
    margin: 0;
    color: #92400e;
}

/* Citation */
.citation-box {
    background: var(--code-bg);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Footer */
footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
}

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

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-bar .container {
        justify-content: flex-start;
    }
    
    .results-grid,
    .results-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .nav-bar {
        display: none;
    }
    
    .hero {
        background: none;
        color: var(--text);
        padding: 2rem 0;
    }
    
    .section {
        break-inside: avoid;
    }
}
