/* sim-ai.org — Swiss Typography Clean */

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

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    background: #FFFFFF;
    color: #444444;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
}

/* Accent Bar — 40px x 4px Signal Red */
.accent-bar {
    width: 40px;
    height: 4px;
    background: #D42B2B;
    margin-bottom: 16px;
}

/* Section Heading */
.section-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #0A0A0A;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 32px;
}

/* ===========================
   HERO
   =========================== */
.hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 32px 40px;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: #0A0A0A;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero-mission {
    font-size: 1rem;
    color: #444444;
    margin-bottom: 32px;
    max-width: 560px;
    line-height: 1.6;
}

.hero-nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #1A5CA8;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 4px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #1A5CA8;
    transition: width 0.2s ease;
}

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

.nav-link:hover {
    color: #D42B2B;
}

/* ===========================
   RESEARCH TRACKS
   =========================== */
.tracks {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px;
}

.track-grid {
    display: flex;
    gap: 0;
}

.track-col {
    flex: 1;
    padding: 0 24px 0 0;
}

.track-divider {
    width: 1px;
    background: #E0E0E0;
    flex-shrink: 0;
    margin: 0 24px 0 0;
    align-self: stretch;
}

.track-number {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #D42B2B;
    display: block;
    margin-bottom: 8px;
    line-height: 1;
}

.track-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0A0A0A;
    margin-bottom: 8px;
}

.track-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #888888;
    margin-bottom: 8px;
}

.track-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #1A5CA8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.track-link:hover {
    color: #D42B2B;
}

/* ===========================
   PUBLICATIONS TABLE
   =========================== */
.publications {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px;
}

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

.pub-table th {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 8px 8px 8px 0;
    border-bottom: 2px solid #0A0A0A;
    white-space: nowrap;
    user-select: none;
}

.pub-table th.sortable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.pub-table th.sortable:hover {
    color: #0A0A0A;
}

.sort-indicator {
    font-size: 0.65rem;
    margin-left: 4px;
    display: inline-block;
    opacity: 0.4;
}

.pub-table th.sort-asc .sort-indicator::after {
    content: '\25B2';
    opacity: 1;
}

.pub-table th.sort-desc .sort-indicator::after {
    content: '\25BC';
    opacity: 1;
}

.pub-table td {
    padding: 12px 8px 12px 0;
    border-bottom: 1px solid #E0E0E0;
    font-size: 0.9rem;
    color: #444444;
    vertical-align: top;
}

.pub-table tbody tr:nth-child(even) {
    background: #F5F5F5;
}

.pub-table tbody tr {
    transition: background 0.15s ease;
}

.pub-table tbody tr:hover {
    background: #F0F0F0;
}

.pub-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #888888;
    white-space: nowrap;
}

.pub-title {
    color: #0A0A0A;
    font-weight: 700;
}

.dl-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #1A5CA8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dl-link:hover {
    color: #D42B2B;
}

/* ===========================
   OPEN SOURCE PROJECTS
   =========================== */
.projects {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.project-card {
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 16px;
}

.project-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.project-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0A0A0A;
}

.project-version {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #888888;
}

.project-stars {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #888888;
}

.project-stars::before {
    content: '\2605 ';
}

.project-desc {
    font-size: 0.9rem;
    color: #444444;
    margin-bottom: 4px;
    line-height: 1.5;
}

.project-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #1A5CA8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: #D42B2B;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px 64px;
    border-top: 2px solid #0A0A0A;
}

.footer-cols {
    display: flex;
    gap: 48px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-col {
    min-width: 100px;
}

.fc-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #0A0A0A;
    margin-bottom: 8px;
}

.fc-link {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #888888;
    text-decoration: none;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.fc-link:hover {
    color: #1A5CA8;
}

.license-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #888888;
    border: 1px solid #E0E0E0;
    padding: 2px 8px;
    margin-bottom: 8px;
}

.footer-copy {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #888888;
}

/* ===========================
   ANIMATIONS
   =========================== */
.fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 640px) {
    .hero {
        padding: 56px 24px 32px;
    }

    .tracks,
    .publications,
    .projects {
        padding: 40px 24px;
    }

    .track-grid {
        flex-direction: column;
        gap: 24px;
    }

    .track-col {
        padding-right: 0;
    }

    .track-divider {
        display: none;
    }

    .pub-table {
        font-size: 0.8rem;
    }

    .pub-table th,
    .pub-table td {
        padding: 8px 4px 8px 0;
    }

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

    .footer {
        padding: 40px 24px 48px;
    }

    .footer-cols {
        gap: 32px;
    }
}
