﻿/* Basic page settings */
* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: calc(var(--header-height, 110px) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #203b31;
    background-color: #ffffff;
}

/* Place the logo and navigation on opposite sides. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 8%;
    border-bottom: 1px solid #dce3da;
}

.logo {
    display: inline-flex;
    flex-shrink: 0;
    max-width: 100%;
}

.logo img {
    display: block;
    width: 205px;
    max-width: 100%;
    height: auto;
}

/* Turn the list into a horizontal menu. */
.site-header nav ul {
    align-items: center;
    gap: 12px 20px;
}

.site-header nav a {
    display: inline-block;
    white-space: nowrap;
}

.site-header .nav-contact {
    padding: 12px 18px;
    border: 1px solid #327151;
    border-radius: 5px;
    color: #203b31;
    font-weight: bold;
    text-decoration: none;
}

.site-header .nav-contact:hover {
    background-color: #d4ed9d;
    border-color: #d4ed9d;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .site-header {
        flex-wrap: wrap;
    }
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

nav a {
    color: #203b31;
    font-size: 15px;
    text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
    color: #327151;
    text-decoration: underline;
    text-underline-offset: 6px;
}

a:focus-visible {
    outline: 2px solid #327151;
    outline-offset: 6px;
}

/* Main introduction: a dark overlay keeps text readable over the image. */
.hero {
    padding: 100px 8% 24px;
    background-color: #102d24;
    background-image:
        linear-gradient(90deg, rgba(9, 36, 27, 0.95), rgba(9, 36, 27, 0.55)),
        url("assets/project.jpg");
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.hero-content {
    max-width: 1100px;
}

.hero-label {
    margin: 0 0 24px;
    color: #d4ed9d;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1.6;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 24px;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.12;
    letter-spacing: -1.5px;
    text-wrap: balance;
}

.hero h1 span {
    color: #d4ed9d;
}

.hero-description {
    max-width: 480px;
    margin: 0 0 32px;
    color: #e0e8df;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-actions .hero-button {
    border: 1px solid #d4ed9d;
    line-height: 1.5;
}

.hero-actions .hero-button-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #aebfb0;
}

.hero-actions .hero-button-secondary:hover {
    background-color: #d4ed9d;
    border-color: #d4ed9d;
    color: #102d24;
}

.hero-button {
    display: inline-block;
    padding: 16px 24px;
    border-radius: 5px;
    background-color: #d4ed9d;
    color: #102d24;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
}

.hero-button:hover {
    background-color: #e5f5c3;
}

.hero-button:focus-visible {
    outline-color: #ffffff;
}

/* Keep research topics on the left and the scroll link on the right. */
.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 12px;
    line-height: 1.6;
}

.hero-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #e0e8df;
}

.hero-scroll {
    margin-left: auto;
    flex-shrink: 0;
    color: #d4ed9d;
    text-decoration: none;
}

.hero-scroll:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hero-scroll:focus-visible {
    outline-color: #ffffff;
}

/* Introduce the project in two columns, stacked on smaller screens. */
.about-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: clamp(32px, 6vw, 96px);
    padding: 88px 8%;
    background-color: #f5f7f0;
    scroll-margin-top: 24px;
}

.about-label {
    margin: 0 0 20px;
    color: #327151;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.about-heading h2 {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.15;
    letter-spacing: -1px;
    text-wrap: balance;
}

.about-heading h2 span {
    color: #327151;
}

.about-copy p {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.8;
}

.about-copy .about-lead {
    font-size: 21px;
    line-height: 1.6;
}

.about-copy h3 {
    margin: 28px 0 12px;
    font-size: 18px;
}

.about-link {
    display: inline-block;
    color: #327151;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.6;
    text-underline-offset: 5px;
}

.about-link:hover {
    color: #102d24;
}

@media (max-width: 900px) {
    .about-section {
        grid-template-columns: 1fr;
    }
}

.research-section {
    padding: 88px 8%;
}

.research-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.research-heading > p {
    margin: 0;
    font-size: 18px;
    line-height: 1.8;
}

.research-section h2 {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.15;
    letter-spacing: -1px;
    text-wrap: balance;
}

.research-section h2 span {
    color: #327151;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.research-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid #dce3da;
    border-radius: 6px;
    background-color: #f5f7f0;
}

.research-card.research-flippable {
    display: grid;
    padding: 0;
    border: 0;
    background: transparent;
    perspective: 1200px;
}

.research-face {
    grid-area: 1 / 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid #dce3da;
    border-radius: 6px;
    background-color: #f5f7f0;
    backface-visibility: hidden;
    transition: transform 550ms ease;
}

