:root {
    --brand: #990000;
    --brand-dark: #660000;
    --border: #e2e5e9;
    --text: #222;
    --muted: #5f6670;
}

html {
    overflow-y: scroll;
}
.publication-item {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.publication-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.publication-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.publication-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
/* ========================================
   Base
   ======================================== */

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: #fff;
}
.team-member-linkedin {
    display: block;
    margin-top: 6px;
    color: #0d4f8b;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s ease;
}

.team-member-linkedin:hover {
    color: #990000;
    text-decoration: underline;
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    min-height: 86px;
    padding: 0;
    background: #fff !important;
    border-bottom: 1px solid #eeeeee !important;
}

.navbar .container {
    min-height: 86px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0;
    margin-right: 40px;
    padding: 0;
    color: #18233a;
    text-decoration: none;
}

.navbar-logo {
    width: 115px;
    height: 115px;
    object-fit: contain;
    flex-shrink: 0;
}

.ntu-logo {
    width: 105px;
    height: 105px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: 8px;
}

.navbar-logo-divider {
    width: 2px;
    height: 55px;
    background: #990000;
    margin: 0 12px;
    flex-shrink: 0;
}

.navbar-brand strong {
    color: #18233a;
    font-size: 2.55rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 4px;
}

.navbar-brand small {
    color: #18233a !important;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
}

.navbar-nav {
    align-items: stretch;
    gap: 6px;
}

.navbar-nav .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 86px;
    padding: 0 15px !important;
    color: #222 !important;
    font-size: 1.25rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--brand) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after,
.navbar-nav .nav-link.active::after,
.navbar-nav .nav-link[aria-current="page"]::after {
    transform: scaleX(1);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link[aria-current="page"] {
    color: var(--brand) !important;
}

.navbar-toggler {
    border: 1px solid #d7d7d7;
    border-radius: 6px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(153, 0, 0, 0.12);
}


/* ========================================
   Hero
   ======================================== */

.hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #18233a;

    background-image: url("../img/homepage.jpg");
    background-size: 25%;
    background-position: 98% center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(255, 255, 255, 0.92) 42%,
            rgba(255, 255, 255, 0.55) 68%,
            rgba(255, 255, 255, 0.18) 100%
        );
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    max-width: 1000px;
    padding: 95px 0;
}

.hero-accent {
    width: 70px;
    height: 5px;
    margin-bottom: 0px;
    border-radius: 4px;
    background: #0d4f8b;
}

.hero-welcome {
    margin: 0 0 8px;
    color: #18233a;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.3;
}

.hero h1 {
    margin: 0;
    color: #10213d;
    font-size: 4.7rem;
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -2px;
}

.hero-university {
    max-width: 1000px;
    margin: 18px 0 0;
    color: #18233a;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.4;
}

.hero-university strong {
    font-weight: 700;
}

.hero-description {
    max-width: 850px;
    margin: 26px 0 0;
    color: #18233a;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.65;
    text-align: justify;
    hyphens: auto;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 34px;
}

.hero-actions .btn {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.hero-actions .btn:hover {
    transform: translateY(-2px);
}

.hero-actions .btn span {
    margin-left: 8px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;

    padding: 16px 32px;

    background: #07579c;
    color: #fff;

    border: 1px solid #07579c;
    border-radius: 35px;

    font-size: 1.15rem;
    font-weight: 600;

    box-shadow: 0 8px 18px rgba(7, 87, 156, 0.18);
}

.btn-hero:hover {
    background: #064a85;
    color: #fff;
    border-color: #064a85;
    box-shadow: 0 10px 22px rgba(7, 87, 156, 0.25);
}


/* ========================================
   Buttons
   ======================================== */

.btn-brand {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
}

.btn-brand:hover {
    background: var(--brand-dark);
    color: #fff;
    border-color: var(--brand-dark);
}

.btn-outline-brand {
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--brand);
}

.btn-outline-brand:hover {
    background: var(--brand);
    color: #fff;
}


/* ========================================
   Cards
   ======================================== */

.card {
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: 0.2s ease;
}

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

.card-icon {
    font-size: 36px;
    margin-bottom: 12px;
}


/* ========================================
   Home
   ======================================== */

.home-content {
    padding-top: -0x;
    padding-bottom: 42px;
}

.home-content h2 {
    font-weight: 700;
    margin: 0;
}


/* ========================================
   About
   ======================================== */

.about-section {
    padding-bottom: 24px;
}

.about-section h2,
.latest-news-section h2 {
    position: relative;
    padding-top: 16px;
    margin-bottom: 18px;
}

.about-description {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 1200px;
}

.pi-profile {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 30px;
}

