:root {
    --bg: #f9f8f5;
    --text: #1c1c2a;
    --accent: #4a6fa5;
    --accent-hover: #3a5a8a;
    --muted: #6b7280;
    --border: #e3ddd5;
    --section-gap: 2.5rem;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px;
}

body {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    padding: 0;
}

/* ── NAV ── */

nav {
    position: sticky;
    top: 0;
    background: rgba(249, 248, 245, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

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

.nav-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
}

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

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.18s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* ── MAIN ── */

main {
    max-width: 820px;
    margin: 0 auto;
    padding: 3.5rem 2rem 2rem;
}

/* ── SECTIONS ── */

section {
    margin-bottom: var(--section-gap);
}

section + section {
    padding-top: var(--section-gap);
    border-top: 1px solid var(--border);
}

h2 {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 1.5rem;
}

h3 {
    font-size: 1.05rem;
    font-weight: 500;
    margin: 1.75rem 0 0.6rem;
    color: var(--text);
}

p {
    margin: 0 0 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* ── HEADER ── */

.header-grid {
    display: grid;
    grid-template-columns: 185px 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

.portrait {
    width: 195px;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 5px;
    display: block;
    margin-top: 1.5rem;
}

.header-name {
    font-size: 2.35rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin: 0 0 0.15rem;
    line-height: 1.15;
}

.header-position {
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0 0 0.25rem;
}

.header-affiliation {
    font-size: 1rem;
    margin: 0 0 1.4rem;
    line-height: 1.6;
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    font-size: 0.95rem;
}

.contact-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    min-width: 62px;
    flex-shrink: 0;
}

/* ── RESEARCH ── */

.research-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 0;
    list-style: none;
    padding: 0;
}

.research-topics li {
    font-size: 0.9rem;
    color: var(--accent);
    background: #eef2f8;
    border: 1px solid #ccd8ec;
    border-radius: 3px;
    padding: 0.2rem 0.65rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
}

/* ── PUBLICATIONS ── */

.pub-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: pub-counter;
}

.pub-list > li {
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    gap: 0 0.75rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    counter-increment: pub-counter;
}

.pub-list > li:first-child {
    border-top: 1px solid var(--border);
}

.pub-list > li::before {
    content: counter(pub-counter) ".";
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: var(--muted);
    padding-top: 0.2rem;
    text-align: right;
}

.pub-title {
    font-weight: 500;
    font-size: 1.05rem;
    display: block;
}

.pub-authors {
    font-size: 0.95rem;
    color: var(--muted);
    display: block;
}

.pub-meta {
    font-size: 0.9rem;
    color: var(--muted);
    display: block;
    font-family: 'Inter', sans-serif;
    margin-top: 0.15rem;
}

/* ── TEACHING ── */

.teaching-group {
    margin-bottom: 0.5rem;
}

.teaching-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.teaching-table tr {
    border-bottom: 1px solid var(--border);
}

.teaching-table tr:last-child {
    border-bottom: none;
}

.teaching-table td {
    padding: 0.5rem 0;
    vertical-align: top;
}

.teaching-table .t-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
    padding-right: 1.5rem;
    min-width: 110px;
}

.teaching-table .t-hours {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
    padding-left: 1rem;
}

/* ── TALKS ── */

.talk-year-header {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    margin: 1.75rem 0 0.6rem;
}

.talk-year-header:first-child {
    margin-top: 0;
}

.talk-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0 0.1rem;
}

.talk-list li {
    display: flex;
    gap: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
    font-size: 0.97rem;
}

.talk-list li:last-child {
    border-bottom: none;
}

.talk-title {
    font-weight: 500;
    font-size: 1.05rem;
    display: block;
}

.talk-venue {
    color: var(--muted);
    font-size: 0.88rem;
    display: block;
    font-family: 'Inter', sans-serif;
}

.affil-prev {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 0.75rem;
    display: block;
}

/* ── FOOTER ── */

footer {
    max-width: 820px;
    margin: 0 auto;
    padding: 1.75rem 2rem 2.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── RESPONSIVE ── */

@media (max-width: 620px) {
    .header-grid {
        grid-template-columns: 1fr;
    }

    .portrait {
        width: 140px;
    }

    .nav-name {
        display: none;
    }

    .nav-links {
        gap: 1.1rem;
    }

    main {
        padding: 2.5rem 1.25rem 1.5rem;
    }

    footer {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}
