/* ===== GOOGLE FONTS IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* ===== TYPOGRAPHY & COLOR SYSTEM ===== */
:root {
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Open Sans', sans-serif;
    
    --color-iit-primary: #0F4C81;
    --color-iit-secondary: #1E88E5;
    --color-iit-dark: #0A3A66;
    
    --color-gray-900: #1A202C;
    --color-gray-800: #2C3E50;
    --color-gray-700: #4A5568;
    --color-gray-600: #718096;
    --color-gray-200: #EDF2F7;
    --color-gray-100: #F7FAFC;
    --color-white: #ffffff;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-4xl: 2.25rem;
}

/* ===== BASE STYLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--color-gray-800);
    background-color: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVIGATION ===== */
header {
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-gray-200);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/*
.logo-section h1 { font-family: var(--font-heading); font-size: var(--text-xl); margin: 0; }
.logo-section p { font-size: var(--text-xs); margin: 0; color: var(--color-gray-600); text-transform: uppercase; letter-spacing: 1px; }
*/
/* --- UPDATED LOGO SECTION --- */

.logo-section {
    display: flex;          /* align items in a row */
    align-items: center;    /* vertically center them */
    gap: 0.5rem;              /* space between logo and text */
}

.university-logo {
    height: 120px;           /* Adjust this to change logo size */
    width: auto;            /* Keeps the aspect ratio correct */
}

/* Container for the text so it stacks vertically next to logo */
.logo-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Remove default margins so they stack tightly */
.logo-section h1 {
    margin: 0;
    line-height: 1.1;
    font-size: 1.8rem; /* Adjust if needed */
}

.logo-section p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Mobile Tweak: Make logo slightly smaller on phones */
@media (max-width: 768px) {
    .university-logo {
        height: 40px;
    }
    .logo-section h1 {
        font-size: 1.4rem;
    }
}
nav ul { display: flex; list-style: none; gap: 2rem; }
nav a { font-weight: 600; font-size: var(--text-sm); color: var(--color-gray-600); text-transform: uppercase; text-decoration: none; }
nav a:hover, nav a.active { color: var(--color-iit-primary); }

/* --- PASTE THE FIX HERE (Outside the media query) --- */
.nav-links {
    margin-top: -20px; /* Pulls the menu up on DESKTOP */
    margin-bottom: 0;
}


/* ===== MAIN CONTENT ===== */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    width: 100%;
}

.page-title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    text-align: center;
    margin-bottom: 3rem;
}

/* ===== CATEGORY FILTERS ===== */
.team-categories {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color-gray-200);
    background: transparent;
    border-radius: 30px;
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn.active, .category-btn:hover {
    background: var(--color-iit-primary);
    color: white;
    border-color: var(--color-iit-primary);
}

/* ===== TEAM GRID ===== */
.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 5rem 3rem;
    margin-bottom: 5rem;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.member-photo {
    height: 200px;
    width: 200px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.member-name { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-iit-primary); margin-bottom: 0.25rem; }
.member-position { font-size: var(--text-sm); font-weight: 600; color: var(--color-iit-secondary); margin-bottom: 1rem; }

/* ===== BIO & READ MORE (FIXED) ===== */
.member-bio { 
    width: 100%; 
    margin-bottom: 0.5rem; 
}

/* The base state for the paragraph */
.member-bio p {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
    text-align: center;
    display: block; /* Default to showing everything */
}

/* The specific styles applied when .collapsed is present */
.member-bio p.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--color-iit-secondary);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 15px;
    margin-bottom: 1rem;
    display: inline-block;
}

.read-more-btn:hover { color: var(--color-iit-dark); text-decoration: underline; }

/* ===== INTERESTS & SOCIALS ===== */
.member-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Fixed space between entries */
    justify-content: center;
    margin-bottom: 1.5rem;
}

.interest-tag {
    background-color: var(--color-gray-100);
    color: var(--color-gray-600);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid var(--color-gray-200);
}

