:root {
    --primary: #1F3A5F;
    --secondary: #4A6FA5;
    --accent: #4FB3A2;
    --text: #1E1E1E;
    --background: #F7F9FC;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    padding-top: 80px; /* roughly navbar height */
}

/* Navigation Bar Styling */
.navbar {
    background-color: var(--primary);
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: var(--background);
    position: fixed;    /* stick to top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;      /* stay above content */
    /* Always visible */
    opacity: 1;
    transform: none;
    transition: none;
}
.navbar.visible {
    /* No effect needed, navbar is always visible */
}



.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 20px;
}

.nav-item {
    color: var(--background);
    text-decoration: none;
    padding: 14px 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.2s, background 0.2s;
}

.nav-item:hover {
    background-color: var(--secondary);
    color: var(--background);
    border-radius: 4px;
}

.navbar {
    opacity: 0;
    transform: translateY(-20px);
    transition: 0.6s ease;
}

.navbar.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Hamburger button – hidden on desktop */
/* Hamburger hidden on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: var(--background);
    border-radius: 999px;
    transition: 0.3s ease;
}

/* Open = X icon */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile dropdown */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        background: var(--secondary);
        flex-direction: column;

        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;

        transition: 0.3s ease;
    }

    .nav-links.show {
        max-height: 500px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        padding: 12px 0;
        text-align: center;
    }
}



/* Mobile styles */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 16px;
    }

    .nav-links {
        position: absolute;
        top: 60px;              /* just below navbar */
        right: 0;
        background-color: var(--secondary);
        flex-direction: column;
        width: 100%;

        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    /* Animated dropdown when .show is added */
    .nav-links.show {
        max-height: 500px;      /* enough space for all links */
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;          /* show hamburger on mobile */
    }
}


.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
}


.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
}

/* Hero Section */
.hero_section {
    background: linear-gradient(rgba(31, 58, 95, 0.6), rgba(31, 58, 95, 0.6)), url('Images/Group.jpg') center/cover no-repeat;
    padding: 120px 0;
    color: white;
}

.section_container {
    max-width: 1000px;
    margin: auto;
    padding: 20px;
}

.hero_container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.text_section h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.text_section h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.text_section p {
    font-size: 1rem;
    max-width: 600px;
    line-height: 1.5;
}

/* Buttons */
.hero_section_button {
    display: flex;
    gap: 15px;
}

.button {
    background-color: var(--accent);
    color: var(--text);
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s;
}

.button:hover {
    background-color: var(--primary);
    color: var(--background);
}
/* Research Section */
.research_section {
    padding: 60px 20px;
    background-color: #F5F5F5;
    color: var(--text);
}

.publications_section {
    padding: 60px 20px;
    background-color: #F5F5F5;
    color: var(--text);
}

/* Text Colour */
.section_container {
    padding: 40px 20px;
    color: #ffffff;
}

/* Box colour */
.about_container {
    max-width: 900px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 25px;
    border-radius: 8px;
}

.text_section {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 15px;
}

/* About Section */
.about_us {
    padding: 0;
    color: var(--text);
    background-color: #EBEBEB;
}

.about_layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    min-height: 500px;
}

.about_image_side {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    min-height: 500px;
    padding: 40px;
    position: relative;
}

.about_image_side iframe {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    box-shadow: 15px 15px 0px #D138BF;
}

.about_text_side {
    padding: 60px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #f5f5f5;
    background-image: url("Images/AV.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about_label {
    color: #D138BF;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section_stripe {
    font-size: 1.2rem;
    letter-spacing: -1px;
    color: var(--primary);
    margin: 15px 0;
    font-weight: 300;
    user-select: none;
}

.about_heading {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 10px 0 25px 0;
    text-transform: uppercase;
}

.about_body {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

/* About section responsive */
@media (max-width: 768px) {
    .about_layout {
        grid-template-columns: 1fr;
    }
    
    .about_image_side {
        min-height: 300px;
    }
    
    .about_text_side {
        padding: 40px 20px;
    }
    
    .about_heading {
        font-size: 1.6rem;
    }
}

.section_container {
    max-width: 1100px;
    margin: 0 auto;
}

.about_container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;           /* so it stacks nicely on small screens */
    margin-bottom: 60px;
}

.text_section {
    flex: 1 1 300px;
}

.section_title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.text_section p {
    line-height: 1.6;
}

/* Right-side image */
.image_section {
    flex: 1 1 450px;
    display: flex;
    justify-content: center;
}

.about_img {
    max-width: 450px;
    width: 100%;
    border-radius: 12px;
}

/* Values Grid */
.values_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Values card wrapper for 3D flip perspective */
.values_card_wrapper {
    perspective: 1000px;
    cursor: pointer;
    height: 220px;
}

/* Individual values card with 3D flip */
.values_card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
}

