* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #004d99;
    --accent-blue: #0066cc;
    --light-blue: #f0f7ff;
    --text-color: #1a1a1a;
    --background-color: #ffffff;
    --container-width: 86%;
    --max-width: 1400px;
}

.container {
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

h3 {
    font-weight: 500;
    margin-bottom: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 0.7rem;
    left: 50%;
    transform: translateX(-50%);
    width: 88%;
    max-width: 1400px;
    padding: 1.1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 77, 153, 0.15);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        backdrop-filter 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        top 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        border-radius 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    height: 4.5rem;
    will-change: transform, height, padding, top, width, background-color;
}

.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-blue), var(--accent-blue));
    z-index: 1002;
    transition: width 0.3s ease;
}

header.scrolled {
    top: 0;
    padding: 0.7rem 1.25rem;
    width: 87%;
    border-radius: 0 0 1.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    height: 3.6rem;
}

header.transitioning {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.preserve-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    pointer-events: none;
}

.preserve-header>* {
    pointer-events: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    border-radius: 0px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled .logo {
    transform: translateX(-10px);
}

header.scrolled .logo-img {
    transform: scale(0.85) translateX(-10px) translateY(0px);
}

@media (max-width: 768px) {
    .logo-img {
        width: 40px;
        height: 40px;
    }

    header.scrolled .logo {
        transform: translateX(-10px);
    }

    header.scrolled .logo-img {
        transform: scale(0.85) translateX(-10px) translateY(0px);
    }
}

nav {
    display: flex;
    gap: 2.7rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    transition: transform 0.35s;
}

/* nav a.scrolled {
    transform: translateX(-10px) translateY(1px);
} */

nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-blue);
    animation: slideUnderline 0.3s ease forwards;
}

@keyframes slideUnderline {
    to {
        width: 100%;
    }
}

nav a.active {
    color: var(--primary-blue);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-blue);
}

.hero {
    position: relative;
    padding: 8.5rem 0 0rem;
    text-align: center;
    width: 100%;
    overflow: hidden;
}

/* Background image embedded in HTML for faster mobile loading */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    /* GPU acceleration to prevent scroll stutter on mobile */
    will-change: transform;
    transform: translateZ(0);
}

/* Gradient overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 40%, rgba(255, 255, 255, 1) 100%);
    z-index: -1;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 2.5rem;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.hero h1 em {
    font-style: normal;
    color: var(--primary-blue);
    position: relative;
}

/* Lab Name Badge Styles */
.lab-name-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.4rem;
    background: linear-gradient(135deg, rgba(0, 77, 153, 0.08) 0%, rgba(0, 102, 204, 0.12) 100%);
    border: 1px solid rgba(0, 77, 153, 0.15);
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 77, 153, 0.08);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.lab-name-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 77, 153, 0.12);
    background: linear-gradient(135deg, rgba(0, 77, 153, 0.12) 0%, rgba(0, 102, 204, 0.16) 100%);
}

.badge-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.badge-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: 0.01em;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.button-outline {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--primary-blue);
    box-shadow: none;
}

.button-outline:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 77, 153, 0.1);
}

.home-section {
    padding: 5rem 0;
}

.bg-light {
    background-color: #fcfcfc;
    width: 100%;
    max-width: none;
    padding: 2rem 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    color: var(--text-color);
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 1.5px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.highlight-card {
    text-align: center;
    /* min-width: 270px; */
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    backdrop-filter: blur(2px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #f0f0f0;
}

/* .highlight-card:hover {
    transform: scale(1.01) translateY(-3px);
    box-shadow: 0 1px 2px rgba(97, 97, 97, 0.2);
} */

.highlight-card:hover {
    transform: scale(1.01) translateY(-1px);
    box-shadow: 0 1px 2px rgba(97, 97, 97, 0.2);
}

.card-image {
    width: calc(100% - 2rem);
    aspect-ratio: 1;
    margin: 1rem;
    /* changed from 1rem 0rem 0rem 1rem to make left/right spacing equal */
    overflow: hidden;
    border-radius: 15px;
    /* border: 1px solid #f0f0f0; */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlight-card:hover .card-image img {
    transform: none;
}

.card-content {
    padding: 1rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.card-content p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.text-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    display: inline-block;
    transition: transform 0.3s ease;
}

.text-link:hover {
    transform: translateX(5px);
}

.publications-snippet {
    max-width: 1000px;
    margin: 0 auto;
}

.center-button {
    text-align: center;
    margin-top: 3rem;
}

.lab-life-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.lab-life-main {
    display: flex;
    flex-direction: column;
}

.life-img {
    width: 100%;
    height: 225px;
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.life-img:hover {
    transform: scale(1.02);
}

.life-caption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    text-align: center;
}

.hero p {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero p span {
    color: var(--primary-blue);
    font-weight: bold;
    margin: 0 0.5rem;
}

.button {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--accent-blue);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 77, 153, 0.2);
    transition: all 0.3s ease;
}

.button:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 77, 153, 0.3);
}

