* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: Arial, sans-serif;

    background: url(images/bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: white;
    font-family: 'Poppins', sans-serif;

    animation: fadein 1.5s linear;
}

/* ANIMATIONS */

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

@keyframes scroll{
    from{
        scale: 0.5;
    }
    to{
        scale: 1;
    }
}

/* ROOT */

.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.buttons{
    display: flex;
    flex-wrap: wrap;
}
.buttons a{
    background: linear-gradient(135deg, #6c63ff, #8ab4ff);
    margin-right: 20px;

    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);

    transition: 0.3s;
}
.buttons a:hover{
    transform: translateY(-10px);
}
.container{
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    border-radius: 30px;

    width: 800px;
    height: 500px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

a{
    text-decoration: none;
    color: white;
}
h1 span{
    background: linear-gradient(90deg, #8ab4ff, #b388ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* NAVBAR */

.navbar{
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 18px 35px;
    border-radius: 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    position: sticky;
    top: 20px;
    z-index: 100;
}
nav{
    display: flex;
    gap: 30px;
}
nav a{
    transition:0.3s
}
nav a:hover{
    color: lightskyblue;
}

/* MAINPAGE */

.mainpage{
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    height: 100vh;

    margin-bottom: 100px;

    animation: scroll linear; 
    animation-timeline: view();
    animation-range: entry 0% cover 40%;

}
.mainpage h1{
    margin-bottom: 20px;
    font-size: 60px;
    transform: translateY(-20px);
}
.mainpage p{
    transform: translateY(-30px);
    font-size: 20px;
}
.mainpage .buttons{
    margin-top: 50px;
}
.mainpage .buttons a:last-child{
    background: transparent;
    border: 1px solid white;
}
.mainpage .tag{
    color: rgb(94, 255, 0);
    font-size: 15px;
}
.mainpage .tag span{
    margin-left: 10px;
    font-size: 20px;
}
.tag-bg{
    background: rgba(0, 128, 0, 0.431);
    width: 250px;
    border-radius: 15px;
    height: 30px;

    margin-bottom: 30px;
}
.mainpage .container{
    padding: 0 30px;
}
.mainpage .buttons a:first-child:hover{
    transform: translateY(-10px);
    box-shadow: 0 2px 32px #88aaff;
}
.mainpage .buttons a:last-child:hover{
    background: white;
    color: black;
}

/* ABOUT */

.about{
    padding: 0 200px;
    margin-bottom: 200px;
    scroll-margin-top: 290px;

    animation: scroll linear; 
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}
.about .container{
    width: 100%;
    height: 100px;
    border-radius: 15px;

    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;

    padding: 20px 40px; 
}
.about h1{
    margin-bottom: 20px;
}

/* PROJECTS */

.projects{
    padding: 0 200px;
    display: flex;
    flex-direction: column;
    margin-bottom: 200px;
    scroll-margin-top: 290px;

    animation: scroll linear; 
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}
.card-section{
    display: flex;
    gap: 20px;
}
.card{
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    width: 400px;
    height: 220px;
    border-radius: 20px;

    padding: 20px 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;

    transition: 0.3s;
}
.card:hover{
    background: rgba(255, 255, 255, 0.155);
}
.projects h3{
    font-size: 25px;
    margin-bottom: 10px;
}
.projects p{
    font-size: 15px;
}
.projects h1{
    margin-bottom: 20px;
}
.projects .buttons{
    margin-top: 30px;
}
.projects .buttons a{
    background: transparent;
    border: 1px solid white;
}
.projects .buttons a:hover{
    background: white;
    color: black;
}
.buttons span{
    margin-left: 10px;
}

/* CONTACT */

.contact{
    padding: 0 200px;
    margin-bottom: 100px;
    scroll-margin-top: 190px;

    animation: scroll linear; 
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}
.contact .container{
    width: 100%;
    height: 170px;
    border-radius: 15px;

    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;

    padding: 20px 40px; 
}
.contact h1{
    margin-bottom: 20px;
    text-align: center;
}
.contact .buttons{
    margin-top: 30px;
}
.contact .buttons a{
    background: transparent;
    border: 1px solid white;
}
.contact .buttons a:hover{
    background: white;
    color: black;
}

/* REPOSNIVENESS */

@media (max-width: 1400px){

    .about,
    .projects,
    .contact{
        padding: 0 120px;
    }
}

@media (max-width: 1140px){

    .projects .card{
        height: 240px;
    }

    .about,
    .projects,
    .contact{
        padding: 0 80px;
    }
}

@media (max-width: 1106px){

    .contact .container{
        height: 190px;
    }

    .about .container{
        height: 120px;
    }
}

@media (max-width: 900px){

    .about,
    .projects,
    .contact{
        padding: 0 40px;
    }

    .mainpage .container{
        width: 100%;
        max-width: 800px;
    }

    /* CENTER PROJECT CARDS */
    .card-section{
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .card{
        width: 100%;
        max-width: 500px;
        height: auto;
        min-height: 220px;
    }

    /* CENTER ABOUT + CONTACT */
    .about .container,
    .contact .container{
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px){

    .navbar{
        padding: 18px 20px;
        flex-direction: column;
        gap: 15px;
    }

    nav{
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .mainpage h1{
        font-size: 48px;
    }

    .mainpage p{
        font-size: 18px;
    }

    .about,
    .projects,
    .contact{
        padding: 0 25px;
    }

    .about .container,
    .contact .container{
        height: auto;
        min-height: 140px;
    }

    /* KEEP EVERYTHING CENTERED */
    .about,
    .projects,
    .contact{
        text-align: center;
    }

    .projects .buttons,
    .contact .buttons,
    .mainpage .buttons{
        justify-content: center;
    }
}

@media (max-width: 600px){

    .mainpage .container{
        height: auto;
        min-height: 500px;
        width: 100%;
    }

    .mainpage h1{
        font-size: 38px;
    }

    .mainpage p{
        font-size: 16px;
    }

    .buttons{
        gap: 12px;
        justify-content: center;
    }

    .buttons a{
        margin-right: 0;
    }

    .about,
    .projects,
    .contact{
        padding: 0 20px;
    }
}

@media (max-width: 480px){

    .mainpage h1{
        font-size: 32px;
    }

    .mainpage p{
        font-size: 15px;
    }

    .buttons{
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .buttons a{
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .projects .card{
        padding: 20px 15px;
        height: 280px;
    }

    .projects h3{
        font-size: 22px;
    }
}