/* ================= RESET ================= */

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

/* ================= BASE ================= */

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fb;
    color: #1e293b;
    line-height: 1.7;
}

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

/* ================= HEADER ================= */

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: auto;
    padding: 16px 24px;

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

    position: relative;
}

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

.lab-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    color: #475569;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563eb;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: #2563eb;
}

/* ================= EXTERNAL LAB LINK ================= */
.lab-nav-link {
    color: #0063a6 !important; /* Forces the link to be blue */
    font-weight: 600 !important;
    border-left: 2px solid #e2e8f0; /* Adds a subtle divider line */
    padding-left: 20px; /* Spaces it out from the Gallery link */
}

/* Removes the divider line on mobile so it looks clean in the dropdown */
@media(max-width: 850px) {
    .lab-nav-link {
        border-left: none;
        padding-left: 0;
    }
}
/* ================= MOBILE NAV ================= */

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: #2563eb;
}

@media(max-width:850px) {

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 80px;
        right: 24px;

        width: 220px;

        background: white;

        flex-direction: column;
        align-items: flex-start;

        padding: 20px;
        border-radius: 16px;

        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

        gap: 18px;

        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;

        transition: all 0.3s ease;
    }

    .nav-links.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

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

section {
    min-height: auto;
    padding: 120px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* .section-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f172a;
}

.section-subtitle {
    color: #64748b;
    margin-bottom: 40px;
} */

.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f172a;
    text-align: center; /* Added to center text */
}

.section-subtitle {
    color: #64748b;
    margin-bottom: 40px;
    text-align: center; /* Added to center text */
}

/* ================= HERO ================= */

#home {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}


.hero-content {
    max-width: 850px;
    margin: 0 auto 50px auto; /* 'auto' centers the container on all pages */

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 10px 0;
    text-align: center;
}

.hero-role {
    color: #2563eb;
    font-weight: 600;
    font-size: 1.3rem;
}

.hero-desc {
    max-width: 700px;
    color: #475569;
    margin: 20px auto 35px;
}

.hero-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
}


/* ================= BUTTONS ================= */

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-outline {
    border: 1px solid #2563eb;
    color: #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* ================= PROFILE IMAGE ================= */

.hero-image {
    margin: 10px 0 35px;
}

.hero-image img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* ================= CARDS ================= */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card,
.research-item,
.publication,
.gallery-event {
    background: white;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* ================= RESEARCH ATTACHMENTS ================= */

.research-attachments {
    display: flex;
    gap: 15px;
    margin-top: 25px; /* Space above the buttons */
    margin-bottom: 35px; /* Space below the buttons, before the images */
    flex-wrap: wrap; /* Keeps them neat on mobile screens */
}

/* Minor tweak so the buttons don't stretch too wide on desktop */
.research-attachments .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ================= RESEARCH IMAGES & CAPTIONS ================= */

.research-images {
    display: flex;
    gap: 25px; /* Slightly wider gap to accommodate text */
    margin-top: 30px;
    justify-content: center;
    flex-wrap: wrap; 
}

/* The figure container now controls the sizing */
.research-figure {
    flex: 1; 
    min-width: 250px; 
    max-width: 450px; 
    margin: 0; /* Resets default browser margins */
    display: flex;
    flex-direction: column;
    gap: 12px; /* Space between the image and the text */
}

.research-figure img {
    width: 100%; /* Forces the image to fill the figure container */
    height: auto;
    border-radius: 12px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); 
    object-fit: cover;
    transition: transform 0.3s ease;
}

.research-figure img:hover {
    transform: scale(1.02); 
}

/* Styling for the caption text */
.research-figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b; /* A soft, professional gray */
    font-style: italic; /* Classic academic caption styling */
    line-height: 1.5;
}
/* ================= PUBLICATIONS ================= */

.publication h3 {
    margin-bottom: 20px;
    color: #0f172a;
}

.publication-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.publication-content p {
    line-height: 1.8;
    color: #334155;
}

.publication-content.disclaimer-text p {
    color: #8b6363;
}

/* ================= LISTS ================= */

