@font-face {
    font-family: 'pixeldyundfrederick';
    src: url(/pixeldy_und_frederick_v02.woff);
    font-style: none;
    font-display: swap;
    text-wrap: balance;
    image-rendering: pixelated;
    line-height: 1; 
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'pixeldyundfrederick', sans-serif;
    font-weight: none;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: none;
    text-rendering: optimizeSpeed;
    text-shadow: none;
    outline: none;
    color: chartreuse;
    background:rgb(253, 253, 250); /* Warm white with green tint */;
}

#logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 350px;
    height: auto;
    z-index: 1000;
}

#navigation {
    position: fixed;
    top: 40px;
    right: 30px;
    display: flex;
    gap: 40px;
    z-index: 1000;
}

@keyframes fadeToGreen {
    0% {
        color: blue;
        filter: 
        drop-shadow(2px 2px 4px blue);
    }
    50% {
        color: blue;
        filter: 
        drop-shadow(2px 2px 4px blue);
    }
    100% {
        color: rgb(127, 255, 0);
        filter: none;
    }
}

#navigation h2 {
    color: chartreuse;
    text-decoration: none;
    font-size: 48px;
    font-weight: normal;
    transition:
        color 0.1s ease-in-out,
        filter ease-in-out 0.1s;
    margin: 0;
    padding: 0;
    animation: fadeToGreen 2s cubic-bezier(0, 1, 0.5, 1);
    cursor: pointer;

}

#navigation h2:hover {
    color: blue;
    filter: 
        drop-shadow(2px 2px 4px blue)
}

a {
    transition:
        color 0.1s ease-in-out,
        filter drop-shadow(2px 2px 4px blue); /* Change image on hover */
}

#navigation a:hover {
    color: blue;
    filter: 
        drop-shadow(2px 2px 4px blue)
}

#logo-container img {
    transition: color 0.1s ease-in-out, filter 0.1s ease-in-out;
    
}

#logo-container img:hover {
    content: url('/MICHA_BIELER_hover.png'); /* Change image on hover */
    filter: drop-shadow(2px 2px 4px blue);
}


/* Project Page Specific Styles */
.project-page {
    background: rgb(253, 253, 250);
    color: #333;
}

.project-container {
    max-width: 1600px;
    margin: 60px auto 60px;
    padding: 60px 10%;
}

.project-header {
    margin-bottom: 40px;
    border-bottom: 3px solid rgb(127, 255, 0);
    padding-bottom: 20px;
}

.project-header h1 {
    font-size: 2.5rem;
    color: rgb(127, 255, 0);
    margin-bottom: 20px;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
}

.project-meta {
    margin-top: 20px;
    font-size: 1rem;
    color: #666;
}

.project-grid {
    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 60px; /* Increase gap for more space between images */
    margin: 40px auto;;
}

.project-grid-small {
    display: grid;
    justify-content: center;
    justify-items: center;
    align-items: center;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px; /* Increase gap for more space between images */
    grid-auto-rows: auto;
    margin: 40px auto;
}

.project-grid img, .project-grid video, .project-grid-small img {
            width: 100%;
            height: auto;
            max-height: 90vw;
            object-fit: contain;
            object-position: center;
            filter: drop-shadow(2px 2px 4px rgba(0, 0, 73, 0.5));
            image-rendering: crisp-edges;
            transition: 
                transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28),
                filter 0.3s ease-out;
        }
.project-grid-small img {
    width: auto;
    max-width: 100%;
    max-height: 50vw;
    object-fit: contain;
    object-position: center;
}

        .project-grid img:hover, .project-grid video:hover, .project-grid-small img:hover {
            transform: scale(1.1) !important; /* Slightly larger scale */
            filter: 
                drop-shadow(4px 4px 8px blue) 
                brightness(1.02); /* Subtle light effect */
            z-index: 100;
        }

.back {
    position: fixed;
    bottom: 20px;
    right: 35px;
    z-index: 1000;
}

#back-icon {
    cursor: pointer;
}

/* Footer */
#copyright {
    position: bottom;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 16px;
    padding: 10px 0;
    z-index: 90;
    color: blue;
}

/* Popup Styles */
#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 3px solid chartreuse;
    padding: 20px;
    padding-left: 40px;
    padding-right: 40px;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: left;
    width: auto;
    min-width: 200px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

p #project-description {
   display: auto;
   position: relative;
    overflow: visible;
}

#popup.hidden {
    display: none;
}

#popup button {
    margin-top: 10px;
    padding: 5px 10px;
    cursor: pointer;
    align-self: center; /* Center the button horizontally */
}


p {
    font-size: 24px;
    color: chartreuse;
}

/* Mobile */
@media (max-width: 767px) {

    #logo-container {
        left: 50%;
        transform: translateX(-50%); /* Center horizontally */
    }

    .project-container {
        margin-top: 160px;
        padding: 0 10%; /* Add more space to the left and right */
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }

    #navigation {
        position: fixed;
        display: flex;
        flex-direction: column; /* Stack items vertically */
        gap: 20px; /* Space between items */
        z-index: 1000; /* Ensure visibility */
        bottom: 20px;
        top: unset;
        display: inline-flex;
        right: unset; /* Explicitly remove the right property */
        left: 20px;
        padding-bottom: 16px;
    }

    #navigation h2 {
        -webkit-writing-mode: sideways-lr; /* Display text vertically */
        -ms-writing-mode: tb-rl; /* For IE and Edge */
        writing-mode: sideways-lr; /* Display text vertically */
        color: rgb(127, 255, 0); /* Keep consistent color */
        transition: color 0.1s ease-in-out;
    }

    .back {
        right: 20px;
    }

}