/* Core Variables & Reset */
:root {
    --theme-color: #f1be6c; 
    --theme-hover: #e5aa14; 
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f4f4f4;
    --white: #ffffff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== HEADER (matches your HTML classes) ===== */
.site-header {
    background-color: var(--theme-color);
    color: var(--text-dark);
    padding: 1.5rem 0;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;      /* prevents edge-to-edge on large screens */
    margin: 0 auto;          /* centers the header content */
    padding: 0 20px;         /* keeps spacing on small screens */
    width: 100%;
}

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

.header-logo {
    height: 70px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    margin: 0;                /* remove default margin */
    line-height: 1.2;         /* tighten line height */
}

.logo-text .subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    display: block;
    margin-top: 0;            /* no extra gap */
    line-height: 1.2;
}

.header-nav {
    display: flex;
    gap: 1.5rem;              /* even spacing between links */
    flex-wrap: wrap;
}

.header-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.header-nav a:hover {
    color: var(--theme-hover);
    border-bottom: 2px solid var(--theme-hover);
}

/* ===== MAIN ===== */
main {
    background-color: var(--white);
    width: 100%;
    margin: 0;
    padding: 4rem 0;
    box-shadow: none;
    border-radius: 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

/* ===== HOMEPAGE ===== */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--theme-color);
    margin-bottom: 0.5rem;
}

.hero h2 span {
    color: var(--theme-color);
    border-bottom: 3px solid var(--theme-color);
}

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

.btn {
    display: inline-block;
    background-color: var(--theme-color);
    color: var(--text-dark);
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--theme-hover);
}

.btn-secondary {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border: 2px solid var(--theme-color);
    color: var(--text-dark);
    border-radius: 4px;
    font-weight: bold;
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--theme-color);
    color: #fff;
}

/* News List */
.news-list {
    list-style: none;
}

.news-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #ccc;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.news-list a {
    color: var(--theme-color);
    text-decoration: none;
}

/* News Cards */
.news-card {
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    border-left: 3px solid #eee;
    transition: border-color 0.3s;
}

.news-card:hover {
    border-left-color: var(--theme-color);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: #222;
    color: #ccc;
    font-size: 0.9rem;
    width: 100%;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--theme-color);
    padding-bottom: 1rem;
}

.page-header h2 {
    color: var(--theme-color);
    font-size: 2rem;
}

/* ===== RESEARCH CARDS ===== */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.research-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    border-top: 5px solid var(--theme-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.research-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--text-dark);
}

/* ===== PI PROFILE ===== */
.pi-profile {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 4rem;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 6px;
    border-left: 4px solid var(--theme-color);
}

.pi-photo img {
    width: 200px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.pi-socials {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    filter: grayscale(100%);
    opacity: 0.8;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 1;
    filter: grayscale(0%);
}

/* ===== PUBLICATIONS SEARCH ===== */
.search-container {
    margin: 2rem 0;
    width: 100%;
    display: block;
}

#pubSearch {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    outline: none;
}

#pubSearch:hover {
    border-color: #ddd;
}

#pubSearch:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 8px rgba(241, 190, 108, 0.2);
}

#pubSearch::placeholder {
    color: #999;
    font-style: italic;
}

/* ===== IMPACT METRICS ===== */
.impact-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-bottom: 4px solid var(--theme-color);
}

.metric-value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-dark);
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

/* ===== PILLARS SECTION ===== */
.pillars-container {
    background: #fdfdfd; 
    padding: 1.5rem 2.5rem;
    border-radius: 8px;
    border-left: 5px solid #f1c40f;
    margin: 2.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.pillar-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pillar-bullets li {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-left: 1.8rem;
    position: relative;
    transition: all 0.3s ease;
}

.pillar-bullets li:last-child {
    margin-bottom: 0;
}

.pillar-bullets li::before {
    content: "→"; 
    position: absolute;
    left: 0;
    color: #f1c40f;
    font-weight: bold;
    font-size: 1.2rem;
}

.pillar-bullets li:hover {
    transform: translateX(8px);
    color: #000;
}

.pillar-bullets li strong {
    color: #000;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== LAB FORM ===== */
.lab-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-top: 5px solid var(--theme-color);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

/* ===== CONTACT GRID ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 20px;      /* keep side padding on mobile */
    }

    .logo-wrapper {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .header-logo {
        height: 60px;
    }

    .header-nav {
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .header-nav a {
        margin: 0;
        padding: 8px 12px;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 4px;
        font-size: 0.9rem;
    }

    .homepage-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
    }

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

    .pi-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pi-photo img {
        width: 150px;
        margin-bottom: 1rem;
    }

    .pi-socials {
        justify-content: center;
    }

    .impact-metrics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .pillars-container {
        padding: 1.5rem;
    }
}

/* --- Thank You Modal Styles --- */

/* 1. The Overlay: Darkens and blurs the background */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensures it stays on top of everything */
    backdrop-filter: blur(5px); /* Modern blur effect */
    transition: opacity 0.3s ease;
}

/* 2. The Content Box */
.modal-content {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-top: 10px solid var(--theme-color); /* Gold theme accent */
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Innovative "pop" effect */
}

/* 3. The Icon and Text */
.modal-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
}

.modal-content h3 {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-content p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* 4. The Close Button (Matching your existing .btn) */
.modal-content .btn {
    width: 120px;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

/* 5. Animation Keyframes */
@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .modal-content {
        padding: 2rem 1.5rem;
    }
}
