:root {
    --accent: #1D4ED8;
    --accent-dark: #1e3a8a;
    --accent-light: #eff6ff;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-main: #ffffff;
    --bg-light: #f6f7f9;
    --border-color: #e5e7eb;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 960px;
    --nav-height: 64px;
}

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

html {
    scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.25;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Visible keyboard focus for all interactive elements */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}

.muted {
    color: var(--text-muted);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

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

.subsection-title {
    font-size: 1.15rem;
    color: var(--accent-dark);
    margin: 2rem 0 1rem;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

#navbar.scrolled {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

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

.nav-logo {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

.nav-logo:hover {
    text-decoration: none;
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.nav-cta {
    background-color: var(--accent-light);
    color: var(--accent);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-weight: 600;
}

.nav-cta:hover {
    background-color: var(--accent);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-main);
    border-radius: 2px;
}

/* Hero */
#hero {
    padding: calc(var(--nav-height) + 3.5rem) 0 3.5rem;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-text {
    flex: 1 1 60%;
}

h1 {
    font-size: 2.5rem;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--accent-dark);
    font-weight: 500;
    margin-top: 0.5rem;
}

.hero-affiliation {
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.hero-statement {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    max-width: 36rem;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.hero-image {
    flex: 0 0 auto;
}

.image-wrapper {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 14px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 0;
}

.image-wrapper img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--bg-main);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent-light);
    color: var(--accent-dark);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.about-card h3 {
    font-size: 1.05rem;
    color: var(--accent-dark);
    margin-bottom: 1rem;
}

.about-card ul {
    list-style: none;
}

.about-card li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.about-card li:last-child {
    margin-bottom: 0;
}

/* Research */
.paper-entry {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.paper-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-dark);
    line-height: 1.4;
}

.paper-link {
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.4rem;
    white-space: nowrap;
}

.paper-authors {
    margin-top: 0.35rem;
    font-size: 0.98rem;
}

.paper-meta {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.paper-abstract {
    margin-top: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.paper-award {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-dark);
}

/* Teaching */
.teaching-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2.5rem;
    align-items: start;
}

.teaching-block h3 {
    font-size: 1.1rem;
    color: var(--accent-dark);
    margin-bottom: 1rem;
}

.teaching-list {
    list-style: none;
}

.teaching-list li {
    margin-bottom: 1.1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border-color);
}

.teaching-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.course-level {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.course-term {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.teaching-interests {
    font-size: 1rem;
    line-height: 1.9;
}

.teaching-statement-link {
    margin-top: 1.25rem;
    font-weight: 500;
}

/* Presentations */
.talks-list {
    list-style: none;
}

.talks-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.talk-title {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Honors & Awards */
.awards-list {
    list-style: none;
}

.awards-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.award-year {
    display: inline-block;
    min-width: 3rem;
    font-variant-numeric: tabular-nums;
}

/* News */
.news-list {
    list-style: none;
}

.news-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.news-date {
    display: inline-block;
    min-width: 3.5rem;
    font-variant-numeric: tabular-nums;
}

/* Service */
.service-list {
    list-style: none;
}

.service-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.service-detail {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

/* Contact */
.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 0.6rem;
}

.personal-note {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.92rem;
}

/* Footer */
footer {
    background: var(--text-main);
    color: #e5e7eb;
    padding: 2.5rem 0 1.25rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-name {
    font-weight: 600;
    color: white;
}

.footer-email a,
.footer-content a {
    color: #d1d5db;
}

.footer-email a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--bg-main);
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 1.5rem 1rem;
        display: none;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        padding: 0.5rem 0;
    }

    .nav-cta {
        display: inline-block;
    }

    .hero-content {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 2rem;
    }

    .about-grid,
    .teaching-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