.pi-details {
    min-width: 0;
}

.pi-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.pi-title {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.avatar {
    width: 220px;
    height: 270px;
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 0;
}

.about-read-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: var(--brand);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.about-read-more span {
    transition: transform 0.2s ease;
}

.about-read-more:hover {
    color: var(--brand-dark);
}

.about-read-more:hover span {
    transform: translateX(4px);
}


/* ========================================
   Quick Links
   ======================================== */

.quick-links-section {
    padding-bottom: 64px;
}

.about-section h2,
.latest-news-section h2,
.quick-links-section h2,
.explore-section h2 {
    position: relative;
    padding-top: 16px;
    margin-bottom: 18px;
}


.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    transition: 0.25s ease;
}

.quick-link-card:hover {
    color: var(--text);
    border-color: var(--brand);
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.quick-link-card h5 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 700;
}

.quick-link-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.quick-link-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: #f5f5f5;
}

.quick-link-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}


/* ========================================
   Latest News
   ======================================== */

.latest-news-section {
    padding-bottom: 60px;
}

.about-section h2::before,
.latest-news-section h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 5px;
    border-radius: 4px;
    background: #0d4f8b;
}
.latest-news-section .list-group {
    border: none;
    gap: 14px;
}

.latest-news-section .list-group-item {
    display: block;
    padding: 22px 36px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px !important;
    color: var(--text);
    text-decoration: none;
    transition: 0.25s ease;
}

.latest-news-section .list-group-item:hover {
    color: var(--text);
    border-color: #cfcfcf;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

.latest-news-section .list-group-item .small.text-muted {
    margin-bottom: 7px;
    color: var(--brand) !important;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.latest-news-section .list-group-item .fw-semibold {
    margin-bottom: 7px;
    font-size: 1.18rem;
    font-weight: 700 !important;
    line-height: 1.4;
}

.latest-news-section .list-group-item .small:not(.text-muted) {
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.6;
}

.latest-news-section > a {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin-top: 18px !important;
    padding: 9px 16px;
    border: 1px solid var(--brand);
    border-radius: 8px;
    color: var(--brand);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.latest-news-section > a:hover {
    background: var(--brand);
    color: #fff;
}

.news-page {
    min-height: 675px;
    padding-top: 42px;
    padding-bottom: 64px;
    box-sizing: border-box;
}

.news-page h1 {
    font-weight: 750;
}
.contact-page h1 {
    font-weight: 750;
}
.current-project-content {
    display: flex;
    flex-direction: column;
}

.current-project-content p {
    margin: 0;
    flex: 1;
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--muted);
    text-align: justify;
}


/* Contact */

.contact-page {
    min-height: 675px;
    padding-top: 42px;
    padding-bottom: 64px;
    box-sizing: border-box;
} 

/* ========================================
   Explore
   ======================================== */

.explore-section {
    padding-top: 0;
}

.about-section h2::before,
.latest-news-section h2::before,
.quick-links-section h2::before,
.explore-section h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 5px;
    border-radius: 4px;
    background: #0d4f8b;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.explore-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 280px;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: 0.25s ease;
}

.explore-item:hover {
    transform: translateY(-6px);
    border-color: var(--brand);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

.explore-item .card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border-radius: 12px;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 22px;
}

.explore-item h5 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.explore-item p {
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.explore-item a {
    margin-top: auto;
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.explore-item a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}


/* ========================================
   Research
   ======================================== */

.research-top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    gap: 70px;
    align-items: start;
    margin-bottom: 35px;
}


/* Research Introduction */

.research-intro {
    max-width: 100%;
    margin-bottom: 0;
}

.research-intro h1 {
    position: relative;
    margin: 0 0 20px;
    padding-top: 18px;
    color: #18233a;
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1px;
}

.research-intro h1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 5px;
    border-radius: 4px;
    background: #0d4f8b;
}

.research-intro p {
    max-width: 1000px;
    margin: 0;
    color: #4f5863;
    font-size: 1.12rem;
    line-height: 1.8;
}

.research-intro .research-description {
    text-align: justify;
}

.research-funding {
    margin: 16px 0 0 !important;
    color: #5f6670;
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: left;
}

.research-funding strong {
    color: #18233a;
    font-weight: 700;
}


/* Research Approach */

.research-approach {
    margin: 0;
}

.research-approach .research-section-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
}

.research-approach .research-section-heading .research-accent {
    margin-bottom: 8px;
}

.research-approach .research-section-heading h2 {
    margin: 0;
    text-align: center;
    color: #990000;
}

.research-section-heading {
    margin-bottom: 18px;
}