.featured-grid {
    width: 100%;
    display: grid;
    grid-gap: 20px;
    padding: 20px 0;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
}

.featured-grid img {
    width: 100%;
    border-radius: 1rem;
    object-fit: cover;
    height: 500px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-grid img:hover {
    transform: scale(1.01) translateY(-3px);
    box-shadow: 0 1px 10px rgba(107, 107, 107, 0.2);
}

@media (max-width: 900px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .featured-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.content {
    margin: 0 auto;
    padding: 8rem 0 2rem;
    min-height: 120px;
}

.team-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); */
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.pi-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 2fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.team-lead {
    height: auto;
    text-align: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    /* backdrop-filter: blur(2px); */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #f0f0f0;
}

.team-lead:hover {
    transform: scale(1.01) translateY(-1px);
    box-shadow: 0 1px 2px rgba(97, 97, 97, 0.2);
}

.team-lead img {
    width: calc(100% - 2rem);
    aspect-ratio: 0.8;
    margin: 1rem 1rem 0 1rem;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.pi-info {
    padding: 1rem;
    width: 100%;
}

.pi-info h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.pi-info .member-role {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-blue);
    background: rgba(0, 77, 153, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
}

.team-member {
    height: auto;
    text-align: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #f0f0f0;
}

.team-member:hover {
    transform: scale(1.01) translateY(-1px);
    box-shadow: 0 1px 2px rgba(97, 97, 97, 0.2);
}

.team-member img {
    width: calc(100% - 2rem);
    aspect-ratio: 1;
    margin: 1rem 1rem 0 1rem;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.member-info {
    padding: 1rem;
    width: 100%;
}

.member-info h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.member-info .member-role {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-blue);
    background: rgba(0, 77, 153, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
}

.member-info .member-research {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.4;
    margin: 0;
}

.member-info p {
    margin: 0.25rem 0;
}

.publications-container {
    width: 100%;
    padding: 0;
}

/* Year group wrapper */
.publication-year-group {
    margin-bottom: 0.5rem;
}

.publication-year {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    padding: 0.5rem 0;
    position: sticky;
    top: 5rem;
    background: var(--background-color);
    z-index: 10;
}

.publication-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.publication-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: start;
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-year-badge {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    padding-top: 0.15rem;
}

.publication-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.publication-title {
    color: #1f2937;
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.5;
    display: block;
}

.publication-authors {
    color: #4b5563;
    font-size: 0.95rem;
}

.publication-journal {
    font-style: italic;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.publication-journal a {
    color: inherit;
    text-decoration: none;
}

.publication-journal a:hover {
    text-decoration: underline;
}

.publication-by {
    display: none;
}

.research-area {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.research-area:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.research-area h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0;
    padding-left: 0;
    position: relative;
}

.research-container {
    width: 100%;
}

.research-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.research-number {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    min-width: 28px;
}

.pi-area {
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    margin-bottom: 1rem;
}

.research-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 0;
    height: auto;
}

.research-image {
    width: 35%;
    padding: 0.75rem;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    max-height: auto;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #f0f0f0;
    backdrop-filter: blur(5px);
}

.research-text {
    flex: 1;
}

.research-text p {
    margin-bottom: 1rem;
    line-height: 1.65;
    color: #4b5563;
    font-size: 1.01rem;
    text-align: justify;
}

/* .research-area h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
} */

@media (max-width: 768px) {
    .research-content {
        flex-direction: column;
    }

    .research-header h3 {
        font-size: 1rem;
    }

    .research-content p {
        font-size: 0.95rem;
    }

    .research-image {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .pi-area {
        padding: 0rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .content {
        margin: 0 auto;
        padding: 4rem 0 0rem;
    }
}

.research-text .button {
    margin-top: 1rem;
    display: inline-block;
}

footer {
    margin: 4rem auto 1rem auto;
    padding: 0.5rem 0.8rem;
    max-width: 1300px;
    width: 85%;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

footer .container {
    display: flex;
    justify-content: center;
}

.copyright {
    color: #434343;
    font-size: 1rem;
    line-height: 1.3;
}

.content:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    padding: 0;
}

.contact-info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    backdrop-filter: blur(2px);
    padding: 1.5rem;
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* .contact-info-card:hover {
    transform: scale(1.01) translateY(-1px);
    box-shadow: 0 1px 2px rgba(97, 97, 97, 0.2);
} */

.contact-info-card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.contact-details {
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
}

.contact-details p {
    margin-bottom: 0.75rem;
}

.contact-details strong {
    color: var(--primary-blue);
    font-weight: 500;
    display: inline-block;
    min-width: 80px;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-top: 3rem;
    border: 1px solid #f0f0f0;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: #4b5563;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    background: rgba(0, 77, 153, 0.06);
    transition: 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
    background: rgba(0, 77, 153, 0.12);
    color: var(--primary-blue);
}

@media (max-width: 1260px) {

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lab-life-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lab-life-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 0rem 0rem 2rem;
        padding-top: 6.5rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .lab-name-badge {
        padding: 0.5rem 0.8rem;
        margin-bottom: 1.5rem;
    }

    .badge-icon {
        font-size: 1rem;
    }

    .badge-text {
        font-size: 1.1rem;
        text-align: center;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .home-section {
        /* width: 95%; */
        padding: 3rem 0;
    }

    .bg-light {
        padding: 4rem 1rem;
    }

    .lab-life-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .life-img {
        height: 200px;
    }

    header {
        width: 92%;
        height: 3.8rem;
        top: 0.5rem;
    }

    header.scrolled {
        top: 0;
        height: 3.5rem;
    }

    .content {
        padding: 6rem 0 2rem;
    }

    nav {
        display: none;
    }

    footer {
        width: 85%;
    }

    .logo {
        font-size: 1.1rem;
        white-space: nowrap;
    }

    .hamburger {
        display: flex;
    }

    .dropdown {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 4rem;
        right: 0;
        width: 100%;
        background-color: var(--background-color);
        box-shadow: 0 2px 7px rgba(79, 79, 79, 0.3);
        z-index: 1000;
        border-radius: 15px;
        max-width: 180px;
        overflow: hidden;
    }

    .dropdown a {
        padding: 0.6rem;
        text-align: center;
        border-bottom: 1px solid #eaeaea;
        text-decoration: none;
        font-size: 1.05rem;
        position: relative;
        color: var(--text-color);
    }

    .dropdown a.active {
        background: var(--light-blue);
        color: var(--primary-blue);
        font-weight: 500;
    }

    .dropdown a:hover {
        background: var(--light-blue);
        color: var(--primary-blue);
        transition: background 0.2s ease;
    }

    .dropdown a:last-child {
        border-bottom: none;
    }

    .pi-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: repeat(1, 1fr);
        justify-items: center;
    }

    .team-lead {
        padding: 0;
        width: 100%;
    }

    .team-lead img {
        max-width: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info-card {
        padding: 1rem;
    }

    .contact-info-card h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .contact-details p {
        font-size: 0.9rem;
    }

    .map-container {
        height: 300px;
        margin-top: 1.5rem;
    }

    .social-links {
        margin-top: 1.5rem;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .social-links a {
        margin-right: 0;
    }

    .publication-item {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .publication-year-badge {
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .featured-grid img {
        height: 300px;
        padding: 0.5rem;
    }

    .team-member {
        padding: 0.2rem;
        max-width: 270px;
        align-self: center;
    }

    .team-member img {
        margin: 1rem 0rem 0rem 0rem;
    }

    .publication-item {
        padding-left: 0.9rem;
        padding: 1.2rem 0rem;
    }

    .social-links a {
        font-size: 1rem;
    }

    .publication-title {
        font-size: 0.9rem;
    }

    .publication-authors {
        font-size: 0.85rem;
    }

    .publication-journal {
        font-size: 0.85rem;
    }

    .copyright {
        font-size: 0.9rem;
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 4px 0;
    transition: 0.4s;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

main {
    position: relative;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-left {
    transform: translateX(-100%);
}

.slide-right {
    transform: translateX(100%);
}

img {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

img.loaded {
    opacity: 1;
}

.nav a,
.button,
.team-member,
.research-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav a:hover,
.button:hover {
    transform: translateY(-2px);
}

.page-transition {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1500;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.45s ease, transform 0.45s ease;
    will-change: opacity, transform;
}

.page-transition.active {
    pointer-events: auto;
    opacity: 1;
}

main {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.dropdown {
    display: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    opacity: 0;
    transform: translateY(-8px);
}

.dropdown.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }

    nav {
        display: flex !important;
    }
}