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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    overflow-x: hidden;
    color: #1d1d1f;
    background-image: url('https://static.igem.wiki/teams/5626/allimage/background.avif');
    background-repeat: repeat;

    background-size: cover;

    background-attachment: fixed;


}

/* Navigation Bar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.001);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-container {
    max-width: 2000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
    margin-right: 2%;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 1s ease;
    margin-right: 16px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-picture {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    border-radius: 75%;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: black;
    text-decoration: none;
    margin: 0;
    transition: font-size 0.25s ease;
}


.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 1s ease, font-size 0.25s ease, padding 0.25s ease, letter-spacing 0.25s ease;
    position: relative;
    display: flex;
    font-size: 1rem;
    /* baseline, will squeeze slightly in media queries */
}

.nav-link:hover {
    background: rgba(255, 140, 0, 0.05);
    color: orange;
}

.nav-item a::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f79c1d, #efe420);
    /* å½©è‰²åº•ç·š */
    transition: transform 0.3s ease;
    border-radius: 3px;
}

.nav-item a:hover::after {
    transform: translateX(-50%) scaleX(1);
}



.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 10px;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(1.8px);
    border-radius: 15px;
    min-width: 100px;
    width: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 1s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}


.dropdown:hover {
    color: orange;
}

.dropdown a:hover::after {
    display: none;
}

/* Ensure dropdown a has no extra margin or padding that might cause background spill */
.dropdown a {
    display: block;
    width: 100%;
    white-space: nowrap;
    padding: 1rem 1.5rem;
    color: #1d1d1f;
    text-decoration: none;
    transition: all 1s ease;
    border-radius: 8px;
    font-size: 1.15rem;
    box-sizing: border-box;
    margin: 0;
}

.dropdown a:hover {
    background-color: rgba(31, 140, 236, 0);
    color: blue;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 5px;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-item:hover .dropdown a:hover {
    background: rgba(4, 127, 235, 0);
    font-size: larger;
    font-weight: 500;
}

/* section é€ åž‹ */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.section-content {
    max-width: 2000px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    margin-top: 70px;
}

.hero-title {
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #1d1d1f;
    max-width: 900px;
}

.hero-description {
    font-size: 1.2rem;
    color: #515154;
    line-height: 1.6;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Sentences Section */
.sentences {
    min-height: 10vh;
    font-size: clamp(2rem, 5.6vw, 6rem);
    width: 500px;
    margin: 0 auto;
    margin-top: 300px;
    margin-bottom: 300px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #1d1d1f;
    transition: opacity 1s ease;
    transform: translateY(20px);
    opacity: 0;
}

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





/* Project Goal Section */
.about {
    background: #f5f5f7;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.about-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 1s ease;
    transform: translateY(20px);
    opacity: 0;
}

.about-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1d1d1f;
}

.about-card p {
    color: #515154;
    line-height: 1.6;
}

/* Project Section */
.project {
    background: #ffffff;
}


.project-visual:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 140, 0, 0.1);
}

/* Science Section */
.science {
    background: #f5f5f7;
}

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

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 1s ease;
    transform: translateY(20px);
    opacity: 0;
}

.stat-item.visible {
    transform: translateY(0);
    opacity: 1;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #ff8c00;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #515154;
    font-weight: 500;
}


/* Impact Section */
.impact {
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.cta-button {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 1s ease;
    position: relative;
}

.cta-secondary {
    background: transparent;
    color: #1d1d1f;
    border: 1px solid #1d1d1f;
}

.cta-secondary:hover {
    background: orange;
    color: white;
    border: 2px solid, orange;
    transform: translateY(-3px);
}

/* Section Titles */
.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.3rem;
    color: #86868b;
    font-weight: 300;
    margin-bottom: 2rem;
    line-height: 1.5;
}


/* Page Title */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-top: 10rem;
    max-width: 800px;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    display: block;
    margin-bottom: 2rem;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-size: 1.1rem;
    background: rgba(255, 159, 69, 0.95);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: justify;
}


@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes scrollMove {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(30px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Response å‹•ç•« */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .section {
        padding: 0 1rem;
        min-height: 80vh;
    }

    .about-grid,
    .science-stats,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
    }
}

/* Subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progressive squeeze for top bar before mobile breakpoint */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .logo-name {
        font-size: 1.35rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .nav-link {
        padding: 0.45rem 0.8rem;
        border-radius: 16px;
        font-size: 0.98rem;
        letter-spacing: 0.005em;
    }
}

@media (max-width: 1050px) {
    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        margin-right: 16px;
    }

    .logo-name {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.35rem 0.6rem;
        border-radius: 14px;
        font-size: 0.96rem;
        letter-spacing: 0.004em;
    }
}

@media (max-width: 960px) {
    .nav-container {
        padding: 0 0.75rem;
    }

    .logo-name {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 0.35rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem;
        border-radius: 12px;
        font-size: 0.95rem;
        letter-spacing: 0.0025em;
    }
}

@media screen and (max-width: 905px) {
    .nav-link {
        display: none;
    }
}


.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}


/* Mobile Menu Styling */
.mobile-menu-icon {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    cursor: pointer;
    padding: 0.5rem;
}

.material-symbols-outlined {
    font-size: 32px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(1.8px);
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 1090;
    padding: 1rem;
    border-top: 1px solid #ccc;
}

.mobile-dropdown {
    padding-bottom: 0.5rem;
}

.mobile-toggle {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    justify-content: flex-start;
    border-radius: 8px;
    transition: background 0.3s ease;
    cursor: pointer;
    color: #1d1d1f;
    text-decoration: none;
}

.mobile-toggle:hover {
    color: orange;
}

.arrow-icon {
    margin-left: 0.3rem;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.mobile-dropdown.open .arrow-icon {
    transform: rotate(90deg);
}

.mobile-submenu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: nowrap;
}

.mobile-submenu a {
    display: block;
    width: 100%;
    word-break: break-word;
    white-space: normal;
    padding: 0.4rem 0;
    font-size: 1.2rem;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-submenu a:hover {
    color: blue;
}

/* Show mobile menu on narrow screens */
@media screen and (max-width: 905px) {
    .mobile-menu-icon {
        display: block;
    }

    #mobile-nav.show {
        display: flex;
    }
}

/* Ensure the mobile menu shows properly */
#mobile-nav {
    display: none !important;
}

#mobile-nav.show {
    display: flex !important;
}

/* Responsive: Hide mobile nav and menu icon on large screens */
@media screen and (min-width: 906px) {
    #mobile-nav {
        display: none !important;
    }

    .mobile-menu-icon {
        display: none !important;
    }

    #menu-icon {
        content: "menu";
    }
}

.nav-link .arrow-icon {
    margin-left: 0.3rem;
}

.footer {
    background-color: #b5b4b4;
    color: rgb(20, 20, 20);
    padding: 3rem 1rem;
    text-align: center;
}

.footer-content h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.contactus-links {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contactus-links li a {
    color: #181818;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-icon {
    height: 42px;
    width: auto;
    transition: transform 0.3s ease;
}

.contactus-links li a:hover .footer-icon {
    transform: scale(1.1);
}

.footer-content p {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #000000;
}





/*lol*/
.banner {
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-top: 80px;
    margin-bottom: 50px;
}


/*å…§å®¹*/
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.big-title {

    font-size: clamp(50px, 4vw, 62.6px);

    margin-top: 80px;
    margin-bottom: 70px;
    width: 85%;
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 2rem;
}



.main {
    margin-top: 100px;
    width: 100%;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


.text {
    text-align: justify;
    font-size: 1.2rem;
    color: #515154;
    line-height: 1.6;
    margin-bottom: 4rem;
    max-width: 2000px;
    margin-left: auto;
    margin-right: auto;
}



/* Side navigation é€£çµ */

.side-nav {
    position: fixed;
    margin-top: 100px;
    width: 15%;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 100;
}


.side-link {
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.75s ease;
    background: transparent;
    color: #1d1d1f;
    border: 1px solid #1d1d1f;
    padding: 1rem;
    border-radius: 20px;
}

.side-link:hover {
    font-size: larger;
    font-weight: 500;
    transition: all 0.75s ease;
    padding: 1rem;
    margin: 3px;
    background: orange;
    color: white;
    border: 2px solid, orange;
    transform: translateY(-3px);
    border-radius: 20px;
}


.section-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    text-align: left;
    margin-bottom: 1rem;
}

html {
    scroll-padding-top: 80px;
}


.cta-secondary:hover {
    background: orange;
    color: white;
    border: 2px solid, orange;
    transform: translateY(-3px);
}


.video {
    width: 1200;
    margin-left: 400px;
    height: 1200;

}


/* =====================
   Team Page Cards (Members / Instructors / Outreach)
   ===================== */

/* Section spacing & headings */
.members-section,
.instructors-section,
.outreach-section {
    margin-top: 80px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.members-section h2,
.instructors-section h2,
.outreach-section h2 {
    font-size: clamp(28px, 3.2vw, 36px);
    font-weight: 800;
    margin: 24px 0 20px;
    text-align: center;
}

/* Shared grid container */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --------- Flip Cards (Members) --------- */
.flip-card {
    background: transparent;
    width: min(100%, 520px);
    height: 340px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1.3s ease;
    transform-style: preserve-3d;
}

/* flip on hover (desktop) */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    background: #fff;
}


/*--------- Flip Cards (Non-Members)-----------*/

/* --------- Flip Cards (Members) --------- */
.flip-cardNM {
    background: transparent;
    width: min(100%, 520px);
    height: 340px;
    perspective: 1000px;
}

.flip-cardNM-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1.3s ease;
    transform-style: preserve-3d;
}

