:root{
    --header-height: 3.5rem;

    /*=============== colors =================*/
    /*--------------- color mode (HSL) = (hue, saturation, lightness) -----------------*/
    --first-hue: 200;
    --sat: 100%;
    --lig: 62%;
    --second-hue: 220;

    --first-color: hsl(var(--first-hue), var(--sat), var(--lig));
    --first-color-alt: hsl(var(--first-hue), var(--sat), 39%) /* -4% */;
    --title-color: hsl(var(--second-hue), 15%, 95%);
    --text-color: hsl(var(--second-hue), 8%, 75%);
    --text-color-light: hsl(var(--second-hue), 4%, 55%);
    --body-color: hsl(var(--second-hue), 30%, 8%);
    --container-color: hsl(var(--second-hue), 32%, 12%);

    /*=============== fonts =================*/
    --body-font: 'Poppins', sans-serif;
    --biggest-font-size: 1.75rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.838rem;
    --smaller-font-size: 0.75rem;
    --tiny-font-size: 0.625rem;

    --font-medium: 500;
    --font-semibold: 600;

    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

@media screen and(min-width: 968px){
    :root{
        --biggest-font-size: 2.5rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: 0.875rem;
        --smaller-font-size: 0.813rem;
    }
}

/*=============== B A S E =================*/
*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html{
    scroll-behavior: smooth;
}

body,
button,
input,
textarea{
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
}

body{
    background: var(--body-color);
    color: var(--text-color);
    transition: 0.4s ease all; /* ---- for light animation ---- */
}

h1,h2,h3{
    color: var(--title-color);
    font-weight: var(--font-semibold);
}

ul{
    list-style: none;
}

a{
    text-decoration: none;
}

button{
    cursor: pointer;
    border: none;
    outline: none;
}

img{
    max-width: 100%;
    height: auto;
}

.container{
    max-width: 968px;
    margin-left: 1rem;
    margin-right: 1rem;
}

.grid{
    display: grid;
    gap: 1.25rem;
}

main{
    overflow: hidden;
}

.section{
    padding: 4.5rem 0 1rem;
}

.section__title,
.section__subtitle{
    text-align: center;
}

.section__title{
    font-size: var(--h2-font-size);
    margin-bottom: 2rem;
    color: var(--first-color);
}

.section__subtitle{
    display: block;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-bottom: 10px;
}

/*=============== H E A D E R =================*/

.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--body-color);
    z-index: var(--z-fixed);
    transition: 0.4s ease all; /* ---- for light animation ---- */
}

