:root {
    --bg-color: rgb(255, 241, 202);
    --card-hover: rgb(112, 138, 88);
    --card-bg: rgb(45, 79, 43);
    --contrast: rgb(255, 184, 35);
    --contrast-dark: rgb(192, 131, 0);
    --contrast-darker: rgb(201, 92, 40);
    --red: rgb(181, 55, 38);
    --vh: 1vh;
}

/* * {
    outline: 1px solid rgba(255, 0, 0, 0.2);
} */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border: none;
    box-shadow: none;
}

::-webkit-scrollbar-thumb {
    background-color: var(--card-bg);
    border-radius: 4px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--card-hover);
}

* {
    box-sizing: border-box;
}

html {
    scrollbar-color: var(--card-bg) var(--bg-color);
    scrollbar-width: thin;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: auto;
}

body {
    font-family: "Geist Mono", Courier, monospace;
    text-align: center;
    padding-top: 20px;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.page-content {
    flex: 1 0 auto;
}

a {
    color: var(--contrast-dark);
    text-decoration: none;
}

h1,
.publications {
    margin: 2rem auto 1rem auto;
    max-width: 1000px;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: left;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.publications h2 {
    margin-bottom: 0.5rem;
}

h1.center-enabled,
.publications.center-enabled {
    text-align: center
}

.green-text {
    color: var(--card-bg);
}

@media (max-width: 999px) {

    h1,
    .publications {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: auto;
        margin-right: auto;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 820px) {

    h1,
    .publications {
        margin: 2rem auto 1rem auto;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.geist-mono-text {
    font-family: "Geist Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 100;
    font-style: normal;
}

.page-frame {
    position: fixed;
    transform: translateZ(0);
    will-change: transform;
    overflow: clip;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--vh, 1vh) * 100);
    z-index: 100;
    pointer-events: none;
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.15) 1%, rgba(0, 0, 0, 0) 15%),
        linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.15) 1%, rgba(0, 0, 0, 0) 15%),
        linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.15) 1%, rgba(0, 0, 0, 0) 15%);
    background-repeat: no-repeat;
    background-size: 100% 7%, max(30px, 10%) 100%, max(30px, 10%) 100%;
    background-position: top, left, right;
}


.topbar {
    position: static;
}

/* Sticky only when JS adds this class */
.topbar.sticky-enabled {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: transparent;
}


.topbar .container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;

    background-color: rgba(255, 241, 202, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transform: translateZ(0);
    padding: 0.5rem 1rem 0.5rem;
    border-radius: 0.5rem;
    overflow: visible;
    box-sizing: border-box;
}

.topbar .container::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    pointer-events: none;
    background: linear-gradient(to bottom,
            rgba(255, 241, 202, 0.3),
            rgba(255, 241, 202, 0));
    z-index: -1;
}