/* flip on hover (desktop) */
.flip-cardNM:hover .flip-cardNM-inner {
    transform: rotateY(180deg);
}

.flip-cardNM-front,
.flip-cardNM-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    background: #fff;
}






/* Front (basic info) */
.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Back (long text, scrollable) */
.flip-card-back {
    transform: rotateY(180deg);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flip-card-back h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.flip-card-back p {
    line-height: 1.5;
    color: #444;
    overflow: auto;
    /* å› ç‚ºå­—å¾ˆé•· â†’ å…§å®¹å¯åœ¨å¡ç‰‡å…§æ»¾å‹• */
    -webkit-overflow-scrolling: touch;
}

/* --------- Simple Cards (Instructors / Outreach) --------- */
.simple-card {
    background: #fff;
    width: 45%;
    height: auto; /* Change from 410px to auto */
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    padding: 0; /* Change from 6px to 0 */
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;

} 

.simple-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.10);
}

.simple-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.simple-card h3 {
    font-size: 1.05rem;
    margin-top: 10px;
}

.simple-card p {
    color: #666;
    font-size: 0.95rem;
}




/* Specific styling for instructor cards */
.instructors-section .card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: flex-start;
}

.instructors-section .simple-card {
    height: 380px; /* Adjust this number to fit your content exactly */
    overflow: hidden; /* Cuts off any overflow */

    width: 300px; /* Set a specific width */
    display: inline-block;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 0; /* No padding on the card itself */
}

.instructors-section .simple-card img {
    display: block;
    width: 100%;
    height: 280px; /* Set a specific height */
    object-fit: cover; /* This will crop the image to fit */
    margin: 0; /* Remove any margins */
}

/* Tighten up the text spacing */
.instructors-section .simple-card h3 {
    font-size: 1.2rem;
    margin: 15px 10px 10px; /* Reduced margins */
}

.instructors-section .simple-card p {
    color: #666;
    font-size: 0.95rem;
    margin: 5px 10px 15px; /* Add specific margins, less space at bottom */
}

/* Remove any extra space from the last element */
.instructors-section .simple-card > *:last-child {
    margin-bottom: 20px; /* Control the final bottom spacing */
}




/*

.instructors-section .simple-card img {
    display: block;
    width: auto;
    height: auto; 
    max-width: 350px; 
    max-height: 400px; 
}

*/





/* --------- Responsive Tweaks --------- */
@media (max-width: 768px) {
    .simple-card img {
        height: 160px;
    }
}

@media (max-width: 520px) {
    .card-container {
        grid-template-columns: 1fr;
    }
}

/* Team page: main-content hero image spacing */
.hero-image {
    margin-top: 10px;
    margin-bottom: 28px;
    min-width: 100%;
    z-index: -11;
}

/* =====================
   HERO (Team) reveal on load
   ===================== */
