/* ===== CSS Variables ===== */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2540;
    --accent: #d69e2e;
    --accent-light: #ecc94b;
    --background: #ffffff;
    --background-alt: #f7fafc;
    --text: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    height: 64px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

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

.nav-menu {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    border-radius: 0.375rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background-color: var(--background-alt);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(6px);
}

/* Mobile Navigation */
@media (max-width: 968px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 10px var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 64px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 54, 93, 0.6);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1rem;
    max-width: 800px;
    color: var(--white);
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: #d4a017; /* dark golden yellow */
    opacity: 1;
    font-weight: 400;
    letter-spacing: 0.12em;
    margin-top: 1.5rem;
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6rem;
    background: linear-gradient(to top, var(--background), transparent);
}

/* ===== Page Header ===== */
.page-header {
    background: var(--primary);
    color: var(--white);
    padding: 5rem 0 4rem;
    text-align: center;
    margin-top: 64px;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.125rem;
}

/* ===== Sections ===== */
.content-section {
    padding: 4rem 0;
}

.section-alt {
    padding: 4rem 0;
    background: var(--background-alt);
}

.content-box {
    max-width: 800px;
    margin: 0 auto;
}

.content-box h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.content-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.text-center {
    text-align: center;
    margin-bottom: 2rem;
}

/* ===== Research Carousel ===== */
.research-carousel {
    padding: 4rem 0;
    background: var(--background-alt);
}

.research-carousel h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.carousel-wrapper {
    position: relative;
    padding: 0 3rem;
}

.carousel-track-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease;
}

.carousel-slide {
    flex: 0 0 calc(33.333% - 1rem);
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

.carousel-slide img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-slide:hover img {
    transform: scale(1.05);
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(26, 54, 93, 0.9), transparent);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px var(--shadow);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text);
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--background-alt);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dots .dot.active {
    background: var(--accent);
}

@media (max-width: 968px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (max-width: 640px) {
    .carousel-slide {
        flex: 0 0 85%;
    }
    
    .carousel-wrapper {
        padding: 0 2.5rem;
    }
}

/* ===== Lab Description ===== */
.lab-description {
    padding: 4rem 0;
    background: var(--background);
}

.lab-description h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.lab-description p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ===== Social Section ===== */
.social-section {
    padding: 3rem 0;
    background: var(--background);
    border-top: 1px solid var(--border);
    text-align: center;
}

.social-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

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

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.link-card {
    display: block;
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow);
}

.card-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.link-card:hover .card-image img {
    transform: scale(1.05);
}

.card-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 54, 93, 0.6);
    color: var(--white);
}

.card-content {
    padding: 1.5rem;
    text-align: center;
}

.card-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    transition: color 0.3s ease;
}

.link-card:hover .card-content h3 {
    color: var(--accent);
}

.card-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Research Tabs ===== */
.research-tabs {
    display: none;
}

.research-cards-mobile {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .research-tabs {
        display: block;
    }

    .research-cards-mobile {
        display: none;
    }
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--background-alt);
}

.tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.research-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px var(--shadow);
}

.research-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.research-text p {
    color: var(--text-muted);
    line-height: 1.8;
}

.research-card {
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

.research-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.research-card .card-body {
    padding: 1.5rem;
}

.research-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.research-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Team Section ===== */
.team-section {
    padding: 4rem 0;
    background: var(--background-alt);
}

.team-category {
    margin-bottom: 3rem;
}

.team-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
    color: var(--text);
}

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

.team-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow);
}

.team-avatar {
    width: 112px;
    height: 112px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 4px rgba(26, 54, 93, 0.1);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary);
    font-size: 1.75rem;
    font-weight: 600;
}

.team-name {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.team-name:hover {
    color: var(--primary-light);
}

.team-name-static {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.team-role {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.team-role.accent {
    color: var(--primary);
    font-weight: 500;
}

.team-org {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.team-interests {
    margin-bottom: 1rem;
    flex: 1;
}

.team-interests strong {
    font-size: 0.75rem;
    color: var(--text);
    display: block;
    margin-bottom: 0.25rem;
}

.team-interests p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.team-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.team-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    transition: var(--transition);
}

.team-links a:hover {
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary);
}

/* ===== Profile Card ===== */
.profile-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 0.5rem;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border);
}

.profile-avatar {
    width: 128px;
    height: 128px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    font-size: 2rem;
    font-weight: 600;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.profile-name:hover {
    color: var(--primary-light);
}

.profile-text {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ===== Activities ===== */
.activities-list {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.activity-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

.activity-card-large {
    /* Large card variant */
}

@media (min-width: 768px) {
    .activity-card {
        flex-direction: row;
    }
}

.activity-image {
    flex-shrink: 0;
}

.activity-image img {
    width: 100%;
    height: 16rem;
    object-fit: cover;
}

@media (min-width: 768px) {
    .activity-image {
        width: 40%;
    }

    .activity-image img {
        height: 100%;
    }
}

/* Activity Slideshow */
.activity-slideshow {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .activity-slideshow {
        width: 45%;
    }
}

.activity-slides-track {
    position: relative;
    width: 100%;
    height: 18rem;
}

@media (min-width: 768px) {
    .activity-slides-track {
        height: 20rem;
    }
}

.activity-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.activity-slide.active {
    opacity: 1;
}

.activity-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.activity-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.activity-dots .dot.active {
    background: var(--white);
}

.activity-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.activity-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.activity-date {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.activity-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.activity-content p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Openings ===== */
.openings-content {
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.openings-box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
}

.openings-box h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.openings-box p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary);
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--primary-light);
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border);
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.contact-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

.contact-card a {
    color: var(--accent);
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--accent-light);
}

.contact-map {
    min-height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

.contact-map iframe {
    border-radius: 0.5rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.7;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    font-size: 0.875rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    opacity: 0.7;
}
