/* Conferences & Invited Talks Section layout with GIF */
.talks-flex {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
}
.talks-list-wrap {
    flex: 2;
}
.talks-gif-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}
.talks-gif {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
/* Conferences & Invited Talks Section */
.talks-section {
    background: var(--color-background-alt);
    padding: var(--section-padding);
    margin-top: var(--spacing-xl);
}
.talks-section .section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}
.talks-list {
    list-style: disc inside;
    font-size: 1.08rem;
    color: var(--color-text-light);
    margin-left: 0;
    margin-bottom: 0;
    padding-left: 0;
    line-height: 1.7;
}
.talks-list li {
    margin-bottom: 0.5rem;
}
/* ===============================================
   CLEAN ACADEMIC WEBSITE - V2.0
   Inspired by Dana Karca & ARIA
   =============================================== */

/* CSS Variables */
:root {
    /* Colors - Karca-inspired Minimal Palette */
    --color-primary: #2c2c2c; /* Charcoal */
    --color-accent: #5a5a5a; /* Medium gray */
    --color-text: #2c2c2c; /* Dark charcoal for text */
    --color-text-light: #666666; /* Medium gray */
    --color-text-lighter: #999999; /* Light gray */
    --color-background: #ffffff;
    --color-background-alt: #fafafa;
    --color-border: #e8e8e8;
    --color-highlight: #d4af37; /* Subtle gold accent */

    /* Typography */
    --font-family: 'PT Serif', Georgia, serif;
    --font-family-serif: 'Marcellus', Georgia, serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Layout */
    --container-max-width: 1200px;
    --section-padding: 4rem 2rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

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

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

strong {
    font-weight: 600;
    color: var(--color-text);
}

em {
    font-style: italic;
    color: var(--color-text-lighter);
}

/* ===============================================
   HEADER / NAVIGATION
   =============================================== */

.site-header {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-light);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--color-text);
}

.main-nav a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .main-nav {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===============================================
   HERO SECTION
   =============================================== */

.hero {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-3xl) 0;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(230,230,230);stop-opacity:0.3" /><stop offset="100%" style="stop-color:rgb(200,200,200);stop-opacity:0.1" /></linearGradient></defs><path d="M 0,300 Q 300,200 600,300 T 1200,300 L 1200,600 L 0,600 Z" fill="url(%23grad)"/></svg>');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-name {
    font-family: var(--font-family-serif);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.hero-name strong {
    font-weight: 600;
}

.hero-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--spacing-lg);
}

.hero-title {
    font-family: var(--font-family-serif);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    font-weight: 400;
}

.institutions {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

.institution-badge {
    height: 50px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(50%);
    transition: all 0.4s ease;
}

.institution-badge:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-2px);
}

/* Liquid Circle Visual */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.liquid-circle-stage {
    width: clamp(380px, 44vmin, 540px);
/* Make Christ's College funder logo at bottom smaller */
.funder--small {
    height: clamp(10px, 0.8vw, 16px);
    width: auto;
}
    aspect-ratio: 1 / 1;
    position: relative;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

.liquid-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(closest-side, transparent 92%, rgba(44, 44, 44, 0.08) 98%, transparent 100%);
    pointer-events: none;
}

.liquid-circle-stage svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 968px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .liquid-circle-stage {
        width: clamp(280px, 55vmin, 380px);
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        padding: var(--spacing-2xl) 0;
    }

    .hero-layout {
        gap: 2rem;
    }

    .hero-name {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .institution-badge {
        height: 36px;
    }

    .institutions {
        gap: 1.5rem;
    }

    .liquid-circle-stage {
        width: clamp(240px, 65vmin, 320px);
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .social-link {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .liquid-circle-stage {
        filter: none;
    }
}

/* ===============================================
   SECTIONS
   =============================================== */

.section {
    padding: var(--spacing-3xl) 0;
}

.section-title {
    font-family: var(--font-family-serif);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-xl);
    text-align: left;
    letter-spacing: -0.01em;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--color-text);
    margin-top: var(--spacing-md);
}

