:root {
    --bg: #f7f7fa;
    --bg-alt: #ffffff;
    --text: #1b1c21;
    --muted: #6f7380;
    --accent: #4c6ef5;
    --accent-soft: rgba(76, 110, 245, 0.12);
    --card-bg: #ffffff;
    --border: rgba(18, 21, 31, 0.06);
    --radius: 18px;
    scroll-behavior: smooth;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}


.publication::before {
    content: "";
    position: absolute;
    inset: -6px;
    background-image: var(--preview, none);
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    opacity: 0.45;
    transform: scale(1.08);
    z-index: 0;
}

.publication::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.76) 100%);
    backdrop-filter: blur(0.5px);
    z-index: 0;
}

.publication > * {
    position: relative;
    z-index: 1;
}
body {
    margin: 0;
    font-family: 'Times New Roman', Times, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

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

a:hover,
a:focus {
    text-decoration: underline;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(247, 247, 250, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem clamp(1rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.branding h1 {
    font-size: clamp(1.2rem, 2.5vw, 1.75rem);
    margin: 0;
}

.branding p {
    margin: 0;
    color: var(--muted);
    font-weight: 400;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(44px, 5vw, 60px);
    height: clamp(44px, 5vw, 60px);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 6px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-nav {
    position: relative;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--text);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav a:focus {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    background: none;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
}

.hero {
    padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 6vw, 5rem) clamp(3rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at top left, rgba(76, 110, 245, 0.16), rgba(128, 166, 255, 0.14), transparent 60%);
}

.hero h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.hero-lede {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    max-width: 620px;
}

.hero-lede + .hero-lede {
    margin-top: -0.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.profile-figure {
    margin: 0;
    width: clamp(220px, 30vw, 320px);
    height: clamp(220px, 30vw, 320px);
    border-radius: calc(var(--radius) * 1.4);
    overflow: hidden;
    background: var(--bg-alt);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.primary:hover,
.button.primary:focus {
    background: #3e5de6;
    text-decoration: none;
}

.button.secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.button.secondary:hover,
.button.secondary:focus {
    border-color: rgba(76, 110, 245, 0.4);
    color: var(--accent);
    text-decoration: none;
}

.section {
    padding: clamp(3rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 5rem);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    scroll-margin-top: clamp(80px, 12vw, 140px);
}

.section.highlight {
    background: #eef1fb;
}

.section-heading {
    max-width: 720px;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-heading h2 {
    margin: 0 0 0.75rem 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.section-heading-icon {
    width: clamp(28px, 3vw, 36px);
    height: clamp(28px, 3vw, 36px);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0.3rem;
    text-decoration: none;
    color: inherit;
}

.section-heading-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: saturate(0.85);
}

.section-heading-icon:hover,
.section-heading-icon:focus-visible {
    border-color: rgba(76, 110, 245, 0.5);
    outline: none;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.timeline {
    display: grid;
    gap: 2rem;
}

.timeline-heading {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
}

.timeline-heading h3 {
    flex: 1;
    min-width: 0;
    margin: 0;
    text-align: left;
}

.timeline-item {
    padding: 1.8rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.institution-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    padding: 0.4rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.institution-link:hover,
.institution-link:focus-visible {
    border-color: rgba(76, 110, 245, 0.5);
    transform: translateY(-1px);
    outline: none;
}

.institution-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeline-item header {
    margin-bottom: 1rem;
}

.timeline-item h3 {
    margin: 0;
    font-size: 1.2rem;
}

.meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.timeline-item ul {
    margin: 0;
    padding-left: 1.1rem;
}

.timeline-item li + li {
    margin-top: 0.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.three-columns {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.project-card {
    padding: 1.2rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.project-contributions {
    margin-bottom: clamp(2rem, 4vw, 3rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(76, 110, 245, 0.08), rgba(76, 110, 245, 0.02));
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.project-contributions h3 {
    margin: 0;
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.contribution-figure {
    margin: 0;
    padding: 0.6rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 6px);
    overflow-x: auto;
}

.contribution-figure img {
    display: block;
    max-width: none;
    width: 720px;
    height: auto;
}

.contribution-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.publication {
    padding: 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.publication-featured {
    padding: 0;
    border: none;
    box-shadow: none;
}

.publication-featured::before,
.publication-featured::after {
    display: none;
}

.publication-featured .publication-figure {
    margin: 0;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    height: clamp(260px, 32vw, 320px);
}

.publication-featured .publication-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.75;
}

.publication-featured-overlay {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(12, 13, 18, 0.20) 0%, rgba(12, 13, 18, 0.92) 45%, rgba(12, 13, 18, 0.76) 100%);
    color: #f7f7fa;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.45rem;
}

.publication-featured-overlay h3 {
    margin: 0;
    font-size: 1.35rem;
}

.publication-featured-overlay a {
    color: inherit;
}

.publication-featured-overlay .meta {
    color: rgba(247, 247, 250, 0.75);
}

.publication-featured-overlay p {
    margin: 0;
    color: rgba(247, 247, 250, 0.9);
}

.card h3,
.project-card h3,
.publication h3 {
    margin: 0;
    font-size: 1.4rem;
}

.card .meta {
    margin: 0.2rem 0 0;
}

.card p:not(.meta) {
    margin: 0.3rem 0 0;
}

.publication .meta {
    margin: 0.2rem 0 0;
}

.publication p:not(.meta) {
    margin: 0.3rem 0 0;
}

.publications {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card a {
    color: var(--text);
    font-weight: 600;
}

.project-card a:hover,
.project-card a:focus {
    color: var(--accent);
    text-decoration: none;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.contact-list li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.contact-list span {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    color: var(--muted);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-social {
    margin-top: 1.5rem;
    justify-content: center;
}

.social-links:not(.hero-social) {
    margin-top: 2rem;
}

.social-link {
    width: 64px;
    height: 64px;
    display: block;
    border: 1px dashed var(--border);
    border-radius: calc(var(--radius) - 4px);
    background: var(--bg-alt);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.social-link:hover,
.social-link:focus {
    border-color: rgba(76, 110, 245, 0.55);
    transform: translateY(-2px);
}

.icon-slot {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-slot img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    filter: saturate(0.85);
}

.icon-slot span {
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: var(--muted);
}

.site-footer {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.show-more-container {
    text-align: center;
    margin-top: 1rem;
}

.load-more[aria-expanded="true"] {
    /* small visual hint when expanded */
    opacity: 0.95;
}

@media (max-width: 600px) {
    .social-link {
        width: 52px;
        height: 52px;
    }

    .hero-content {
        text-align: center;
        align-items: center;
    }

    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .site-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .site-nav {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .site-nav ul {
        position: absolute;
        right: clamp(1rem, 5vw, 2rem);
        top: 120%;
        background: rgba(247, 247, 250, 0.97);
        padding: 1rem 1.5rem;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        flex-direction: column;
        gap: 1rem;
        min-width: 200px;
        width: min(280px, 90vw);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
        text-align: center;
    }

    .site-nav ul[aria-expanded="true"] {
        transform: translate(-50%, 0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        cursor: pointer;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
