/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    --primary: #8B0000;
    --primary-light: #A52A2A;
    --secondary: #2C5F7C;
    --text-dark: #1a1a1a;
    --text-light: #4a5568;
    --text-muted: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

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

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

/* ==========================================
   Container & Layout
   ========================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.bg-light {
    background: var(--bg-light);
}

.text-center {
    text-align: center;
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: start;
}



/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.section-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    .nav-wrapper {
        gap: 0.5rem;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .logo-text h1 {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo-text p {
        font-size: 0.7rem;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.logo-text h1 {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 1rem 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* MIT Logo in Header */
.mit-logo {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 0 0.5rem;
    flex-shrink: 0;
}

.mit-logo img {
    height: 60px !important;
    width: auto !important;
    max-height: 60px !important;
    max-width: 80px !important;
    object-fit: contain !important;
    opacity: 0.7;
    transition: var(--transition);
}

.mit-logo:hover img {
    opacity: 1;
}

@media (max-width: 768px) {
    .mit-logo {
        order: 2;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
    }

    .mit-logo img {
        height: 30px !important;
        max-height: 30px !important;
    }

    .mobile-toggle {
        order: 3;
    }
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 80px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        align-items: flex-start;
    }

    .nav-menu.active {
        right: 0;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* ==========================================
   Hero Slider
   ========================================== */
.hero-slider {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.slider-container {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
}

.slide-content h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: white;
    margin-bottom: 1rem;
    font-weight: 300;
}

.slide-content p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
}

.slider-btn {
    pointer-events: all;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.25rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .hero-slider {
        height: 500px;
    }
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* ==========================================
   Research List
   ========================================== */
.research-list {
    list-style: none;
    margin-bottom: 2rem;
}

.research-list li {
    margin-bottom: 1rem;
}

.research-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.research-list a:hover {
    box-shadow: var(--shadow);
    transform: translateX(5px);
    border-color: var(--primary);
}

.research-list .icon {
    font-size: 1.5rem;
}

/* ==========================================
   News Grid
   ========================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.news-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-content time {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.news-content h3 a {
    color: var(--text-dark);
}

.news-content h3 a:hover {
    color: var(--primary);
}

.news-content p {
    font-size: 0.9375rem;
    color: var(--text-light);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 5rem;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-content a {
    color: white;
    text-decoration: underline;
}

.footer-content a:hover {
    color: var(--primary-light);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text p {
        font-size: 0.75rem;
    }
}

/* ==========================================
   Page Header (for internal pages)
   ========================================== */
.page-header {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.page-header-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .page-header {
        height: 250px;
    }
}

/* ==========================================
   Timeline (for News page)
   ========================================== */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
}

.timeline-marker {
    position: absolute;
    left: -50px;
    top: 0;
}

.timeline-year {
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 0 0 4px white, 0 0 0 6px var(--primary);
}

.timeline-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.news-article {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}

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

