/* Modern Technical Style Sheet 
   Focus: Clean architecture and high-tech aesthetics
*/

:root {
    --primary-blue: #00204e;
    --dark-blue: #001533;
    --accent-blue: #007bff;
    --silver-gray: #a3a9ac;
    --tech-cyan: #00d2ff;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --text-main: #2d3436;
    --text-muted: #636e72;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background-color: #f0f2f5;
    background-image: 
        radial-gradient(var(--primary-blue) 0.5px, transparent 0.5px), 
        radial-gradient(var(--primary-blue) 0.5px, #f0f2f5 0.5px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    background-attachment: fixed;
    line-height: 1.6;
}

/* --- HEADER & NAVIGATION --- */
header {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

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

.lab-logo {
    font-size: 1.6rem;
    display: flex;
    gap: 6px;
    align-items: center;
}

.lab-logo .u-of-t { color: white; font-weight: 800; }
.lab-logo .microlab { 
    font-family: 'JetBrains Mono', monospace; 
    color: var(--tech-cyan); 
    font-weight: 700;
}

nav ul { list-style: none; display: flex; gap: 25px; }
nav a { 
    color: rgba(255, 255, 255, 0.85); 
    text-decoration: none; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1.2px;
    transition: 0.3s;
}
nav a:hover { color: var(--tech-cyan); }

/* --- MAIN CONTAINER --- */
main.container {
    background: var(--glass-bg);
    margin: 2rem auto 5rem auto;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
    backdrop-filter: blur(10px);
    border: 1px solid white;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 2.5rem;
    letter-spacing: -1px;
    position: relative;
    padding-bottom: 12px;
}

h1::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 50px; height: 4px;
    background: var(--tech-cyan);
    border-radius: 2px;
}

.page-intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-top: -1.5rem;
    margin-bottom: 3rem;
    max-width: 750px;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 32, 78, 0.1), transparent);
    margin: 3rem 0;
    border: none;
}

/* --- HOME PAGE HERO --- */
.hero img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #ddd;
}

/* --- PEOPLE GRID --- */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.person-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    will-change: transform;
}

.person-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 32, 78, 0.12);
}

.person-card img, .img-placeholder {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: 50% 15%;
}

.img-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.img-placeholder span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.person-info { padding: 1.5rem; flex-grow: 1; }
.person-info h3 { color: var(--primary-blue); font-size: 1.15rem; margin-bottom: 4px; }
.person-info .role { font-weight: 700; color: var(--accent-blue); font-size: 0.85rem; margin-bottom: 12px; }

.custom-fields { list-style: none; font-size: 0.8rem; border-top: 1px solid #f5f5f5; padding-top: 10px; }
.custom-fields li { margin-bottom: 4px; color: var(--text-muted); }

/* --- PUBLICATIONS --- */
.paper-row {
    padding: 1.5rem;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid #eee;
    transition: 0.3s;
}

.paper-row:hover {
    transform: translateX(8px);
    border-color: var(--primary-blue);
    background: #fcfdfe;
}

/* --- COLLABORATORS (UPDATED SIZE) --- */
.collab-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 2rem; /* Increased padding */
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 2rem;
}

.collab-logo-box {
    flex: 0 0 240px; /* Increased from 160px */
    height: 120px;   /* Increased from 80px */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 3rem; /* Increased spacing */
    padding: 15px;
}

.collab-logo-box img {
    max-width: 200px; /* Increased from 140px */
    max-height: 100px; /* Increased from 60px */
    width: auto;
    height: auto;
    object-fit: contain; 
    filter: grayscale(0.5);
    opacity: 0.8;
    transition: 0.3s;
}

.collab-card:hover .collab-logo-box img {
    filter: grayscale(0);
    opacity: 1;
}

/* --- TABLES (Research) --- */
.lab-table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.lab-table th { text-align: left; padding: 0 1rem 5px 1rem; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.lab-table td { padding: 1.2rem 1rem; background: #fff; border: 1px solid #eee; }

/* --- FOOTER --- */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    /* 1. Main Layout Adjustments */
    main.container { 
        padding: 1.5rem; 
        margin: 1rem auto; 
    }

    h1 { 
        font-size: 1.8rem; 
        word-wrap: break-word; /* Prevents long titles from overflowing */
    }

    /* 2. Navigation Fix: Stack logo and menu vertically */
    .nav-wrapper {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 10px 0;
    }

    /* 3. Menu Wrapping: Allow links to drop to a second line if needed */
    nav ul { 
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px; /* Vertical and horizontal spacing between links */
        padding: 0 10px;
    }

    nav a { 
        font-size: 0.7rem; 
        letter-spacing: 0.5px;
    }

    /* 4. Collaborator Cards */
    .collab-card { 
        flex-direction: column; 
        text-align: center; 
    }

    .collab-logo-box { 
        margin-right: 0; 
        margin-bottom: 1.5rem; 
        flex: 0 0 auto; 
        width: 100%; 
    }
}
