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

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1624;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-glass: rgba(0, 0, 0, 0.05);
    --text-primary: #000000;
    --text-secondary: rgba(0, 0, 0, 0.7);
    --text-tertiary: rgba(0, 0, 0, 0.5);
    --accent-primary: #14b8a6;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #14b8a6 0%, #a855f7 100%);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(20, 184, 166, 0.2);
    --selection-color: rgba(20, 184, 166, 0.6);
    --selection-bg: rgba(20, 184, 166, 0.25);
}

body {
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 100%;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
    transition: background-color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    overflow-x: hidden;
}

main {
    overflow-x: hidden;
    width: 100%;
}

/* Navigation */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.2);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    transition: var(--transition);
}

[data-theme="light"] .navbar-custom {
    background: rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: flex-start;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
    transition: filter 0.3s ease;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--selection-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-icon {
    transition: var(--transition);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .mobile-menu-overlay {
    background: rgba(255, 255, 255, 0.98);
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-nav-links li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-links li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-nav-links li:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-menu-overlay.active .mobile-nav-links li:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    display: block;
    padding: 0.5rem 1rem;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    color: var(--accent-primary);
    transform: scale(1.05);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow-y: hidden;
    overflow-x: hidden;
    position: fixed;
    width: 100%;
    max-width: 100vw;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    animation: pulse 8s ease-in-out infinite;
    transition: var(--transition);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.title-line.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

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

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Benchmarks Section */
.section-title {
    font-size: clamp(2rem, 5vw, 2rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-container {
    margin-top: 5vh;
    width: 95%;
    max-width: 1600px;
}

.leaderboards-section {
    padding: 6rem 0;
    min-height: 100vh;
    transition: var(--transition);
}

.leaderboard-controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.benchmark-summary {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    animation: fadeIn 0.4s ease-out;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.benchmark-summary-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
    max-width: 800px;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    padding: 0;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: not-allowed;
    opacity: 0.4;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.read-more-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.read-more-btn::after {
    content: ' →';
    opacity: 0.6;
}

@media (max-width: 768px) {
    .benchmark-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .benchmark-summary-text {
        font-size: 1rem;
    }
}

.benchmark-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.benchmark-category {
    position: relative;
}

.benchmark-category-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 0;
    width: 100%;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.05rem;
    position: relative;
    text-transform: none;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.benchmark-category-btn::before {
    font-size: 0.7rem;
    opacity: 0.4;
    transition: var(--transition);
}

.benchmark-category:hover .benchmark-category-btn::after {
    transform: rotate(0deg);
    opacity: 0.6;
}

.benchmark-category-btn:hover {
    color: var(--text-primary);
}

.benchmark-instances {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.benchmark-category:hover .benchmark-instances,
.benchmark-instances:has(.filter-btn.active) {
    max-height: 500px;
    opacity: 1;
    padding-left: 1rem;
    padding-top: 0.5rem;
}

.benchmark-instances .filter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    text-align: left;
    width: 100%;
}

.benchmark-category:has(.filter-btn.active) .benchmark-category-btn::after {
    transform: rotate(0deg);
    opacity: 0.6;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.05rem;
    position: relative;
    text-transform: none;
    letter-spacing: -0.01em;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--selection-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    color: var(--text-primary);
    background: transparent;
}

.filter-btn:hover::after {
    width: 100%;
}

[data-theme="light"] .filter-btn:hover {
    background: transparent;
    color: var(--text-primary);
}

.filter-btn.active {
    background: transparent;
    border: none;
    color: var(--text-primary);
    box-shadow: none;
}

.filter-btn.active::after {
    width: 100%;
    height: 2px;
    background: var(--selection-color);
}

.filter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto; /* Allow tooltip to show */
}

.filter-btn:disabled:hover {
    color: var(--text-secondary);
    background: transparent;
}

.filter-btn:disabled:hover::after {
    width: 0;
}

.table-container {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 0.5px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
    position: relative;
    isolation: isolate;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 0;
}

.table-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.06) 0%, 
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 0;
}

/* Scroll indicator shadow - only on mobile */
@media (max-width: 768px) {
    .table-container-wrapper {
        position: relative;
    }

    /* Right edge shadow to indicate more content */
    .table-container.has-scroll::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 60px;
        background: linear-gradient(to left, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
        pointer-events: none;
        z-index: 3;
        border-radius: 0 24px 24px 0;
    }

    [data-theme="light"] .table-container.has-scroll::before {
        background: linear-gradient(to left, rgba(255, 255, 255, 0.9) 0%, transparent 100%);
    }

    /* Scroll hint indicator */
    .leaderboard-container::after {
        content: '← Swipe to see more →';
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        color: var(--text-tertiary);
        font-size: 0.75rem;
        font-weight: 500;
        opacity: 0;
        animation: fadeInOut 3s ease-in-out;
        pointer-events: none;
        white-space: nowrap;
    }

    @keyframes fadeInOut {
        0%, 100% {
            opacity: 0;
        }
        10%, 90% {
            opacity: 0.6;
        }
    }

    .leaderboard-container.scroll-hint-shown::after {
        animation: none;
        opacity: 0;
    }
}

[data-theme="light"] .table-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 0 0 0.5px rgba(255, 255, 255, 0.8) inset,
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

[data-theme="light"] .table-container::before {
    background: 
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.6) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
}

[data-theme="light"] .table-container::after {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.5) 0%, 
        transparent 40%,
        transparent 60%,
        rgba(0, 0, 0, 0.02) 100%);
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    position: relative;
    z-index: 1;
}