.member-meta { margin-bottom: 1rem; }
.member-email { font-size: var(--text-xs); color: var(--color-gray-600); text-decoration: none; font-weight: 600; }

.member-social-links {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.social-link { color: var(--color-gray-400); font-size: 1.1rem; transition: color 0.2s; }
.social-link:hover { color: var(--color-iit-primary); }

.member-social-row {
    display: flex;
    /* Increased gap: was 1.5rem, now 2.5rem (approx 40px) */
    gap: 2.5rem; 
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.member-social-row a {
    /* Uniform Gray Color */
    color: #95a5a6; 
    font-size: 1.4rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Optional: Darker gray on hover */
.member-social-row a:hover {
    color: #555; 
    transform: translateY(-2px);
}

/* ===== JOIN CTA & FOOTER ===== */
.join-cta { text-align: center; padding: 5rem 2rem; border-top: 1px solid var(--color-gray-200); margin-top: 4rem; }
footer { background-color: var(--color-gray-100); padding: 3rem 1.5rem; border-top: 1px solid var(--color-gray-200); margin-top: auto; }
.footer-container { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }

/* =========================================
   RESPONSIVE / MOBILE STYLES
   ========================================= */

/* Default: Hide Hamburger on Desktop */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-gray-800);
}

/* --- MOBILE BREAKPOINT (Tablets and Phones) --- */
@media screen and (max-width: 768px) {
    
    /* 1. HEADER & NAVIGATION */
    .header-container {
        padding: 1rem;
        position: relative; /* Needed for absolute positioning of menu */
    }

    .menu-toggle {
        display: block; /* Show hamburger */
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        max-height: 0; /* Hidden by default */
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        z-index: 1000;
    }

    nav.active {
    max-height: 100vh; /* This allows it to grow as tall as the screen */
}

    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
        text-align: center;
        padding: 0;
    }
    

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links a {
        display: block;
        padding: 15px;
        width: 100%;
    }

    /* 2. GLOBAL LAYOUT ADJUSTMENTS */
    main {
        padding: 2rem 1rem; /* Less padding on mobile */
    }

    .page-title {
        font-size: 1.8rem; /* Smaller titles */
        margin-bottom: 2rem;
    }

    /* 3. TEAM PAGE ADJUSTMENTS */
    .team-container {
        grid-template-columns: 1fr; /* Stack members in 1 column */
        gap: 3rem;
    }
    
    .member-photo {
        width: 150px;
        height: 150px;
    }

    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }

    /* 4. PUBLICATIONS PAGE ADJUSTMENTS */
    .publication-item {
        flex-direction: column; /* Stack year/title vertically */
        gap: 0.5rem;
    }
    
    .publication-filters {
        gap: 0.5rem;
    }

    /* 5. CONTACT & RESEARCH ADJUSTMENTS */
    .research-card, .course-card {
        padding: 1.5rem;
    }
    
    iframe {
        height: 300px; /* Smaller maps */
    }
}


/* Styling for the Text-Only Alumni List */
.alumni-list-section {
    max-width: 800px; /* Match your layout width */
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: none; /* Hidden by default */
}

.alumni-list-section h3 {
    font-family: var(--font-heading, sans-serif);
    color: var(--color-gray-900, #333);
    border-bottom: 2px solid var(--color-gray-200, #eee);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.alumni-simple-list {
    list-style: none;
    padding: 0;
}

.alumni-simple-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.05rem;
    color: #333;
}

.alumni-details {
    color: #666;
    font-size: 0.95rem;
    margin-left: 0.5rem;
}
/* =========================================
   FOOTER / DEVELOPER CREDIT STYLES
   ========================================= */
.copyright {
    display: flex;
    flex-direction: column; /* Stacks the two lines vertically */
    align-items: center;
    gap: 5px; /* Small space between lines */
}

.developer-credit {
    font-size: 0.85rem; /* Slightly smaller than main text */
    color: #bdc3c7;     /* Light gray color */
    margin: 0;
}