.research-section-heading h2 {
    margin: 0 0 8px;
    color: #18233a;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.research-section-heading .research-accent {
    width: 45px;
    height: 3px;
    border-radius: 3px;
    background: #0d4f8b;
}


/* Research Process Boxes */

.research-process {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.research-process-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 0;
    width: 85%;
    margin: 0 auto;
    padding: 18px 22px;
    overflow: visible;
    background: #fff;
    border: 1px solid #dfe4ea;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.035);
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

/* Arrow to the next box */

.research-process-item:not(:last-child)::before {
    content: "↓";
    position: absolute;
    left: 50%;
    bottom: -24px;
    transform: translateX(-50%);
    color: #990000;
    font-size: 80px;
    font-weight: 700;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}

.research-process-item:not(:last-child):hover::before {
    opacity: 1;
}

/* Arrow to the next box */

.research-process-item:not(:last-child)::before {
    content: "↓";
    position: absolute;
    left: 50%;
    bottom: -24px;
    transform: translateX(-50%);
    color: #990000;
    font-size: 30px;
    font-weight: 700;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}

.research-process-item:not(:last-child):hover::before {
    opacity: 1;
}

.research-process-item::after {
    content: "";
    position: absolute;
    right: -35px;
    top: -35px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(13, 79, 139, 0.05);
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.research-process-item:hover {
    background: #0d4f8b;
    border-color: #0d4f8b;
    box-shadow: 0 10px 24px rgba(13, 79, 139, 0.18);
}

.research-process-item:hover::after {
    background: rgba(255, 255, 255, 0.10);
    transform: scale(1.15);
}

.research-process-number {
    display: none;
}

.research-process-item h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #18233a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.research-process-item:hover .research-process-number,
.research-process-item:hover h3 {
    color: #fff;
}

.research-process-arrow {
    display: none;
}


/* Key Research Areas */

/* Key Research Areas Heading */

.research-areas-section .research-section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
}

.research-areas-section .research-section-heading .research-accent {
    order: -1;
    margin-bottom: 8px;
}

.research-areas-section .research-section-heading h2 {
    margin: 0;
}

.research-areas-section {
    margin-bottom: 50px;
}

.research-areas-section > p {
    max-width: 1000px;
    margin: 0 0 32px;
    color: #4f5863;
    font-size: 1.05rem;
    line-height: 1.75;
}

.research-area-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 22px;
}

.research-area-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 112px;
    padding: 20px 24px;
    overflow: visible;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid #0d4f8b;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.045);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.research-area-card:hover {
    transform: translateY(-4px);
    border-color: #cbd7e3;
    border-left-color: #0d4f8b;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

.research-area-number {
    flex: 0 0 72px;
    margin: 0;
    color: rgba(13, 79, 139, 0.10);
    font-size: 4.2rem;
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -2px;
}

.research-area-card h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #18233a;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
}

.research-area-card p {
    margin: 0;
    color: #5f6670;
    font-size: 0.94rem;
    line-height: 1.65;
}

/* Current Projects */

.current-projects-section {
    margin-bottom: 50px;
}

.current-projects-section .research-section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
}

.current-projects-section .research-section-heading .research-accent {
    order: -1;
    margin-bottom: 8px;
}

.current-projects-section .research-section-heading h2 {
    margin: 0;
}

.current-projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.current-project-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    min-height: 150px;
    padding: 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid #0d4f8b;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.045);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.current-project-card:hover {
    transform: translateY(-4px);
    border-color: #cbd7e3;
    border-left-color: #0d4f8b;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

.current-project-number {
    flex: 0 0 60px;
    margin: 0;
    color: rgba(13, 79, 139, 0.12);
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -2px;
}

.current-project-content {
    position: relative;
    z-index: 1;
}

.current-project-content h3 {
    margin: 2px 0 10px;
    color: #18233a;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.4;
}

.current-project-content p {
    margin: 0;
    color: #5f6670;
    font-size: 0.96rem;
    line-height: 1.65;
}


/* Current Projects - Mobile */

@media (max-width: 700px) {

    .current-projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .current-project-card {
        min-height: 0;
        padding: 20px;
        gap: 16px;
    }

    .current-project-number {
        flex: 0 0 48px;
        font-size: 2.8rem;
    }

    .current-project-content h3 {
        font-size: 1.05rem;
    }

    .current-project-content p {
        font-size: 0.94rem;
    }
}

/* Tablet */

