* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

:root {
    --primary-color: black;
    --secondary-color: #ffffff;
    --tertiary-color: #ffffff;
    --space-s: .5vh;
    --space-m: 1vh;
    --space-l: 5vh;
    --space-xl: 25vh;
    --font-s: .9rem;
    --font-m: 15px;
    --font-l: 80px;
    --grotesk: 'Helvetica Neue', sans-serif;
    --serif: "Times", serif;
}

@font-face {
    font-family: 'EB-Garamond';
    src: url(/assets/fonts/EBGaramond-Regular.ttf) format('truetype');
}

@font-face {
    font-family: 'EB-Garamond-Italic';
    src: url(/assets/fonts/EBGaramond-Italic.ttf) format('truetype');
}

@font-face {
    font-family: 'Adobe-Garamond';
    src: url(/assets/fonts/AGaramondPro-Regular.otf) format('opentype');
}

@font-face {
    font-family: 'Adobe-Garamond-Serif';
    src: url(/assets/fonts/AGaramondPro-Italic.otf) format('opentype');
}

@font-face {
    font-family: 'Pantasia';
    src: url(/assets/fonts/Pantasia-Regular.ttf) format('truetype');
}

body {
    width: 100vw;
    background-color: black;
    color: var(--secondary-color);
}

/* Global Typography Classes */
.serif {
    font-family: var(--serif);
    font-weight: 400;
    line-height: calc(var(--font-m) * 1.28);
    font-size: 17px;
}

.grotesk {
    font-family: var(--grotesk);
    font-weight: 400;
    line-height: calc(var(--font-m) * 1.2);
    font-size: var(--font-m);
}

.emphasized {
    font-style: italic;
}

nav p,
a {
    text-decoration: none;
    color: var(--primary-color);
    background-color: var(--tertiary-color);
    padding: 0 var(--space-m);
}

.about-content a {
    padding: 0;
}

.about-content a:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

nav {
    position: fixed;
    display: flex;
    z-index: 1000;
}

#nav-primary {
    width: fit-content;
    top: 50%;
    align-items: flex-start;
    padding: 0px var(--space-s);
}

#nav-secondary {
    top: var(--space-m);
    right: var(--space-m);
    flex-direction: row;
    align-items: flex-start;
}

.nav-categories a:hover {
    cursor: pointer;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    opacity: 1;
}

.nav-name,
.nav-categories,
.nav-project-infos,
.nav-exhibitions,
.nav-index,
.nav-about {
    display: flex;
    flex-direction: column;
}

.nav-project-infos,
.nav-categories,
.nav-index,
.nav-exhibitions,
.nav-about {
    text-wrap: balance;
}

.nav-filter {
    background-color: transparent;
    color: var(--secondary-color);
    opacity: .5;
}

.nav-filter[data-active="true"] {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    opacity: 1;
}

.project-description {
    max-width: 45ch;
    text-wrap: balance;
    white-space: normal;
}

.toggle-index:hover,
.toggle-exhibitions:hover,
.toggle-about:hover {
    cursor: pointer;
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.nav-project-infos {
    max-width: 50ch;
    transition: opacity 150ms ease-in-out;
}

.nav-about {
    max-width: 50ch;
    transition: opacity 150ms ease-in-out;

    p {
        color: var(--primary-color);
        background-color: var(--tertiary-color);
    }
}
#contact-info {
    padding-top: var(--space-m);
    background-color: var(--tertiary-color);
}

.index-item {
    display: grid;
    grid-template-columns: 1fr 35% 15%;

    padding: 0px;

    p {
        color: var(--primary-color);
        background-color: var(--secondary-color);
    }
}

.index-item:hover,
.index-item:hover p {
    cursor: pointer;
    opacity: 1;
    transition: opacity 150ms ease-in-out;
}

.index-content,
.exhibitions-list,
.about-content {
    white-space: normal;
}

.index-item[data-active="true"] {
    opacity: 1;
}

.index-item {
    opacity: .9;
    transition: opacity 150ms ease-in-out;
}

.is-hidden {
    display: none;
}

#content {
    margin-top: 10vh;
}

.content-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 200px;
}

.content-row:hover {
    cursor: ew-resize;
}

article[hidden] {
    display: none !important;
}

.project-imgs {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* justify-content: center; <-- Entfernen oder ändern */
    justify-content: flex-start;
    height: 95vh;
    width: 100vw;
    overflow-x: auto;
    /* 'auto' ist sauberer als 'scroll' */
    gap: var(--space-s);
    /* Optional: Abstand zwischen den Bildern */
    padding: 0 var(--space-s);
    /* Damit das erste Bild nicht am Rand klebt */

    /* Scrollbar verstecken (wie in deinem Code gewünscht) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.project-imgs::-webkit-scrollbar {
    display: none;
    /* Für Chrome/Safari */
}

.project-imgs img {
    height: 100%;
    width: auto;
    flex-shrink: 0;
    margin: auto;
    /* WICHTIG: Verhindert, dass Bilder gestaucht werden */
}

#content,
.project-imgs {
    overscroll-behavior-x: contain;
}

.project-info {
    padding-bottom: var(--space-s);
    display: flex;
    width: 100%;
    height: fit-content;
    justify-content: center;
}

#index {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-s) var(--space-m);
}


/* Nav Layout Desktop & Mobile */
@media (max-width: 768px) {
    :root {
        --space-s: .5vh;
        --space-m: 1.5vh;
        --space-l: 3vh;
        --space-xl: 15vh;
        --font-s: .9rem;
        --font-m: 15px;
        --font-l: 60px;
    }
    .serif {
        font-size: 16px;
    }
    #nav-primary {
        top: auto;
        bottom: var(--space-m);
        flex-direction: column;
        align-items: flex-start;
        max-width: calc(100vw - 2 * var(--space-m));
        max-height: 45vh;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #nav-primary::-webkit-scrollbar {
        display: none;
    }

    #nav-secondary {
        flex-direction: column;
        align-items: flex-end;
        max-width: calc(100vw - 2 * var(--space-m));
    }

    .content-row {
        margin-bottom: 1vh;
    }

    .project-imgs {
        flex-direction: row;
        height: auto;
        max-height: fit-content;
        padding-bottom: 25vh;
        width: 100vw;
    }

    .project-imgs img {
        height: 100%;
        width: auto;
        max-width: 85vw;
        /* Ensures the next image is always visible */
        object-fit: contain;
        flex-shrink: 0;
    }

    /* Override nowrap on mobile to ensure long titles/texts are fully readable */
    .nav-project-infos,
    .nav-categories,
    .nav-name {
        white-space: normal;
        width: auto !important;
        /* disable forced width animation if it restricts reading */
    }
}

.index-content,
.exhibitions-list,
.about-content {
    text-align: left;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.index-content::-webkit-scrollbar,
.exhibitions-list::-webkit-scrollbar,
.about-content::-webkit-scrollbar {
    display: none;
}