/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #1a5490;
    --secondary-color: #2c7fb8;
    --accent-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #34495e;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --gradient-1: linear-gradient(135deg, #1a5490 0%, #2c7fb8 100%);
    --gradient-2: linear-gradient(135deg, #2c7fb8 0%, #41a9c9 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s ease;
}

/* ===== RESET & GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

section {
    position: relative;
}

.section-padding {
    padding: 100px 0;
}

/* ===== NAVIGATION ===== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(26, 84, 144, 0.95);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.navbar-logo {
    height: 55px;
    width: 55px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    /* padding: 4px; */
}

.brand-text {
    color: var(--white);
    letter-spacing: 2px;
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover:after,
.navbar-nav .nav-link.active:after {
    width: 60%;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0,50 Q25,25 50,50 T100,50" stroke="rgba(255,255,255,0.05)" stroke-width="2" fill="none"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-affiliation {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.btn-hero {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    background: var(--accent-color);
    border: none;
    color: var(--white);
    transition: var(--transition);
}

.btn-hero:hover {
    background: #e67e22;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    margin-bottom: 1rem;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.subsection-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* ===== ABOUT SECTION ===== */
.lead-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-sm);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-item span {
    font-weight: 500;
    color: var(--text-color);
}

/* ===== GROUP PICTURE SECTION ===== */
.group-picture-section {
    background: var(--light-color);
}

.group-photo-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: var(--transition);
}

.group-photo-container:hover {
    transform: translateY(-5px);
}

.group-photo-container img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-caption {
    background: rgba(26, 84, 144, 0.9);
    color: var(--white);
    padding: 1rem;
    text-align: center;
    margin-top: -5px;
}

.photo-caption p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* ===== RESEARCH HIGHLIGHTS ===== */
.highlight-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: var(--transition);
    background: var(--white);
    padding: 0;
}

.highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.highlight-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

/* ===== THEME CARDS ===== */
.theme-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    text-align: center;
}

.theme-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.theme-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.theme-icon i {
    font-size: 2rem;
    color: var(--white);
}

.theme-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0;
}

/* ===== RESEARCH CARDS ===== */
.research-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.research-number {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.research-card h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.research-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* ===== CAPABILITIES GRID ===== */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.capability-item {
    background: var(--white);
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.capability-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.capability-item i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

/* ===== TEAM CARDS ===== */
.team-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.team-card.featured {
    border: 3px solid var(--primary-color);
}

.team-card.alumni {
    opacity: 0.85;
}

.team-image-wrapper {
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background: var(--gradient-1);
}

.team-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.team-card:hover .team-photo {
    transform: scale(1.05);
}

/* Fallback for missing images */
.team-photo[src*="team/"]:not([src*=".jpg"]):not([src*=".png"]),
.team-photo[src=""]:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-info {
    padding: 1.5rem;
}

.team-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.team-role {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.team-subtitle {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.team-focus {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.team-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.team-link {
    width: 40px;
    height: 40px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

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

/* ===== PUBLICATIONS ===== */
.pub-category {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.pub-category i {
    font-size: 1.8rem;
}

.publication-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.publication-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.pub-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 0;
}

.pub-text em {
    font-style: italic;
}

.pub-text a {
    color: var(--secondary-color);
    word-break: break-all;
    font-weight: 500;
}

.pub-text a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== CONTACT SECTION ===== */
.contact-info {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.contact-details h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
}

.contact-details p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.8;
}

.contact-details a {
    color: var(--secondary-color);
    font-weight: 500;
}

.contact-details a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link {
    padding: 0.6rem 1.5rem;
    background: var(--light-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-color);
    padding: 2rem 0;
    color: var(--white);
}

.footer-text {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
    .section-padding {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .subsection-title {
        font-size: 1.5rem;
    }

    .navbar-collapse {
        background: rgba(26, 84, 144, 0.95);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }

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

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-affiliation {
        font-size: 0.95rem;
    }

    .btn-hero {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .subsection-title {
        font-size: 1.3rem;
    }

    .theme-card,
    .research-card {
        padding: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin: 0 auto;
    }

    .social-links {
        justify-content: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

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

    .brand-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .section-padding {
        padding: 40px 0;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    /* Team cards remain 1:1 ratio on mobile */
    .team-image-wrapper {
        padding-top: 100%;
        /* Maintain 1:1 ratio */
    }
}

/* ===== UTILITY CLASSES ===== */
.bg-light {
    background-color: #f8f9fa !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

/* ===== LOADING ANIMATION ===== */
[data-aos] {
    pointer-events: auto !important;
}

/* img modal */
/* Fix image height + auto crop nicely */
.highlight-card {
    overflow: hidden;
    border-radius: 10px;
    display: flex;
    justify-content: center /* center horizontally */;
    align-items: center /* center vertically */;
    
}

.highlight-card img {
    /* width: 100%; */
    width: auto;
    height: 300px;
    /* 👈 fixed height */
    /* object-fit: cover; */
    /* 👈 auto adjust nicely */
    cursor: pointer;
    transition: 0.3s;
}

.highlight-card img:hover {
    transform: scale(1.05);
}

/* 📱 Responsive tweaks */
@media (max-width: 768px) {
    .highlight-card img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .highlight-card img {
        height: 180px;
    }
}

/* Modal (same as before, cleaned) */
/* Modal */
.modal {
  display: none;              /* hidden by default */
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.96);

  align-items: center;        /* vertical center */
  justify-content: center;    /* horizontal center */
}

/* When open */
.modal.active {
  display: flex;              /* 👈 use flex ONLY when active */
}

/* Image */
.modal-content {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;

  display: block;
  margin: auto;               /* extra safety centering */
  border-radius: 8px;
}

/* Close button */
.close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

/* Arrows */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border: none;
  padding: 10px 25px;
  cursor: pointer;
  border-radius: 50%;
}

.prev { left: 15px; }
.next { right: 15px; }