@media (max-width: 1000px) {

    .research-top {
        grid-template-columns: 1fr;
        gap: 50px;
        margin-bottom: 70px;
    }

    .research-process {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* Mobile */

@media (max-width: 700px) {

    .research-top {
        grid-template-columns: 1fr;
        gap: 45px;
        margin-bottom: 55px;
    }

    .research-intro {
        margin-bottom: 0;
    }

    .research-intro h1 {
        margin-bottom: 20px;
        font-size: 2.4rem;
        line-height: 1.15;
        letter-spacing: -0.5px;
    }

    .research-description {
    max-width: 100%;
    margin: 0;
    color: #4f5863;
    font-size: 1.12rem;
    line-height: 1.8;
    text-align: center !important;
    }

    .research-section-heading h2 {
        font-size: 1.45rem;
    }

    .research-process {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .research-process-item {
        padding: 17px 18px;
    }

    .research-process-item h3 {
        font-size: 1rem;
    }

    .research-area-grid {
        grid-template-columns: 1fr;
    }

}


/* ========================================
   Team
   ======================================== */
.team-page > h1 {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 30px;
    font-weight: 800;

    background: linear-gradient(
        90deg,
        #990000,
        #0d4f8b,
        #6a1b9a,
        #00796b,
        #990000
    );
    background-size: 300% auto;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    animation: teamHeadingColors 5s ease-in-out infinite;
}

@keyframes teamHeadingColors {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}

.team-page > h1 {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 60px;
    font-weight: 700;
}

.team-page > .row > .col-auto {
    position: relative;
    top: 40px;
}

.team-page > .row > .team-pi-details {
    position: relative;
    top: -15px;
}

.team-page > .row > .team-pi-details p {
    text-align: justify;
}

.team-page .row > .col-auto {
    position: relative;
    top: 20px;
}

.team-pi-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d0030;
    margin-top: -80px;
    margin-bottom: 6px;
}
.team-pi-label + h4 {
    margin-bottom: 6px !important;
    color: #18233a;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
}

.team-pi-label + h4 + .text-muted {
    margin-bottom: 12px;
    color: #4f5863 !important;
    font-size: 1.05rem;
    line-height: 1.55;
}

.team-pi-label + h4 + .text-muted + div {
    margin-bottom: 16px;
    color: #4f5863;
    font-size: 0.98rem;
    line-height: 1.6;
}

.team-pi-label + h4 + .text-muted + div a {
    color: #0d4f8b;
    font-weight: 600;
    text-decoration: none;
}

.team-pi-label + h4 + .text-muted + div a:hover {
    text-decoration: underline;
}

.team-pi-label + h4 + .text-muted + div + p {
    max-width: 850px;
    margin-top: 0 !important;
    color: #5f6670;
    font-size: 1rem;
    line-height: 1.7;
}
/* PI Contact Information */

.team-pi-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.team-pi-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4f5863;
    font-size: 0.95rem;
    line-height: 1.5;
}

.team-pi-contact-label {
    color: #18233a;
    font-weight: 700;
}

.team-pi-contact-item a {
    color: #0d4f8b;
    font-weight: 600;
    text-decoration: none;
}

.team-pi-contact-item a:hover {
    color: #990000;
    text-decoration: underline;
}

.team-pi-contact-divider {
    width: 1px;
    height: 20px;
    background: #d8dde3;
}
.team-category-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    column-gap: 15px;
    align-items: start;
}

.team-category-column {
    display: flex;
    flex-direction: column;
    gap: 35px;
    min-width: 0;
}

.team-category {
    min-width: 0;
}

.team-category-title {
    margin: 0 0 20px;
    font-size: 1.15rem;
    font-weight: 700;
}

.team-member-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.team-undergraduate-grid {
    flex-wrap: nowrap;
}

.team-member-item {
    width: 220px;
}

.team-member-card {
    width: 220px;
    height: auto;
    margin: 0;
    overflow: visible;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: 0.25s ease;
}

.team-member-card:hover {
    border-color: #c8c8c8;
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.team-member-photo {
    display: block;
    width: 220px;
    height: 270px;
    max-width: 220px;
    min-width: 220px;
    object-fit: cover;
    object-position: center;
    background: #f5f5f5;
}

.team-member-info {
    padding: 12px 20px 20px;
    text-align: center;
}

.team-member-info h5 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
}

.team-member-email {
    display: block;
    color: var(--brand);
    font-size: 0.82rem;
    text-decoration: none;
    word-break: break-word;
    text-align: center;
}

/* Keep Postdoctoral Researcher bio popup inside the page */
.team-category:first-child .team-member-bio {
    left: 0;
    transform: translate(0, 8px);
}

.team-category:first-child .team-member-about:hover .team-member-bio {
    transform: translate(0, 0);
}

.team-member-email:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}
.team-member-bio {
    text-align: justify;
}

