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



body {
    font-family: Arial, sans-serif;
    color: black; /* Ensures text is readable on white */
    background-color: white !important; /* Forces a white background on all pages */
}

/* Video Background */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* HEADER CONTAINER - Centers the header */
.header-container {
    display: flex;
    justify-content: center; /* Centers the header */
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

/* HEADER - Ensures Equal Left & Right Margins */
header {
    width: 90%; /* Keeps the header smaller than full width */
    max-width: 1200px; /* Restricts max width */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px 30px; /* Increased padding to add height */
    display: flex;
    justify-content: space-between; /* Aligns DavidLab left, menu right */
    align-items: center; /* Ensures vertical alignment */
    border-radius: 8px; /* Optional: Rounds the header corners */
    margin: 10px auto; /* Ensures equal margins left & right */
    position: fixed; /* Keeps header fixed on top */
    top: 0;
    left: 0;
    right: 0;
    height: auto; /* Ensures the header adapts to content */
}

/* MAIN CONTENT - Creates Space Below Fixed Header */
main {
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background-color: white;
}

/* Ensure proper spacing below the header */
main.page-content {
    margin-top: 100px !important; /* Force spacing below the header */
}

/* Global Font Style for Headings */
h1, h2, h3 {
    font-family: "Lato", "Open Sans", sans-serif;
    font-weight: 400;
    color: #666;
    text-align: left;
    margin: 0 0 20px 0;
    padding: 0;
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Full-Width Underline Effect */
h1::after, h2::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #6b8e75;
    margin: 5px 0 0;
}

/* DavidLab (Ensures Proper Left Margin) */
#site-name {
    font-size: 16px; /* Matches menu text size */
    font-weight: bold;
    margin-left: 30px; /* Ensures left margin is equal to menu's padding */
    padding: 0;
    display: flex;
    align-items: center; /* Ensures vertical alignment */
}

/* DavidLab Link */
#site-name a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

#site-name a:hover {
    color: #6b8e75; /* Same hover effect as menu */
}

/* Navigation Menu (Right-Aligned) */
#menu {
    display: flex;
    justify-content: flex-end; /* Ensures menu is fully right-aligned */
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 30px; /* Ensures right padding matches DavidLab margin */
    border-radius: 8px; /* Gives a rounded look */
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1); /* Adds shadow ONLY around the menu */
}

/* Navigation List */
#menu ul {
    list-style: none;
    display: flex;
    gap: 15px;
    padding: 0;
    margin: 0;
}

/* Individual Menu Items */
#menu ul li {
    display: inline;
}

/* Menu Links */
#menu ul li a {
    text-decoration: none;
    color: black;
    font-size: 16px; /* Matches DavidLab */
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

/* Hover Effect */
#menu ul li a:hover {
    color: #6b8e75; /* Soft green hover */
}

/* Hamburger Menu Button (for mobile) */
#menu-toggle {
    display: none;
    font-size: 30px;
    cursor: pointer;
    color: black;
    z-index: 1001;
}

/* PUBLICATIONS PAGE (Ensures Background Matches) */
.publications-container {
    max-width: 1200px;
    margin: 50px auto;
    text-align: left;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

/* Publication list styles */
.publications-list {
    list-style: none;
    padding: 20px 60px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.publications-list li {
    margin-bottom: 15px;
    font-size: 14px;
    color: #808080;
    line-height: 1.5;
}

/* Italic journal names */
.publications-list i {
    font-style: italic;
}

/* DOI and PDF Link Styles */
.publications-list li a {
    color: #6b8e75 !important; /* Force green color */
    text-decoration: none;
    font-weight: normal;
    font-size: inherit;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-bottom 0.3s ease-in-out;
}

/* Hover effect for DOI & PDF links */
.publications-list li a:hover {
    border-bottom: 2px solid #6b8e75 !important; /* Force green color */
    opacity: 0.8;
}

/* Responsive Menu (for smaller screens) */
@media (max-width: 768px) {
    header {
        padding: 10px;
    }

    #menu {
        display: none; /* Hide the menu */
        position: absolute;
        top: 60px;
        right: 20px;
        width: 200px;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 10px;
        border-radius: 5px;
    }

    #menu ul {
        flex-direction: column;
        gap: 10px;
    }

    #menu ul li {
        display: block;
        text-align: left;
    }

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

    /* Show menu when active */
    #menu.active {
        display: block;
    }
}

/* PROJECTS PAGE */
.projects-container {
    max-width: 900px;
    margin: 50px auto;
    text-align: left;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

/* Container styles for consistent content width */
.research-container,
.publications-container,
.projects-container {
    max-width: 1200px;
    margin: 50px auto;
    text-align: left;
    padding: 20px 60px;
    background: white;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Project Container */
.projects-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Project Item */
.project-item {
    position: relative;
    width: 100%;
    max-width: none;
    overflow: hidden;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 30px;
    padding: 20px 60px;
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

/* Project Thumbnail - Adjusted Size with Shadow */
.project-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    margin: auto;
    transition: transform 0.3s ease-in-out; /* Smooth zoom-in effect */
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3); /* Enhancing button effect */
    opacity: 0.9; /* Slight transparency */
}

/* Zoom-in on hover */
.project-item:hover .project-thumbnail {
    transform: scale(1.1);
    opacity: 1;
}

/* Large Dark Grey Bar for Acronym */
.project-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #444; /* Dark grey */
    color: white;
    text-align: center;
    font-size: 22px; /* Large but not bold */
    font-weight: 300; /* Thinner text */
    padding: 40px 0; /* Increased height */
    opacity: 0.9;
    border-top: 1px solid white; /* Thin white line at the top */
}

/* White Outline for Acronym - Making It Visible */
.project-title-overlay span {
    color: white;
    font-size: 22px;
    font-weight: 300; /* Thinner text */
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.6), 
                 -2px -2px 4px rgba(255, 255, 255, 0.6); 
}

/* Project Detail Page */
.project-details-container {
    max-width: 800px;
    margin: 50px auto;
    text-align: left;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.project-detail-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Investigators */
.investigators {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.pi {
    text-align: center;
}

.pi-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

/* Hover Effects */
.project-item:hover .project-title-overlay {
    background: rgba(0, 0, 0, 0.9);
}

/* Profile Page Styles */
.profile-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 20px 60px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.profile-photo-container {
    text-align: center;
    margin-right: 40px;
}

.profile-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
}

.profile-info p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #666;
}

.profile-info a {
    color: #6b8e75;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
}

.profile-info a:hover {
    border-bottom: 1px solid #6b8e75;
}

.profile-ids p {
    margin-bottom: 5px;
}

.content-heading {
    padding: 20px 60px 0;
}

.content-section {
    padding: 0 60px 20px;
}

/* Responsive styles for profile page */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-photo-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    .profile-info h1 {
        text-align: center;
    }
    .content-heading {
        padding: 20px 30px 0;
    }
    .content-section {
        padding: 0 30px 20px;
    }
}

@media (max-width: 480px) {
    .content-heading {
        padding: 20px 15px 0;
    }
    .content-section {
        padding: 0 15px 20px;
    }
}

.back-btn {
    background-color: #6b8e75;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: bold;
    transition: background-color 0.3s;
    display: inline-block;
    border: none;
    font-size: 1em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 18px;
}
.back-btn:hover {
    background-color: #4e6b57;
    color: #fff !important;
    text-decoration: none !important;
}
