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

:root {
    --background: #ffffff;
    --foreground: oklch(0.145 0 0);
    --muted-foreground: #717182;
    --border: rgba(0, 0, 0, 0.1);
    --secondary: oklch(0.95 0.0058 264.53);
    --secondary-foreground: #030213;
    --card: #ffffff;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
}

h1 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-name {
    color: var(--foreground);
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-link {
    color: var(--muted-foreground);
    display: inline-flex;
}

.social-link:hover {
    color: var(--foreground);
}

.icon {
    width: 16px;
    height: 16px;
}

.intro-logo {
    display: inline-block;
    height: 1em;
    width: auto;
    vertical-align: -0.12em;
    margin: 0 0.15em 0 0.08em;
    line-height: 1;
}

/* Slightly smaller for wordmark-style logos so they don't overpower text */
.intro-logo.wordmark {
    height: 0.9em;
    vertical-align: -0.1em;
}

/* Slightly larger for crest-style marks */
.intro-logo.crest {
    height: 1.15em;
    vertical-align: -0.15em;
}

/* Subtle highlight for key phrase (non-link) */
.highlight {
    font-weight: 600;
    color: var(--foreground);
}

/* Section */
section {
    padding: 3rem 1.5rem;
}

.section-border {
    border-top: 1px solid var(--border);
}

/* Hero */
.hero-content {
    max-width: 1024px;
    margin: 0 auto;
}

.hero-bio {
    color: var(--muted-foreground);
    max-width: calc(72ch + 320px);
}

.hero-tagline {
    color: oklch(0.3 0 0);
}

.hero-tagline-mobile {
    display: none;
}

.hero-tagline-role,
.hero-tagline-areas {
    display: block;
}

/* Only float the top-level portrait image, not inline logos */
.hero-bio > img {
    float: right;
    margin-left: 1.25rem;
    margin-bottom: 1rem;
    width: 256px;
    height: 256px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.hero-bio p {
    margin-bottom: 0.75rem;
}

.hero-bio a {
    color: var(--foreground);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
    text-decoration-color: rgba(0, 0, 0, 0.25);
}

.hero-bio a:hover {
    text-decoration-color: rgba(0, 0, 0, 0.5);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    clear: both;
    margin-bottom: 1rem; /* space before horizontal rule */
}

/* Subtle list for key interests */
.hero-list {
    margin: 0.25rem 0 0.75rem 0.75rem;
    padding-left: 0;
    list-style: none;
    color: var(--muted-foreground);
}
.hero-list li { margin: 0.15rem 0; }
.hero-list li::before {
    content: "- ";
    color: var(--muted-foreground);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* Publications */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pub-entry {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
}

.pub-entry:first-child {
    border-top: none;
}

.pub-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.pub-authors {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    color: var(--foreground);
}

.pub-venue {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--muted-foreground);
    margin-bottom: 0.35rem;
}

.pub-summary {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    max-width: 72ch;
    margin-top: 0.4rem;
}

.pub-entry .badges {
    padding-top: 0.35rem;
    margin-bottom: 0.4rem;
    gap: 0.4rem;
}

/* Monochrome pill buttons for publication links (Project, PDF, etc.) */
.pub-entry .badge {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.16rem 0.6rem;
}

.pub-entry .badge:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* Awards / distinctions under publications */
.cv-award {
    color: #ffb700;
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.1rem 0;
}

.cv-award a {
    color: inherit;
    text-decoration: none;
}

.cv-award a:hover {
    text-decoration: underline;
}

.pub-advisors {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

/* Row of small pill links, adapted from pub-misc */
.pub-misc {
    font-size: 0.75rem;
    margin-top: 0.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.pub-misc a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--muted-foreground);
    white-space: nowrap;
    background-color: rgba(0, 0, 0, 0.035);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    text-decoration: none;
}

.pub-misc a:hover {
    color: var(--foreground);
    background-color: rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

/* Contact */
.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#publications .section-header {
    margin-top: 0.75rem;
}

.section-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.contact-content {
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
}

.contact-content a {
    color: var(--foreground);
}

.contact-content a:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 1rem; /* pull horizontal rule away from badges */
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--border);
}

.footer-text {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

@media (max-width: 640px) {
    .hero-heading {
        text-align: center;
    }

    .hero-tagline-desktop {
        display: none;
    }

    .hero-tagline-mobile {
        display: block;
    }

    .hero-bio > img {
        float: none;
        display: block;
        margin: 0 auto 1rem;
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 360px) {
    .hero-bio > img {
        width: 180px;
        height: 180px;
    }
}
