/* style.css - DEEP CYBER THEME (Final Stacked Layout) */

:root {
    /* --- COLOR PALETTE --- */
    /* Secondary Accent (Orange) */
    --vibrant-coral: #FF9100;

    /* Primary Accent (Cyan/Neon) */
    --golden-pollen: #00F0FF;
    --yellow-green: #00F0FF;

    /* Muted Text (Blue-Grey) */
    --steel-blue: #B0BEC5;

    /* Main Text (White) */
    --dusty-grape: #FFFFFF;

    /* Backgrounds */
    --bg-page: #03121A;
    /* Deepest Blue/Black */
    --bg-card: #0A2633;
    /* Slightly lighter for cards */
    --bg-header: rgba(3, 18, 26, 0.95);
    /* Semi-transparent Header */

    /* Variables mapping */
    --text-main: var(--dusty-grape);
    --text-muted: var(--steel-blue);
    --border-color: #546E7A;
}

/* --- UPDATED: PREVENTS PAGE SHAKING/JUMPING --- */
html {
    /* This tells the browser to reserve space for the scrollbar 
       even when the modal is open, stopping the layout shift. */
    scrollbar-gutter: stable;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* =========================================
   HEADER STYLES
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: var(--bg-header);
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 4px solid var(--vibrant-coral);

    /* Layout: Vertical Stack (Top Row + Nav Strip) */
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- TOP ROW --- */
.header-top-row {
    display: flex;
    justify-content: space-between;
    /* 'stretch' makes columns full height, needed for bottom alignment */
    align-items: stretch;
    width: 100%;
    padding: 15px 4%;

    /* Background Image with Dark Overlay */
    background: linear-gradient(rgba(3, 18, 26, 0), rgba(3, 18, 26, 0)),
        url('images/cam.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    max-width: 100%;
    margin: 0 auto;
    transition: all 0.4s ease;
}

/* --- LEFT GROUP: Vertical Stack (Top Logo + Bottom Logo) --- */
.header-left-group {
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    justify-content: space-between;
    /* Push Top logo up, Bottom logo down */
    align-items: flex-start;
    /* Align left */
    flex: 1;
    padding-top: 5px;
}

/* 1. TOP-LEFT LOGO (Larger & Clickable) */
.header-top-logo a {
    display: block;
    transition: transform 0.3s ease;
}

.header-top-logo a:hover {
    transform: scale(1.05);
}

/* REPLACE THE EXISTING .header-top-logo img BLOCK WITH THIS */

/* REPLACE THE EXISTING .header-top-logo img BLOCK WITH THIS */

.header-top-logo img {
    height: 270px;
    width: auto;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 20px #00F0FF) drop-shadow(0 0 50px rgba(0, 240, 255, 0.7));
    transform: translate(125px, 0px);
}

/* Optional: Make it pulse slightly when hovered for extra realism */
.header-top-logo img:hover {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0)) drop-shadow(0 0 20px #00F0FF) drop-shadow(0 0 60px rgba(0, 240, 255, 0));
    transform: translate(130px, 5px) scale(1.05);
}

/* 2. BOTTOM-LEFT IITB LOGO (Smaller) */
/* REPLACE THE EXISTING .header-iitb-logo img BLOCK WITH THIS */

.header-iitb-logo img {
    height: 90px;
    width: auto;
    transition: height 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));

    /* --- MOVE CONTROL --- */
    /* 1st Value (X): Negative = Left, Positive = Right */
    /* 2nd Value (Y): Negative = Up,   Positive = Down */
    transform: translate(-60px, 10px);
}


/* --- RIGHT GROUP: Profile Cluster (Right Alignment) --- */
.header-right-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align everything to right */
    justify-content: flex-start;
    /* Start from top */
    gap: 10px;
    flex: 1;
}

