*{
    box-sizing: border-box;
}

/* Grundlegendes Layout & Zentrierung */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    font-family: 'Helvetica Neue', sans-serif;
    text-align: center;
    cursor: crosshair;
    background-color: white;
    position: relative;
    overflow: hidden;
}

body{
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hauptcontainer für den Inhalt */
#main-content {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 5;
    transition: filter 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

/* Hintergrundanimation */
.fade-out {
    filter: blur(5px);
    opacity: 0.5;
    pointer-events: none;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: filter 1s ease-in-out;
    z-index: 1;

    &.open{
        pointer-events: none;
    }
}

/* Blur-Effekt für den Hintergrund */
.background-container.blurred {
    filter: blur(5px);
}

/* GRAIN-EFFEKT OVERLAY INNERHALB DES BACKGROUND-CONTAINERS */
/*
.grainy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('grainy.png');
    opacity: 0.05;
    z-index: 3;
    transition: opacity 1s ease-in-out;
}
 */

.left-half, .right-half {
    width: 50%;
    height: 100%;
    position: absolute;
    top: 0;
    transition: transform 1s ease-in-out;
}

.left-half {
    left: 0;
    background: repeating-linear-gradient(
            to right,
            black 0px, black 30px,
            white 30px, white 60px
    );
    background-size: 60px 100%;
    background-position-x: 0;
    animation: moveLeft 2s linear infinite;
}

.right-half {
    right: 0;
    background: repeating-linear-gradient(
            to left,
            black 0px, black 30px,
            white 30px, white 60px
    );
    background-size: 60px 100%;
    background-position-x: 0;
    animation: moveRight 2s linear infinite;
}

.open .left-half {
    transform: translateX(-100%);
}

.open .right-half {
    transform: translateX(100%);
}

@keyframes moveLeft {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: -60px;
    }
}

@keyframes moveRight {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 60px;
    }
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.extended-content {
    position: fixed;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: 10;

    &:has(.title-fade-out){
        pointer-events: none;
    }
}

.clickable-title {
    cursor: pointer;
    transition: color 0.3s ease, filter 0.3s ease, opacity 0.5s ease;
    font-size: 2.5em;
    color: rgb(0, 0, 0);
    filter: blur(2px);
}

.clickable-title:hover {
    color: rgb(0, 255, 0);
    filter: blur(0);
}

/* Neue Klasse für das Ausblenden des Titels */
.title-fade-out {
    opacity: 0;
    pointer-events: none;
}

.scrolling-text-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 3;
    overflow: hidden;
    border-bottom: 2px solid rgb(0, 255, 0);
    transition: opacity 0.5s ease-in-out;
}

.scrolling-text-container.initial-hidden {
    opacity: 0;
}

.scrolling-text {
    display: inline-block;
    white-space: nowrap;
    position: relative;
    top: 50%;
    transform: translateY(-50%);

    animation: scroll-text 20s linear infinite;
}

.scrolling-text span {
    display: inline-block;
    padding-right: 100px;
    color: rgb(0, 255, 0);
    font-size: 24px;
    font-weight: bold;
}

@keyframes scroll-text {
    from {
        transform: translate(0, -50%);
    }
    to {
        transform: translate(-50%, -50%);
    }
}


/* Plus-Buttons und Drop-up-Menüs */
.corner-buttons {
    position: fixed;
    bottom: 1.25rem;
    right: 0;
    z-index: 5;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    padding: 0 2rem;
    pointer-events: auto;
}

.plus-container {
    font-size: 3rem;
    font-weight: bold;
    color: rgb(0, 255, 0);
    transition: transform 0.3s ease, color 0.3s ease, filter 0.3s ease; /* Fügt Filter zu Übergängen hinzu */
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: blur(2px); /* Standard-Unschärfe */

    img{
        height: 1em;
        width: auto;
    }
}

.plus-container:hover {
    filter: blur(0); /* Schärfe beim Hovern */
}

.plus-container.active {
    transform: rotate(45deg);
}

