/* google fonts*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/*varibles css*/
:root {
    --header-height: 3rem ;

    /*colors*/
    --hue-color: 257; 

    /* HSL color mode */
    --first-color:hsl(var(--hue-color), 78%, 57%);  
    --first-color-second: hsl(var(--hue-color), 30%, 8%);  
    --first-color-alt: hsl(var(--hue-color), 66%, 49%);  
    --first-color-lighter: hsl(var(--hue-color), 94%, 91%);  
    --title-color: hsl(var(--hue-color), 8%, 95%);  
    --text-color:hsl(var(--hue-color), 8%, 75%);   
    --text-color-light: hsl(var(--hue-color), 8%, 72%);  
    --input-color: hsl(var(--hue-color), 29%, 16%);  
    --body-color: hsl(var(--hue-color), 28%, 12%);
    --container-color: hsl(var(--hue-color), 29%, 16%);
    --scroll-bar-color: hsl(var(--hue-color), 12%, 48%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 36%);


    /* font */
    --body-font: 'Poppins', sans-serif;;

    /* typography */    
    /* .5rem = 8px, 1rem = 16px, 1.5rem = 24px ... */
    --big-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1.125rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /* font weight*/
    --font-medium: 500;
    --font-semi-bold: 600;

    /* margin bottom */
    /* .25rem = 4px, .5rem = 8px, .75rem = 12px ... */
    --mb-0-25: .25rem;
    --mb-0-5: .5rem;
    --mb-0-75: .75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

    /* z index */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}
/* variables light theme */
.light-theme{
    /* HSL color mode */
    --first-color-second: hsl(var(--hue-color), 78%, 57%);  
    --title-color: hsl(var(--hue-color), 8%, 53%);  
    --text-color:hsl(var(--hue-color), 8%, 45%);    
    --input-color: hsl(var(--hue-color), 70%, 96%);  
    --body-color: hsl(var(--hue-color), 60%, 99%);
    --container-color: #fff;
    --scroll-bar-color: hsl(var(--hue-color), 12%, 90%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 80%);
}

/* Font size for large devices */
/* 3rem = 48px, 1.5rem = 24px, .875rem = 14px, .813rem = 13.008  */
@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 3rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}


/* base*/
*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
html{
    scroll-behavior: smooth;
}
body{
    margin: 0 0 var(--header-height) 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
}

h1,h2,h3,h4{
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul{
    list-style: none;
}

a{
    text-decoration: none;
}

img{
    max-width: 100%;
    height: auto;
}

/* section class css*/
.section
{
    padding: 2rem 0 4rem;
}
.section__title{
    position: relative;
    font-size: var(--h1-font-size);
    color: var(--text-color);
    margin-bottom: 2rem;
}

.section__title::after{
    position: absolute;
    content: "";
    width: 35px;
    height: .2rem;
    left: 0;
    right: 0;
    margin: auto;
    top: 2.5rem;
    background-color: var(--first-color);
}
.section__subtitle{
    display: block;
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-3);
}
.section__title,
.section__subtitle{
    text-align: center;
}

/* layout*/
.container{
    max-width: 768px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}
.grid{
    display: grid;
    gap: 1.5rem;
}

