/* 1. CORE THEME & VARIABLES */
:root {
    --primary: #1a202c; 
    --accent: #3182ce;  
    --bg: #ffffff;
    --text: #4a5568;
    --border: #e2e8f0;
    --light-blue: #f8fbff;
    --dark-charcoal: #2d3748; /* Deep dark grey for publication titles */
}

* { box-sizing: border-box; }

body { 
    font-family: 'Inter', -apple-system, sans-serif; 
    margin: 0; 
    color: var(--text); 
    line-height: 1.6;
    background: var(--bg);
}

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Global spacing for all main content areas to align titles across pages */
.page-content {
    padding-top: 40px !important; 
}

/* 2. NAVIGATION */
.navbar {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    z-index: 1000;
}

.nav-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo, a.logo { 
    font-weight: 800; 
    font-size: 1.4rem; 
    color: var(--primary) !important; 
    text-decoration: none; 
}

.logo span { color: var(--accent); }

nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
nav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.85rem; }
nav a.active { color: var(--accent) !important; border-bottom: 2px solid var(--accent); }

/* 3. TEAM PAGE */
.pi-card { 
    display: flex; gap: 40px; align-items: flex-start; background: var(--light-blue); 
    padding: 35px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 60px;
}

.team-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); 
    gap: 40px; margin-top: 30px;
}

.team-card { border: 1px solid var(--border); padding: 40px 30px; border-radius: 12px; text-align: center; background: white; }

.photo-container {
    position: relative; overflow: hidden; border-radius: 8px;
    border: 1px solid var(--border); background: #edf2f7;
}

.pi-photo-container { width: 220px; height: 280px; flex-shrink: 0; }
.team-card .photo-container { width: 200px; height: 250px; margin: 0 auto 20px; }

.photo-container img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: opacity 0.4s ease-in-out;
}
.hover-1 { opacity: 0; }

.member-info { flex: 1; }

/* 4. NEWS PAGE */
.news-item {
    display: flex; gap: 30px; padding-bottom: 40px; 
    border-bottom: 1px solid var(--border); align-items: flex-start; margin-bottom: 30px;
}

/* Bold Blue News Date Styling */
.news-date {
    color: var(--accent); 
    font-weight: 800;      
    font-size: 0.95rem;     
    text-transform: uppercase; 
    min-width: 100px;      /* Keeps the dates aligned in a tidy column */
    flex-shrink: 0;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.news-img-link { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }

.news-img-frame {
    width: 120px; height: 120px; border-radius: 8px; overflow: hidden;
    border: 1px solid var(--border); position: relative;
}

.news-img-static {
    position: static !important; width: 100% !important; height: 100% !important;
    object-fit: cover; display: block !important;
}

.enlarge-text { font-size: 0.65rem; color: var(--accent); font-weight: 700; text-transform: uppercase; }

.news-headline {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
}

/* 5. LIGHTBOX MODAL - UPDATED */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%; 
    
    /* This color makes the background visible but darkened */
    background-color: rgba(0, 0, 0, 0.2); 
    
    /* Adds a nice blur effect to the background webpage */
    backdrop-filter: blur(5px); 
    
    justify-content: center; 
    align-items: center; 
    cursor: zoom-out;
}

.modal-content { 
    /* Limits image to roughly 2/3 of the screen */
    max-width: 65%; 
    max-height: 65%; 
    
    border-radius: 8px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; 
}

@keyframes zoomIn { 
    from {transform: scale(0.8); opacity: 0;} 
    to {transform: scale(1); opacity: 1;} 
}

/* 6. PUBLICATIONS PAGE */
.pub-header {
    margin-top: 0 !important; 
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 45px;
}

.scholar-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.pub-item {
    margin-bottom: 12pt; 
    padding-bottom: 12pt;
    border-bottom: 1px solid #f7fafc; 
}

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

.pub-title-bold-grey {
    font-weight: 800;
    color: var(--dark-charcoal); 
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 8px;
    display: block;
    text-decoration: none;
}

.pub-citation {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
}

.pub-citation strong { color: var(--primary); }

.pm-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

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

/* 7. FOOTER & TITLES */
.section-title { 
    font-size: 1.8rem; 
    font-weight: 800; 
    color: var(--primary); 
    margin-top: 0 !important; /* Resets individual page overrides to align with .page-content */
}

.member-name { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin: 15px 0 5px; }
.member-title { font-weight: 700; color: var(--accent); font-size: 0.85rem; text-transform: uppercase; margin-bottom: 10px; display: block;}
footer { padding: 60px 0; border-top: 1px solid var(--border); text-align: center; font-size: 0.85rem; color: #a0aec0; margin-top: 80px; }

/* 8. RESPONSIVE */
@media (max-width: 700px) {
    .pi-card { flex-direction: column; align-items: center; text-align: center; }
    .news-item { flex-direction: column; }
    .pub-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .team-grid { grid-template-columns: 1fr; }
    .news-date { min-width: auto; margin-bottom: 5px; }
}

/* Mobile Responsive Navigation */
@media (max-width: 768px) {
    .nav-flex {
        flex-direction: column; /* Stacks logo on top of nav */
        align-items: center;    /* Centers everything */
        padding: 15px 0;
    }

    .navbar nav ul {
        flex-wrap: wrap;       /* Allows links to wrap to a new line if needed */
        justify-content: center;
        padding: 0;
        margin-top: 15px;      /* Space between logo and links */
        gap: 10px;             /* Space between individual links */
    }

    .navbar nav ul li {
        margin: 5px 10px;      /* Horizontal and vertical spacing for links */
    }

    .logo {
        margin-bottom: 10px;   /* Extra breathing room under the logo */
    }
}

/* Hero Slideshow Styling */
.hero-slideshow {
    width: 100%;
    height: 450px; /* Matches the visual weight of your hero section */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #edf2f7; /* Background color while images load */
    margin-top: 30px;
    border: 1px solid var(--border);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill space without stretching */
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Smooth cross-fade duration */
}

.hero-slide.active {
    opacity: 1;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .hero-slideshow {
        height: 250px;
    }
}