/* ===============================================
   ABOUT SECTION
   =============================================== */

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.text-block {
    margin-bottom: var(--spacing-2xl);
}

.text-block h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.text-block p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

.text-block-spaced {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-xl);
}

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

.clean-list li {
    padding-left: 1.5rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    color: var(--color-text-light);
    line-height: 1.6;
}

.clean-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* Positions with inline logos */
.positions-with-logos li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-left: 0;
}

.positions-with-logos li::before {
    display: none;
}

.inline-logo {
    height: 24px;
    width: auto;
    flex-shrink: 0;
    margin-top: 0.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.positions-with-logos li:hover .inline-logo {
    opacity: 1;
}

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

.education-list li {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

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

.education-list strong {
    font-size: 1.05rem;
    color: var(--color-text);
}

.text-link {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
}

.text-link:hover {
    text-decoration-color: var(--color-primary);
}

.ambassador-badge {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background-color: var(--color-background-alt);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.wmt-logo {
    height: 40px;
    width: auto;
}

.ambassador-badge span {
    color: var(--color-text-lighter);
    font-size: 0.95rem;
}

.profile-photo {
    /* Profile photo - rectangular with subtle styling */
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
}

.overview-image {
    width: 80%;
    max-width: 210px;
    height: auto;
    display: block;
    margin-top: var(--spacing-3xl);
    margin-left: -0px;
    margin-right: auto;
}

@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-sidebar {
        order: -1;
    }

    .profile-photo {
        max-width: 400px;
    }
}

/* ===============================================
   RESEARCH SECTION
   =============================================== */

.research-section {
    background-color: var(--color-background-alt);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--color-background);
    padding: 2.5rem;
    border-radius: 2px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    box-shadow: none;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: var(--color-text-lighter);
}

/* Featured project styling: larger, more prominent card */
.project-card.featured {
    padding: 3rem;
    border-left: 4px solid var(--color-highlight);
    background: linear-gradient(180deg, rgba(212,175,55,0.03), transparent 60%);
}

@media (min-width: 1100px) {
    .project-card.featured {
        grid-column: span 2; /* make featured projects span two columns on wide screens */
    }
}

.project-card h3 {
    font-family: var(--font-family-serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

.project-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--color-text-light);
    background-color: transparent;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--color-border);
    font-weight: 400;
    font-style: italic;
}

/* ===============================================
   PUBLICATIONS SECTION
   =============================================== */

.highlights-list {
    max-width: 900px;
}

.highlight-item {
    display: grid;
    grid-template-columns: 120px 80px 1fr;
    gap: 2rem;
    padding-bottom: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
    align-items: start;
}

.highlight-item:last-child {
    border-bottom: none;
}

.pub-image-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-background-alt);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pub-image-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pub-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlight-item .year {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-lighter);
    flex-shrink: 0;
}