/* On wider screens: switch to horizontal row with three sections */
@media (min-width: 700px) {
    .topbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 999px) {

    .topbar,
    .nav-cards {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Navigation */
.nav-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    flex-grow: 1;
    background-color: transparent;
    backdrop-filter: none;
}

/* Card links */
.card {
    display: block;
    padding: 1rem 1.5rem;
    background: rgba(45, 79, 43, 0.9);
    text-decoration: none;
    color: var(--contrast);
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s;
}

.card:hover {
    background-color: var(--card-hover);
    transform: translateY(-3px);
}

.card.active {
    background-color: rgba(51, 51, 51, 0.9);
    color: var(--contrast);
}

.card.active:hover {
    transform: none;
    cursor: default;
}

.logo-link {
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    color: #333;
    padding: 0.4rem 0.4rem 0.4rem 0.6rem;
    transition: color 0.2s ease;
    flex-shrink: 1;
    background-color: rgba(255, 241, 202, 0.75);
    border-radius: 1rem;
    border: 3px solid var(--card-bg);
    max-width: 100%;
}

/* Above 730px: horizontal layout, logo left */
@media (min-width: 856px) {
    .topbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .topbar .container {
        justify-content: space-between;
    }

    .logo-link {
        text-align: left;
        margin: 0;
        display: block;
    }
}

/* Below 730px: stacked layout, logo centered */
@media (max-width: 855px) {
    .topbar {
        flex-direction: column;
        align-items: center;
    }

    .topbar .container {
        justify-content: center;
    }

    .logo-link {
        text-align: center;
        margin: 0 auto 0rem auto;
        display: inline-block;
    }
}


.logo-link:hover {
    color: #787878;
}


.no-style {
    color: var(--card-bg);
    font-weight: bold;
}

.no-style:hover {
    color: #555;
}


.team-roster {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: flex-start;

    max-width: 1000px;
    margin: 3rem auto 1rem auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 999px) {
    .team-roster {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
}

.team-member {
    display: flex;
    flex: 1 1 calc(50% - 2rem);
    max-width: 500px;
    gap: 1rem;
    align-items: flex-start;
}

.team-member a:hover {
    color: #555;
}

.member-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    border: 3px solid #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.member-info h3 {
    margin: 0;
    font-size: 1.2rem;
    text-align: left;
}

.member-role {
    font-weight: bold;
    margin: 0.25rem 0;
    text-align: left;
}

.member-description {
    margin: 1rem 0;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.member-photo-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.member-links {
    margin-top: 0.2rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.member-links img {
    width: 24px;
    height: 24px;
    transition: filter 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .member-links img:hover {
        filter: grayscale(100%);
    }
}


@media (max-width: 900px) {
    .team-member {
        flex-direction: column;
        flex: 0 0 200px;
        width: 200px;
        align-items: center;
        text-align: center;
        margin: 0 auto;
        gap: 0.1rem;
    }

    .member-photo-column {
        margin-bottom: 0;
        align-items: center;
    }

    .member-links {
        margin-bottom: 0.1rem;
        justify-content: center;
    }

    .member-info h3 {
        margin-top: 0.1rem;
    }
}


.image-text-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1000px;
    padding: 1rem;
    flex-wrap: nowrap;
}

.image-text-block.reverse {
    flex-direction: row-reverse;
}

.image-text-block .image {
    max-width: 1000px;
    max-height: 400px;
    height: auto;
    width: auto;
    flex-shrink: 1;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.3));
    display: block;
    margin: 0;
}

.image-text-block .text {
    flex: 1 1 300px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}


@media (max-width: 850px) {

    .image-text-block,
    .image-text-block.reverse {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .image-text-block .text,
    .image-text-block.reverse .text {
        order: 0;
    }

    .image-text-block .image,
    .image-text-block.reverse .image {
        order: 1;
        max-width: 100%;
        max-height: 400px;
    }

    .image-text-block .text {
        text-align: center;
    }

    .image-text-block.image-below>.text p:last-child {
        margin-bottom: 0;
    }

    .image-text-block.image-below>.image {
        margin-top: 0;
    }


}

.footer-logos {
    max-width: 1000px;
    width: 100%;
    margin: 7rem auto 0.5rem auto;
    padding: 2rem 1rem 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    justify-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    background-color: transparent;
    box-sizing: border-box;
    flex-shrink: 0;
}


.footer-logos img {
    max-height: 60px;
    height: auto;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}


.news-feed {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
}

.news-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #939393;
}

.news-headline {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    text-align: left;
}

.news-date {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: #666;
    text-align: left;
}

.news-body {
    margin-top: 0.8rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    text-align: left;
}

.contact-layout {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;

    max-width: 1000px;
    margin: 2rem auto 1rem auto;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: left;
    box-sizing: border-box;
}

.contact-text {
    flex: 1 1 60%;
    min-width: 300px;
}

.contact-text h1 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding: 0;
    text-align: left;
}


.contact-image img {
    display: block;
    width: clamp(200px, 55vw, 550px);

    height: auto;
    margin: 0;
}

.contact-image img {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: auto;
    margin: 0;
}


@media (max-width: 702px) {
    .contact-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-text {
        text-align: center;
    }

    .contact-text h1 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-image {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 1rem;
    }

    .contact-image img {
        width: 90%;
        max-width: 500px;
    }
}