:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #059669;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

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

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

/* Navigation */
.navbar {
    background: var(--dark-bg);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.nav-brand .subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

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

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

.section-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

/* Abstract */
.abstract-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.abstract-box h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.abstract-box p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Taxonomy */
.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.taxonomy-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.taxonomy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.taxonomy-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.taxonomy-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.badge-local { background: #dbeafe; color: #1e40af; }
.badge-global { background: #fef3c7; color: #92400e; }
.badge-posthoc { background: #e0e7ff; color: #4338ca; }
.badge-selfexp { background: #d1fae5; color: #065f46; }
.badge-deliberative { background: #fce7f3; color: #9f1239; }
.badge-counterfactual { background: #f3e8ff; color: #6b21a8; }
.badge-agnostic { background: #ddd6fe; color: #5b21b6; }
.badge-specific { background: #fed7aa; color: #92400e; }
.badge-bp { background: #bfdbfe; color: #1e40af; }
.badge-per { background: #fecaca; color: #991b1b; }
.badge-pro { background: #c7d2fe; color: #3730a3; }
.badge-rb { background: #fde68a; color: #78350f; }
.badge-ot { background: #d1d5db; color: #374151; }
.badge-visual { background: #d1fae5; color: #065f46; }
.badge-textual { background: #fef3c7; color: #92400e; }
.badge-fbe { background: #e0f2fe; color: #075985; }
.badge-cbe { background: #fce7f3; color: #9f1239; }
.badge-cfe { background: #ede9fe; color: #5b21b6; }
.badge-sbe { background: #dcfce7; color: #166534; }

/* Filters */
.filters {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 300px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--text-secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: var(--text-primary);
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--dark-bg);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--light-bg);
}

.method-name {
    font-weight: 600;
    color: var(--primary-color);
}

.method-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.method-badges .badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Datasets Grid */
.datasets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.dataset-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dataset-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dataset-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.dataset-year {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.dataset-stats {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dataset-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.dataset-stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.dataset-stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.dataset-purpose {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.purpose-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-bg);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Metrics */
.metrics-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-tab {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.metric-tab:hover {
    border-color: var(--primary-color);
}

.metric-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.metrics-content {
    display: grid;
    gap: 1.5rem;
}

.metric-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.metric-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.metric-category-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-bg);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Repository Tables */
.repo-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.repo-tab {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.repo-tab:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.repo-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.metric-formula {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.metric-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.about-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contribution-list {
    list-style: none;
    padding: 0;
}

.contribution-list li {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.conference-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.conf-tag {
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}
