
@media (max-width: 800px) {
  .menu-button{
    display: flex !important;
    }

    h2:not(.intro h2){
        text-align: center;
    }

  .hideOnMobile{
    display: none;
  }

  .skills-logos img{
    max-width: 100px;
    max-height: 100px;
  }

  #code{
    width: 200px;
    top: 90% !important;
  }

  #main-pic {
    display: none;
  }
  #about-me {
    max-width: 100% !important;
    padding: 0.5rem !important;
    gap: 0rem !important;
    margin: auto;
    overflow-wrap: break-word;
  }
  .info{
    width: 90% !important;
  }

  .posters img{
    gap: 1rem;
    width: 110px;
  }


    nav{
        padding: 0 1rem !important;
    }



}

@media (max-width: 1000px){
    #main-pic{
        display: none;
    }

}

@media(max-width: 500px){
  
  body{
    overflow-x: hidden;
  }
    .sidebar{
        width: 100%;
        background-color: white;

    }

    .name-email{
        flex-wrap: wrap;
    }

    #logo{
        display: none;
    }
    nav{
        height: 4rem !important;
        position: sticky;
        justify-content: flex-end !important;
    }
}


#loading-screen{
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}


#loading {
    border: 16px solid #f3f3f3;
    border-top: 16px solid var(--main-color);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    transition: opacity 0.5s ease-out;

}


#loading[style*="display: none"] {
    opacity: 0;
}



@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.scroll-watcher{
    height: 5px;
    position: fixed;
    top: 0;
    z-index: 1000;
    background-color: var(--main-color);
    width: 100%;
    scale: 0 1;
    transform-origin: left;
    animation: scroll-watcher linear;
    animation-timeline: scroll(y);
}

@keyframes scroll-watcher{
    to{scale: 1 1;}
}

*{
    font-size: 18px;
    font-family: "Poppins", sans-serif;
    --main-color: #5f737c;
    --main-lighter: #d3dcdf;
    --main-darker: #23292f;
    box-sizing: border-box

}

html:not(#code){
    margin: auto;
}

html{
    scroll-behavior: smooth;
}

p{
    font-size: max(1.1rem, 1.8vw);
}

h3{
    font-size: 1.5rem;
}

section{
  width: 100%;
}

#about-me > *, #skills > *, #contact > *{
  opacity: 0;
}

#background1{
    width: 100%;
    height: 500px;
    background-image: url('/background/divider.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; 
}

.menu-button{
    display: none;
}

#background2{
    width: 100%;
    height: 400px;
    background-image: url('/background/divider2.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: -70px;
    margin-bottom: -100px; 

}

#background3{
    width: 100%;
    height: 400px;
    background-image: url('/background/divider3.svg');
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    margin: -70px 0; 

}

#background4{
    width: 100%;
    height: 400px;
    background-image: url('/background/divider4.svg');
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    margin: -70px 0; 
}


@font-face{
    font-family: "IBM Plex Serif";
    src: url(fonts/IBMPlexSerif-Bold.woff);
    font-weight: bold;
}

@font-face{
    font-family: "Lato";
    src: url(fonts/Lato-Black.woff);
    font-weight: bold;
}

@font-face{
    font-family: "Poppins";
    src: url(fonts/Poppins-Regular.woff);
}



.slide-in-animation{
    animation: slide-in 1s ease;
}

.fade-in{
    animation: fade 0.5s ease;
}

.fade-out{
    animation: fade 0.5s ease;
    animation-direction: reverse;
}

@keyframes fade{
    from{
        opacity: 1;
    }

    to{
        opacity: 0;
    }
}

@keyframes slide-in{
    from{
        transform: translateY(-200px);
    }

    to{
        transform: translateY(0);
    }
}

@keyframes shift-right{
    from{
        opacity: 0;
        transform: translateX(-200px);
    }

    to{
        opacity: 1;
        transform: translateX(0);
    }
    
}