.highlight-content h4 {
    font-family: var(--font-family-serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

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

.journal {
    font-size: 0.9rem;
    color: var(--color-text-lighter);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
}

.pub-link {
    font-size: 0.95rem;
    color: var(--color-primary);
    font-weight: 500;
}

.view-all {
    margin-top: var(--spacing-xl);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-background-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--color-background);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .highlight-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pub-image-wrapper {
        width: 100%;
        height: 200px;
    }
}

/* ===============================================
   TEACHING & OUTREACH SECTION
   =============================================== */

.teaching-section {
    background-color: var(--color-background);
}

.teaching-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

/* Compact horizontal experience timeline */
.experience-timeline {
    margin: 1.25rem 0 2rem;
    overflow: hidden;
}
.timeline-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.timeline-item {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(250,250,250,0.9));
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.6rem;
}
.timeline-logo {
    width: 48px;
    height: auto;
    flex-shrink: 0;
}
.timeline-meta .timeline-year {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}
.timeline-meta .timeline-role {
    font-size: 0.9rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
@media (max-width: 680px) {
    .timeline-item { width: 180px; }
    .timeline-logo { width: 42px; }
}

/* ===============================================
   Horizontal timeline (rich, card-based)
   =============================================== */
.experience-timeline-horizontal {
    position: relative;
    margin: 1rem 0 2rem;
    width: 100vw; /* full-bleed across the viewport */
    left: 50%;
    transform: translateX(-50%);
}
.timeline-horizontal {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    overflow-x: auto;
    padding: 36px 4vw 1.25rem; /* top padding aligns badges over the spine; side padding keeps cards from touching edges */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.timeline-horizontal::before {
    content: '';
    position: absolute;
    left: 0; /* span full width */
    right: 0;
    top: 28px; /* aligns with badge centers */
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-border) 10%, var(--color-border) 90%, transparent);
    z-index: 0;
}
.timeline-card {
    position: relative;
    flex: 0 0 300px;
    scroll-snap-align: start;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem 1rem 1rem 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    z-index: 1;
}
.timeline-badge {
    position: absolute;
    left: 20px;
    top: 0; /* align badge top to the timeline padding-top so center sits on the spine */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-background-alt);
    display: grid;
    place-items: center;
    border: 1px solid var(--color-border);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.timeline-logo-small {
    width: 40px;
    height: auto;
    display: block;
}
.timeline-body { margin-top: 16px; }
.timeline-date { font-weight: 700; color: var(--color-text-lighter); font-size: 0.95rem; margin-bottom: 4px; }
.timeline-title { font-size: 1rem; margin: 0 0 6px 0; color: var(--color-text); }
.timeline-org { font-weight: 400; color: var(--color-text-light); font-size: 0.95rem; }
.timeline-desc { color: var(--color-text-light); margin: 0 0 0.5rem 0; font-size: 0.95rem; }

@media (max-width: 900px) {
    .timeline-card { flex: 0 0 260px; }
    .timeline-horizontal::before { top: 52px; }
    .timeline-badge { left: 14px; top: -22px; width: 48px; height: 48px; }
    .timeline-logo-small { width: 34px; }
}

/* ===============================================
   Vertical timeline (card + spine)
   =============================================== */
.timeline-vertical {
    position: relative;
    margin: 1rem 0 2rem;
    padding-left: 72px; /* space for the spine and icons */
}
.timeline-vertical::before {
    content: '';
    position: absolute;
    left: 36px; /* center of badges */
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--color-border) 10%, var(--color-border) 90%, transparent);
}
.timeline-vertical .entry {
    display: grid;
    grid-template-columns: 64px 1fr; /* fixed column for the badge, content in the right column */
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
    position: relative;
}
.timeline-vertical .node {
    position: relative;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-background-alt);
    display: grid;
    place-items: center;
    border: 1px solid var(--color-border);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    justify-self: center;
    align-self: start;
}
.timeline-icon {
    width: 36px;
    height: auto;
    display: block;
}
.timeline-vertical .card {
    margin-left: 0; /* content sits to the right of the spine (grid places it in column 2) */
    padding: 1rem 1rem 1rem 1.25rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    width: 100%;
}
.timeline-vertical .meta .date {
    font-weight: 700;
    color: var(--color-text-lighter);
    margin-bottom: 6px;
}
.timeline-vertical .title { margin: 0 0 6px 0; }
.timeline-vertical .org { color: var(--color-text-light); font-weight: 500; }
.timeline-vertical .desc {
    color: var(--color-text-light);
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
}

@media (max-width: 680px) {
    .timeline-vertical { padding-left: 56px; }
    .timeline-vertical::before { left: 28px; }
    .timeline-vertical .node { left: 6px; width: 40px; height: 40px; }
    .timeline-icon { width: 28px; }
}

/* Biography card styling */
.bio-section .biography-card {
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.5rem;
    max-width: 900px;
    color: var(--color-text-light);
}
.bio-section .biography-card p { margin-bottom: 1rem; color: var(--color-text-light); line-height: 1.7; }

