@keyframes fadeout
{
    from {
        opacity: 100;        
    }
    to {
        opacity: 0;
    }
}

@keyframes fadein
{
    from {
        opacity: 0;
    }
    to {
        opacity: 100;
    }
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


:root {
    --buttoncolor: rgb(75, 169, 214);
    --bgcolor: #070511;
    --textcolor: #f9f9f9;

}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

html {
    overflow-y: scroll;
    background-image: url("img/morning.jpg");
    background-attachment: fixed;
}

header {
    padding: 1rem 0rem 1rem 3rem;
    width: 100%;
    height: 10%;
    display: flex;
    justify-content: space-between; /* Centers the items horizontally */
    align-items: center; /* Centers the items vertically */
    position: fixed;
    top: 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    background-color: var(--bgcolor);
    border-bottom: 5px solid var(--buttoncolor);
}

header > h1, header > nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    display: flex; /* Makes the list items line up horizontally */
    padding-left: 0; /* Removes default list padding */
    gap: 25px; /* Space between list items */
    padding-right: 35px;
}

li {
    list-style-type: none;
    font-size: 1.25rem;
}

li {
    line-height: 1.75;
}

.link-button > a {
    filter: invert(1);
}

.link-button > a:hover {
    filter: invert(0.35) sepia(1) saturate(5) hue-rotate(170deg) brightness(1.1);
    -webkit-transition: filter 100ms ease-in;
    -ms-transition: filter 100ms ease-in;
    transition: filter 100ms ease-in;
}

.button, .button > a {
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    justify-content: center;
    align-items: center;
}

a {
    text-decoration: none;
    color: black;
}

a:hover {
    color: gray;
}

.button:hover, .button > a:hover {
    cursor: pointer;
    color: var(--buttoncolor);
    -webkit-transition: color 100ms ease-in;
    -ms-transition: color 100ms ease-in;
    transition: color 100ms ease-in;
}

main > div > a:first-child {
    width: 100rem;
    height: 100rem;
}

p {
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: black;
    margin: auto;
    font-size: 3rem;
}

h2 {
    padding-top: 100px;
    padding-bottom: 50px;
    text-align: center;
    font-size: 3rem;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: black;
}


section > p:first-of-type {
    padding-top: 110px;
    padding-bottom: 40px;
    padding-left: 30px;
    padding-right: 30px;
    text-align: center;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

#projects {
    display: none; /* Flexbox for layout */
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
    justify-content: center; /* Center items horizontally */
    gap: 24px; /* Space between projects */
    padding: 40px 20px; /* Padding around the section */
}

.project {
    display: flex; /* Flexbox for centering project content */
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center-align text inside projects */
    gap: 16px; /* Space between elements inside the project */
    max-width: 600px; /* Set max width for each project */
    width: 100%; /* Make it responsive */
    padding: 20px; /* Add inner padding */
    border: 3px solid black; /* Border for styling */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional shadow */
    background-color: #f9f9f9;
}

iframe {
    width: 100%; /* Make iframe responsive */
    max-width: 532px; /* Limit max width */
    height: 300px; /* Fixed height */
    border: none; /* Remove iframe border */
    display: block; /* Prevent inline display issues */
    margin: 0 auto; /* Center iframe within the project */
}

.social-img {
    max-width: 30px;
    margin: 0 auto;
    display: inline-block;
}

h3 {
    font-family: 'Open Sans', 'Helvetica Neue', sans-serif
}

.fadein {
    animation-name: fadein;
    animation-duration: 1.2s;
}

.fadeout {
    animation-name: fadeout;
    animation-duration: 0.6s;
}

.morning {
    background-image: url("img/morning.jpg");
    -webkit-transition: background-image 500ms linear;
    -ms-transition: background-image 500ms linear;
    transition: background-image 500ms linear;
}

.evening {
    background-image: url("img/evening.jpg");
    -webkit-transition: background-image 500ms linear;
    -ms-transition: background-image 500ms linear;
    transition: background-image 500ms linear;
}

.night {
    background-image: url("img/night.jpg");
    -webkit-transition: background-image 500ms linear;
    -ms-transition: background-image 500ms linear;
    transition: background-image 500ms linear;
}

.nice {
    background-image: url("img/nice.gif");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    margin: 0;
}

#special {
    width: 50px;
    height: 50px;
    border-radius: 30px;
    position: fixed;
    bottom: 50px;
    left: 50px;
    font-size: 2rem;
    font-weight: bold;
}

#warning {
    color: red;
    font-weight: bold;
    margin-top: 5px;
}

#special:hover {
    background-color: var(--bgcolor);
    color: #f9f9f9;
    cursor: pointer;
}

@media (max-width: 1000px) {
    #projects {
        gap: 16px; /* Adjust spacing for smaller screens */
    }

    .project {
        max-width: 100%; /* Allow projects to fill smaller screens */
    }

    iframe {
        height: 200px; /* Adjust height for smaller screens */
    }

    header {
        justify-content: center;
        padding-left: 0rem;
    }

    nav, nav ul {
        display: none;
    }

    #about {
        display: block;
    }

    #projects {
        display: flex;
    }

    p {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    p {
        font-size: 2rem;
        padding-left: 25px;
        padding-right: 25px;
        padding-bottom: 200px;
    }
}