.news-article.featured {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.news-article .news-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.news-article time {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.news-article h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.news-article p {
    color: var(--text-light);
    line-height: 1.6;
}

.news-article a {
    color: var(--primary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: -30px;
    }

    .timeline-year {
        width: 50px;
        height: 50px;
        font-size: 0.75rem;
    }

    .news-article {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-article .news-image img {
        height: 200px;
    }
}

/* ==========================================
   Research Detail Page
   ========================================== */
.research-detail {
    margin-bottom: 5rem;
}

.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.research-grid.reverse {
    direction: rtl;
}

.research-grid.reverse > * {
    direction: ltr;
}

.research-image {
    position: sticky;
    top: 100px;
}

.research-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.research-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.publications-highlight {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.publications-highlight h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.pub-list {
    list-style: none;
}

.pub-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pub-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pub-list a {
    display: block;
    transition: var(--transition);
}

.pub-list a:hover {
    transform: translateX(5px);
}

.pub-list strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.5rem;
}

.pub-list .authors {
    color: var(--text-light);
    font-size: 0.9375rem;
    display: block;
    margin-bottom: 0.25rem;
}

.pub-list .journal {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
    display: block;
}

@media (max-width: 992px) {
    .research-grid,
    .research-grid.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .research-image {
        position: relative;
        top: 0;
    }
}

/* ==========================================
   People/Team Page
   ========================================== */
.pi-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.pi-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.pi-info h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.pi-title {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.pi-contact {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.contact-item {
    margin-bottom: 1rem;
}

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

.contact-item strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--primary);
}

.contact-item a:hover {
    text-decoration: underline;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.team-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.team-photo {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--bg-light);
}

.team-photo img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Creates square container */
    object-fit: cover;
    border-radius: 8px;
}

.team-info {
    padding: 1.5rem;
}

.team-info h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

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

.team-email {
    margin-bottom: 1rem;
}

.team-email a {
    color: var(--secondary);
    font-size: 0.9375rem;
}

.team-background,
.team-research {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.team-background strong,
.team-research strong {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .pi-card {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }

    .pi-image img {
        max-width: 250px;
        margin: 0 auto;
    }

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

/* ==========================================
   Alumni Section
   ========================================== */
.alumni-section {
    margin-bottom: 3rem;
}

.alumni-title {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.alumni-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.alumni-item h4 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.alumni-item p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin: 0;
}

@media (max-width: 768px) {
    .alumni-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Publications Page
   ========================================== */
.section-small {
    padding: 2rem 0;
    background: var(--bg-light);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9375rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.publications-year {
    margin-bottom: 4rem;
    transition: var(--transition);
}

.publications-year.hidden {
    display: none;
}

.year-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary);
    font-weight: 700;
}

.publication-list {
    list-style: none;
    counter-reset: publication-counter;
}

.publication-item {
    counter-increment: publication-counter;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    padding-left: 4rem;
}

.publication-item::before {
    content: counter(publication-counter);
    position: absolute;
    left: 1.5rem;
    top: 1.5rem;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

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

.publication-item a {
    display: block;
}

.publication-item h3 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
}

.publication-item .authors {
    color: var(--text-light);
    font-size: 0.9375rem;
    display: block;
    margin-bottom: 0.5rem;
}

.publication-item .journal {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

.publication-item a:hover h3 {
    color: var(--primary);
}

.note {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .filter-bar {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .publication-item {
        padding-left: 1.5rem;
    }

    .publication-item::before {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 1rem;
    }
}

/* ==========================================
   Contact Page
   ========================================== */
.join-banner {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.join-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.join-overlay h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    color: white;
    margin-bottom: 1rem;
}

.join-overlay p {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: rgba(255, 255, 255, 0.9);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.join-info {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    text-align: justify;
}

.join-info p {
    margin-bottom: 1.5rem;
}

.join-info a {
    color: var(--primary);
    font-weight: 600;
}

.join-info a:hover {
    text-decoration: underline;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-info-card .section-title {
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

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

.info-item .icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: var(--primary);
}

.info-item strong {
    display: block;
    color: var(--text-dark);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.info-item p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
}

.info-item a {
    color: var(--primary);
}

.info-item a:hover {
    text-decoration: underline;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    min-height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================
   Alumni Update Notice
   ========================================== */
.alumni-update-notice {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.notice-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.notice-icon svg {
    display: inline-block;
}

.alumni-update-notice h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.alumni-update-notice p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.email-link {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.75rem 2rem;
    background: white;
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.email-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .alumni-update-notice {
        padding: 2rem 1.5rem;
    }

    .alumni-update-notice h3 {
        font-size: 1.25rem;
    }

    .alumni-update-notice p {
        font-size: 1rem;
    }

    .email-link {
        font-size: 1rem;
        padding: 0.625rem 1.5rem;
    }
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .map-container {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .join-banner {
        height: 350px;
    }

    .contact-info-card {
        padding: 1.5rem;
    }

    .info-item {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.5rem !important;
}

.mt-2 {
    margin-top: 1rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .navbar,
    .footer,
    .slider-controls,
    .slider-dots,
    .mobile-toggle,
    .filter-bar {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}


/* ==========================================
   Back to Top Button (Optional)
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* ==========================================
   Navbar Scroll Effects
   ========================================== */
.navbar.scroll-down {
    transform: translateY(-100%);
}

.navbar.scroll-up {
    transform: translateY(0);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   Loading State
   ========================================== */
body:not(.loaded) {
    overflow: hidden;
}

body:not(.loaded)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.loaded::before {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Loading and Error States */
.loading-state,
.error-state {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.citations {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ==========================================
   Research Page Specific Styles
   ========================================== */

/* Quick Navigation */
.research-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.research-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow);
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.research-nav-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.research-nav-icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .research-nav {
        gap: 1rem;
    }

    .research-nav-item {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* Research Label */
.research-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: rgba(139, 0, 0, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 2.5rem; /* ← Increase this value */
    margin-right: 2.5rem;
}

/* Research Detail Section */
.research-detail {
    margin-bottom: 2rem;
}

/* Research Grid */
.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.research-grid.reverse {
    direction: rtl;
}

.research-grid.reverse > * {
    direction: ltr;
}

/* Research Image */
.research-image {
    position: sticky;
    top: 100px;
}

.research-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.research-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Research Text */
.research-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 1.8;
    color: var(--text-light);
}

/* Publications Highlight Box */
.publications-highlight {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border-left: 4px solid var(--primary);
}

.publications-highlight h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Publication List Items */
.pub-list {
    list-style: none;
}

.pub-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pub-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pub-list a {
    display: block;
    padding: 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
}

.pub-list a:hover {
    background: white;
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.pub-list strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.pub-list .authors {
    color: var(--text-light);
    font-size: 0.9375rem;
    display: block;
    margin-bottom: 0.25rem;
}

.pub-list .journal {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
    display: block;
}

/* Section Divider */
.section-divider {
    padding: 0;
}

.section-divider hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 0;
}

/* Research CTA */
.research-cta {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 0;
}

.research-cta h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.research-cta p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .research-grid,
    .research-grid.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 2rem;
    }

    .research-image {
        position: relative;
        top: 0;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .research-label {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .publications-highlight {
        padding: 1.5rem;
    }

    .pub-list a {
        padding: 0.5rem;
    }

    .pub-list strong {
        font-size: 0.9375rem;
    }

    .pub-list .authors {
        font-size: 0.875rem;
    }

    .pub-list .journal {
        font-size: 0.8125rem;
    }

    .research-cta h2 {
        font-size: 1.5rem;
    }

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

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* Smooth Scroll Offset for Fixed Navbar */
html {
    scroll-padding-top: 100px;
}

/* Animation for Research Sections */
.research-detail {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.research-detail.visible {
    opacity: 1;
    transform: translateY(0);
}