.plus-green {
    color: rgb(0, 255, 0) !important;
}

.plus-container:hover {
    color: rgb(0, 255, 0);
}

.drop-up-menu {
    position: absolute;
    bottom: 60px;
    left: 30px;
    padding: 10px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    z-index: 101;
    pointer-events: auto;
    animation: fade-in-up 0.3s ease-out forwards;
}

.drop-up-menu.right {
    left: auto;
    right: 30px;
    align-items: flex-end;
}

.drop-up-menu a {
    color: rgb(0, 255, 0);
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.drop-up-menu a:hover {
    color: gray;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overlays */
.overlay {
    flex-direction: column;
    justify-content: center;
    align-items: center;

    color: white;
    animation: fadeIn 0.5s ease forwards;

    background: none;
    border: none;

    &::backdrop{
        background: rgba(0, 0, 0, 0.8);
    }
}

.overlay.office {
    padding-top: 60px;
}

.overlay.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.index-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.project-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-decoration: none;
    color: rgb(0, 255, 0);
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s ease;
    cursor: pointer;
    padding: 5px 0;
    text-align: left;
}

.project-link:hover {
    color: lightgray;
}

/* Standard-Regeln für alle Spalten, die sich den Platz teilen */
.column-text {
    flex: 1;
    text-align: left;
}

/* Leere Spalten, die nur zur Ausrichtung dienen, sollen keinen Platz einnehmen */
#office-overlay .project-link .placeholder {
    flex: 1;
    text-align: left;
    color: transparent;
}

/* Die rechte Spalte soll rechtsbündig sein */
.year-column {
    flex-grow: 0;
    text-align: right;
}

/* SPEZIELLE REGELN FÜR DAS OFFICE-OVERLAY */
#office-overlay{
    .project-link{
        .column-text {
            flex: 1;
        }

        .column-text:first-child {
            text-align: left;
        }

        .column-text:nth-child(2) {
            text-align: center;
        }

        .column-text:last-child {
            text-align: right;
        }
    }
}

.project-divider {
    width: 100%;
    height: 1px;
    background-color: rgb(0, 255, 0);
    margin: 5px 0;
}

dialog{
    form{
        margin-top: 40px;
        cursor: pointer;
        font-size: 14px;
        margin-bottom: 20px;
    }
}

.close-overlay {

}

.close-overlay:hover {
    color: rgb(0, 255, 0);
}

.images{
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    figure{
        display: none;

        position: absolute;
        margin: 0;
        inset: 0;

        &:has(.random-image){
            display: block;
        }
    }

    picture{
        display: none;
        position: absolute;
        width: 600px;
        height: auto;
        z-index: 0;
        animation: fadeIn 0.5s ease forwards;
        pointer-events: auto;
        cursor: move;

        @media (max-width: 768px) {
            width: 300px;
        }

        img{
            width: 100%;
            height: auto;
            display: block;
        }

        &.random-image {
            display: block;
        }
    }

    figcaption{
        position: fixed;
        bottom: 1.75rem;
        left: 1.75rem;
        z-index: 100;
        display: none;
    }

    figure:has(.random-image.recent){
        figcaption{
            display: block;
        }
    }
}



/* Neue Klasse für den "TO BE ANNOUNCED"-Text */
.teaching-text {
    color: rgb(0, 255, 0);
    font-size: 24px;
    font-style: italic;
    font-weight: normal;
}

/* Impressum-Textfarbe an den Lauftext anpassen */
#imprint-overlay h2,
#imprint-overlay p {
    color: rgb(0, 255, 0);
}

@media (max-width: 768px) {
    .scrolling-text {
        font-size: 18px;
        animation-duration: 30s;
    }


    .clickable-title {
        font-size: 2em;
    }

    .corner-buttons {
        font-size: 14px;
        padding: 0 20px;
    }

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

h1 {
    color: black;
}

button{
    color: inherit;
    font: inherit;
    border: none;
    border-radius: 0;
    background: none;
    cursor: pointer;
}

a{
    color: currentColor;
    text-decoration: underline;
}