/* Short biography snippets used across the site */
.bio-snippet {
    font-style: italic;
    color: var(--color-text-lighter);
    margin-bottom: 0.75rem;
    font-size: 0.98rem;
}
.hero-snippet {
    font-style: normal;
    color: var(--color-text);
    font-weight: 600;
    margin-top: 0.25rem;
}
.about-snippet, .research-snippet, .positions-snippet {
    font-size: 1rem;
}
.passian-snippet {
    font-size: 0.98rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}


/* Project image inside project cards */

.project-media {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: none;
}
.project-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.brain-gif-container {
    display: flex;
    flex-direction: column;
    align-items: left;
    min-width: 310px;
}
.brain-gif {
    width: 340px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    margin-bottom: 0.3rem;
}
.gif-credit {
    font-size: 0.05rem;
    color: var(--color-text-lighter);
    text-align: left;
    opacity: 0.6;
    margin: 0;
}

/* Reduce size for featured project images (Brain centiles, PASSIAN) */

/* Overrides for specific project images */
.project-card.featured .project-image-large {
    /* make Brain Charts noticeably larger on wide screens */
    max-width: 520px;
    width: 100%;
    flex-shrink: 0;
}
.project-card.featured .project-image-small {
    /* make PASSIAN icon smaller and more subtle */
    max-width: 180px;
}