.values_card_wrapper.flipped .values_card {
    transform: rotateY(180deg);
}

/* Front of values card */
.values_card_front {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary) 100%);
    border: 2px solid rgba(224, 216, 255, 0.4);
    padding: 30px 20px;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    backface-visibility: hidden;
    transition: 0.3s;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.values_card_front h3 {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--background);
}

.values_card_wrapper:hover .values_card_front {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    border-color: rgba(224, 216, 255, 0.6);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Back of values card */
.values_card_back {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 2px solid rgba(224, 216, 255, 0.3);
    padding: 30px 20px;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    position: absolute;
    top: 0;
    left: 0;
}

.values_card_back p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--background);
}

/* Research Section */
.research_section {
    padding: 60px 40px;
    color: var(--text);
    background-color: #F7F9FC;
}

.research_section_heading {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: #57A773;
    text-transform: uppercase;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.research_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.research_card {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 4px;
    border-left: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease;
}

.research_card:hover {
    transform: translateY(-5px);
}

.research_card h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
}

.research_card .section_stripe {
    margin: 5px 0 15px 0;
}

.research_card_intro {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.research_divider {
    width: 60px;
    border: none;
    border-top: 2px solid #ccc;
    margin: 10px auto 15px;
}

.research_card_body {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

.research_card p {
    line-height: 1.6;
    color: #555;
    text-align: center;
    font-size: 0.9rem;
}

.research_card_image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 20px;
    border: none;
}

.aedes_image {
    max-width: 100%;
    max-height: 200px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.attribution {
    font-size: 0.65rem;
    color: #999;
    margin-bottom: 10px;
    margin-top: -10px;
    line-height: 1.3;
}

.attribution a {
    color: var(--primary);
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
}

.research_card:nth-child(3) .research_card_image {
    width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Research Section - Responsive Styles */

/* Large screens - ensure proper spacing */
@media (min-width: 1400px) {
    .research_grid {
        max-width: 1400px;
        gap: 40px;
    }
    
    .research_section {
        padding: 80px 60px;
    }
    
    .research_section_heading {
        font-size: 3rem;
        margin-bottom: 60px;
    }
}

/* Tablet View - 2 columns */
@media (max-width: 1024px) and (min-width: 769px) {
    .research_grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
        padding: 0 20px;
    }
    
    .research_section {
        padding: 50px 30px;
    }
    
    .research_section_heading {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }
    
    .research_card {
        padding: 30px 25px;
    }
    
    .research_card h3 {
        font-size: 1.3rem;
    }
}

/* Mobile View - 1 column */
@media (max-width: 768px) {
    .research_grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0 10px;
    }
    
    .research_section {
        padding: 40px 15px;
    }
    
    .research_section_heading {
        font-size: 1.6rem;
        margin-bottom: 30px;
        letter-spacing: 1px;
    }
    
    .research_card {
        padding: 30px 20px;
    }
    
    .research_card h3 {
        font-size: 1.2rem;
    }
    
    .research_card_intro {
        font-size: 0.9rem;
    }
    
    .research_card_body {
        font-size: 0.85rem;
    }
    
    .research_card_image {
        margin-bottom: 15px;
    }
}

/* Small Mobile View - Extra adjustments for very small screens */
@media (max-width: 480px) {
    .research_section {
        padding: 30px 10px;
    }
    
    .research_section_heading {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    .research_card {
        padding: 25px 15px;
    }
    
    .research_card h3 {
        font-size: 1.1rem;
    }
    
    .research_card_intro {
        font-size: 0.85rem;
    }
    
    .research_card_body {
        font-size: 0.8rem;
        line-height: 1.6;
    }
}


/* ISVac Platform Section */
.isvac_section {
    padding: 0;
    background-color: #EBEBEB;
}

.isvac_layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 560px;
}

.isvac_text_side {
    padding: 60px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #EBEBEB;
}

.isvac_label {
    color: #F87060;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.isvac_heading {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 10px 0 25px 0;
    text-transform: uppercase;
}

.isvac_body {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.isvac_image_side {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    min-height: 500px;
    padding: 40px;
    position: relative;
}

.isvac_image_side iframe {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    box-shadow: 15px 15px 0px #F87060;
}

.isvac_diagram {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.isvac_img_wrapper {
    text-align: center;
    margin: 20px 0;
}

.isvac_img {
    max-width: 55%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .isvac_layout {
        grid-template-columns: 1fr;
    }
    
    .isvac_image_side {
        min-height: 300px;
    }
    
    .isvac_text_side {
        padding: 40px 20px;
    }
    
    .isvac_heading {
        font-size: 1.6rem;
    }
}

/* Mozzie mAbs Section */
.mozzie_mabs_section {
    padding: 0;
    background-color: #F7F9FC;
}

.mozzie_layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    min-height: 500px;
}

.mozzie_image_side {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    min-height: 500px;
    padding: 40px;
    position: relative;
    gap: 25px;
}

.mozzie_image_side .mozzie_img {
    max-width: 300px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 15px 15px 0px #0091AD;
    position: relative;
    z-index: 2;
}

.mozzie_text_side {
    padding: 60px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #F7F9FC;
}

.mozzie_label {
    color: #0091AD;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.mozzie_heading {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 10px 0 25px 0;
    text-transform: uppercase;
}

.mozzie_body {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.mozzie_button {
    margin-top: 10px;
}

.mozzie_button .button {
    background-color: var(--primary);
    color: var(--background);
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 8px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.mozzie_button .button:hover {
    background-color: var(--secondary);
}

@media (max-width: 768px) {
    .mozzie_layout {
        grid-template-columns: 1fr;
    }
    
    .mozzie_image_side {
        min-height: 300px;
    }
    
    .mozzie_text_side {
        padding: 40px 20px;
    }
    
    .mozzie_heading {
        font-size: 1.6rem;
    }
}

/* Team Section */
.team_section {
    padding: 60px 20px;
    color: var(--text);
    background-color: #E0E0E0;
}

.team_section .section_title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

/* Sub-headings: T3, Officers, General Executives */
.team_group_title {
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-align: center;
    color: var(--primary);
}

/* ===================== PI SECTION (Combined wrapper) ===================== */
.pi-section {
    position: relative;
    width: 100%;
    background-color: var(--background);
    padding: 60px 20px 50px;
    overflow: hidden;
}

.pi-section .about-bg-deco {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(87, 167, 115, 0.02) 0%,
        rgba(79, 179, 162, 0.02) 100%
    );
    clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 0;
}

.pi-section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.pi-divider {
    text-align: center;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 20px 0;
    opacity: 0.6;
    position: relative;
    z-index: 1;
}

.pi-divider-orange {
    color: #F87060;
}

/* ===================== ABOUT SECTION (PI Profiles) ===================== */
.about {
    position: relative;
    padding: 30px 0;
    background-color: transparent;
    margin-bottom: 0;
    overflow: visible;
}

.about-bg-deco {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(87, 167, 115, 0.02) 0%,
        rgba(79, 179, 162, 0.02) 100%
    );
    clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 0;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* Reverse layout with same-size photo */
.about-reverse .about-container {
    grid-template-columns: 1fr 380px;
}

/* ===== Photo Column ===== */
.about-photo-wrapper {
    position: relative;
    width: 100%;
}

.about-photo-border {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent);
    border-radius: 12px;
    z-index: 0;
}

.about-photo {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: block;
    z-index: 1;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    margin-top: 20px;
}

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

.btn-dark:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-cv {
    width: 100%;
}

/* ===== Text Column ===== */
.about-text {
    padding-top: 10px;
}

.about-text p.about-label {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hash-separator {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 12px 0;
    opacity: 0.7;
}

.about-name {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    margin: 15px 0 8px 0;
    line-height: 1.2;
}

.about-title {
    font-size: 1.1rem;
    color: #555;
    margin: 10px 0 15px 0;
}

.about-title em {
    font-style: italic;
    color: #666;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
}

.about-bold {
    font-weight: 600;
    color: #333;
}

.about-bottom-stripe {
    display: none; /* replaced by .pi-divider in combined section */
}

/* Orange theme for Roy's section */
.about-reverse .about-text p.about-label {
    color: #F87060;
}

.about-reverse .hash-separator {
    color: #F87060;
}

.about-reverse .about-photo-border {
    border-color: #F87060;
}

.about-reverse .about-bottom-stripe {
    color: #F87060;
}

.about-reverse .about-bg-deco {
    background: linear-gradient(
        135deg,
        rgba(248, 112, 96, 0.02) 0%,
        rgba(255, 140, 100, 0.02) 100%
    );
}

/* Scroll reveal animations */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.8s ease forwards;
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.8s ease forwards 0.2s;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* About / PI Section - Responsive */
@media (max-width: 1024px) {
    .pi-section {
        padding: 50px 20px 40px;
    }

    .about-container {
        grid-template-columns: 320px 1fr;
        gap: 40px;
    }
    
    .about-reverse .about-container {
        grid-template-columns: 1fr 320px;
    }
    
    .about-name {
        font-size: 1.9rem;
    }
}

@media (max-width: 768px) {
    .pi-section {
        padding: 40px 15px 30px;
    }

    .pi-section-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .about {
        padding: 20px 0;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-photo-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-name {
        font-size: 1.7rem;
    }
    
    .about-title {
        font-size: 1rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .btn-cv {
        width: 100%;
    }

    /* About (PI profiles) reverse layout stacks on mobile */
    .about-reverse .about-container {
        grid-template-columns: 1fr;
    }

    .about-reverse .about-photo-wrapper {
        max-width: 280px;
        margin: 0 auto;
        order: -1;
    }
}

@media (max-width: 480px) {
    .pi-section {
        padding: 30px 10px 20px;
    }

    .pi-section-title {
        font-size: 1.5rem;
    }

    .about {
        padding: 15px 0;
    }
    
    .about-name {
        font-size: 1.5rem;
    }
    
    .about-title {
        font-size: 0.95rem;
    }
    
    .about-text p {
        font-size: 0.9rem;
        line-height: 1.7;
    }
}

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

/* Grid layout for team cards */
.team_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    justify-items: center;   /* centers cards in each column */
    align-items: stretch;
    margin-bottom: 10px;
}

/* Team card wrapper for 3D flip perspective */
.team_card_wrapper {
    perspective: 1000px;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
    height: 360px;
}

/* Individual team card with 3D flip */
.team_card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
}

.team_card_wrapper.flipped .team_card {
    transform: rotateY(180deg);
}

/* Front of team card */
.team_card_front {
    background-color: #f0f0f0;
    border-radius: 16px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.team_card_front:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

/* Back of team card */
.team_card_back {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 16px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backface-visibility: hidden;
    transform: rotateY(180deg);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.team_card_back .team_bio {
    color: var(--background);
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 1;
    overflow-y: auto;
    max-height: 100%;
    padding-right: 8px;
}

.team_card_back .team_bio::-webkit-scrollbar {
    width: 6px;
}

.team_card_back .team_bio::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.team_card_back .team_bio::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.team_card_back .team_bio::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Team photo */
.team_photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid rgba(255, 255, 255, 0.7);
}

/* Name + role */
.team_name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--primary);
}

.team_role {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
}

.team_affiliation {
    font-size: 0.85rem;
    color: var(--secondary);
    opacity: 0.8;
    margin-bottom: 8px;
}

/* Social links on team cards */
.team_social_links {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}

.team_social_links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.team_social_links a:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.about-reverse .team_social_links a:hover {
    background-color: #F87060;
}

/* Social links under PI photos */
.about-photo-column {
    display: flex;
    flex-direction: column;
}

.about-social-links {
    justify-content: center;
    margin-top: 25px;
    position: relative;
    z-index: 2;
}

/* Bio text */
.team_bio {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
    color: var(--secondary);
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .team_section {
        padding: 40px 10px;
    }

    .team_section .section_title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .team_group_title {
        margin-top: 28px;
        margin-bottom: 12px;
        font-size: 1.3rem;
    }

    .team_grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .team_card_wrapper {
        max-width: 260px;
        height: 340px;
    }

    .team_card {
        max-width: 320px;
    }

    .team_photo {
        width: 100px;
        height: 100px;
    }

    .team_name {
        font-size: 1.05rem;
    }

    .team_role {
        font-size: 0.85rem;
    }

    .team_card_back .team_bio {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    /* Alumni section */
    .alumni_section {
        padding: 40px 10px;
    }

    .alumni_section .section_title {
        font-size: 1.8rem;
    }

    .alumni_section .section_subtitle {
        font-size: 0.95rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .alumni_carousel_container {
        gap: 8px;
    }

    .alumni_scroll_btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .alumni_card {
        flex: 0 0 220px;
        min-width: 220px;
        width: 220px;
        height: auto;
        min-height: 280px;
        max-height: 380px;
        padding: 0 0 16px 0;
    }

    .alumni_name {
        font-size: 1rem;
    }

    .alumni_years {
        font-size: 0.8rem;
    }

    .alumni_role {
        font-size: 0.75rem;
    }

    .alumni_photo {
        width: 75px;
        height: 75px;
        margin: 16px auto 10px auto;
    }
}

@media (max-width: 480px) {
    .team_section {
        padding: 30px 8px;
    }

    .team_section .section_title {
        font-size: 1.5rem;
    }

    .team_group_title {
        font-size: 1.15rem;
        margin-top: 20px;
    }

    .team_grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .team_card_wrapper {
        max-width: 100%;
        height: 320px;
    }

    .team_photo {
        width: 85px;
        height: 85px;
    }

    .team_name {
        font-size: 1rem;
    }

    .team_role {
        font-size: 0.8rem;
    }

    /* Alumni section - small mobile */
    .alumni_section .section_title {
        font-size: 1.5rem;
    }

    .alumni_section .section_subtitle {
        font-size: 0.85rem;
    }

    .alumni_carousel_container {
        gap: 5px;
    }

    .alumni_scroll_btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .alumni_card {
        flex: 0 0 185px;
        min-width: 185px;
        width: 185px;
        height: auto;
        min-height: 260px;
        max-height: 360px;
        padding: 0 0 14px 0;
    }

    .alumni_name {
        font-size: 0.9rem;
    }

    .alumni_years {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .alumni_role {
        font-size: 0.7rem;
    }

    .alumni_photo {
        width: 62px;
        height: 62px;
        margin: 14px auto 8px auto;
    }
}


/* Sponsor Section */
.sponsor_section {
    padding: 60px 20px;
    color: #1e293b;
    background-color: #F5F5F5;
}

.sponsor_section .section_title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.sponsor_description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Sponsor Grid */
.sponsor_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 35px;
    align-items: center;
    justify-items: center;
}

/* Sponsor card wrapper for 3D flip perspective */
.sponsor_card_wrapper {
    width: 100%;
    max-width: 200px;
    perspective: 1000px;
    cursor: pointer;
    height: 250px;
}

/* Individual sponsor card with 3D flip */
.sponsor_card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
}

.sponsor_card_wrapper.flipped .sponsor_card {
    transform: rotateY(180deg);
}

/* Front of card (logo) */
.sponsor_card_front {
    background-color: #f0f0f0;
    padding: 20px 15px;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    transition: 0.3s;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sponsor_card_wrapper:hover .sponsor_card_front {
    background-color: #e8e0eb;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Back of card (info) */
.sponsor_card_back {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 1px solid rgba(224, 216, 255, 0.4);
    padding: 20px 15px;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    position: absolute;
    top: 0;
    left: 0;
}

.sponsor_card_back h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--background);
}

.sponsor_card_back p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: rgba(247, 249, 252, 0.9);
}

/* Sponsor logos */
.sponsor_logo {
    max-width: 150px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Contact Section */
.contact_section {
    padding: 60px 20px;
    color: var(--text);
    background-color: #EBEBEB;
}

.contact_section .section_title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #5a5a5a;
}

.contact_description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #5a5a5a;
}

/* Grid layout */
.contact_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: start;
}