/* Postdoc and PhD About popup */
.team-member-bio p {
    margin: 0 0 12px;
}

.team-member-bio p:last-child {
    margin-bottom: 0;
}
.team-member-about {
    position: relative;
    margin: 18px -20px -20px;
    border-top: 1px solid var(--border);
}
.team-member-photo {
    border-radius: 8px;
}

.team-member-about-trigger {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: 0;
    background: #fff;
    color: #0d4f8b;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}

.team-member-about-trigger:hover {
    background: #990000;
    color: #fff;
    box-shadow: inset 0 0 0 1px #990000;
}

/* Smooth page transition */

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

main {
    animation: pageFadeIn 0.3s ease-out;
}
/* Bio popup */

.team-member-bio {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 50;

    width: 520px;
    max-width: 520px;

    padding: 16px 18px;

    background: #fff;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);

    color: #4f5863;
    font-size: 0.9rem;
    line-height: 1.6;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, 8px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.team-member-about:hover .team-member-bio {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ========================================
   Publications
   ======================================== */
.publications-page {
    max-width: 1150px;
    min-height: 675px;
    padding-top: 42px;
    padding-bottom: 64px;
    box-sizing: border-box;
}

.publications-header h1 {
    font-weight: 750;
    margin-bottom: 35px;
}

.publications-list {
    width: 100%;
}

.publication-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.publication-number {
    flex: 0 0 28px;
    font-weight: 700;
    line-height: 1.65;
}

.publication-content {
    flex: 1;
    min-width: 0;
}

.publication-authors,
.publication-title,
.publication-details {
    margin: 0;
    line-height: 1.65;
}

.publication-authors {
    color: #333;
}

.publication-title {
    display: inline;
}

.publication-details {
    display: inline;
}

.publication-item a {
    color: #0d4f8b;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.publication-item a:hover {
    color: #990000;
    text-decoration: underline;
}
.publications-page {
    min-height: 675px;
    padding-top: 42px;
    padding-bottom: 64px;
    box-sizing: border-box;
}

.publications-header {
    margin-bottom: 34px;
}

.publications-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.publication-year {
    margin-bottom: 30px;
}

.publication-year-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.publication-year-heading span {
    width: 4px;
    height: 27px;
    background: var(--brand);
    border-radius: 3px;
}

.publication-year-heading h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
}

.publication-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.publication-card {
    display: flex;
    gap: 18px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: 0.25s ease;
}

.publication-card:hover {
    border-color: #c8c8c8;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.06);
}

.publication-number {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 26px;
    flex-shrink: 0;
    padding-top: 2px;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 700;
}

.publication-content {
    min-width: 0;
}

.publication-authors {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}



.publication-title {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.45;
}

.publication-venue {
    color: var(--muted);
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.45;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 11px;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.publication-link span {
    transition: transform 0.2s ease;
}

.publication-link:hover {
    color: var(--brand-dark);
}

.publication-link:hover span {
    transform: translateX(4px);
}

.publication-link.disabled {
    color: #8a8f95;
    cursor: default;
}

.publication-empty {
    padding: 22px 25px;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}
.publications-stay-tuned {
    margin: 70px 0;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    animation: stayTunedColor 3s ease-in-out infinite;
}

@keyframes stayTunedColor {
    0% {
        color: #990000;
    }

    50% {
        color: #0d4f8b;
    }

    100% {
        color: #990000;
    }
}

/* ========================================
   Teaching
   ======================================== */

.teaching-page {
    padding-top: 42px;
    padding-bottom: 72px;
}

.teaching-header {
    margin-bottom: 38px;
}

.teaching-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 750;
    letter-spacing: -0.5px;
    color: var(--text);
}

.teaching-courses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 1400px;
}
.teaching-course-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.72;
    text-align: justify;
}
.teaching-page {
    min-height: 675px;
    padding-top: 42px;
    padding-bottom: 72px;
    box-sizing: border-box;
}
.teaching-course-card {
    width: 100%;
    min-height: 315px;
    padding: 27px 29px 29px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 15px;
    box-sizing: border-box;
    overflow: hidden;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.teaching-course-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.teaching-course-card:hover {
    border-color: #c8c8c8;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
}

.teaching-course-card:hover::before {
    transform: scaleX(1);
}

.teaching-course-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.teaching-course-code {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 6px;
    background: #f3f4f5;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.4px;
}

.teaching-course-number {
    color: #b5b5b5;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.teaching-course-card h2 {
    max-width: 520px;
    margin: 0;
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}

.teaching-divider {
    width: 42px;
    height: 2px;
    margin: 17px 0 16px;
    background: var(--brand);
    opacity: 0.8;
}

.teaching-course-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.72;
}