/* Row 1: Socials + Photo */
.profile-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* BIG PROFILE IMAGE */
.profile-img {
    height: 300px;
    /* Big Photo */
    width: auto;
    border-radius: 15px;
    border: 4px solid var(--golden-pollen);
    object-fit: cover;
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

/* SOCIAL ICONS (Vertical Column) */
.social-icons {
    display: flex;
    flex-direction: column;
    /* Vertical Stack */
    gap: 12px;
}

.social-icons a {
    color: var(--golden-pollen);
    font-size: 1.8rem;
    transition: 0.3s;
    text-decoration: none;
    display: flex;
    justify-content: center;
}

.social-icons a:hover {
    color: var(--vibrant-coral);
    transform: scale(1.3) translateX(-3px);
}

/* Row 2: Text Info (Stacked Below Photo) */
.text-info {
    text-align: right;
    margin-top: 5px;
}

.name-wrapper h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--dusty-grape);
    margin: 0;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.name-wrapper span {
    color: var(--vibrant-coral);
}


.details-box {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 600;
}

/* --- BOTTOM ROW: Nav Strip --- */
.header-nav-strip {
    width: 100%;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    padding: 10px 0;
    transition: all 0.4s ease;
}

.nav-menu {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.15rem;
    padding: 8px 25px;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--golden-pollen);
    border: 1px solid var(--golden-pollen);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* =========================================
   SHRUNK STATE (Scrolling)
   ========================================= */

header.shrunk .header-top-row {
    padding: 0px 4%;
    align-items: center;
    ;
}

/* Shrink Top Logo */
header.shrunk .header-top-logo img {
    height: 90px;
    transform: translate(0, 0);
    /* Reset position */
    filter: drop-shadow(0 0 50px rgba(0, 240, 255, 0));
}

header.shrunk .header-right-group {
    flex-direction: row-reverse;
    align-items: center;
    gap: 15px;
}

/* Shrink Profile Image */
header.shrunk .profile-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    border-width: 2px;
    box-shadow: none;
    margin: 0;
}

/* Hide Extra Details */
header.shrunk .header-iitb-logo,
header.shrunk .details-box,
header.shrunk .social-icons {
    display: none;
}

header.shrunk .text-info {
    margin: 0;
    text-align: right;
    /* Text aligns towards the photo */
}

/* Smaller Name */
header.shrunk .name-wrapper h1 {
    font-size: 1.4rem;
    margin: 0;
    text-shadow: none;
}


/* --- NAV STRIP --- */
header.shrunk .header-nav-strip {
    padding: 0;
    background-color: var(--bg-header);
    /* Seamless look */
    border-top: none;
}

header.shrunk .nav-link {
    font-size: 1.5rem;
    padding: 8px 15px;
}

/* =========================================
   MAIN CONTENT & SPACER
   ========================================= */
/* Spacer height = Header initial height + padding */
.spacer-div {
    height: 510.8px;
}

.main-content {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    margin-top: 100px;
}

header.shrunk .main-content {
    margin-top: 200px;
}

.main-title {
    font-size: 3.5rem;
    color: var(--dusty-grape);
    margin-bottom: 30px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.typewriter-box {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 15px 40px;
    border-radius: 50px;
    border: 2px solid var(--golden-pollen);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
    font-weight: 700;
}

#typing {
    border-right: 3px solid var(--vibrant-coral);
    animation: blink 0.7s infinite;
}

.intro-text {
    margin-top: 50px;
    max-width: 800px;
    font-size: 1.2rem;
    color: var(--text-main);
}

footer {
    background: var(--bg-card);
    padding: 30px;
    text-align: center;
    border-top: 5px solid var(--yellow-green);
    margin-top: 60px;
    color: var(--text-main);
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}


/* --- SLIDER STYLES --- */
.slider-container {
    max-width: 900px;
    /* Adjust width as needed */
    position: relative;
    margin: 40px auto;
    /* Centers the slider */
    overflow: hidden;
    /* Hides images that are off-screen */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.slider-wrapper {
    display: flex;
    /* Puts images in a row */
    transition: transform 0.5s ease-in-out;
    /* Smooth sliding effect */
    width: 100%;
}

.slider-wrapper img {
    width: 100%;
    /* Makes image fill the container */
    flex-shrink: 0;
    object-fit: cover;
    height: 450px;
    /* Fixed height for consistency */
}

/* Next & Previous Buttons */
/* Next & Previous Buttons */
.prev-btn,
.next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    z-index: 2;
}

/* Position the "Previous" button to the left */
.prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