/* Contact info text */
.contact_info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #5a5a5a;
}

.contact_info p {
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.5;
    color: #5a5a5a;
}

/* Contact form */
.contact_form {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form_group input,
.form_group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
}

.contact_button {
    background-color: var(--primary);
    color: var(--background);
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s;
}

.contact_button:hover {
    background-color: var(--secondary);
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slide {
    display: flex;
    gap: 10px;
    overflow: hidden;
}

.item {
    min-width: 200px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.gallery_slider {
    position: relative;      /* required so buttons position ON TOP */
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.slide {
    display: flex;
    transition: transform 0.4s ease;
}

.item {
    min-width: 100%;
    flex-shrink: 0;
}

.item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Prev / Next Buttons */
.gallery_btn {
    position: absolute;               /* put ON TOP of images */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;                      /* sit above the images */
    background: rgba(0,0,0,0.4);
    border: none;
    padding: 10px 14px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 1.4rem;
}

.gallery_btn.prev {
    left: 10px;
}

.gallery_btn.next {
    right: 10px;
}

.gallery_btn:hover {
    background: rgba(0,0,0,0.6);
}

/* Gallery Items */
.item {
    min-width: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 350px; /* adjust height of the gallery frame */
    overflow: hidden;
    border-radius: 12px;
}

/* Scale Images Inside the Frame */
.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* fill the box neatly */
    border-radius: 12px;
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--background);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer_container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
    gap: 40px;
}

/* Footer Sections */
.footer_section h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer_links {
    list-style: none;
    padding: 0;
}

.footer_links li {
    margin-bottom: 8px;
}

.footer_links a {
    color: #ffffff;
    text-decoration: none;
    transition: 0.3s;
}

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

/* Brand Area */
.footer_brand {
    max-width: 270px;
}

.footer_logo {
    width: 60px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.footer_title {
    margin: 5px 0;
    font-size: 1.4rem;
}

.footer_subtext {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Social Icons */
.footer_socials {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.social_icon {
    font-size: 1.6rem;
    text-decoration: none;
    color: #ffffff;
    transition: 0.3s;
}

.social_icon:hover {
    color: var(--accent);
}

/* Footer Bottom Bar */
.footer_bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
    border-top: 1px solid var(--background);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer_container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

.social_img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin: 0 4px;   /* reduced from 8px → closer icons */
    transition: 0.3s;
}

.social_img:hover {
    transform: scale(1.15);
    opacity: 0.8;
}

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

.contact_section {
    padding: 60px 20px;
    color: #762d78;
    background-color: #EBEBEB;
}

.contact_section .section_title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text);
}

.contact_text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    font-size: 1.05rem;
    color: var(--text);
}

