/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --text: #1a1a1a;
    --text-light: #555;
    --accent: #1a5276;
    --accent-hover: #2980b9;
    --bg: #fafafa;
    --bg-card: #fff;
    --border: #e0e0e0;
    --max-width: 900px;
}

body {
    font-family: 'Source Sans 3', -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ===== NAV ===== */
nav {
    position: sticky;
    top: 0;
    background: rgba(250,250,250,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 0.8rem 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}
.nav-name:hover { text-decoration: none; }

.nav-links a {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-light);
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ===== MAIN ===== */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}
section:last-child { border-bottom: none; }

h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--text);
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== HERO ===== */
.hero { padding-top: 3rem; }

.hero-content {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.hero-text { flex: 1; }

.hero-text h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.title {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.1rem;
}

.affiliation {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
}

.bio {
    margin-bottom: 0.8rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
}

.contact {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.hero-photo {
    flex-shrink: 0;
    width: 200px;
}

.hero-photo img {
    width: 100%;
    border-radius: 8px;
    filter: grayscale(10%);
}

/* ===== PAPERS ===== */
.paper {
    margin-bottom: 1.2rem;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.paper-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.paper-authors {
    font-size: 0.88rem;
    color: var(--text-light);
}

.paper-journal {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-top: 0.1rem;
}

details {
    margin-top: 0.4rem;
}

details summary {
    font-size: 0.85rem;
    color: var(--accent);
    cursor: pointer;
    font-weight: 400;
}

details p {
    margin-top: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== TEACHING ===== */
.teaching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.course {
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.course h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.course p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.award {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-light);
}

/* ===== CV SECTION ===== */
#cv ul {
    list-style: none;
    padding: 0;
}

#cv li {
    padding: 0.3rem 0;
    font-size: 0.93rem;
    border-bottom: 1px solid #f0f0f0;
}
#cv li:last-child { border-bottom: none; }

/* ===== FOOTER ===== */
footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 650px) {
    .hero-content {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }
    .hero-photo { width: 160px; }
    .teaching-grid { grid-template-columns: 1fr; }
    .nav-links a { margin-left: 1rem; font-size: 0.82rem; }
}