/* Position the "Next" button to the right */
.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* Hover effects */
.prev-btn:hover,
.next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* The dots/circles */
.dots-container {
    text-align: center;
    position: absolute;
    bottom: 15px;
    width: 100%;
    z-index: 2;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active,
.dot:hover {
    background-color: #fff;
    transform: scale(1.2);
}


/* =========================================
   "ABOUT ME" / INNER PAGE STYLES
   ========================================= */

.site-container {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    margin-top: 60px;
}

.page-main-title h1 {
    color: var(--dusty-grape);
    text-align: center;
    font-size: 3rem;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.page-main-title p {
    color: var(--vibrant-coral);
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

/* --- Section Headings (Cyber Style) --- */
.section-heading {
    color: var(--golden-pollen);
    font-size: 1.8rem;
    margin-bottom: 25px;
    margin-top: 50px;
    border-left: 5px solid var(--vibrant-coral);
    padding-left: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, rgba(10, 38, 51, 0.8), transparent);
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 0 10px 10px 0;
}

/* --- Info & Data Cards --- */
.info-card,
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.info-card:hover,
.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--golden-pollen);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.15);
}

/* Override JS inline colors to match theme */
.info-card p,
.info-card li {
    color: var(--text-muted) !important;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* --- Table Styles (Data Grids) --- */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--vibrant-coral);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

td {
    padding: 17px;
    border-bottom: 1px solid rgba(84, 110, 122, 0.3);
    color: var(--text-muted);
    vertical-align: top;
}

/* Make first column bold/white */
td:first-child {
    color: var(--dusty-grape);
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(0, 240, 255, 0.05);
    /* Subtle cyber hover row */
}

/* Mobile Response */
/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 900px) {
    .header-top-row {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .header-left-group {
        align-items: center;
        justify-content: center;
        flex-direction: row;
        gap: 20px;
    }

    .header-top-logo img {
        height: 70px;
    }

    .header-iitb-logo img {
        height: 50px;
    }

    .header-right-group {
        align-items: center;
        width: 100%;
    }

    .profile-row {
        flex-direction: row;
        justify-content: center;
    }

    .social-icons {
        flex-direction: row;
    }

    .text-info {
        text-align: center;
        margin-top: 15px;
    }

    .spacer-div {
        height: 650px;
    }

    .main-title {
        font-size: 2.2rem;
    }

    /* --- ADDED FOR ABOUT PAGE MOBILE --- */
    .page-main-title h1 {
        font-size: 2.2rem;
    }

    .info-card,
    .about-card {
        padding: 20px;
        overflow-x: auto;
        /* Allows tables to scroll horizontally on phones */
    }
}

/* Ensure the page is always tall enough to scroll, even with little content */
body {
    min-height: 120vh;
    /* Forces the page to be 20% taller than the screen */
}

.section-heading i {
    margin-right: 15px;
    /* Space between icon and text */
    color: var(--vibrant-coral);
    /* Make icon orange */
}

/* =========================================
   PROJECTS TIMELINE STYLES (Advanced Interaction)
   ========================================= */

.timeline-wrapper {
    position: relative;
    padding: 20px 0;
    margin-top: 40px;
}

/* The Vertical Neon Line */
.timeline-line {
    position: absolute;
    left: -10px;
    top: 25px;
    bottom: 50px;
    width: 4px;
    background: var(--border-color);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 60px;
}

/* The Glowing Year Marker */
.timeline-marker {
    position: absolute;
    left: -60px;
    top: 0px;
    width: 100px;
    height: 100px;
    background: var(--bg-card);
    border: 3px solid var(--vibrant-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--golden-pollen);
    font-weight: 800;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 0 0 15px rgba(255, 145, 0, 0.4);
}

/* --- MAIN CARD CONTAINER --- */
.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    position: relative;

    /* 1. Card Lift & Scale Transition */
    transform-origin: center;
    transition:
        transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        /* Bouncy Effect */
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}

.timeline-card::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--border-color);
    transition: border-right-color 0.4s ease;
}

/* --- CARD HOVER STATE --- */
.timeline-card:hover {
    /* Lift up 8px and scale slightly */
    transform: translateY(-8px) scale(1.02);

    /* Soft Violet Glow */
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.25),
        0 0 20px rgba(138, 43, 226, 0.1);

    /* Border Change */
    border-color: var(--steel-blue);
}

.timeline-card:hover::before {
    border-right-color: var(--steel-blue);
}