/* Form styling */
.contact_form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input_group {
    display: flex;
    flex-direction: column;
}

.input_group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.input_group input,
.input_group textarea {
    padding: 12px 14px;
    border-radius: 8px;
    border: none;
    background-color: #ffffffdd;
    font-size: 1rem;
}

.input_group input:focus,
.input_group textarea:focus {
    outline: 2px solid var(--secondary);
}

/* Submit button */
.submit_button {
    background-color: var(--primary);
    color: var(--background);
    width: fit-content;
    margin: 10px auto 0;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.submit_button:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact_form {
        width: 90%;
    }
}

/* Publication Search Bar */
.publications_search {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.search_input {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--secondary);
    border-radius: 8px;
    background-color: white;
    color: var(--text);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search_input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(79, 179, 162, 0.3);
}

.search_input::placeholder {
    color: #999;
}

/* Publications Grid */
.articles_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* Publication Card */
.publication_card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(31, 58, 95, 0.08);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.publication_card:hover {
    box-shadow: 0 12px 24px rgba(31, 58, 95, 0.15);
    transform: translateY(-8px);
}

.pub_year {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    width: fit-content;
}

.pub_title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.4;
}

.pub_authors {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
}

.pub_journal {
    font-size: 0.85rem;
    color: var(--secondary);
    font-style: italic;
}