/* Decorative animated GIF beside Brain Charts (not inside a project card) */
.brain-gif-wrap {
    /* Inline grid item to sit beside project cards */
    display: block;
    align-self: start;
    justify-self: end;
    width: min(320px, 28%);
    pointer-events: none; /* decorative only */
}
.brain-gif-wrap .brain-gif {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.brain-gif-wrap .gif-credit {
    font-size: 0.35rem;
    color: var(--color-text-lighter);
    margin-top: 0.35rem;
    opacity: 0.9;
    text-align: right;
}

@media (max-width: 900px) {
    /* Hide decorative GIF on smaller screens to avoid layout conflicts */
    .brain-gif-wrap { display: none; }
}

/* Featured row: place a prominent project and a decorative/info card side-by-side */
.project-media .brain-gif {
    display: block;
    width: min(260px, 40%);
    height: auto;
    margin: 1rem 0 0 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.project-media .gif-credit {
    font-size: 0.78rem;
    color: var(--color-text-lighter);
    margin-top: 0.35rem;
}

@media (max-width: 900px) {
    .project-media .brain-gif { width: 100%; margin-top: 0.75rem; }
}

@media (max-width: 900px) {
    .project-media, .project-card.featured .project-media { max-width: 100%; }
}

/* PASSIAN project repo link inside project card */
.project-meta { margin-top: 0.5rem; display:flex; justify-content:flex-end; }
.project-repo { display: inline-flex; align-items: center; gap:0.5rem; text-decoration:none; color:var(--color-primary); font-weight:600; }
.repo-icon { width:20px; height:auto; display:block; filter:brightness(0) saturate(100%) invert(10%) sepia(0%); }
.repo-text { font-size:0.95rem; }

.project-description { margin-top: 1rem; color: var(--color-text-light); font-size: 0.98rem; }
.project-description ul { margin-left: 1.25rem; }
.project-description li { margin-bottom: 0.4rem; }


/* Graphic callout for teaching/outreach (matches attached purple layout) */
.teaching-graphic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    background: linear-gradient(180deg, #eadcff 0%, #e0d0ff 100%);
    border-radius: 8px;
    padding: 2.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

/* ARIA-style layout tweaks */
.aria-left .aria-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.aria-tag {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    background: rgba(255,255,255,0.9);
    border-radius: 999px;
    font-size: 0.75rem;
    color: #35203a;
    border: 1px solid rgba(34,17,51,0.06);
    font-weight: 600;
}
.aria-title {
    font-family: var(--font-family-serif);
    font-size: clamp(28px, 5.8vw, 56px);
    line-height: 1.02;
    margin: 0.25rem 0 0.75rem;
    color: #1a0f24;
}
.aria-lead {
    color: var(--color-text-light);
    max-width: 48ch;
    margin-bottom: 0;
}
.aria-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.aria-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(34,17,51,0.06);
    padding: 1rem;
    border-radius: 6px;
}
.aria-card h4 { margin: 0 0 0.25rem 0; }

@media (max-width: 900px) {
    .teaching-graphic { padding: 1.5rem; }
    .aria-title { font-size: clamp(22px, 6.2vw, 36px); }
    .aria-right { flex-direction: row; gap: 0.75rem; }
    .aria-card { flex: 1; }
}

.teaching-feature h3 {
    font-family: var(--font-family-serif);
    font-size: clamp(26px, 4.6vw, 44px);
    line-height: 1.05;
    color: #1e0f2a; /* dark contrast on purple */
    margin: 0;
    font-weight: 600;
}

.teaching-graphic-info {
    border-left: 1px solid rgba(34,17,51,0.12);
    padding-left: 1.5rem;
    color: var(--color-text-light);
}

.teaching-graphic-info p {
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .teaching-graphic {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .teaching-graphic-info {
        border-left: none;
        padding-left: 0;
        margin-top: 1rem;
    }
}

.teaching-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.teaching-block.full-width {
    grid-column: 1 / -1;
}

.teaching-block h3 {
    font-family: var(--font-family-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.teaching-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.teaching-item {
    padding: 1.5rem;
    background-color: var(--color-background-alt);
    border-radius: 2px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.teaching-item:hover {
    border-color: var(--color-text-lighter);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.teaching-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.teaching-item p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin: 0;
}

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

.outreach-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--color-background-alt);
    border-radius: 2px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    align-items: flex-start;
}

.outreach-item:hover {
    border-color: var(--color-text-lighter);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.outreach-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.outreach-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.outreach-item p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 968px) {
    .teaching-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .outreach-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   AWARDS SECTION
   =============================================== */

.awards-section {
    background-color: var(--color-background-alt);
}

.awards-list {
    max-width: 900px;
}

.award-item {
    display: flex;
    gap: 2rem;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: none;
}

.award-item.featured {
    border-left: 3px solid var(--color-text);
    background: var(--color-background-alt);
}

.award-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.award-item .year {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-lighter);
    min-width: 80px;
    flex-shrink: 0;
}

.award-content h4 {
    font-family: var(--font-family-serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.award-content .amount {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
    font-style: italic;
}

.award-content p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin: 0;
}

@media (max-width: 768px) {
    .award-item {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===============================================
   CONTACT SECTION
   =============================================== */

.contact-content {
    max-width: 600px;
}

.contact-text {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xl);
}

.contact-link {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-link:hover {
    background-color: var(--color-background-alt);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.social-link.lab-link {
    border-color: var(--color-text);
    background-color: var(--color-background-alt);
}

.social-link.lab-link:hover {
    background-color: var(--color-text);
    color: var(--color-background);
}

/* ===============================================
   FUNDERS SECTION
   =============================================== */

.funders-section {
    padding: var(--spacing-2xl) 0;
    background: var(--color-background-alt);
    border-top: 1px solid var(--color-border);
}

.funders-title {
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}


.funders-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem; /* tighter spacing by default */
    flex-wrap: wrap;
}

.funder-pair {
    display: flex;
    gap: 0.5rem; /* keep paired funders visually close */
    align-items: center;
}

.funder-logo {
    height: clamp(48px, 6.5vw, 96px);
    width: auto;
    opacity: 1; /* fully visible */
    filter: none; /* no grayscale */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: inline-block;
}

.funder-logo:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Bump up size for the main project funders */
.funder--large {
    height: clamp(64px, 8.5vw, 120px);
}

/* Full rectangular/wordmark logos */
.funder--full {
    height: clamp(42px, 5.5vw, 92px);
}

@media (max-width: 768px) {
    .funders-grid {
        gap: 2.5rem;
    }

    .funder-logo {
        height: 50px;
    }
}

/* ===============================================
   FOOTER
   =============================================== */

.site-footer {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-background-alt);
}

.site-footer p {
    font-size: 0.9rem;
    color: var(--color-text-lighter);
    text-align: center;
    margin: 0;
}

/* ===============================================
   UTILITIES
   =============================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Smooth Reveal Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}