.research-front,
.research-back {
    cursor: pointer;
}

.research-back {
    transform: rotateY(-180deg);
    background-color: #edf3e5;
}

.is-flipped .research-front {
    transform: rotateY(180deg);
}

.is-flipped .research-back {
    transform: rotateY(0);
}

.research-back h3 {
    margin-top: 0;
}

.research-flip-button {
    align-self: flex-start;
    margin-top: auto;
    padding: 20px 0 0;
    border: 0;
    background: transparent;
    color: #327151;
    font: bold 15px/1.6 Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}

.research-flip-button:hover {
    color: #102d24;
}

.research-flip-button:focus-visible {
    outline: 2px solid #327151;
    outline-offset: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .research-face {
        transition: none;
    }
}

.research-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.research-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: #327151;
}

.research-number {
    color: #327151;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
}

.research-card h3 {
    margin: 28px 0 16px;
    font-size: 24px;
    line-height: 1.3;
}

.research-card p {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.8;
}

.research-details {
    margin-top: auto;
    border-top: 1px solid #dce3da;
    padding-top: 20px;
}

.research-details summary {
    color: #327151;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.6;
    cursor: pointer;
}

.research-details summary:hover {
    color: #102d24;
}

.research-details summary:focus-visible {
    outline: 2px solid #327151;
    outline-offset: 6px;
}

.research-objectives {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
    line-height: 1.8;
}

.research-objectives li + li {
    margin-top: 16px;
}

.research-detail-copy {
    margin-top: 20px;
}

.research-detail-copy p:last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .research-heading {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

.team-section {
    padding: 88px 8%;
    background-color: #f5f7f0;
    scroll-margin-top: 24px;
}

.team-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.team-heading > p {
    margin: 0;
    font-size: 18px;
    line-height: 1.8;
}

.team-section h2 {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.team-section h2 span {
    color: #327151;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.team-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid #dce3da;
    border-radius: 6px;
    background-color: #ffffff;
}

.team-card > img,
.team-placeholder {
    display: block;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 25%;
}

.team-placeholder {
    display: grid;
    place-items: center;
    background-color: #e1ebd6;
    color: #327151;
    font-size: 28px;
    font-weight: bold;
}

.team-card-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.team-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.3;
}

.team-card h3 a {
    color: inherit;
    text-decoration: none;
}

.team-card h3 a:hover {
    color: #327151;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.team-role {
    margin: 0 0 12px;
    color: #327151;
    font-size: 15px;
    line-height: 1.6;
}

.team-affiliation {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .team-heading {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

@media (max-width: 600px) {
    .team-card {
        padding: 20px;
        gap: 16px;
    }

    .team-card > img,
    .team-placeholder {
        width: 64px;
        height: 64px;
    }

    .team-card h3 {
        font-size: 20px;
    }
}

.resources-section {
    padding: 88px 8%;
    scroll-margin-top: 24px;
}

.resources-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: clamp(32px, 6vw, 96px);
}

.resources-section h2 {
    margin: 0;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.resources-section h2 span {
    color: #327151;
}

.resource-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid #dce3da;
    color: #203b31;
    text-decoration: none;
}

.resource-link:first-child {
    border-top: 1px solid #dce3da;
}

.resource-link small {
    display: block;
    margin-bottom: 8px;
    color: #327151;
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.resource-link strong {
    font-size: clamp(22px, 2.5vw, 28px);
    line-height: 1.3;
}

.resource-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid #dce3da;
    border-radius: 50%;
    font-size: 24px;
}

.resource-link:hover .resource-arrow,
.resource-link:focus-visible .resource-arrow {
    background-color: #d4ed9d;
    border-color: #d4ed9d;
}

.resource-link:hover strong {
    color: #327151;
}

.resource-note {
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .resources-section {
        padding: 48px 20px;
    }
}

.contact-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 64px 8%;
    background-color: #204f3c;
    color: #ffffff;
    scroll-margin-top: 24px;
}

.contact-section .about-label {
    color: #d4ed9d;
}

.contact-section h2 {
    margin: 0 0 20px;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.contact-description {
    max-width: 580px;
    margin: 0;
    color: #e0e8df;
    font-size: 18px;
    line-height: 1.8;
}

.contact-section .hero-button {
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .contact-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
        padding: 48px 20px;
    }
}

.updates-section {
    padding: 64px 8% 88px;
    min-height: 60vh;
    background-color: #f5f7f0;
}

.updates-container {
    max-width: 1200px;
    margin-inline: auto;
}

.updates-section h1 {
    margin: 0 0 20px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}

.updates-section .detail-intro {
    margin: 0;
    font-size: 20px;
    line-height: 1.8;
}

.updates-section .empty-state {
    max-width: 800px;
    margin-top: 40px;
    padding: 32px;
    border: 1px solid #dce3da;
    border-radius: 6px;
    background-color: #ffffff;
}

.updates-section .empty-state h2 {
    margin: 0 0 16px;
    color: #327151;
    font-size: 24px;
    line-height: 1.3;
}

.updates-section .empty-state p {
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.8;
}

@media (max-width: 600px) {
    .updates-section {
        padding: 40px 20px 56px;
    }

    .updates-section .empty-state {
        padding: 24px;
    }
}

/* Profile pages share the homepage header, footer, and color palette. */
.skip-link {
    position: fixed;
    top: -100px;
    left: 20px;
    z-index: 200;
    padding: 12px 16px;
    background: #ffffff;
    color: #203b31;
}

.skip-link:focus {
    top: 12px;
}

.profile-section {
    padding: 64px 8% 88px;
    background-color: #f5f7f0;
}

.profile-container {
    max-width: 1200px;
    margin-inline: auto;
}

.profile-back-link {
    margin-bottom: 40px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: clamp(32px, 5vw, 72px);
}

.profile-photo {
    width: 280px;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    object-position: center 25%;
}

.profile-copy {
    max-width: 760px;
    min-width: 0;
}

.profile-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}