/* --- INTERNAL LOGO INTERACTION --- */
.card-logos img {
    height: 40px;
    /* Enforce consistent height */
    width: auto;
    margin-bottom: 15px;
    filter: grayscale(100%);
    /* Start Black & White */
    opacity: 0.8;
    transition: all 0.4s ease;
    transform-origin: left center;
}

/* On Card Hover: Colorize and Zoom Logo */
.timeline-card:hover .card-logos img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.project-title {
    font-size: 1.4rem;
    color: var(--dusty-grape);
    margin: 0;
    font-weight: 700;
}

.project-tag {
    background: rgba(0, 240, 255, 0.1);
    color: var(--golden-pollen);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--golden-pollen);
    font-weight: 600;
}

.project-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--vibrant-coral);
    margin-bottom: 15px;
    font-weight: 600;
}

/* --- DESCRIPTION TEXT EXPANSION --- */
.project-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;

    /* Truncation Logic */
    max-height: 80px;
    /* Start short (approx 3 lines) */
    overflow: hidden;
    position: relative;

    /* Smooth Expansion */
    transition: max-height 0.6s ease;
}

/* Gradient Fade Overlay */
.project-desc::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    transition: opacity 0.6s ease;
    pointer-events: none;
}

/* On Card Hover: Expand Text & Remove Gradient */
.timeline-card:hover .project-desc {
    max-height: 500px;
    /* Arbitrary large height to allow full expansion */
}

.timeline-card:hover .project-desc::after {
    opacity: 0;
    /* Fade out the overlay */
}

/* --- LINK INTERACTION (Individual) --- */
.project-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--golden-pollen);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.project-link i {
    font-size: 0.8rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

/* Hovering the LINK itself (overrides card styles) */
.project-link:hover {
    color: var(--vibrant-coral);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.project-link:hover i {
    transform: translateX(3px) translateY(-3px);
    /* Little arrow fly animation */
}

/* =========================================
   RESEARCH GROUP STYLES (Cyber Theme)
   ========================================= */

.page-header {
    text-align: center;
    margin: 60px 0px 40px 0px;
}

.page-header h1 {
    font-size: 3rem;
    color: var(--dusty-grape);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.page-header p {
    color: var(--vibrant-coral);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Sub Nav Pills --- */

/* --- Sub Nav Pills (Sticky Update) --- */
.sub-nav-wrapper {
    /* 1. Make it Sticky */
    position: -webkit-sticky;
    /* For Safari */
    position: sticky;

    /* 2. Offset (Matches the height of your fixed Header) */
    top: 163px;

    /* 3. Layering & Visuals */
    z-index: 1000;
    /* Sit above content, but below Header (z-index 2000) */
    background: var(--bg-page);
    /* Solid background to hide scrolling content */
    border: 1px solid var(--vibrant-coral);
    /* Cyber border line */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    /* Shadow for depth */

    /* 4. Layout */
    display: flex;
    justify-content: center;
    padding: 15px 0;
    margin-bottom: 50px;
    transition: all 0.3s ease;
}

.sub-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.nav-pill:hover,
.nav-pill.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--golden-pollen);
    border-color: var(--golden-pollen);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* --- Section Headers --- */
.category-section {
    margin-bottom: 80px;
    scroll-margin-top: 270px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 20px;
}

.category-title {
    font-size: 2rem;
    color: var(--golden-pollen);
}

.section-filter-bar button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
    transition: all 0.3s;
}

.section-filter-bar button.active,
.section-filter-bar button:hover {
    background: var(--vibrant-coral);
    color: #000;
    border-color: var(--vibrant-coral);
    font-weight: 700;
}

/* --- Grid & Cards --- */
.scholar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.scholar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.scholar-card:hover {
    transform: translateY(-10px);
    border-color: var(--golden-pollen);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.15);
}

.image-wrapper {
    height: 250px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.scholar-card:hover img {
    transform: scale(1.1);
}

/* Badges */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    text-transform: uppercase;
}

.badge-ongoing {
    background: var(--golden-pollen);
    color: #000;
    box-shadow: 0 0 10px var(--golden-pollen);
}

.badge-alumni {
    background: var(--steel-blue);
    color: #fff;
}

.scholar-info {
    padding: 20px;
    text-align: center;
}

.scholar-info h3 {
    color: var(--dusty-grape);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.year-text {
    color: var(--vibrant-coral);
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--golden-pollen);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    /* Keep vertical scroll */
    overflow-x: hidden;
    /* REMOVES LEFT-RIGHT SCROLL */
    position: relative;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.3);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--golden-pollen);
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
}