.card ul,
.coursework-list,
.publication-list {
    margin-left: 20px;
}

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

.publication-list li {
    font-family: "Times New Roman", Times, serif;
    line-height: 1.9;
    color: #334155;
}

/* ================= LINKS ================= */

.card a,
.pub-link,
.course-link {
    color: #2563eb;
    transition: all 0.3s ease;
}

.card a:hover,
.pub-link:hover,
.course-link:hover {
    text-decoration: underline;
}

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

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: #2563eb;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #1d4ed8;
    transform: translateX(5px);
}

/* ================= GALLERY ================= */

.event-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.event-gallery img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* ================= IMAGE OVERLAY ================= */

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.gallery-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: all 0.4s ease;
}

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

.image-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-image:hover .image-overlay {
    opacity: 1;
}

.image-overlay p {
    color: white;
    font-size: 0.95rem;
}

/* ================= IMAGE POPUP ================= */

#image-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    padding: 30px;
}

#popup-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* ================= EDUCATION ================= */
.education-title {
    text-align: center;
    margin-bottom: 30px;
}

.education-item {
    padding: 18px 0;
    border-bottom: 1px solid #e2e8f0;
}

.education-item:last-child {
    border-bottom: none;
}

.education-item h3 {
    color: #0f172a;
    margin-bottom: 6px;
}

.education-item p {
    color: #475569;
}

.education-item span {
    color: #64748b;
    font-size: 0.95rem;
}


/* ================= FOOTER ================= */
/* ================= FOOTER ================= */

.site-footer {
    background: #e4e4e4;
    color: #05305c;
    padding: 2.5rem 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* --- Left Column Layout --- */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Creates space between the text block and social icons */
}

.footer-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.footer-subtitle {
    opacity: 0.85;
}

/* --- Social Icons --- */
.footer-socials {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: flex-start; /* Aligns icons to the left under the text */
}

.footer-socials a {
    color: #05305c;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: #2563eb;
    transform: translateY(-3px);
}

/* --- Right Column Layout --- */
.institute-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.institute-logo:hover {
    transform: scale(1.05); /* Gives a nice little pop when hovering over the link */
}

/* --- Responsive Layout for Phones --- */
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .footer-left {
        align-items: center; /* Centers the text block on mobile */
    }

    .footer-socials {
        justify-content: center; /* Centers the icons on mobile */
    }

    .institute-logo {
        height: 50px; /* Bumps up the size slightly for mobile legibility */
    }
}

/* ================= RESPONSIVE ================= */

@media(max-width:900px) {

    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: 2.8rem;
    }

    .hero-image img {
        width: 220px;
        height: 220px;
    }

    .institute-logo {
        height: 50px;
        width: auto;
        object-fit: contain;
    }
}

@media(max-width:600px) {

    .hero-name {
        font-size: 2.2rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* ================= NEWS SECTION (RESPONSIVE FIX) ================= */

.news-section {
    padding: 80px 20px;
    background: #ffffff;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 10px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
}

.section-header p {
    color: #64748b;
    margin-top: 8px;
}

/* GRID FIX */
.news-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: auto;
}

/* CARD */
.news-card {
    background: #f5f7fb;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: 0.3s ease;
}

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

/* TEXT */
.news-date {
    font-size: 0.85rem;
    color: #2563eb;
    font-weight: 600;
}

.news-card h3 {
    margin: 10px 0;
}

.news-card p {
    color: #475569;
    font-size: 0.95rem;
}

/* ================= RESPONSIVE BREAKPOINTS ================= */

@media (max-width: 992px) {
    .news-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .section-header h2 {
        font-size: 1.6rem;
    }

    .news-section {
        padding: 50px 15px;
    }
}

/* ================= NEWS ATTACHMENTS ================= */

.news-attachments {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* PDF / link style */
.attachment-link {
    display: inline-block;
    font-size: 0.9rem;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

.attachment-link:hover {
    text-decoration: underline;
}

/* Image preview */
.news-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: 0.3s ease;
}

.news-img:hover {
    transform: scale(1.02);
}

@media (max-width: 600px) {
    .news-img {
        max-height: 140px;
    }
}