/* Teaching - Mobile */

@media (max-width: 800px) {

    .teaching-page {
        padding-top: 32px;
        padding-bottom: 52px;
    }

    .teaching-header {
        margin-bottom: 30px;
    }

    .teaching-header h1 {
        font-size: 2.2rem;
    }

    .teaching-courses {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .teaching-course-card {
        min-height: auto;
        padding: 23px 22px 25px;
    }

    .teaching-course-card h2 {
        font-size: 1.2rem;
    }

    .teaching-course-card p {
        font-size: 0.92rem;
        line-height: 1.68;
    }
}


/* ========================================
   Opportunities
   ======================================== */

.opportunities-page {
    padding-top: 35px;
    padding-bottom: 64px;
}

.opportunities-header {
    max-width: 900px;
    margin-bottom: 38px;
}

.opportunities-header h1 {
    margin: 0 0 12px;
    font-size: 2.5rem;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.opportunities-header p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.opportunities-header a,
.opportunity-inline-link,
.opportunities-note a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.opportunities-header a:hover,
.opportunity-inline-link:hover,
.opportunities-note a:hover {
    color: var(--brand-dark);
}


/* Opportunities Cards */

.opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    transform: translateY(-15px);
}
.opportunities-note {
    width: 100%;
    transform: translateY(-35px);
}
.opportunity-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: stretch;
    gap: 24px;

    min-height: 185px;

    padding: 24px 26px;

    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.opportunity-card:hover {
    border-color: #c8c8c8;
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(0, 0, 0, 0.07);
}


/* Card Content */

.opportunity-content {
    min-width: 0;
    align-self: center;
}

.opportunity-content h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
}

.opportunity-content p {
    max-width: 820px;
    margin: 0;

    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.65;
}


/* Links inside text */

.opportunity-inline-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.opportunity-inline-link:hover {
    color: var(--brand-dark);
}


/* Red Action Links */

.opportunity-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-top: 13px;

    color: var(--brand);

    font-size: 0.92rem;
    font-weight: 650;

    text-decoration: none;

    transition: color 0.2s ease;
}

.opportunity-link span {
    transition: transform 0.2s ease;
}

.opportunity-link:hover {
    color: var(--brand-dark);
}

.opportunity-link:hover span {
    transform: translateX(4px);
}


/* Right-side Images */

.opportunity-image {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 135px;

    border-radius: 12px;

    overflow: hidden;
}

.opportunity-image img {
    display: block;

    width: 150px;
    height: 150px;

    object-fit: contain;

    transition: transform 0.25s ease;
}

.opportunity-card:hover .opportunity-image img {
    transform: scale(1.04);
}


/* Individual Image Backgrounds */

.opportunity-image-postdoc {
    background: #f5f7f8;
}

.opportunity-image-phd {
    background: #f7f8f2;
}

.opportunity-image-masters {
    background: #f3f7fa;
}


/* Bottom Information Box */

.opportunities-note {
    display: flex;
    align-items: center;
    gap: 12px;

    max-width: 1150px;

    margin-top: 28px;
    padding: 15px 18px;

    background: #fafafa;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.opportunities-note-icon {
    width: 26px;
    height: 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #eeeeee;
    color: var(--muted);

    font-size: 0.8rem;
    font-weight: 700;
}

.opportunities-note p {
    margin: 0;

    color: var(--muted);

    font-size: 0.9rem;
    line-height: 1.5;
}

.opportunities-note a {
    color: var(--brand);
    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 2px;
}


/* ========================================
   Opportunities - Mobile
   ======================================== */

@media (max-width: 700px) {

    .opportunities-page {
        padding-top: 32px;
        padding-bottom: 48px;
    }

    .opportunities-header {
        margin-bottom: 28px;
    }

    .opportunities-header h1 {
        font-size: 2.2rem;
    }

    .opportunity-card {
        grid-template-columns: 1fr;

        gap: 16px;

        min-height: 0;

        padding: 20px;
    }

    .opportunity-content {
        order: 1;
    }

    .opportunity-image {
        order: 2;

        width: 100%;
        min-height: 150px;
    }

    .opportunity-image img {
        width: 135px;
        height: 135px;
    }

    .opportunity-content h2 {
        font-size: 1.12rem;
    }

    .opportunities-note {
        align-items: flex-start;
    }

}


/* ========================================
   Gallery
   ======================================== */

.gallery-page {
    padding-top: 42px;
    padding-bottom: 72px;
    min-height: 660px;
    box-sizing: border-box;
}

.gallery-header {
    margin-bottom: 38px;
}