/* header */
.header{
    width: 100%;
    position:fixed;
    bottom: 0;
    left: 0;
    z-index:var(--z-fixed);
    background-color:var(--body-color);
}
/* nav bar*/
.nav{
    max-width: 968px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__toggle{
    color: var(--title-color);
    font-weight: var(--font-medium);
}
.logo{
    width: 25px;
    height: 25px;
}

.nav__toggle{
    cursor: pointer;
    font-size: 1.1rem;
}
.nav__toggle:hover{
    color:var(--first-color);
}

@media screen and (max-width: 767px){
    .nav__menu{
        position:fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background-color: var(--body-color);
        padding: 2rem 1.5rem 4rem;
        box-shadow: 0 -1px 4px rgba(0,0,0, .15);
        border-radius: 1.5rem 1.5rem 0 0 ;
        transition: .3s;
    }
}

.nav__list{
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.nav__link{
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: var(--small-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
}
.nav__link:hover{
    color: var(--first-color);
}
.nav__icon{
    font-size: 1.5rem;
}
.nav__close{
    position: absolute;
    right: 1.3rem;
    bottom: 1rem;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--first-color);
}
.nav__close:hover{
    color: var(--first-color-alt);
}
/* show menu class (toggle clicked) */
.show-menu{
    bottom: 0;
}


/* Home*/
.home__container{
    gap: 3rem;
    
}
.home__content{
    grid-template-columns: .5fr 3fr;
    padding-top: 3.5rem;
    align-items: center;

}
.home__social{
    display: grid;
    grid-template-columns: max-content;
    row-gap: 1rem;
}
.home__social-icon{
    font-size: 2rem;
    color: var(--first-color);
}
.home__social-icon:hover{
    color:var(--first-color-alt); 
    animation: pulse 1s infinite;
    animation-timing-function: linear;
}
@keyframes pulse{
    0% { transform: scale(1); }
    50% { transform: scale(1.1);}
    100% { transform: scale(1); }
}
.home__img{
    margin-left: 2.5rem;
}
.home__data{
    grid-column: 1/3;
}
.home__title{
    font-size: 3rem;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 0.75;
    margin-bottom: 2rem;
    color: hsl(41, 93%, 54%);
}

.home__span{
  display: block;
}
.home__span:not(.light){
    opacity: 0;
    animation: flashText .5s ease-out alternate infinite;
}
.light{
  position: relative;
  display: inline-block;
}
.light:before {
    position: absolute;
    left: 0;
    top: -10%;
    width: 100%;
    height: 120%;
    background:#FFF;
    filter: blur(13px);
    content: "";
    opacity: 0;
    animation: flash .5s ease-out alternate infinite;
  }

@keyframes flash{
    to {
      opacity: 1;
    }
  }
  
  @keyframes flashText {
    to {
      opacity: 0.15;
    }
  }

.home__scroll{
    display: none;
}
.home__scroll-button{
    color: var(--first-color);
    transition: .3s;
}
.home__scroll-button:hover{
    transform: translateY(.25rem);
}
.home__scroll-mouse{
    font-size: 2rem;
}
.home__scroll-name{
    font-size: var(--small-font-size);
    color:var(--title-color);
    font-weight: var(--font-medium);
    margin-right: var(--mb-0-25);
}
.home__scroll-arrow{
    font-size: 1rem;
}

/* Button*/
.button{
    display: inline-block;
    background-color: var(--first-color); 
 
    box-shadow: 0 4px 6px rgba(174,190,205, .3);
    color: #fff;
    padding: 1rem;
    border-radius: .7rem;
    font-weight: var(--font-medium);
}
.button:hover{
    background: linear-gradient(135deg, #6e8efb, #a777e3);
  
}
.button__icon{
    font-size: 1.25rem;
    margin-left: var(--mb-0-5);
}

.button--flex{
    display: inline-flex;
    align-items: center;
}
.clicked:active{
    box-shadow: 0 5px 15px rgba(174,190,205, .3);
    transform: translateY(4px);
}
/* About */
.about__img{
    width: 200px;
    border-radius: .5rem;
    justify-self: center;
    align-self: center;
}
.about__description{
    text-align: center;
    margin-top: var(--mb-3);
    margin-bottom: var(--mb-2-5);
}
.about__buttons{
    display: flex;
    justify-content: center;
}

/* Skills */
.skills__container{
    row-gap: 0;
}
.skills__list{
    display: grid;
    grid-tempLate-columns: repeat(2, 1fr);
    justify-content:center;
    align-items:center;
    text-align: center;
    grid-gap:1rem;
    padding: 1rem 80px;
    font-size: 1.2rem;
    row-gap: 1.5rem;
}
.skills__data{
    padding: 1rem;
    cursor:pointer;
}
.skills__data:hover,
.skills__img{
    transform: translateX(-20px);
}
.skills__img{
    width:90px;
    height:90px;
    position: relative;
    border-radius: 45px;
    background-color: #fff;
    display:flex;
    justify-content:center;
    align-items:center;
    transition: .5s;
}
 .skills__img:after{
    content: '';
    position:absolute;
    top:0;
    left: 0;
    width:50%;
    height:90px;
    border-radius: 45px 0 0 45px; 
    } 
.skills__img-icon{
    width:50px;
}
.skills__title{
    font-size: var(--h3-font-size);
}
.skills__list{
    row-gap: 1.5rem;
    padding-left: 2.7em;
}

/* projects */
.projects__container{
    overflow: initial;
}
.projects__content{
    background-color:var(--input-color);
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(174,190,205, .3);
    padding:0 1.5rem;
}
.projects__img{
    width: 100%;
    transition: .4s;
    border-radius: .5rem;
    justify-self: center;
    margin-top: 1.5rem;
}
.projects__data{
    padding: 1.5rem;
}
.projects__subtitle{
    font-size: var(--small-font-size);
    color: var(--title-color);
}
.projects__title{
    font-size: var(--h2-font-size);
    color: var(--first-color);
    margin-bottom: var(--mb-0-75);
   
}
.projects__content:hover{
    box-shadow: 0 12px 45px  rgba(174,190,205, .4);
    
}
.projects__content:hover .projects__img{
    transform: scale(1.02);
}
.github-icon{
   font-size: 1.4rem;
    color: var(--first-color); 
    cursor: pointer;
}
.demo-icon{
    font-size: 1.2rem;
    color: var(--first-color); 
    cursor: pointer;
}
.github-icon:hover,
.demo-icon:hover{
    color: var(--first-color-alt);
    -webkit-animation-name:shake;    
    -webkit-animation-duration:          0.8s;
    -webkit-animation-iteration-count:   infinite;
    -webkit-animation-timing-function:   linear;
    -webkit-transform-origin:            50% 100%;
   
}
@-webkit-keyframes shake {
    0%  { -webkit-transform:     translate(2px, 1px) rotate(0deg); }
    10% { -webkit-transform:     translate(-1px, -2px) rotate(-2deg); }
    20% { -webkit-transform:     translate(-3px, 0px) rotate(3deg); }
    30% { -webkit-transform:     translate(0px, 2px) rotate(0deg); }
    40% { -webkit-transform:     translate(1px, -1px) rotate(1deg); }
    50% { -webkit-transform:     translate(-1px, 2px) rotate(-1deg); }
    60% { -webkit-transform:     translate(-3px, 1px) rotate(0deg); }
    70% { -webkit-transform:     translate(2px, 1px) rotate(-2deg); }
    80% { -webkit-transform:     translate(-1px, -1px) rotate(4deg); }
    90% { -webkit-transform:     translate(2px, 2px) rotate(0deg); }
    100%{ -webkit-transform:     translate(1px, -2px) rotate(-1deg); }
   }

/* contact */
.contact__container{
    row-gap: 3rem;
    
}
.contact__information{
    display: flex;
    margin-bottom: 4rem;
    margin-left: 4rem;
    
}
.contact__icon{
    font-size: 2rem;
    color: var(--first-color);
    margin-right: var(--mb-0-75);
    -webkit-transition: 0.6s ease-out;
    -moz-transition:  0.6s ease-out;
    transition:  0.6s ease-out;
}
.contact__icon:hover{
    -webkit-transform: rotateZ(720deg);
    -moz-transform: rotateZ(720deg);
    transform: rotateZ(720deg);
}
.contact__title{
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
    
}
.contact__subtitle{
    font-size: var(--small-font-size);
    color: var(--text-color);
   
}
.contact__content{
    background-color: var(--input-color);
    border-radius: .5rem;
    padding: .75rem 1rem .25rem;
}
.contact__label{
    font-size:var(--small-font-size);
    color: var(--title-color);
}
.contact__input{
    width: 100%;
    background-color: var(--input-color);
    color:var(--text-color);
    font-family: var(--body-font);
    font-size:var(--normal-font-size);
    border: none;
    outline: none;
    padding: .25rem .5rem .5rem 0;
}

/* footer */
.footer{
    padding-top: 2rem;
}
.footer__container{
    row-gap:3.5rem;
}
.footer__bg{
    background-color: var(--first-color-second);
    padding: 2rem 0 3rem;
}
.footer__title{
    color: var(--text-color-light);
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-0-25);
    text-align:center;
} 
.footer__subtitle{
    font-size: var(--medium-font-size);
    text-align:center;
}
.footer__links{
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
    text-align:center;
    font-size: 1rem;
}
.footer__link{
    color: var(--text-color-light);
}
.footer__link:hover{
    color:hsl(41, 93%, 79%);
}
.footer__copy{
    font-size: var(--smaller-font-size);
    text-align:center;
    color: var(--text-color-light);
    margin-top: var(--mb-3);
}

/* active link */
.active-link{
    color: var(--first-color);
}
/* scroll header */
.scroll-header{
    box-shadow: 0 -1px 4px rgba(0,0,0, .15);
}
/* scroll up */
.scrollup{
    position: fixed;
    right: 1rem;
    bottom: -20%;
    background-color: var(--first-color);
    border-radius: .4rem;
    opacity: .7;
    padding: .3rem .6rem;
    z-index: var(--z-tooltip);
    transition: .4s;
}
.scrollup:hover{
    background-color: var(--first-color-alt);
}
.scrollup__icon{
    font-size: 1.5rem;
    color: #fff;
}  
/* show up arrow scroll */
.show-scroll{
    bottom: 5rem;
}

/* scroll bar */
::-webkit-scrollbar{
    width: .60rem;
    background-color: var(--scroll-bar-color);
    border-radius: .5rem;
}
::-webkit-scrollbar-thumb{
    background-color: var(--scroll-thumb-color);
    border-radius: .5rem;
}
::-webkit-scrollbar-thumb:hover{
    background-color: var(--text-color-light);
}

/* dark and light theme button */
.nav__btns{
    display: flex;
    align-items: center;
}
.change-theme{
    /* font-size: 1.25rem; */
    color: var(--title-color);
    margin-right: var(--mb-1);
    cursor: pointer;
    width: 20px;
}
.change-theme:hover{
    color: var(--first-color);
}

/* === Media queries ===*/
/* small devices */
@media screen and (max-width: 350px) {
    .container{
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }
    .section__title{
        position: relative;
        font-size: var(--h1-font-size);
        color: var(--text-color);
        margin-bottom: 2rem;
    }
    .section__title::after{
        position: absolute;
        content: "";
        width: 35px;
        height: .2rem;
        left: 0;
        right: 0;
        margin: auto;
        top: 2.5rem;
        background-color: var(--first-color);
    }
    .section__subtitle{
        display: block;
        font-size: var(--small-font-size);
        margin-bottom: var(--mb-3);
    }
    .nav__menu{
        padding: 2rem .25rem 4rem;
    }
    .nav__list{
        column-gap: 0;
    }
    .home__content{
        grid-template-columns: .25fr 3fr;
    }
    .home__img{
        width: 180px;
    }
    .skills__title{
        font-size: var(--normal-font-size);
    }
    .skills__list{
        padding:0;
        padding-left:2rem;
    }
}

/* Medium devices */
@media screen and (min-width:350px){
    .skills__list{
        padding-left:8rem;
    }
}
@media screen and (min-width:568px) {
    .section__title{
        position: relative;
        font-size: var(--h1-font-size);
        color: var(--text-color);
        margin-bottom: 2rem;
    }
    .section__title::after{
        position: absolute;
        content: "";
        width: 35px;
        height: .2rem;
        left: 0;
        right: 0;
        margin: auto;
        top: 2.5rem;
        background-color: var(--first-color);
    }
    .home__content{
        grid-template-columns: max-content 1fr 1fr;
    }.home__data{
        grid-column: span;
    }
    .home__social{
       display: flex;
       column-gap: 1rem;
    }
    .home__img{
        order: 1;
        justify-self: center;
    }
    .about__container,
    .skills__container,
    .contact__container,
    .footer__container{
        grid-template-columns: repeat(2,1fr);
    }
 .skills__container{
    grid-template-columns: repeat(1,1fr);
    column-gap: 2rem;
    row-gap: 2rem;
    margin-left: 2rem;
    margin-right: 2rem;
 }
 .skills__list{
    padding:0;
    grid-tempLate-columns: repeat(3, 1fr);
    padding-left: 6rem;
 }
}

@media screen and (min-width:768px){
    .container{
        margin-left: auto;
        margin-right: auto;
    }
    body{
        margin: 0;
    }
    .section{
        padding: 6rem 0 2rem;
    }
    .section__title{
        position: relative;
        font-size: var(--h1-font-size);
        color: var(--text-color);
        margin-bottom: 2rem;
    }
    .section__title::after{
        position: absolute;
        content: "";
        width: 35px;
        height: .2rem;
        left: 0;
        right: 0;
        margin: auto;
        top: 2.5rem;
        background-color: var(--first-color);
    }
    .header{
        top:0;
        bottom: initial;
    }
    .header,
    .main,
    .footer__container{
        padding: 0 2rem;
    }
    .nav{
        height: calc(var(--header-height) + 1.5rem );
        column-gap: 1rem;
    }
    .nav__icon,
    .nav__close,
    .nav__toggle{
        display: none;
    }
    .nav__list{
        display: flex;
        column-gap: 2rem;
    }
    .nav__menu{
        margin-left: auto;
    }
    .change-theme{
        margin: 0;
    }
    .home__container{
        row-gap: 5rem;
    }
    .home__content{
        padding-top: 5.5rem;
        column-gap: 2rem;
    }
    .home__img{
        width: 270px;
    }
    .home__scroll{
        display: block;
    }
    .home__scroll-button:hover{
        margin-left: 2rem;
    }
    .about__container{
        column-gap: 5rem;
    }
    .about__img{
        width: 350px;
    }
    .about__description{
        text-align: initial;
    }
    .about__buttons{
        justify-content: initial;
    }
    .footer__container{
        grid-template-columns: repeat(3,1fr);
    }
    .footer__bg{
        padding: 3rem 0 3.5rem;
    }
   
  
}
/* Large devices */
@media screen and (min-width: 1024px) {
    .header,
    .main,
    .footer__container{
        padding: 0;
    }

    .section__title{
        position: relative;
        font-size: var(--h1-font-size);
        color: var(--text-color);
    }
    .section__title::after{
        position: absolute;
        content: "";
        width: 65px;
        height: .2rem;
        left: 0;
        right: 0;
        margin: auto;
        top: 3.5rem;
        background-color: var(--first-color);
    }

    .home__img{
        width: 400px;
        
    }
    .about__container{
        margin-bottom: 8rem;
    }
    .contact__form{
        width: 460px;
    }
    .contact__inputs{
        grid-template-columns: repeat(2,1fr);
    }
     .projects__container{
        grid-template-columns: repeat(3,1fr);
        padding: 5rem;
        column-gap: 2rem;
        row-gap: 2rem;
    }
    .skills__container{
        grid-template-columns: repeat(2,1fr);
        column-gap: 3rem;
        row-gap: 3rem;
        
    }
    .skills__list{
        display: grid;
        grid-tempLate-columns: repeat(4, 1fr);
        justify-content:center;
        align-items:center;
        text-align: center;
        grid-gap:1rem;
        padding: 1rem 80px;
        font-size: 1.2rem;
        row-gap: 1.5rem;
    }
}