@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --green: #10b981;
    --green-light: #34d399;
    --purple: #8b5cf6;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --border: rgba(51, 65, 85, 0.6);
    --border-light: rgba(71, 85, 105, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ─── Navigation ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent-light), var(--green-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}


.navbar-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.navbar-links a:hover {
    color: var(--accent-light);
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--accent-light);
}

.navbar-links .btn-nav {
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.navbar-links .btn-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    color: #fff;
}

/* ─── Hero ─── */
.hero {
    position: relative;
    text-align: center;
    padding: 7rem 2rem 5rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-light);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 30%, var(--accent-light) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #2563eb);
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* ─── Stats Bar ─── */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-light), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ─── Sections ─── */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ─── Team ─── */
.team-section {
    border-top: 1px solid var(--border);
}

.pi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.pi-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    transition: border-color 0.3s;
}

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

.pi-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.pi-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.pi-info .pi-role {
    color: var(--accent-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.pi-info .pi-affil {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.team-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.contributor-tags,
.evaluator-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
}

.tag:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-glow);
}

.tag .tag-affil {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.tag-contributor {
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--accent-light);
}

.tag-equal {
    font-size: 0.65rem;
    color: var(--amber);
    font-weight: 600;
}

/* ─── Charts ─── */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.chart-wrapper {
    position: relative;
    width: 100%;
    max-height: 450px;
}

/* ─── Tables ─── */
.data-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.data-table-title {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

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

th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

td.highlight {
    color: var(--green);
    font-weight: 600;
}

td.lowlight {
    color: var(--rose);
}

/* ─── Bias Heatmap ─── */
.bias-cell {
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    padding: 0.6rem 0.5rem;
    border-radius: 4px;
}

.bias-positive {
    color: #f97316;
}

.bias-negative {
    color: #22d3ee;
}

.bias-neutral {
    color: var(--text-muted);
}

/* ─── Dataset Section ─── */
.dataset-section {
    border-top: 1px solid var(--border);
}

.download-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.download-card h3 {
    margin-bottom: 0.5rem;
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ─── Footer ─── */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--accent-light);
    text-decoration: none;
}

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

/* ─── Blog Styles ─── */
.blog-hero {
    text-align: center;
    padding: 5rem 2rem 3rem;
}

.blog-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.blog-meta {
    color: var(--accent-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

.article h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 3.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.article p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.article strong {
    color: var(--text-primary);
}

.article code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.88em;
    color: var(--accent-light);
}

.article blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--accent-glow);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article .feature-image {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 1.5rem 0;
    background: #fff;
}

/* ─── Animations ─── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .navbar-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-links {
        gap: 1rem;
    }

    .stats-bar {
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 1.8rem;
    }

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

    .section {
        padding: 3rem 1.5rem;
    }

    .chart-wrapper {
        max-height: 350px;
    }
}