.nav{
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo{
    color: var(--first-color);
    font-weight: var(--font-medium);
    transition: 0.4s;
    cursor: pointer;
}

.nav__logo:hover{
    color: var(--first-color-alt);
}

.nav__menu{
    position: fixed;
    bottom: 1rem;
    background: hsla(var(--second-hue), 32%, 16%, 0.8);
    width: 90%;
    border-radius: 4rem;
    padding: 1rem 2.25rem;
    backdrop-filter: blur(10px);
    transition: 0.4s ease all; /* ---- for light animation ---- */
}

.nav__list{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__link{
    color: var(--text-color);
    font-size: 1.25rem;
    padding: 0.4rem;
    display: flex;
    border-radius: 5rem;
}

.active-link{
    background: linear-gradient(180deg, hsla(var(--first-hue), var(--sat), var(--lig), 1),
                                        hsla(var(--first-hue), var(--sat), var(--lig), 0.2)
                                );
    box-shadow: 0 0 16px hsla(var(--first-hue), var(--sat), var(--lig), 0.4);
    color: var(--title-color);
}

/* ------------------ change language ---------------------*//* 
.langWrap{
    background: var(--first-color);
    border-radius: 0.5rem;
}

.langWrap a{
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 0.5rem;
    background: var(--container-color);
    border: 1px solid var(--first-color);
    transition: 0.3s ease all;
}

.langWrap .active{
    background: var(--first-color);
    border: 1px solid var(--container-color);
} */

/* ------------------- change theme color -------------------------- */

.change-theme{
    font-size: 1.25rem;
    cursor: pointer;
    transition: 0.3s ease all;
}

.change-theme:hover{
    color: var(--first-color);
}

.home__container{
    position: relative;
    row-gap: 4.5rem;
    padding-top: 2rem;
}

.home__data{
    text-align: center;
}

.home__name{
    margin-bottom: 0.5rem;
}

.home__greeting,
.home__education{
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
}

.home__greeting{
    display: block;
    color: var(--title-color);
    margin-bottom: 0.75rem;
}

.home__education{
    color: var(--text-color);
    margin-bottom: 2.5rem;
}

.home__img{
    width: 210px;
    height: 270px;
    transition: 0.4s ease all;
}

.home__handle{
    justify-self: center;
    border-radius: 10rem 10rem 1rem 1rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.home__buttons{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: 0.4s ease all;
}

.home__social,
.home__scroll{
    position: absolute;
}

.home__social{
    bottom: 3rem;
    left: 0;
    display: grid;
    row-gap: 0.5rem;
}

.home__social-link{
    width: max-content;
    color: var(--first-color);
    background: var(--container-color);
    padding: 0.35rem;
    border-radius: 0.25rem;
    display: flex;
    font-size: 1rem;
    transition: 0.4s ease all;
}

.home__social-link:hover{
    background: var(--first-color);
    color: #000;
}

.home__social::after{
    content: '';
    width: 32px;
    height: 2px;
    background: var(--first-color);
    transform: rotate(90deg) translate(18px, 1px);
}

.home__scroll{
    color: var(--first-color);
    right: -1.5rem;
    bottom: 4rem;
    display: grid;
    row-gap: 2.25rem;
    justify-items: center;
}

.home__scroll-icon{
    font-size: 1.45rem;
}

.home__scroll-name{
    font-size: var(--smaller-font-size);
    transform: rotate(-90deg);
}

/*=============== Buttons =================*/
.button{
    display: inline-block;
    background: var(--first-color);
    color: var(--body-color);
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    transition: 0.4s ease all;
    border: 2px solid var(--first-color);
}

.button--ghost{
    background: transparent;
    color: var(--first-color);
}

.button:hover{
    background: var(--first-color-alt);
    color: var(--body-color);
}

.button--ghost:hover{
    background: var(--first-color);
    color: var(--body-color);
}

/*=============== A B O U T =================*/
.about__container{
    row-gap: 2.5rem;
}

.about__img{
    justify-self: center;
    border-radius: 1.5rem;
    width: 220px;
}

.about__data{
    text-align: center;
}

.about__info{
    display: grid;
    grid-template-columns: repeat(100px, 1fr);
    gap: 0.7rem;
    margin-bottom: 2rem;
}

.about__box{
    background: var(--container-color);
    border-radius: 0.75rem;
    padding: 0.75rem 5rem;
}

.about__icon{
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--first-color);
}

.about__title{
    font-size: var(--smaller-font-size);
    margin-bottom: 0.5rem;
}

.about__subtitle{
    font-size: var(--tiny-font-size);
}

.about__description{
    margin-bottom: 2rem;
}

/*=============== scroll-header =================*/
.scroll-header{
    box-shadow: 0px 4px 4px hsla(0, 0%, 4%, 0.3);
}

/*=============== S K I L L S =================*/
.skills__container{
    row-gap: 1.25rem;
    padding-top: 1rem;
}

@media screen and (max-width: 375px){
    .skills__content{
        font-size: 85%;
    }
}

@media screen and (max-width: 335px){
    .skills__content{
        font-size: 70%;
    }
}

.skills__content{
    background: var(--container-color);
    padding: 1.5rem;
    border-radius: 1.25rem;
}

.skills__title{
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    color: var(--first-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

.skills__box{
    display: flex;
    justify-content: center;
    column-gap: 1.4rem;
}

.skills__group{
    display: grid;
    align-content: flex-start;
    row-gap: 1rem;
}

.skills__data{
    display: flex;
    column-gap: 0.5rem;
}

.skills .bxs-badge-check{
    font-size: 1rem;
    color: var(--first-color);
}

.skills__name{
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    line-height: 18px;
    margin-bottom: 5px;
}

.skills__level{
    font-size: var(--tiny-font-size);
}

.skills__boxes{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.groups{
    margin-top: 20px;
}

.soft__skills .bxs-badge-check{
    color: var(--first-color);
    font-size: 1rem;
}

/*=============== W O R K =================*/
.work__container{
    padding-top: 1rem;
}

.work__filters{
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 0.75rem;
    margin-bottom: 2rem;
}

.work__item{
    cursor: pointer;
    color: var(--title-color);
    padding: 0.25rem 0.75rem;
    font-weight: var(--font-medium);
    border-radius: 0.5rem;
}

.work__card{
    background: var(--container-color);
    padding: 1rem;
    border-radius: 1rem;
}

.work__img{
    border-radius: 1rem;
    margin-bottom: 0.75rem;
}

.work__title{
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    margin-bottom: 0.45rem;
}

.work__button{
    width: max-content;
    color: var(--first-color);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    column-gap: 0.25rem;
}

.work__icon{
    transition: 0.3s ease all;
    font-size: 1rem;
}

.work__button:hover .work__icon{
    transform: translateX(0.25rem);
}

/* ------- A C T I V E  item work --------- */
.active__work{
    color: var(--body-color);
    background-color: var(--first-color);
    transition: 0.4s;
}

/*=============== C O N T A C T =================*/
.contact__container{
    row-gap: 3rem;
    padding-bottom: 3rem;
}

.contact__title{
    text-align: center;
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
}

.contact__info{
    display: grid;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.contact__card{
    background: var(--container-color);
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
}

.contact__card-icon{
    font-size: 2rem;
    color: var(--title-color);
    margin-bottom: 0.25rems;
}

.contact__card-title,
.contact__card-data{
    font-size: var(--small-font-size);
}

.contact__card-title{
    font-weight: var(--font-medium);
    margin-bottom: 0.25rem;
}

.contact__card-data{
    display: block;
    margin-bottom: 0.75rem;
    color: var(--first-color);
}

.contact__button{
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--small-font-size);
    column-gap: 0.25rem;
}

.contact__button-icon{
    font-size: 1rem;
    transition: 0.3s ease all;
}

.contact__button:hover .contact__button-icon{
    transform: translateX(0.25rem);
    color: var(--first-color);
}

.contact__form-div{
    position: relative;
    margin-bottom: 2rem;
    height: 4rem
}

.contact__form-input{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--text-color-light);
    background: none;
    color: var(--text-color);
    outline: none;
    padding: 1.5rem;
    border-radius: 0.75rem;
    z-index: 1;
}

.contact__form-tag{
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    font-size: var(--smaller-font-size);
    padding: 0.25rem;
    background: var(--body-color);
    z-index: 10;
}

.contact__form-area{
    height: 11rem;
}

.contact__form-area{
    resize: none;
}

.but{
    position: relative;
    margin-top: 7rem
}


/*=============== F O O T E R =================*/
.footer{
    background: var(--first-color);
}

.footer__container{
    padding: 2rem 0 6rem;
}

.footer__title,
.footer__link{
    color: var(--body-color);
}

.footer__title{
    text-align: center;
    margin-bottom: 2rem;
}

.footer__list{
    display: flex;
    justify-content: center;
    column-gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer__social{
    display: flex;
    justify-content: center;
    column-gap: 1.25rem;
}

.footer__social-link{
    background: var(--body-color);
    color: var(--first-color);
    padding: 0.35rem;
    border-radius: 0.35rem;
    font-size: 1rem;
    display: inline-flex;
}

.footer__copy{
    display: block;
    margin-top: 4.5rem;
    color: var(--container-color);
    text-align: center;
    font-size: var(--smaller-font-size);
}

::-webkit-scrollbar{
    width: 0.5rem;
    border-radius: 0.5rem;
    background: hsl(var(--second-hue), 8%, 38%);
}

::-webkit-scrollbar-thumb{
    background: hsl(var(--second-hue), 8%, 26%);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover{
    background: hsl(var(--second-hue), 8%, 20%)
}

.light-theme::-webkit-scrollbar{
    background: hsl(var(--second-hue), 8%, 66%);
}

.light-theme::-webkit-scrollbar-thumb{
    background: hsl(var(--second-hue), 8%, 54%);
}

.light-theme::-webkit-scrollbar-thumb:hover{
    background: hsl(var(--second-hue), 8%, 44%);
}



/*=============== Light theme =================*/

.light-theme .langWrap a{
    color: var(--title-color);
}

.light-theme .scroll-header{
    box-shadow: 0 2px 4px hsla(0, 0%, 1%, 0.1);
}

.light-theme .nav__menu{
    background: hsla(var(--second-hue), 32%, 90%, 0.8);
}

.light-theme .section__subtitle{
    color: var(--text-color);
}

.light-theme .home__social-link{
    box-shadow: 0 2px 8px hsla(var(--second-hue), 48%, 8%, 0.2);
    color: var(--title-color);
}

.light-theme .home__social::after,
.light-theme .footer__social-link{
    background: var(--title-color);
}

.light-theme .home__scroll,
.light-theme .button,
.light-theme .button:hover,
.light-theme .active__work,
.light-theme .footer__title,
.light-theme .footer__link,
.light-theme .footer__copy{
    color: var(--title-color);
}

.light-theme .about__box{
    box-shadow: 0 2px 8px hsla(var(--second-hue), 48%, 8%, 0.2);
}

.light-theme .skills__content,
.light-theme .work__card,
.light-theme .contact__card{
    box-shadow: 0 2px 16px hsla(var(--second-hue), 48%, 8%, 0.2);
}

body.light-theme{
    --title-color: hsl(var(--second-hue), 15%, 15%);
    --text-color: hsl(var(--second-hue), 8%, 35%);
    --body-color: hsl(var(--second-hue), 100%, 99%);
    --container-color: #fafafa;
}

/* ------------------------------- MEDIA  SCREEN ------------------------------------- */

@media screen and (max-width: 320px){
    .home__img{
        width: 160px;
        height: 213px;
    }

    
    .skills__box{
        display: block;
    }

    .skills__groups{
        margin-bottom: 20px;
    }

    .work__item{
        font-size: var(--small-font-size);
    }

    .work__filters{
        column-gap: 0.25rem;
    }

    .contact__info{
        gap: 0.75rem;
    }

    .contact__card-title,
    .contact__card-data{
        font-size: var(--smaller-font-size);
    }
}

@media screen and (max-width: 330px){
    .nav__menu{
        padding: 1rem 1.5rem;
    }

    .home__buttons{
        flex-direction: column;
    }

    .home__img{
        width: 190px;
        height: 253px;
    }

    .about__info{
        grid-template-columns: repeat(70px 2fr);
    }

    .skills__box{
        column-gap: 0.70rem;
    }

    .skills__name{
        font-size: var(--smaller-font-size);
    }
}

@media screen and (max-width: 300px){
    .about__box{
        width: 250px;
    }
}

@media screen and (min-width: 575px){
    .nav__menu{
        width: 428px;
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    .about__info{
        grid-template-columns: repeat(3, 140px);
        justify-content: center;
        gap: 3rem;
    }

    .about__box{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1.5rem 3rem;
    }

    .about__description{
        padding: 0 4rem;
    }

    .skills__container{
        justify-content: center;
    }

    .skills__content{
        padding: 2rem 4rem;
    }

    .work__container{
        justify-content: center;
    }

    .work__img{
        width: 335px;
    }

    .contact__info{
        grid-template-columns: 335px;
        justify-content: center;
    }

    .contact__form{
        width: 335px;
        margin: 0 auto;
    }
}

@media screen and (min-width: 850px){

    .about__info{
        grid-template-columns: repeat(3, 140px);
        justify-content: center;
        gap: 4rem;
    }

    .about__box{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem 5rem;
    }

    .work__container{
        grid-template-columns: repeat(2, max-content);
    }

    .contact__container{
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        column-gap: 4rem;
    }
}

@media screen and (min-width: 992px){
    .container{
        margin-left: auto;
        margin-right: auto;
    }

    .section{
        padding: 6.5rem 0 1rem;
    }

    .section__title{
        margin-bottom: 3.5rem;
    }

    .nav{
        height: calc(var(--header-height) + 1rem)
    }

    .home__img{
        width: 320px;
        height: 400px;
    }

    .home__social-link{
        padding: 0.4rem;
        font-size: 1.35rem;
    }

    .home__social::after{
        transform: rotate(90deg) translate(16px, -2px);
    }
    
    .home__scroll-icon{
        font-size: 2rem;
    }

    .about__img{
        width: 350px;
    }

    .skills__c{
        grid-template-columns: repeat(2, 350px);
        column-gap: 2rem;
    }
    
    .work__container{
        gap: 3rem;
    }

    .work__img{
        margin-bottom: 1.25rem;
    }

    .skills__boxes{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        column-gap: 2rem;
    }

    .flex__content{
        margin: auto;
    }
}