.leaderboard-table thead {
    background: transparent;
    transition: var(--transition);
    position: relative;
}

.leaderboard-table thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0.5px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.15) 80%,
        transparent 100%);
}

[data-theme="light"] .leaderboard-table thead::after {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.08) 20%,
        rgba(0, 0, 0, 0.12) 50%,
        rgba(0, 0, 0, 0.08) 80%,
        transparent 100%);
}

.leaderboard-table th {
    padding: 1.15rem 2rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    text-shadow: none;
    opacity: 0.8;
}

/* Mobile/Desktop text switching */
.leaderboard-table th .mobile-text {
    display: none;
}

.leaderboard-table th .desktop-text {
    display: inline;
}

[data-theme="light"] .leaderboard-table th {
    opacity: 0.7;
}

.leaderboard-table tbody tr {
    border-bottom: none;
    transition: var(--transition);
    position: relative;
}

.leaderboard-table tbody tr::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 0.5px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.06) 30%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.06) 70%,
        transparent 100%);
}

[data-theme="light"] .leaderboard-table tbody tr::after {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.04) 30%,
        rgba(0, 0, 0, 0.06) 50%,
        rgba(0, 0, 0, 0.04) 70%,
        transparent 100%);
}

.leaderboard-table tbody tr:last-child::after {
    display: none;
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(0);
}
/* Hide price and date columns */
.leaderboard-table .hidden-column {
    display: none;
}

[data-theme="light"] .leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.5);
}

.leaderboard-table tbody tr.hidden {
    display: none;
}

.leaderboard-table td {
    padding: 1.15rem 2rem;
    color: var(--text-primary);
    position: relative;
    text-shadow: none;
    text-wrap-mode: nowrap;
}

.rank {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
    width: 60px;
    font-size: 0.9rem;
    text-shadow: none;
    opacity: 0.9;
}

.model-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.model-badge {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

[data-theme="light"] .model-badge {
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent-primary);
}