.pub_doi {
    font-size: 0.85rem;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.pub_doi a {
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
    transition: color 0.3s ease;
}

.pub_doi a:hover {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .articles_grid {
        grid-template-columns: 1fr;
    }
    
    .search_input {
        font-size: 16px; /* Prevents zoom on mobile */
    }
}

/* Ensure mobile dropdown is positioned above content and appears below navbar */
@media (max-width: 768px) {
    .nav-links {
        top: 100% !important;
        left: 0 !important;
        z-index: 1001 !important;
        width: 100% !important;
    }
    /* Allow the absolutely-positioned dropdown to extend outside the navbar */
    .navbar {
        overflow: visible !important;
    }
}

/* Year-based Publications Dropdown */
.publications_by_year {
    margin-top: 30px;
}

.year-section {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
}

.year-dropdown {
    width: 100%;
    padding: 16px 20px;
    background-color: var(--secondary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.year-dropdown:hover {
    background-color: var(--primary);
}

.year-title {
    flex-grow: 1;
    text-align: left;
}

.year-count {
    margin-left: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.year-toggle {
    margin-left: 15px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.year-content {
    padding: 20px;
    display: none;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
/* Visiting Scientists Section */
.visiting_section {
    padding: 60px 20px;
    background-color: #f5f5f5;
}

.visiting_section .section_title {
    color: var(--primary);
    text-align: center;
}

.visiting_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.visiting_card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.visiting_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.visiting_name {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.visiting_affiliation {
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.visiting_dates {
    color: #888;
    font-size: 0.9rem;
}

/* Alumni Section */
.alumni_section {
    padding: 60px 20px;
    color: var(--text);
    background-color: #EBEBEB;
}

.alumni_section .section_title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.alumni_section .section_subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 40px;
}

.alumni_carousel_container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 auto;
}

.alumni_grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    overflow-x: hidden;
    padding-bottom: 15px;
    margin: 0;
    flex: 1;
}

.alumni_scroll_btn {
    background-color: var(--accent);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.alumni_scroll_btn:hover {
    background-color: var(--primary);
    transform: scale(1.1);
}

.alumni_scroll_prev {
    order: -1;
}

.alumni_card {
    background: white;
    padding: 0 0 20px 0;
    border-radius: 16px;
    border: none;
    border-top: 5px solid var(--accent);
    box-shadow: 0 4px 18px rgba(31, 58, 95, 0.10);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 0 0 clamp(200px, 18vw, 260px);
    min-width: clamp(200px, 18vw, 260px);
    width: clamp(200px, 18vw, 260px);
    height: auto;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    text-align: center;
}

/* No extra padding needed for cards with photos */
.alumni_card:has(.alumni_photo) {
    padding-top: 0;
}

.alumni_card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(31, 58, 95, 0.18);
}

.alumni_name {
    color: var(--primary);
    font-size: 1.05rem;
    margin: 0 16px 4px 16px;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.alumni_photo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    position: static;
    display: block;
    margin: 20px auto 12px auto;
    border: 4px solid var(--accent);
    box-shadow: 0 2px 10px rgba(0,0,0,0.13);
    opacity: 1;
}

.alumni_header {
    display: none;
}

.alumni_role {
    color: var(--text);
    font-weight: 500;
    font-size: 0.8rem;
    line-height: 1.5;
    padding: 0 16px;
    margin: 0;
    text-align: center;
    list-style: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.alumni_role li {
    margin-bottom: 4px;
    list-style: none;
    padding: 0;
}

.alumni_years {
    color: var(--accent);
    font-size: 0.82rem;
    margin: 0 16px 8px 16px;
    font-style: italic;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: center;
}

.alumni_current {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}