.modal-body {
    display: flex;
    flex-direction: row;
}

.modal-left {
    width: 35%;
    background: rgba(0, 0, 0, 0.2);
    padding: 40px 20px;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.modal-left img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--vibrant-coral);
    margin-bottom: 20px;
    object-fit: cover;
}

.modal-right {
    width: 65%;
    padding: 40px;
}

/* Styling for the Role Tag in Modal */
.role-tag {
    display: inline-block;
    background: rgba(0, 240, 255, 0.1);
    /* Subtle Cyan Tint */
    color: var(--golden-pollen);
    /* Neon Cyan Text */
    border: 1px solid var(--golden-pollen);
    padding: 6px 18px;
    border-radius: 50px;
    /* Pill Shape */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    /* Spacing below the box */
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
    /* Soft Glow */
}

.social-item {
    margin: 12px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    /* Vertically center icon and text */
}

.social-item a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 10px;
    transition: 0.3s;
    /* FIX FOR SCROLLING: */
    word-break: break-word;
    /* Breaks long URLs to next line */
    overflow-wrap: anywhere;
    /* Ensures text stays inside the box */
    display: inline-block;
    /* Helps wrapping behave correctly */
}

.social-item a:hover {
    color: var(--golden-pollen);
}

.social-item i {
    width: 30px;
    /* Fixed width for perfect alignment */
    text-align: center;
    /* Center the icon inside that width */
    color: var(--vibrant-coral);
    /* Icon Color */
    font-size: 1.1rem;
    /* Slightly larger icon */
    margin-right: 5px;
}

.social-icons i:hover {
    color: var(--golden-pollen);
    transform: scale(1.2);
    transition: transform 0.3s ease;
    margin-right: 5px;


}

.info-block {
    margin-bottom: 20px;
}

.info-block h4 {
    color: var(--vibrant-coral);
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* FIXED CLOSE BUTTON */
.close-btn {
    position: sticky;
    /* Keeps it visible even when scrolling */
    top: 10px;
    float: right;
    /* Forces it to the right corner */
    margin-right: -10px;
    /* Adjust alignment edge */
    margin-top: -10px;
    /* Adjust alignment top */
    color: var(--golden-pollen);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3001;
    /* Higher than modal content */
    background: var(--bg-card);
    /* Prevents text from showing behind it */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-align: center;
    transition: transform 0.3s ease;
}

.close-btn:hover {
    color: var(--vibrant-coral);
    transform: rotate(90deg);
    /* Nice interaction effect */
}

/* Mobile Modal */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-left,
    .modal-right {
        width: 100%;
        border-right: none;
        box-sizing: border-box;
        /* Ensures padding doesn't add width */
    }

    .modal-left {
        border-bottom: 1px solid var(--border-color);
    }
}

/* =========================================
   PUBLICATIONS PAGE STYLES
   ========================================= */

/* --- Stats Dashboard --- */
.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    flex-wrap: wrap;
    gap: 20px;
}

.stat-box {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--golden-pollen);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-weight: 600;
}

.vertical-divider {
    width: 1px;
    height: 50px;
    background: var(--border-color);
    opacity: 0.5;
}

/* --- Search & Filters --- */
.filter-section {
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vibrant-coral);
}

#searchInput {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--golden-pollen);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.year-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.year-btn:hover,
.year-btn.active {
    background: var(--vibrant-coral);
    color: #000;
    border-color: var(--vibrant-coral);
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.3);
}

/* --- Results List --- */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pub-row {
    background: var(--bg-card);
    border-left: 4px solid var(--border-color);
    padding: 25px;
    border-radius: 0 10px 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.pub-row:hover {
    transform: translateX(5px) scale(1.1);
    border-color: var(--golden-pollen);
    border-left-color: var(--golden-pollen);
    background: rgba(10, 38, 51, 0.9);
}

.pub-details {
    flex: 1;
    padding-right: 20px;
}

.pub-link h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s;
}