.gallery-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 750;
    letter-spacing: -0.5px;
    color: var(--text);
}

.gallery-stay-tuned {
    margin: 70px 0;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    animation: galleryStayTunedColor 3s ease-in-out infinite;
}

@keyframes galleryStayTunedColor {
    0% {
        color: #990000;
    }

    50% {
        color: #0d4f8b;
    }

    100% {
        color: #990000;
    }
}
.gallery-page {
    padding-top: 42px;
    padding-bottom: 72px;
    min-height: 675px;
    box-sizing: border-box;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: #111;
    color: #bbb;
    padding: 32px 0;
    margin-top: 0;
}

.footer a {
    color: #ddd;
}


/* ========================================
   Tablet
   ======================================== */

@media (max-width: 1000px) {

    .explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        min-height: 650px;
    }

    .hero-content {
        max-width: 850px;
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .hero-university {
        font-size: 1.7rem;
    }

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

}


/* ========================================
   Mobile
   ======================================== */

@media (max-width: 700px) {

    .navbar {
        min-height: 72px;
    }

    .navbar .container {
        min-height: 72px;
    }

    .navbar-brand {
        gap: 0;
        margin-right: 15px;
    }

    .navbar-logo {
        width: 42px;
        height: 42px;
    }

    .ntu-logo {
        width: 42px;
        height: 42px;
        margin-left: 5px;
    }

    .navbar-logo-divider {
        width: 2px;
        height: 30px;
        margin: 0 6px;
    }

    .navbar-brand strong {
        font-size: 1.85rem;
        letter-spacing: 2.5px;
    }

    .navbar-brand small {
        font-size: 0.95rem;
    }

    .navbar-collapse {
        padding-bottom: 10px;
    }

    .navbar-nav {
        gap: 0;
    }

    .navbar-nav .nav-link {
        min-height: 48px;
        padding: 0 8px !important;
    }

    .navbar-nav .nav-link::after {
        left: 8px;
        right: 8px;
    }


    /* Hero */

    .hero {
        min-height: 720px;
        background-position: center;
    }

    .hero-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(255, 255, 255, 0.96) 0%,
                rgba(255, 255, 255, 0.90) 70%,
                rgba(255, 255, 255, 0.65) 100%
            );
    }

    .hero-content {
        padding: 65px 0;
    }

    .hero-accent {
        width: 55px;
        height: 4px;
        margin-bottom: 22px;
    }

    .hero-welcome {
        font-size: 1.45rem;
        margin-bottom: 6px;
    }

    .hero h1 {
        font-size: 2.8rem;
        letter-spacing: -1px;
        line-height: 1.08;
    }

    .hero-university {
        margin-top: 16px;
        font-size: 1.35rem;
        line-height: 1.45;
    }

    .hero-description {
        max-width: 100%;
        margin-top: 22px;
        font-size: 1.05rem;
        line-height: 1.65;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 28px;
    }

    .hero-actions .btn {
        width: fit-content;
    }

    .btn-hero {
        padding: 14px 25px;
        font-size: 1rem;
    }


    /* Home */

    .home-content {
        padding-top: 48px;
        padding-bottom: 52px;
    }


    /* About */

    .about-section {
        padding-bottom: 48px;
    }

    .pi-profile {
        align-items: flex-start;
        gap: 18px;
    }

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

    .pi-title {
        font-size: 0.9rem;
    }


    /* Quick Links */

    .quick-links-section {
        padding-bottom: 48px;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .quick-link-card {
        padding: 20px;
    }


    /* Latest News */

    .latest-news-section {
        padding-bottom: 48px;
    }

    .latest-news-section .list-group-item {
        padding: 20px;
    }

    .latest-news-section .list-group-item .fw-semibold {
        font-size: 1.08rem;
    }

    .latest-news-section > a {
        width: fit-content;
    }


    /* Explore */

    .explore-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .explore-item {
        min-height: 250px;
    }


    /* Team */

    .team-category-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 40px;
    }

    .team-category-column {
        gap: 40px;
    }

    .team-member-grid {
        justify-content: center;
        gap: 20px;
    }

    .team-member-item {
        width: 220px;
    }

    .team-member-card {
        width: 220px;
        margin-left: auto;
        margin-right: auto;
    }

    .team-member-photo {
        width: 220px;
        height: 270px;
        max-width: 220px;
        min-width: 220px;
    }

    .team-member-info {
        padding: 18px;
    }

    .team-member-bio {
        width: 260px;
        max-width: calc(100vw - 60px);
    }

    .team-undergraduate-grid {
        flex-wrap: wrap;
    }


    /* Publications */

    .publications-page {
        padding-top: 32px;
        padding-bottom: 48px;
    }

    .publications-header {
        margin-bottom: 28px;
    }

    .publications-header h1 {
        font-size: 2.2rem;
    }

    .publication-card {
        gap: 12px;
        padding: 18px;
    }

    .publication-number {
        width: 22px;
    }

    .publication-title {
        font-size: 1rem;
    }


    /* Opportunities */

    .opportunities-page {
        padding-top: 32px;
        padding-bottom: 48px;
    }

    .opportunities-header {
        margin-bottom: 28px;
    }

    .opportunities-header h1 {
        font-size: 2.2rem;
    }

    .opportunity-card {
        gap: 15px;
        padding: 20px;
    }

    .opportunity-icon {
        width: 42px;
        height: 42px;
        font-size: 0.78rem;
    }

    .opportunity-content h2 {
        font-size: 1.12rem;
    }

    .opportunities-note {
        align-items: flex-start;
    }

}
/* ========================================
   Small Phones (≤480px)
   ======================================== */
