/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    line-height: 1.7;
    font-size: 18px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 100;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-weight: 600;
    font-size: 1.3rem;
    color: #1a1a1a;
    text-decoration: none;
}

.nav-links a {
    color: #555;
    text-decoration: none;
    margin-left: 2rem;
    font-size: 1.1rem;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1a1a1a;
}

.nav-links a.active {
    color: #1a1a1a;
    font-weight: 600;
}

/* Standalone page sections (research.html, other.html) need top padding to clear the fixed navbar */
section.page-section {
    padding-top: 7rem;
}

/* Hero Section */
.hero {
    padding-top: 5rem;
    padding-bottom: 2rem;
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.hero-photo {
    flex-shrink: 0;
}

.hero-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    color: #1a1a1a;
}

.subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 0;
    font-weight: 400;
}

.affiliation {
    font-size: 1rem;
    color: #777;
    margin-bottom: 0.6rem;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #1d4ed8;
}

.bio p {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    line-height: 1.7;
}

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

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

.section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e5e5;
}

/* Papers */
.paper {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.paper-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.paper-tag {
    display: inline-block;
    background: #2563eb;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.15rem 0.55rem;
    border-radius: 3px;
    vertical-align: middle;
    position: relative;
    top: -2px;
    margin-left: 0.4rem;
}

.dept-link {
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.dept-link:hover {
    color: #2563eb;
}

.paper-coauthor {
    display: block;
    color: #666;
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 0.3rem;
}

.coauthor-link {
    color: #2563eb;
    text-decoration: none;
}

.coauthor-link:hover {
    text-decoration: underline;
}

.abstract-toggle {
    background: none;
    border: 1px solid #d0d0d0;
    color: #555;
    padding: 0.35rem 0.9rem;
    font-size: 0.95rem;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.3rem;
}

.abstract-toggle:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.abstract {
    margin-top: 0.8rem;
    padding: 1rem 1.2rem;
    background: #f8f9fa;
    border-left: 3px solid #2563eb;
    border-radius: 0 4px 4px 0;
}

.abstract p {
    font-size: 1rem;
    color: #444;
    line-height: 1.7;
}

/* CV Section */
.cv-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-cv-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0 2rem 2rem;
    scroll-margin-top: 5rem;
}

.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.cv-button:hover {
    background: #333;
}

/* Footer */
.footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.footer p {
    color: #999;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 700px) {
    .hero-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-photo img {
        width: 160px;
    }

    .contact-links {
        justify-content: center;
    }

    .bio {
        text-align: left;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links a {
        margin-left: 1rem;
    }

    .cv-links {
        flex-direction: column;
    }
}