.pub-link:hover h3 {
    transform: scale(1.01);
    color: var(--golden-pollen);
}

.pub-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.pub-journal {
    color: var(--vibrant-coral);
    font-style: italic;
    font-weight: 600;
}

.pub-year {
    font-weight: 700;
    color: var(--text-main);
}

.pub-citations {
    text-align: center;
    min-width: 60px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
}

.cite-count {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--golden-pollen);
}

.cite-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .stats-card {
        flex-direction: column;
        gap: 30px;
    }

    .vertical-divider {
        width: 50%;
        height: 1px;
    }

    /* Horizontal on mobile */
    .pub-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .pub-citations {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 15px;
    }

    .cite-count {
        font-size: 1.1rem;
    }
}

/* =========================================
   GALLERY PAGE STYLES
   ========================================= */

/* --- Page Title --- */
.header-skeleton {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
}

.header-skeleton h1 {
    font-size: 3rem;
    color: var(--dusty-grape);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.header-skeleton p {
    color: var(--vibrant-coral);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Sticky Filter Bar --- */
.filter-container {
    position: -webkit-sticky;
    position: sticky;
    top: 163px;
    z-index: 900;
    background: var(--bg-page);
    padding: 15px 0;
    border: 1px solid var(--vibrant-coral);
    /* UPDATED: Changed to border-bottom for cleaner look */
    margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

.filter-skeleton {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-item {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.filter-item:hover,
.filter-item.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--golden-pollen);
    border-color: var(--golden-pollen);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.filter-item i {
    margin-right: 5px;
}

/* --- Gallery Sections --- */
.gallery-section {
    margin-bottom: 80px;
    scroll-margin-top: 300px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* --- Cyber Photo Card (Pop-Out Logic) --- */
.card-skeleton {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: all 0.3s ease;

    /* UPDATED: Essential for stacking context */
    position: relative;

    /* UPDATED: Removed 'overflow: hidden' so the image can expand outside */
    /* overflow: hidden; <--- DELETED */
}

.card-skeleton:hover {
    /* UPDATED: Z-index ensures the expanded card sits on top of neighbors */
    z-index: 50;
    border-color: var(--golden-pollen);
    /* Note: transform removed here to prevent layout shift during pop-out */
}

.media-placeholder {
    height: 220px;
    width: 100%;

    /* UPDATED: Anchors the absolute image */
    position: relative;

    background: #000;
    /* Fallback color */
    border-radius: 15px 15px 0 0;
    /* Keep top corners rounded initially */
}

.media-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px 14px 0 0;

    /* UPDATED: Positioning and Animation for Pop-Out */
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Bouncy smooth transition */
    z-index: 10;
}

/* UPDATED: THE POP-OUT INTERACTION */
.card-skeleton:hover .media-placeholder img {
    /* 1. Break Boundaries (Wider than card) */
    width: 110%;
    left: -5%;

    /* 2. Reveal Full Height */
    height: auto;
    min-height: 240px;
    /* Ensures it grows at least a bit */

    /* 3. Lift Up */
    top: -20px;

    /* 4. Visuals (Glow & Shadow) */
    border-radius: 10px;
    box-shadow:
        0 0 0 2px var(--golden-pollen),
        /* Glowing Border */
        0 20px 50px rgba(0, 0, 0, 0.8);
    /* Deep Shadow */

    z-index: 100;
}

/* UPDATED: Hidden because it interferes with the clear view of the photo */
.overlay-icon {
    display: none;
}

.text-placeholder {
    padding: 20px;

    /* UPDATED: Ensure text has background and sits correctly */
    background: var(--bg-card);
    position: relative;
    z-index: 20;
    border-radius: 0 0 15px 15px;
}

.text-placeholder h3 {
    color: var(--dusty-grape);
    font-size: 1.2rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.text-placeholder p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}


/* =========================================
   CONTACT PAGE STYLES
   ========================================= */

.contact-header {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 40px;
}

.contact-header h1 {
    font-size: 3rem;
    color: var(--dusty-grape);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.contact-header p {
    color: var(--vibrant-coral);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- The Glass Card --- */
.contact-glass-card {
    display: flex;
    background: rgba(10, 38, 51, 0.8);
    /* Dark Semi-transparent */
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    min-height: 600px;
}

/* --- Left Sidebar --- */
.info-sidebar {
    width: 35%;
    background: linear-gradient(135deg, var(--bg-card), #051a24);
    padding: 40px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-inner h2 {
    color: var(--golden-pollen);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.link-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 1rem;
}

.link-item i {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    width: 40px;
    height: 40px;
    background: rgba(255, 145, 0, 0.1);
    color: var(--vibrant-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
    transition: all 0.3s;
}

.link-item:hover i {
    background: var(--vibrant-coral);
    color: #000;
    transform: scale(1.3);
}

/* 1. Address (Green) */
.link-item:nth-child(1):hover i {
    background: #2ecc71;
    color: white;
}

.link-item:nth-child(1):hover a {
    color: #27ae60;
}

/* 2. Phone (Blue) */
.link-item:nth-child(2):hover i {
    background: #3498db;
    color: white;
}

.link-item:nth-child(2):hover a {
    color: #2980b9;
}

/* 3. Email (Orange/Red) */
.link-item:nth-child(3):hover i {
    background: #e67e22;
    color: white;
}

.link-item:nth-child(3):hover a {
    color: #d35400;
}

/* 4. LinkedIn (Deep Blue) */
.link-item:nth-child(4):hover i {
    background: #0077b5;
    color: white;
}

.link-item:nth-child(4):hover a {
    color: #0077b5;
}

/* 5. Google Scholar (Light Blue) */
.link-item:nth-child(5):hover i {
    background: #4285f4;
    color: white;
}

/* 6. ResearchGate (Teal/Green) */
.link-item:nth-child(6):hover i {
    background: #00ccbb;
    color: white;
}

.link-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    word-break: break-word;
}

.link-item a:hover {
    color: var(--dusty-grape);
    transform: scale(1.1);
}

/* --- Right Form --- */
.form-wrapper {
    width: 65%;
    padding: 50px;
}

.main-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field label {
    display: block;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.3rem;
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.field textarea {
    height: 120px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--golden-pollen);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 10px;
}

.code-box select {
    padding: 12px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
}

#otherCode {
    width: 80px;
}

/* Button */
.send-btn {
    background: var(--vibrant-coral);
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 145, 0, 0.3);
    background: var(--golden-pollen);
}

/* Mobile Response */
@media (max-width: 900px) {
    .contact-glass-card {
        flex-direction: column;
    }

    .info-sidebar,
    .form-wrapper {
        width: 100%;
        padding: 30px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* =========================================
   CHATBOT STYLES (Cyber Theme)
   ========================================= */
#chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 5000;
}

#chat-circle {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 2px solid var(--golden-pollen);
    border-radius: 50%;
    color: var(--golden-pollen);
    padding: 15px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
}

#chat-circle:hover {
    background: var(--golden-pollen);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
}

.chat-box {
    display: none;
    /* Hidden by default */
    background: rgba(10, 38, 51, 0.95);
    /* Dark Glass */
    backdrop-filter: blur(10px);
    width: 350px;
    max-width: 85vw;
    height: 500px;
    max-height: 100vh;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    flex-direction: column;
}

.chat-box-header {
    background: var(--bg-card);
    height: 60px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    color: var(--golden-pollen);
    text-align: center;
    font-size: 1.2rem;
    padding-top: 17px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.chat-box-toggle {
    float: right;
    margin-right: 15px;
    cursor: pointer;
    transition: color 0.3s;
}

.chat-box-toggle:hover {
    color: var(--vibrant-coral);
}

.chat-box-body {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Scrollbar for chat */
.chat-box-body::-webkit-scrollbar {
    width: 5px;
}

.chat-box-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

.chat-logs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-msg.user {
    align-self: flex-end;
    background: var(--vibrant-coral);
    color: #000;
    border-bottom-right-radius: 2px;
}

.chat-msg.bot {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--golden-pollen);
    color: var(--text-main);
    border-bottom-left-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.chat-input {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    background: var(--bg-page);
}

#chat-input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    padding: 10px;
    outline: none;
}

.chat-submit {
    background: transparent;
    border: none;
    color: var(--golden-pollen);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 10px;
    transition: transform 0.2s;
}

.chat-submit:hover {
    transform: scale(1.2);
    color: var(--vibrant-coral);
}