.profile-copy p {
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 1.8;
}

.profile-copy .profile-role {
    margin-bottom: 8px;
    color: #327151;
    font-size: 19px;
    font-weight: bold;
}

.profile-copy .profile-affiliation {
    padding-bottom: 24px;
    border-bottom: 1px solid #dce3da;
    font-size: 15px;
}

.profile-cv:focus-visible {
    outline-color: #327151;
}

.profile-social {
    margin: 0 0 24px;
}

.profile-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #327151;
    border-radius: 5px;
    color: #327151;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
}

.linkedin-link:hover {
    background-color: #d4ed9d;
}

@media (max-width: 760px) {
    .profile-section {
        padding: 40px 20px 56px;
    }

    .profile-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .profile-photo {
        width: 240px;
        height: auto;
    }
}

/* Place the funding logo beside its acknowledgment. */
.funding-strip {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 28px 8%;
    border-bottom: 1px solid #dce3da;
    background-color: #ffffff;
    font-size: 14px;
    line-height: 1.6;
}

.funding-logo {
    display: block;
    flex-shrink: 0;
    max-width: 100%;
}

.funding-strip img {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
}

.funding-strip p {
    margin: 0;
}

.funding-strip .funding-number {
    margin-top: 6px;
    color: #327151;
}

/* Footer: shared navigation and a link back to the page header. */
.site-footer {
    padding: 28px 8% 18px;
    background-color: #102d24;
    color: #e0e8df;
}

.footer-top {
    display: grid;
    grid-template-columns: max-content minmax(0, 480px) max-content;
    justify-content: space-between;
    align-items: start;
    gap: 32px;
}

.footer-top > * {
    min-width: 0;
}

.footer-funding {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: #e0e8df;
}

@media (min-width: 701px) and (max-width: 1100px) {
    .footer-top {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
    }

    .footer-funding {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.footer-top nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    gap: 8px 24px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.footer-heading {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
}

.footer-contact .footer-email {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.footer-email {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-email span,
.footer-email a {
    min-width: 0;
}

.email-icon {
    display: block;
    flex-shrink: 0;
    color: #d4ed9d;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* A light backing keeps the original logo and tagline readable. */
.footer-logo {
    justify-self: start;
    padding: 8px 10px;
    border-radius: 6px;
    background-color: #ffffff;
}

.site-footer a {
    color: #e0e8df;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
    color: #d4ed9d;
    text-decoration: underline;
    text-underline-offset: 6px;
}

.site-footer a:focus-visible {
    outline-color: #d4ed9d;
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 12px;
    line-height: 1.6;
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 700px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Adjust the page sections on smaller screens. */
@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    nav ul {
        gap: 18px;
    }

    .hero {
        padding: 64px 20px 24px;
    }

    .hero-bottom {
        margin-top: 40px;
        gap: 16px;
    }

    .hero-description {
        font-size: 16px;
    }

    .about-section,
    .research-section,
    .team-section {
        padding: 48px 20px;
    }

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

    .funding-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px 20px;
    }

    .site-footer {
        padding: 24px 20px 18px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