@keyframes shift-left{
    from{
        opacity: 0;
        transform: translateX(200px);
    }
    to{
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shift-up{
    from{
        opacity: 0;
        transform: translateY(-50px);
    }
    to{
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shift-down{
    from{
        opacity: 0;
        transform: translateY(-50px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

.shift-down{
    animation: shift-down 1s ease;
}
.shift-up{
    animation: shift-up 1s ease;
}

.shift-right{
    animation: shift-right 1s ease;
}

.shift-left{
    animation: shift-left 1s ease;
}

nav{
    height: 5rem;
    display: flex;
    font-weight: bold;
    top: 0;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 0 2rem;
    z-index: 3;
    transition:  background-color 1s ease, box-shadow 1s ease;

}

.hover-effect:hover{
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 1px 15px rgba(0,0,0,0.4);
    transition: background-color 1s ease, box-shadow 1s ease;

}


nav li:nth-last-child(2) a{
    color: white;
    border-radius: 5px;
    background-color: var(--main-color);
    transition: background-color 0.5s ease;
}


li{
    text-decoration: none;
    margin: 0;
    font-size: 1.5rem;
    padding: 0.5rem;
}

nav li{
    list-style: none;
}

nav li a{
    text-decoration: none;
    color: black;
    list-style: none;
    margin: 0;
    font-size: 1.5rem;
    padding: 0.5rem;
}

nav li:not(:nth-last-child(2)) a{
    transition: color 0.5s ease;
}

nav li:not(:nth-last-child(2)) a:hover{
    color: var(--main-color);

}

nav li:nth-last-child(2) a:hover{
    background-color: black;

}

nav > ul {
  display: flex;
  list-style-type: none;
  gap: 20px;
  margin: 0; 
  padding: 0;

}

#open, #close{
    height: 30px;
    filter: brightness(0%);
}
.sidebar{
    position: fixed;
    overflow: hidden;
    top: 0;
    right: 0;
    background-color:white;
    z-index: 1000;
    width: 250px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.8rem 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;

}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 998; /* Below sidebar (z-index: 999) but above other content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.sidebar.open + .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.sidebar.open{
    transform: translateX(0);
    box-shadow: 0 0 15px black;

}

body.sidebar-open {
    overflow: hidden;
}

.sidebar li{
    width: 100%;
    padding: 0.5rem 2rem;
}

.sidebar a{
    width: 100%;
}

#code{
    opacity: 0;
    filter: invert(43%) sepia(33%) saturate(221%) hue-rotate(154deg) brightness(93%) contrast(90%);
    position: absolute;
    max-width: 400px;
    right: 5%;
    z-index: -10;
    top: 75%;
}

#logo{
    margin-right: 0;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 0.2rem;
    border: solid 2px black;
    border-radius: 5px;
}



@keyframes appear{
    from{
        transform: translateY(-10%);
    }
    to{
        transform:translateY(0%);
    }
}

.dark{
    background-color: var(--main-color);
}



#about-me{
    padding: 5%;
    margin: 0;
    position: relative;
    justify-content: center;
    margin: auto;
    gap: 50px;
    display: flex;
    z-index: 2;
    background-color: var(--main-color);
}




.intro{
    z-index: -1;
    width: 100%;
    user-select: none;
    padding: 0 5vw;
    position: relative;
}

.intro-slide-in {
    animation: intro-slide-in 0.8s ease-out forwards;
}

@keyframes intro-slide-in {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.intro h1{
    opacity: 0;
    margin: 0;
    font-size: max(4rem, 8vw);
    font-weight: bolder;
    font-family: "Lato", sans-serif;
}



.bio p{
    opacity: 0;
    font-size: max(1rem, 1.5vw);

}



h2{
    font-size: max(2rem, 4vw) !important;
    font-family: "Lato", sans-serif;
    margin: auto;
}

.intro h2, .intro h2 > span{
    opacity: 0;
    font-size: max(1.3rem, 4vw) !important;
    font-family: "Lato", sans-serif;
    margin: auto;
    margin-top: max(1rem, 1vw);
    color: var(--main-color)
}

.intro h2:not(span){
    color: black;
}

.intro p{
    opacity: 0;
    font-size: max(1.2rem, 2vw);
    position: relative;
}
 

body{
    width: 100%;
    margin: auto;
    overflow-x: hidden;
}

content{
    max-width: 1200px;
}

.container{
    max-width: 1100px;
    margin: auto;
}
.main{
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;


}

#main-pic{
    opacity: 0;
    width: 30%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: solid 2px white;
}


.bio{
    font-size: 1rem;
    margin-top: 10px;
}


.info{
    width: 55vw;
    height: 50%;
    padding: 0 15px;
}


.icons{
    display: flex;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    text-align: left;
    gap: 0.5rem;
    margin-right: 5rem;
    filter: brightness(100);
}

.icon{
    max-height: 5rem;
}



.info h2,
.info h3 {
    opacity: 0;
    align-self: flex-start;
}


.info h3{
    font-size: 2.2rem;
    margin-left: 4.2rem;
    margin-top: -0.5rem;
    font-family: "IBM Plex Serif", serif;
}


#skills{
    height: auto;
    margin: auto;
    background-color: white;
}


.skills h2{
    padding: 0 3rem;
    margin-top: -5rem;
    margin-bottom: 2rem;
    position: relative;
}


.skills-logos{
    gap: 2rem;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    padding: 2rem;
    justify-content: center;
}
.skills-logos .logo{
    height: max(5rem, 8.5vw);
    width: max(5rem, 8.5vw);
    object-fit: contain;
    flex: 0 0 auto;
    display: block;
    opacity: 0;
}


.white{
    color: white;
}

#gallery h2{
    padding-right: 3vw;
}


#gallery{
    text-align: right;
    overflow-x: hidden;
}

.posters{
    padding-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#row1{
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    width: max-content;
    transform: translateX(0);
}

#row2{
    display: flex;
    gap: 1rem;
    width: max-content;
    transform: translateX(calc(-100% + 100vw));

}




.posters img{
    max-width: 200px;

}



#contact{
    padding: max(1rem, 5vw);
    gap: 10rem;
    width: 100%;
}



#name, #email{
    width: 90%;
}

.contact-info{
    border: solid 3px black;
    border-radius: 10px;
    padding: 2rem;
    max-width: 600px;
}

input, textarea{
    border: solid 1px black;
    border-radius: 5px;
    margin-top: 1rem;
}


button{
    background-color: white;
    color: black;
    padding: 0.5rem 0.5rem;
    border: solid 1px black;
    border-radius: 5px;
    font-size: max(1rem, 1vw); 
    display: inline-block; 
    min-width: 120px; 
    text-align: center;
}
.name-email{
    display: flex;
    gap: 1.2rem;
    width: 100%;
    justify-content: space-between;
}

.message{
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
}

label{
    font-size: 1.2rem;
    color: black;
}

#message-label::before{
    content: ""; 
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
    margin-bottom: -0.1rem;
    background-image: url("Icons8/message-bubble-svgrepo-com.svg");
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
}

#name-label::before{
    content: ""; 
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
    margin-bottom: -0.1rem;
    background-image: url("Icons8/user-svgrepo-com.svg");
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
}


#email-label::before{
    content: ""; 
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
    margin-bottom: -0.2rem;
    background-image: url("Icons8/mail-svgrepo-com.svg");
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
}

#social-media{
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    width: 100%;
    padding-top: 5rem;
    gap: max(1rem, 2vw);

}

#social-media img{
    height: max(25px, 3vw);

}

#github, #discord{
    filter: brightness(0%) saturate(0%);

}