.model-badge.verified {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

[data-theme="light"] .model-badge.verified {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.score,
.accuracy,
.mae,
.corr {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-shadow: none;
}

.org {
    color: var(--text-primary);
    font-weight: 500;
    opacity: 0.85;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.provider-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.date,
.price {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    font-size: 0.9rem;
    opacity: 0.75;
    font-weight: 500;
}

.benchmark-info-card {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

[data-theme="light"] .benchmark-info-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Model Visualizations */
.model-visualizations {
    margin-top: 3rem;
}

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

.visualization-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.visualization-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.visualization-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.visualization-item:hover .visualization-img {
    transform: scale(1.02);
}

.visualization-label {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

[data-theme="light"] .visualization-item {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .visualization-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .visualization-img {
    background: var(--bg-secondary);
}

/* About Section */
.about-section {
    padding: 6rem 0;
    min-height: 100vh;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Team Section */
.team-section {
    padding: 6rem 0;
    min-height: 100vh;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.team-content {
    max-width: 1200px;
    margin: 0 auto;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
    justify-items: center;
}

.team-member {
    text-align: center;
    max-width: 250px;
}

.member-photo {
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.member-photo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 3rem;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.member-affiliation {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.member-contact {
    margin-top: 0.5rem;
}

.contact-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    word-break: break-word;
}

.affiliated-institutions {
    text-align: center;
    padding-top: 2rem;
}

.institutions-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.institution-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.institution-logo {
    max-width: 240px;
    opacity: 0.7;
    transition: var(--transition);
}

.institution-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.institution-img {
    width: auto;
    max-width: 240px;
}

[data-theme="light"] .team-section {
    background: var(--bg-primary);
}

[data-theme="light"] .member-photo {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .member-photo:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    transition: var(--transition);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

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

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Prevent horizontal scroll on page */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        position: relative;
    }

    main {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    section {
        width: 100%;
        max-width: 100vw;
    }
    
    /* Prevent horizontal scroll on non-leaderboard sections */
    .hero,
    .about-section,
    .team-section {
        overflow-x: hidden;
    }

    .container {
        padding: 0 1rem;
        max-width: 100vw;
    }
    
    /* Allow leaderboard container to have scrollable children */
    .leaderboards-section .container {
        overflow-x: visible;
    }

    .nav-container {
        padding: 0 1rem;
        justify-content: space-between;
        overflow-x: visible;
    }

    .nav-container .col-2 {
        flex: 0 0 auto;
        min-width: fit-content;
        width: auto;
    }

    .nav-container .col-9 {
        flex: none;
        width: auto;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .logo {
        font-size: 1rem;
        min-width: fit-content;
        flex-shrink: 0;
    }

    .logo-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .logo-text {
        white-space: nowrap;
    }

    .hero {
        padding: 6rem 1rem 3rem;
        min-height: 80vh;
        overflow-x: hidden;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-stats {
        gap: 2rem;
    }

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

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .leaderboards-section {
        padding: 2rem 0;
        width: 100%;
        overflow-x: visible; /* Allow table to scroll horizontally */
    }

    .leaderboard-container {
        margin-top: 2rem;
        width: 100%;
        max-width: 100vw;
        position: relative;
        padding-bottom: 2rem;
        overflow-x: visible; /* Allow child elements to scroll */
    }

    /* Stack leaderboard layout on mobile */
    .leaderboard-container .row {
        flex-direction: column;
        overflow-x: visible; /* Allow child elements to scroll */
        width: 100%;
    }

    .leaderboard-container .col-2,
    .leaderboard-container .col-10 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        overflow-x: visible; /* Allow child elements to scroll */
    }

    .leaderboard-controls {
        margin-bottom: 1.5rem;
    }

    .benchmark-accordion {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        /* overflow-x: auto; */
        padding-bottom: 0.5rem;
    }

    .benchmark-category {
        flex-shrink: 0;
    }

    .benchmark-category-btn {
        white-space: nowrap;
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
    }

    .benchmark-instances {
        position: absolute;
        background: var(--bg-secondary);
        border-radius: 8px;
        padding: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        z-index: 100;
        min-width: 200px;
        max-height: 0 !important;
        opacity: 0 !important;
        padding-left: 0 !important;
        padding-top: 0 !important;
    }

    .benchmark-category:hover .benchmark-instances,
    .benchmark-category.mobile-open .benchmark-instances {
        max-height: 500px !important;
        opacity: 1 !important;
        padding-left: 0.5rem !important;
        padding-top: 0.5rem !important;
    }

    .table-container {
        border-radius: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        position: relative;
        /* Add scroll snap for better UX */
        scroll-behavior: smooth;
        width: 100%;
        max-width: calc(100vw - 2rem); /* Account for container padding */
        margin: 0 auto;
    }

    .leaderboard-table {
        font-size: 0.8rem;
        min-width: 100%;
        width: max-content;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    .leaderboard-table th {
        font-size: 0.65rem;
        padding: 0.875rem 0.5rem;
    }

    /* Switch to mobile text on mobile */
    .leaderboard-table th .mobile-text {
        display: inline;
    }

    .leaderboard-table th .desktop-text {
        display: none;
    }

    /* First column (Rank) - make it sticky for better UX */
    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        position: sticky;
        left: 0;
        background: var(--bg-card);
        backdrop-filter: blur(20px);
        z-index: 1;
        padding-left: 0.75rem;
    }

    [data-theme="light"] .leaderboard-table th:first-child,
    [data-theme="light"] .leaderboard-table td:first-child {
        background: rgba(255, 255, 255, 0.9);
    }

    .leaderboard-table thead th:first-child {
        z-index: 2;
    }

    .rank {
        width: 35px;
        font-size: 0.8rem;
    }

    .model-name {
        font-size: 0.85rem;
    }

    .model-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    .score,
    .accuracy,
    .mae,
    .corr,
    .org,
    .date,
    .price {
        font-size: 0.8rem;
    }

    /* Tighter column widths on mobile */
    .leaderboard-table td.model,
    .leaderboard-table th:nth-child(2) {
        min-width: 140px;
        padding-right: 0.75rem;
    }

    .leaderboard-table td.org,
    .leaderboard-table th:nth-child(3) {
        min-width: 100px;
    }

    .leaderboard-table td.mae,
    .leaderboard-table th:nth-child(4) {
        min-width: 80px;
    }

    .leaderboard-table td.corr,
    .leaderboard-table th:nth-child(5) {
        min-width: 70px;
    }

    .leaderboard-table td.price,
    .leaderboard-table th:nth-child(6) {
        min-width: 90px;
    }

    .leaderboard-table td.date,
    .leaderboard-table th:nth-child(7) {
        min-width: 90px;
        padding-right: 1rem;
    }

    .visualization-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .visualization-item {
        padding: 0.75rem;
    }

    .visualization-label {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }

    .about-section {
        padding: 4rem 0;
        width: 100%;
    }

    .about-text {
        font-size: 1rem;
        line-height: 1.7;
        max-width: 100%;
    }

    .team-section {
        padding: 4rem 0 2rem;
        width: 100%;
    }

    .team-content {
        padding: 2rem 1rem !important;
        overflow-x: hidden;
        max-width: 100%;
    }

    .team-members {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 2.5rem;
    }

    .team-member {
        max-width: 200px;
    }

    .member-photo {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    .member-name {
        font-size: 1.1rem;
    }

    .member-affiliation {
        font-size: 0.85rem;
    }

    .contact-info {
        font-size: 0.85rem;
    }

    .institutions-title {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .institution-logos {
        gap: 2rem;
        flex-direction: column;
    }

    .institution-logo {
        max-width: 180px;
    }

    .institution-img {
        max-width: 180px;
    }

    .footer {
        padding: 2rem 0 1.5rem;
        margin-top: 3rem;
        overflow-x: hidden;
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        overflow-x: hidden;
    }

    .footer-links {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .container {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .nav-container {
        padding: 0 0.75rem;
        overflow-x: visible;
    }

    .logo {
        font-size: 0.9rem;
        gap: 0.5rem;
    }

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

    .table-container {
        max-width: calc(100vw - 2rem); /* Account for padding */
    }

    .hero-title {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .leaderboard-table {
        font-size: 0.75rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.65rem 0.4rem;
    }

    .leaderboard-table th {
        font-size: 0.6rem;
        padding: 0.75rem 0.4rem;
    }

    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        padding-left: 0.5rem;
    }

    .rank {
        width: 30px;
        font-size: 0.75rem;
    }

    .model-name {
        font-size: 0.8rem;
    }

    .model-badge {
        font-size: 0.6rem;
        padding: 0.12rem 0.35rem;
    }

    .score,
    .accuracy,
    .mae,
    .corr,
    .org,
    .date,
    .price {
        font-size: 0.75rem;
    }

    /* Even tighter columns on small phones */
    .leaderboard-table td.model,
    .leaderboard-table th:nth-child(2) {
        min-width: 120px;
        padding-right: 0.5rem;
    }

    .leaderboard-table td.org,
    .leaderboard-table th:nth-child(3) {
        min-width: 80px;
    }

    .leaderboard-table td.mae,
    .leaderboard-table th:nth-child(4) {
        min-width: 70px;
    }

    .leaderboard-table td.corr,
    .leaderboard-table th:nth-child(5) {
        min-width: 60px;
    }

    .leaderboard-table td.price,
    .leaderboard-table th:nth-child(6) {
        min-width: 75px;
    }

    .leaderboard-table td.date,
    .leaderboard-table th:nth-child(7) {
        min-width: 80px;
        padding-right: 0.75rem;
    }

    .team-members {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .member-photo {
        width: 140px;
        height: 140px;
    }

    .institution-logos {
        gap: 1.5rem;
    }

    .institution-logo {
        max-width: 150px;
    }

    .institution-img {
        max-width: 150px;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero-title {
        font-size: clamp(3.5rem, 7vw, 4.5rem);
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 1rem 1.5rem;
    }

    .team-members {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 2.5rem;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .filter-btn,
    .benchmark-category-btn,
    .nav-link,
    .theme-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    .filter-btn {
        padding: 0.875rem 1.5rem;
    }

    .leaderboard-table tbody tr:hover {
        background: transparent;
    }

    .leaderboard-table tbody tr:active {
        background: rgba(255, 255, 255, 0.03);
    }

    [data-theme="light"] .leaderboard-table tbody tr:active {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

[data-theme="light"] ::selection {
    background: rgba(20, 184, 166, 0.25);
    color: var(--text-primary);
}

.fake-selection {
    background: rgba(20, 184, 166, 0.25);
    color: var(--text-primary);
    position: relative;
}

#typing-text {
    display: inline-block;
    opacity: 1 !important;
    animation: none !important;
}

#typing-text::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s infinite;
    color: var(--accent-primary);
    font-weight: 300;
}

#typing-text.typing-complete::after {
    animation: none;
    opacity: 0;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}


button:focus{
    outline: none;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .image-modal-overlay {
    background: rgba(0, 0, 0, 0.85);
}

.image-modal-content {
    position: relative;
    z-index: 10001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-modal-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 300;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.image-modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Thumbnail Styles */
.plot-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.plot-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border-color: var(--accent-primary);
}

.plot-thumbnail:active {
    transform: scale(1.05);
}

.plot-thumbnail-cell {
    text-align: center;
    padding: 0.5rem !important;
}

.plot-thumbnail-placeholder {
    width: 60px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}