.hero.hero--team {
    position: relative;
    margin-top: 90px;
    /* clear the fixed navbar */
    border-radius: 12px;
    overflow: hidden;
    outline: 4px solid rgba(153, 102, 255, 0.75);
    /* purple border like screenshot */
}

.hero.hero--team .hero__img {
    display: block;
    width: 100%;
    height: clamp(240px, 40vw, 420px);
    /* responsive banner height */
    object-fit: cover;
    transform: scale(1.04);
    /* start slightly zoomed */
    filter: brightness(0.7);
    /* start darker under title */
    transition: transform 1200ms ease, filter 1200ms ease;
}

/* dark overlay that fades away */
.hero.hero--team .hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
    transition: opacity 1000ms ease;
}

/* centered big title shown at start */
.hero.hero--team .hero__title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: clamp(38px, 9vw, 120px);
    line-height: 1;
    font-weight: 900;
    color: #fff;
    text-align: center;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    opacity: 1;
    transition: opacity 900ms ease, transform 900ms ease;
}

/* Reveal state â€” JS will add .is-revealed on load */
.hero.hero--team.is-revealed .hero__title {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px));
}

.hero.hero--team.is-revealed .hero__overlay {
    opacity: 0;
}

.hero.hero--team.is-revealed .hero__img {
    transform: scale(1);
    filter: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    .hero.hero--team .hero__img,
    .hero.hero--team .hero__overlay,
    .hero.hero--team .hero__title {
        transition-duration: 1ms !important;
    }
}

/* Make flip-card-back scrollable */
.flip-card-back {
    overflow-y: auto;
    max-height: 100%;
    padding: 20px;
}

/* Custom scrollbar for better appearance (optional) */
.flip-card-back::-webkit-scrollbar {
    width: 6px;
}

.flip-card-back::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.flip-card-back::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.flip-card-back::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}


/* For embedded PDF */
embed[type="application/pdf"],
object[type="application/pdf"],
iframe {
    width: 100% !important;
    min-height: 1000px !important;
    height: auto !important;
}

/* Optional: Add zoom controls */
.pdf-zoom-container {
    zoom: 1;
    transform: scale(1);
    transform-origin: top center;
}


/* Remove fixed dimensions - let image determine size */
.instructors-section .flip-card {
    width: auto;
    height: auto;
    perspective: 1000px;
    display: inline-block; /* Shrinks to content */
}

.instructors-section .flip-card-inner {
    width: auto;
    height: auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

/* Front matches image exactly */
.instructors-section .flip-card-front {
    position: relative; /* Not absolute */
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
}

.instructors-section .flip-card-front img {
    display: block;
    width: auto;
    height: auto;
    max-width: 280px; /* Control max size */
    border-radius: 16px;
}

/* Back side matches front dimensions */
.instructors-section .flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: rotateY(180deg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 30px;
    box-sizing: border-box;
}

/* Keep them side by side */
.instructors-section .card-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}






.scroll-story-wrapper {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
    -ms-overflow-style: none;  /* Add this for IE/Edge */
    scrollbar-width: none;  /* Add this for Firefox */
}

.scroll-story-wrapper::-webkit-scrollbar-thumb {
   display: none;
}



<style>
    .scroll-story-wrapper {
        width: 100%;
        height: 100vh;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        -webkit-overflow-scrolling: touch;
        position: relative;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .scroll-story-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .story-part {
        width: 100%;
        height: 100vh;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        position: relative;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .story-image {
        position: absolute;
        width: 100%;
        max-width: 100%;
        height: auto;
        left: 50%;
        transform: translateX(-50%);
        min-height: 1200vh; /* IMPORTANT: Make image tall enough for all sections */
    }

    /* Fixed positioning - use viewport heights instead of percentages */
    #part1 .story-image { top: -50vh; }
    #part2 .story-image { top: -100vh; }
    #part3 .story-image { top: -200vh; }
    #part4 .story-image { top: -300vh; }
    #part5 .story-image { top: -400vh; }
    #part6 .story-image { top: -500vh; }
    #part7 .story-image { top: -600vh; }
    #part8 .story-image { top: -700vh; }
    #part9 .story-image { top: -800vh; }
    #part10 .story-image { top: -900vh; }
    #part11 .story-image { top: -1000vh; }
    #part12 .story-image { top: -1100vh; }

    /* Rest of your styles... */
</style>