/* General Setup */
body { font-family: 'Open Sans', Arial, sans-serif; margin: 0; padding: 0; color: #333; background-color: #f4f7f9; }

/* ========================================== */
/* HEADER & NAVIGATION                        */
/* ========================================== */
header { display: flex; justify-content: space-between; align-items: center; padding: 40px 50px; background-color: #ffffff; border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 1000; transition: all 0.4s ease; }
.logo-link { display: flex; align-items: center; gap: 25px; text-decoration: none; color: inherit; }
.lab-logo { max-height: 160px; width: auto; transition: max-height 0.4s ease; }
.lab-title { font-family: 'Courier Prime', monospace; font-size: 2.2rem; font-weight: 700; letter-spacing: 0.5px; transition: font-size 0.4s ease; }
nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
nav a { text-decoration: none; color: #3a5b9b; font-size: 1.2rem; transition: all 0.4s ease; }
nav a:hover, nav a.active { font-weight: 600; }

header.shrink { padding: 15px 50px; }
header.shrink .lab-logo { max-height: 80px; }
header.shrink .lab-title { font-size: 1.5rem; }
header.shrink nav a { font-size: 1rem; }

/* ========================================== */
/* HOME PAGE SPECIFIC STYLES                  */
/* ========================================== */
.hero-section { position: relative; height: 600px; background-color: #0d1b2a; background-image: url('images/Home/Home_page_wallpaper.jpg'); background-size: cover; background-position: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 60px; }
.hero-title { color: #ffffff; font-family: 'Courier Prime', monospace; text-align: center; font-size: 2.2rem; letter-spacing: 1px; z-index: 10; }
.delayed-box { background: #ffffff; padding: 50px 60px; width: 60%; max-width: 800px; text-align: center; margin-top: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); opacity: 0; transform: translateY(20px); animation: fadeAndSlideIn 1s forwards; animation-delay: 1s; z-index: 10; }
.delayed-box h2 { font-family: 'Lora', serif; font-size: 1.8rem; margin-top: 0; margin-bottom: 30px; }
.delayed-box p { font-family: 'Lora', serif; font-size: 1.05rem; line-height: 1.8; text-align: justify; color: #444; }
@keyframes fadeAndSlideIn { to { opacity: 1; transform: translateY(0); } }
.read-more-btn { display: inline-block; margin-top: 30px; padding: 12px 35px; background-color: #3f51b5; color: white; text-decoration: none; font-size: 0.9rem; border-radius: 2px; transition: background 0.3s; }
.read-more-btn:hover { background-color: #303f9f; }
.highlights-section { padding: 80px 50px; background: #f4f7f9; }
.section-title-wrapper { display: flex; align-items: center; justify-content: center; margin-bottom: 50px; }
.section-title { font-family: 'Open Sans', sans-serif; font-size: 1.5rem; margin: 0 20px; font-weight: 600; }
.section-title-wrapper::before, .section-title-wrapper::after { content: ""; flex: 1; border-bottom: 1px solid #333; max-width: 400px; }
.slider-container { display: flex; align-items: center; justify-content: center; max-width: 1100px; margin: auto; position: relative; }
.slider-wrapper { width: 90%; position: relative; height: 300px; overflow: hidden; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; display: flex; align-items: center; gap: 40px; pointer-events: none; }
.slide.active-slide { opacity: 1; pointer-events: auto; }
.dual-images { display: flex; gap: 15px; flex: 1; justify-content: center; align-items: center; }
.dual-images img { width: 45%; height: 220px; object-fit: cover; border: 1px solid #ccc; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-radius: 4px; }
.slide-content { flex: 1.2; font-family: 'Open Sans', sans-serif; color: #444; text-align: justify; font-size: 0.95rem; line-height: 1.5; }
.tight-text p { margin-top: 5px; margin-bottom: 5px; }
.slider-arrow { background: none; border: none; font-size: 2.5rem; font-weight: 300; cursor: pointer; color: #333; padding: 10px; }

/* ========================================== */
/* RESEARCH PAGE SPECIFIC STYLES              */
/* ========================================== */
.research-hero { position: relative; height: 400px; background-color: #051421;
    background-image: url('images/Research/wallpaper.jpg'); background-size: cover; background-position: center; display: flex; justify-content: center; }

.what-we-study-banner { 
    position: absolute;
    top: 300px; /* <--- CONTROL KNOB: Increase this number (e.g. 80px, 100px) to move it further downwards! */
    background-color: #5C3D6E; /* <--- ROYAL PURPLE ACCENT COLOR */
    color: white; 
    width: 60%; 
    max-width: 700px; 
    text-align: center; 
    padding: 30px 20px 40px 20px; 
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); 
    opacity: 0; 
    transform: translateY(-20px); 
    animation: dropIn 1s forwards; 
    animation-delay: 0.5s; 
    z-index: 10;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Uses Pacifico Font */
.what-we-study-banner h2 { 
    font-family: 'Pacifico', cursive !important; 
    font-size: 2.6rem !important; 
    font-weight: 400 !important; 
    margin: 0; 
}

@keyframes dropIn { to { opacity: 1; transform: translateY(0); } }

.research-content-section { background-color: #4A767D; padding: 60px 40px; }
.research-card { max-width: 1100px; margin: 0 auto 50px auto; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 40px; color: white; }
.research-card:last-child { border-bottom: none; }
.research-card-title { font-family: 'Lora', serif; font-size: 1.8rem; text-align: center; text-decoration: underline; margin-bottom: 30px; }
.research-card-body { display: flex; align-items: center; gap: 40px; }
.img-left { flex-direction: row; }
.img-right { flex-direction: row; }
.research-img-container { flex: 1; display: flex; justify-content: center; }
.research-img-container img { height: 280px; width: auto; max-width: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.research-text { flex: 1.5; font-family: 'Open Sans', sans-serif; font-size: 1.05rem; line-height: 1.7; text-align: justify; }

/* ========================================== */
/* PEOPLE PAGE SPECIFIC STYLES                */
/* ========================================== */
.team-header { text-align: center; padding: 25px 20px 30px; background-color: transparent; }
.team-header h1 { font-family: 'Open Sans', sans-serif; font-size: 2.8rem; font-weight: 700; margin: 0 0 10px 0; color: #000; }
.alumni-header h2 { font-family: 'Open Sans', sans-serif; font-size: 2.2rem; font-weight: 700; margin: 0 0 10px 0; color: #000; }
.header-line { width: 40px; height: 2px; background-color: #000; margin: 0 auto; }
.person-card { background-color: #ffffff; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.person-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; }
.person-info { padding: 30px; font-family: 'Open Sans', sans-serif; position: relative; display: flex; flex-direction: column; flex-grow: 1; }
.name { font-family: 'Open Sans', sans-serif; font-weight: 700; font-size: 1.3rem; margin: 0 0 5px 0; color: #000; }
.role { font-size: 0.85rem; font-style: italic; color: #555; margin: 0 0 20px 0; }
.bio { font-size: 0.85rem; line-height: 1.6; color: #333; text-align: justify; margin-bottom: 20px; }
.pi-section { background-color: transparent; display: flex; justify-content: center; padding-bottom: 60px; }
.pi-card { width: 90%; max-width: 350px; } 
.team-grid-section { background-color: transparent; padding: 0 50px 80px 50px; }
.team-grid { display: grid; gap: 30px; max-width: 1400px; margin: 0 auto; }

@media (min-width: 1100px) {
    .team-grid.four-cols { grid-template-columns: repeat(4, 1fr); }
    .team-grid.three-cols { grid-template-columns: repeat(3, 1fr); max-width: 1050px; margin: 0 auto; }
}
@media (max-width: 1099px) and (min-width: 769px) {
    .team-grid.four-cols, .team-grid.three-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .team-grid-section { padding: 0 20px 50px 20px; }
    .team-grid.four-cols, .team-grid.three-cols { grid-template-columns: 1fr; }
}

/* ========================================== */
/* CONTACT & FOOTER                           */
/* ========================================== */
.contact-section { background: #ffffff; padding: 60px 50px 20px 50px; }
.map-container { width: 70%; margin: 0 auto 40px auto; border: 1px solid #ccc; }
.contact-info-row { display: flex; justify-content: center; align-items: center; text-align: center; font-size: 0.85rem; color: #555; max-width: 900px; margin: auto; gap: 15px; padding-bottom: 30px; border-bottom: 1px solid #ccc; }
.contact-item { flex: 1; }
.contact-item a { color: #555; text-decoration: none; }
.divider { color: #ccc; }
footer { text-align: center; padding: 20px; font-size: 0.85rem; color: #777; background: #ffffff; }

/* ========================================== */
/* PUBLICATIONS PAGE ALIGNMENT & STYLING      */
/* ========================================== */

.pubs-grid-section {
    background-color: transparent;
    padding: 20px 50px 80px 50px;
}

.pubs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Strictly forces 3 cards per row */
    gap: 35px;
    max-width: 1300px;
    margin: 0 auto;
}

/* Individual Card Styling */
.pub-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Paper Title (Centered above image) */
.pub-title {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    color: #111;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

/* Authors List (Centered below title, above image) */
.pub-authors {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    color: #666;
    margin: 0 0 20px 0;
}

/* Image Container */
.pub-img-container {
    width: 100%;
    height: 180px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.pub-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Description Text */
.pub-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
    text-align: justify;
    margin: 0 0 25px 0;
    flex-grow: 1;
}

/* PDF Download Button Container */
.pub-pdf-container {
    text-align: center;
    margin-top: auto;
}

.pub-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #d32f2f;
    color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 22px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pub-pdf-link:hover {
    background-color: #c62828;
}

/* Responsive layout adjustments */
@media (max-width: 1100px) {
    .pubs-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 768px) {
    .pubs-grid-section {
        padding: 10px 20px 50px 20px;
    }
    .pubs-grid {
        grid-template-columns: 1fr; /* 1 column on mobile phones */
    }
}

/* ========================================== */
/* PUBLICATIONS PAGE ALIGNMENT & STYLING      */
/* ========================================== */

.pubs-grid-section {
    background-color: transparent;
    padding: 20px 50px 80px 50px;
}

.pubs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Strictly forces 3 cards per row */
    gap: 35px;
    max-width: 1300px;
    margin: 0 auto;
}

/* Individual Card Styling */
.pub-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Paper Title (Centered above image) */
.pub-title {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    color: #111;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

/* Authors List (Centered below title, above image) */
.pub-authors {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    color: #666;
    margin: 0 0 20px 0;
}

/* Image Container */
.pub-img-container {
    width: 100%;
    height: 180px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.pub-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents paper figures from being cropped awkwardly */
}

/* Description Text */
.pub-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
    text-align: justify;
    margin: 0 0 25px 0;
    flex-grow: 1;
}

/* PDF Download Button Container */
.pub-pdf-container {
    text-align: center;
    margin-top: auto;
}

.pub-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #d32f2f;
    color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 22px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pub-pdf-link:hover {
    background-color: #c62828;
}

/* Responsive layout adjustments */
@media (max-width: 1100px) {
    .pubs-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 768px) {
    .pubs-grid-section {
        padding: 10px 20px 50px 20px;
    }
    .pubs-grid {
        grid-template-columns: 1fr; /* 1 column on mobile phones */
    }
}

/* ========================================== */
/* PHASE SHIFT MOMENTS PAGE STYLES            */
/* ========================================== */

.phase-hero {
    position: relative;
    height: 400px;
    background-color: #000000;
    background-image: url('images/Phase%20Shift%20Moments/wallpaper.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
}

.phase-title-box {
    position: absolute;
    bottom: -100px; 
    background: #ffffff;
    padding: 35px 50px;
    width: 80%;
    max-width: 900px; 
    text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeAndSlideIn 1s forwards;
    animation-delay: 1s; 
    border-radius: 4px;
}

.phase-title-box h2 {
    font-family: 'Pacifico', cursive; 
    font-size: 2.8rem;
    font-weight: 400;
    margin: 0 0 15px 0;
    color: #000;
}

.phase-title-box p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 12px;
}

.phase-slideshow-section {
    background-color: #f4f7f9;
    padding: 160px 20px 80px 20px; 
    display: flex;
    justify-content: center;
}

.phase-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    width: 100%;
    position: relative;
}

.phase-slider-wrapper {
    width: 85%;
    position: relative;
    height: 550px; 
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 6px;
}

.phase-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.phase-slide.active-slide {
    opacity: 1;
    pointer-events: auto;
}

.phase-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover; 
    border-bottom: 2px solid #eee;
}

.phase-caption {
    padding: 20px 30px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #444;
    text-align: center;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}
.phase-caption p { margin: 0; }

.phase-arrow {
    background: none;
    border: none;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    color: #333;
    padding: 10px 20px;
    transition: color 0.3s;
}
.phase-arrow:hover { color: #3a5b9b; }

/* ========================================== */
/* CONTACT PAGE SPECIFIC STYLES               */
/* ========================================== */

.contact-hero-section {
    position: relative;
    height: 600px;
    background-color: #0d1b2a;
    background-image: url('images/Home/Home_page_wallpaper.jpg'); /* Uses the lights background */
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.contact-popup-box {
    background: #ffffff;
    padding: 50px 60px;
    width: 75%;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-radius: 4px;
    animation: fadeAndSlideIn 1s forwards;
}

.contact-popup-box h2 {
    font-family: 'Courier Prime', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #111;
}

.contact-address {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
}

.contact-inquiry-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* ========================================== */
/* POLISHED CONTACT DIALOG BOX STYLES         */
/* ========================================== */

.contact-hero-section {
    position: relative;
    min-height: 650px;
    background-color: #0d1b2a;
    background-image: url('images/Home/Home_page_wallpaper.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.contact-popup-box {
    background: #ffffff;
    padding: 45px 55px;
    width: 85%;
    max-width: 850px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    animation: fadeAndSlideIn 1s forwards;
    border-top: 5px solid #3a5b9b; /* Elegant accent border on top */
}

.contact-box-title {
    font-family: 'Courier Prime', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #111;
}

.contact-box-line {
    width: 50px;
    height: 3px;
    background-color: #3a5b9b;
    margin: 0 auto 20px auto;
}

.contact-address {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.contact-inquiry-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 30px;
}

/* Form Layout Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    flex: 1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    background-color: #fafbfc;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3a5b9b;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(58, 91, 155, 0.15);
}

.contact-submit-btn {
    background-color: #3a5b9b;
    color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 10px rgba(58, 91, 155, 0.3);
}

.contact-submit-btn:hover {
    background-color: #304a80;
    transform: translateY(-2px);
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 18px;
    }
    .contact-popup-box {
        padding: 30px 20px;
    }
}

/* ========================================== */
/* CONTACT DETAILS LIST STYLING               */
/* ========================================== */

.contact-details-list {
    margin: 15px 0 20px 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-details-list p {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: #444;
    margin: 0;
}

.contact-details-list i {
    color: #3a5b9b;
    margin-right: 8px;
}

.contact-details-list a {
    color: #444;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details-list a:hover {
    color: #3a5b9b;
    text-decoration: underline;
}