@media (max-width: 480px) {

    /* Navbar */
    .navbar-brand strong { font-size: 1.5rem; letter-spacing: 1.5px; }
    .navbar-brand small { font-size: 0.8rem; }

    /* Hero */
    .hero h1 { font-size: 2.2rem; }
    .hero-welcome { font-size: 1.2rem; }
    .hero-university { font-size: 1.1rem; }
    .hero-description { font-size: 0.98rem; }
    .hero-actions .btn,
    .btn-hero { width: 100%; justify-content: center; }

    /* About / Team PI — reset the desktop positioning hacks */
    .pi-profile { flex-direction: column; align-items: flex-start; }
    .avatar { width: 90px; height: 90px; }

    .team-pi-label,
    .team-page > .row > .col-auto,
    .team-page > .row > .team-pi-details {
        margin-top: 0;
        top: 0;
    }

    .team-pi-contact { flex-direction: column; align-items: flex-start; gap: 8px; }
    .team-pi-contact-divider { display: none; }

    /* Research */
    .research-intro h1 { font-size: 2rem; }
    .research-area-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .research-area-number { font-size: 3rem; }

    /* Publications / Teaching / Opportunities / Gallery headers */
    .publications-header h1,
    .teaching-header h1,
    .opportunities-header h1,
    .gallery-header h1 { font-size: 1.9rem; }

    .publication-card,
    .current-project-card { flex-direction: column; }
    .publication-number,
    .current-project-number { width: auto; }
}
.team-member-about.bio-open .team-member-bio {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
.team-page .team-pi-details h4.mb-0 {
    font-weight: 700 !important;
}
.news-item {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ========================================
   Hero slideshow (right side)
   ======================================== */

.hero {
    background-image: none;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero-content {
    flex: 1 1 0;
    min-width: 0;
}

.hero-slideshow {
    position: relative;
    flex: 0 0 38%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(16, 33, 61, 0.22);
    background: #e9eef5;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.9s ease-in-out;
}

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

@media (max-width: 991px) {
    .hero-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: 50px;
    }
    .hero-content {
        padding-bottom: 40px;
    }
    .hero-slideshow {
        flex: none;
        width: 100%;
    }
}

.hero-slideshow {
    flex: 0 0 30%;
    aspect-ratio: 3 / 2;
    background: #fff;
}

.hero-slide {
    object-fit: contain;
}


/* ========================================
   Responsive hero (fits any screen size)
   ======================================== */

.hero-inner {
    display: flex;
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
}

.hero-content {
    flex: 1 1 0;
    min-width: 0;
    padding: clamp(40px, 7vw, 95px) 0;
}

.hero-slideshow {
    position: relative;
    flex: 0 1 clamp(260px, 32vw, 520px);
    width: clamp(260px, 32vw, 520px);
    aspect-ratio: 3 / 2;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 45px rgba(16, 33, 61, 0.22);
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.9s ease-in-out;
}

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

/* Text scales smoothly with the screen width */
.hero-welcome     { font-size: clamp(1.2rem, 2.2vw, 2rem); }
.hero h1          { font-size: clamp(2.4rem, 5.5vw, 4.7rem); letter-spacing: -1px; }
.hero-university  { font-size: clamp(1.1rem, 2.1vw, 2rem); }
.hero-description { font-size: clamp(1rem, 1.4vw, 1.3rem); max-width: 100%; }

/* Tablets and phones: photos move below the text */
@media (max-width: 991px) {
    .hero-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: 45px;
    }

    .hero-content {
        padding-bottom: 32px;
    }

    .hero-slideshow {
        flex: none;
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }
}
