/* CSS reset code */

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

html{
    scroll-behavior: smooth;
}

::-webkit-scrollbar{
    width: 0px;
}

/* ::-webkit-scrollbar-track{
    background-color: #fff;
    border: none;
}

::-webkit-scrollbar-thumb{
    border-radius: 2px;
    background-color: #bdd431;
} */

:root{
    --white-color: #e8e5fa;
    --black-color: #09061b;
    --blue-color: #4831d4;
    --yellow-color: #bdd431;
    --ff-poppins: 'Poppins', sans-serif;
    --ff-raleway: 'Raleway', sans-serif;
    --fw-hero: 900;
    --fw-headings: 700;
    --fw-body: 400;
}


ul{
    list-style: none;
}

/* Desktop code */

#home{
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    height: 100vh;
    background: var(--blue-color);
}

#intro{
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-family: var(--ff-raleway);
    font-weight: var(--fw-body);
}

#intro h1{
    font-size: 120px;
    line-height: 0.8;
    color: var(--yellow-color);
    font-family: var(--ff-poppins);
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

#intro h1::before{
    content:"Rahul Gupta";
    position: absolute;
    top: -4px;
    left: -4px;
    color: var(--black-color);
    -webkit-text-stroke: 2px var(--white-color);
    z-index: -1;
}

#intro p{
    text-align: center;
    width: 380px;
    margin-bottom: 5px;
}

#intro a, #about a, #projects>a{
    height: 40px;
    width: 150px;
    outline: none;
    background: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: var(--ff-raleway);
    font-weight: var(--fw-body);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#intro a{
    border: 1px solid var(--white-color);
    color: var(--white-color);
    box-shadow: inset 0 0 0 0 var(--white-color);
    -webkit-transition: ease-out 0.4s;
    -moz-transition: ease-out 0.4s;
    transition: ease-out 0.4s;
}

#intro a:hover {
    box-shadow: inset 400px 0 0 0 var(--white-color);
    color: var(--blue-color);
}

#about a, #projects>a{
    border: 1px solid var(--black-color);
    color: var(--black-color);
    box-shadow: inset 0 0 0 0 var(--black-color);
    -webkit-transition: ease-out 0.4s;
    -moz-transition: ease-out 0.4s;
    transition: ease-out 0.4s;
}

#about a:hover, #projects>a:hover{
    box-shadow: inset 400px 0 0 0 var(--black-color);
    color: var(--yellow-color);
}

#projects>a{
    width: max-content;
    padding: 0 5ch;
}

#projects{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 150px 15vw;
    font-family: var(--ff-raleway);
}

#projects h2, #about article:nth-child(1) h2{
    font-family: var(--ff-raleway);
    font-weight: var(--fw-headings);
    text-transform: uppercase;
    font-size: 24px;
    color: transparent;
    -webkit-text-stroke: 1px var(--black-color);
}

#projects h2{
    width: 100%;
    position: relative;
}

#projects h2::after{
    content: "";
    height: 1px;
    width: calc(100% - 30vw - 9ch);
    background-color: var(--black-color);
    opacity: 0.6;
    position: absolute;
    left: 9ch;
    top: 50%;
}

.projectCard{
    display: flex;
    margin: 60px 0;
}

.projectImage{
    overflow: hidden;
    transition: all 2s ease-in;
}

.projectImage > img:hover{
    transform: scale(1.1);
}

.projectCard h3{
    font-size: 24px;
}

.projectCard h4{
    text-transform: uppercase;
    color: var(--blue-color);
    font-weight: var(--fw-headings);
    font-size: 12px;
}

.projectCard p{
    background-color: var(--blue-color);
    color: var(--white-color);
    padding: 20px 30px;
    text-align: justify;
    font-weight: var(--fw-body);
    font-size: 14px;
    width: 400px;
}

.projectCard article{
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.projectCard article a:hover{
    filter: invert(15%) sepia(100%) saturate(3710%) hue-rotate(249deg) brightness(86%) contrast(94%);
}

.projectCard article ul{
    display: flex;
    justify-content: flex-end;
}

.projectCard ul{
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.projectCard li:hover{
    cursor: pointer;
    color: var(--blue-color);
}

#about{
    display: flex;
    justify-content: space-around;
    gap: 60px;
    padding: 80px 20vw;
    font-family: var(--ff-raleway);
    background-color: var(--white-color);
}

#techStack{
    display: flex;
    height: 50px;
    align-items: center;
    flex: 1;
    gap: 10px;
}

#techStack::Before{
    content: "Tech Stack:";
}

#about>article{
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    text-align: justify;
}

#about>article>h2{
    margin-bottom: 20px;
}

#about>img{
    height: 300px;
    border-radius: 10%;
}

footer{
    background-color: var(--black-color);
    color: var(--white-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 140px;
    padding: 0 60px;
    font-family: var(--ff-raleway);
    border-top: 60px solid var(--blue-color);
}

footer ul{
    display: flex;
    gap: 20px;
}

footer ul::before{
    content: "Contact Me:";
}

footer a{
    color: var(--white-color);
    text-decoration: none;
    font-size: 14px;
    position: relative;
}

footer a::after{
    position: absolute;
    content: "";
    height: 3px;
    width: 0%;
    background-color: var(--yellow-color);
    left: 0;
    bottom: -2px;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

footer a:hover::after{
    width: 100%;
}

.loader{
    width: 100dvw;
    height: 100dvh;
    background-color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loader > span{
    height: 50px;
    width: 10px;
    border-radius: 10px;
    background-color: var(--blue-color);
    animation: height 1s ease-in-out infinite alternate;
}

.loader > span:nth-child(2n+1){
    animation: height 0.5s ease-in-out infinite alternate;
}

@keyframes height {
    0%{
        height: 0px;
    }
    100%{
        height: 50px;
    }    
}


@media screen and (max-width: 600px) {
    #intro h1{
        font-size: 48px;
    }

    #intro h1::before{
      top: -2px;
        left: -2px;
    }

    #intro p{
        width: 300px;
    }

    #intro a, #about a{
        height: 40px;
        width: 100px;
        font-size: 16px;
    }

    #projects{
        padding: 10vw 40px;
        font-size: 14px;
    }

    .projectCard{
        flex-direction: column;
    }

    .projectCard>img{
        height: 60vw;
        width: 82vw;
    }

    .projectCard>article{
        text-align: left;
        margin-top: 20px;
    }

    .projectCard>article>h4{
        font-size: 12px;
    }

    .projectCard>article>h3{
        font-size: 18px;
        font-weight: bold;
    }

    .projectCard>article>ul{
        justify-content: start;
    }

    .projectCard p{
        width: 82vw;
    }

    #about{
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 80px 10vw;
    }

    #about > article:nth-child(1){
        width: 280px;
    }

    #about p{
        width: 280px;
        font-size: 14px;
    }

    #about > img{
        height: 280px;
        width: 280px;
    }

    #about h2,#projects h2{
        font-size: 20px;
    }

    #techStack{
        width: 300px;
        gap: 0;
        flex-wrap: wrap;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    #techStack h2{
        font-size: 16px;
    }

    #techStack img{
        width: 40px;
        height: 40px;
    }

    footer{
        height: 200px;
        gap: 10px;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    footer h2{
        font-size: 18px;
    }

    footer a{
        font-size: 14px;
    }

    footer ul{
        gap: 10px;
    }
}