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

:root {
    --header-height: 3rem;


    --first-color:#3E0E12;
    --first-color-dark:#2F0a0D;
    --text-color: #524748;
    --first-color-light: #7B6F71;
    --first-color-lighten: #FBF9F9;

    --body-font: 'Poppins', sans-serif; 
    --biggest-font-size: 2.5rem;
    --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-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    --mb-1: .5rem;
    --mb-2: 1rem;
    --mb-3: 1.5rem;
    --mb-4: 2rem;
    --mb-5: 2.5rem;
    --mb-6: 3rem;
    
    --z-normal: 1;
    --z-tooltip: 10;
    --z-fixed: 100;
}

@media screen and (min-width: 768px){
    :root{
        --biggest-font-size: 4.5rem;
        --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;
    }
}

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

html{
    scroll-behavior: smooth;
}

body{
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    background-color: var(--first-color-lighten);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, ul, p{
    margin: 0;
}

h2, h3{
    font-weight: var(--font-semi-bold);
}

ul{
    padding: 0;
    list-style: none;
}

a{
    text-decoration: none;
}

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

.section{
    padding:4rem 0 2rem;
}

.section-title, .section-subtitle{
    text-align: center;
}

.section-title{
    font-size: var(--h1-font-size);
    color: var(--first-color);
    margin-bottom: var(--mb-3);
}

.section-subtitle{
    display: block;
    font-size: var(--smaller-font-size);
    font-weight: var(--font-semi-bold);
}

.bd-container{
    max-width: 1024px;
    width: calc(100% - 2rem);
    margin-left: var(--mb-2);
    margin-right: var(--mb-2);
}

.bd-grid{
    display: grid;
    gap: 1.5rem;
}

.l-header{
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: #000;
}

.nav{
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media screen and (max-width: 768px){
    .nav__menu{
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        padding-top: 1.5rem;
        text-align: center;
        background-color: #000;
        transition: .4s;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
        border-radius: 0 0 1rem 1rem;
    }
}

.nav__item{
    margin-bottom: var(--mb-3);
}

.nav__link{
    color: var(--first-color-lighten);
    transition: .3s;
}

.nav__link:hover{
    color: var(--first-color-light);
}

.nav__logo, .nav__toggle{
    color: var(--first-color-lighten);
}

.nav__toggle{
    font-size: 1.3rem;
    cursor: pointer;
}

.show-menu{
    top:var(--header-height);
}

.active-link{
    position: relative;
}

.active-link::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -.7rem;
    width: 65%;
    height: 3px;
    background-color: var(--first-color-light);
}

.scroll-header{
    background-color: var(--first-color-lighten);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.scroll-header .nav__logo, .scroll-header .nav__toggle, .scroll-header .nav__link{
    color: var(--first-color-dark);
}

.scroll-header .nav__menu{
    background-color: var(--first-color-lighten);
}

.scrolltop{
    position: fixed;
    right: 1rem;
    bottom: -20%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5rem;
    background: rgba(123, 111, 113, .7);
    border-radius: .5rem;
    z-index: var(--z-tooltip);
    transition: .4s;
    
    visibility: hidden;
}

.scrolltop:hover{
    background: var(--first-color);
}

.scrolltop__icon{
    font-size: 2rem;
    color: var(--first-color-lighten);

}

.show-scroll{
    visibility: visible;
    bottom: 1.5rem;
}

.home{
    background-color: #000;
    overflow: hidden;
}

.home__container{
    position: relative;
    height: calc(100vh - var(--header-height));
    grid-template-rows: repeat(2, max-content);
    align-content: space-around;
    row-gap: 2rem;
}

.home__data{
    border-left: 4px solid var(--first-color-lighten);
    color: var(--first-color-lighten);
    padding-left: 1.5rem;
    z-index: var(--z-tooltip);
}

.home_name{
    font-size: var(--biggest-font-size);
}

.home__greeting, .home__profession{
    display: block;
    font-weight: var(--font-bold);
}

.home__greeting{
    font-size: .813rem;
}

.home__profession{
    font-size: .938rem;
    margin-bottom: var(--mb-3);
    min-height: 1.6em;
    position: relative;
    width: min(100%, 18ch);
}

.home__profession-text{
    animation: typing-cycle 9s steps(var(--typing-steps), end) infinite;
    border-right: 2px solid var(--first-color-lighten);
    left: 0;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    white-space: nowrap;
    width: 0;
}

.home__profession-text--iot{
    --typing-steps: 12;
    --typing-width: 12ch;
}

.home__profession-text--python{
    --typing-steps: 16;
    --typing-width: 16ch;
    animation-delay: 3s;
}

.home__profession-text--web{
    --typing-steps: 13;
    --typing-width: 13ch;
    animation-delay: 6s;
}

@keyframes typing-cycle{
    0%{
        opacity: 1;
        width: 0;
    }

    18%{
        opacity: 1;
        width: var(--typing-width);
    }

    28%{
        opacity: 1;
        width: var(--typing-width);
    }

    33%,
    100%{
        opacity: 0;
        width: 0;
    }
}

.home__img{
    position:absolute;
    right: 0;
    bottom: 0;
}

.home__img img{
    width: 285px;
}

.home__social{
    display: flex;
    flex-direction: column;
}

.home__social-icon{
    width: max-content;
    font-size: 1.3rem;
    margin-bottom: var(--mb-2);
    color: var(--first-color-lighten);
}

.home__social-icon:hover{
    color: var(--first-color-light);
}

.button{
    display: inline-block;
    background-color: var(--first-color);
    color: var(--first-color-lighten);
    padding: .75rem 1rem;
    border-radius: .25rem;
    transition: .3s;
}

.button:hover{
    background-color: var(--first-color-dark);
}

.button-light{
    background-color: var(--first-color-light);
}

.button-white{
    background-color: var(--first-color-lighten);
    color: var(--first-color-dark);
}

.button-white:hover{
    background-color: var(--first-color-lighten);
}

.button-link{
    background: none;
    color: var(--first-color);
    padding: 0;
}

.home__button{
    z-index: 10;
    opacity: 1;
}

.button-link:hover{
    background: none;
}

.about__data{
    text-align: center;
}

.about__description{
    font-size: var(--h2-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--first-color);
}

.about__number{
    font-size: var(--h1-font-size);
    color: var(--first-color);
    display: block;
}

.about__img{
    justify-self: center;
    width: 220px;
    border-radius: .5rem;
}

/* Qualification */
.qualification__container{
    row-gap: 2.5rem;
}

.qualification__title{
    font-size: var(--h3-font-size);
    color: var(--first-color);
    margin-bottom: var(--mb-2);
    display: flex;
    align-items:last baseline
}

.qualification__title-icon{
    font-size: 1.5rem;
    margin-right: var(--mb-1);
}

.qualification__box{
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
    margin: var(--mb-2) 0;
}

.qualification__area{
    font-size: var(--normal-font-size);
    color: var(--first-color);
    margin-bottom: var(--mb-1);
    font-weight: var(--font-medium);
}

.qualification__icon, .qualification__work{
    font-size: var(--smaller-font-size);
    color: var(--first-color-light);
}

.qualification__work{
    display: block;
}

/* Services */

.services__filter > input{
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.services__tabs{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin-bottom: var(--mb-3);
}

.services__tab{
    padding: .55rem 1rem;
    border-radius: .5rem;
    color: var(--first-color);
    background-color: #fff;
    box-shadow: 0 3px 6px rgba(174, 190, 205, .25);
    cursor: pointer;
    transition: .3s;
}

.services__tab:hover{
    transform: translateY(-.15rem);
}

#skill-all:checked ~ .services__tabs .services__tab--all,
#skill-iot:checked ~ .services__tabs .services__tab--iot,
#skill-ml:checked ~ .services__tabs .services__tab--ml,
#skill-web:checked ~ .services__tabs .services__tab--web{
    color: #fff;
    background-color: var(--first-color);
}

.services__data{
    padding: 1.35rem .85rem;
    background-color: #fff;
    border-radius: .5rem;
    text-align: center;
    transition: .4s;
    box-shadow: 0 4px 6px rgba(174, 190, 205, .3);
}

.services__container{
    gap: 1rem;
    justify-content: center;
    grid-template-columns: repeat(2, minmax(0, 145px));
}

.skill-card{
    display: block;
}

#skill-iot:checked ~ .services__container .skill-card,
#skill-ml:checked ~ .services__container .skill-card,
#skill-web:checked ~ .services__container .skill-card{
    display: none;
}

#skill-iot:checked ~ .services__container .skill-iot,
#skill-ml:checked ~ .services__container .skill-ml,
#skill-web:checked ~ .services__container .skill-web{
    display: block;
}

.services__icon, .services__title{
    color: var(--first-color);
}

.services__icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.4rem;
    margin-bottom: var(--mb-1);
    font-size: 2.25rem;
}

.services__icon-text{
    width: 2.4rem;
    border-radius: 50%;
    border: 2px solid var(--first-color);
    font-size: var(--small-font-size);
    font-weight: var(--font-bold);
    line-height: 1;
}

.services__title{
    font-size: var(--normal-font-size);
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--mb-1);
}

.services__description{
    margin-bottom: var(--mb-4);
}

.services__data:hover{
    transform: translateY(-.5rem);
    box-shadow: 0 6px 8px rgba(174, 190, 205, .4);

}

/* project */
.project__container{
    padding: 1.5rem 1rem;
    background-color: var(--first-color-dark);
    color: var(--first-color-lighten);
    border-radius: .5rem;
    text-align: center;
}

.project__icon, .project__title{
    margin-bottom: var(--mb-1);
}

.project__icon{
    font-size: 3.5rem;
}

.project__title{
    font-size: 1.5rem;
}

.project__description{
    margin-bottom: var(--mb-4);
}

/* portfolio */

.portfolio__nav{
    text-align: center;
    margin-bottom: var(--mb-3);
}

.portfolio__item{
    margin: 0 var(--mb-2) ;
    cursor: pointer;
}

.portfolio__content{
    background-color: #fff;
    border-radius: .5rem;
    overflow:hidden;
    box-shadow: 0 4px 6px rgba(174, 190, 205, .3);
}

.portfolio__img{
    width: 100%;
    transition: .4s;
}

.portfolio__data{
    padding:1.5rem;
}

.portfolio__subtitle{
    font-size: var(--small-font-size);
    color: var(--first-color-light);
}

.portfolio__title{
    font-size: var(--h3-font-size);
    color: var(--first-color);
    margin: var(--mb-2) 0;
}

.portfolio__content:hover{
    box-shadow: 0 6px 8px rgba(174,190,205,.4);
}

.portfolio__content:hover .portfolio__img{
    transform: scale(1.02);
}

.active-portfolio{
    color: var(--first-color-dark);
    font-weight: var(--font-semi-bold);
}

/* Project detail page */
.project-page{
    padding-top: 2rem;
}

.project-detail{
    min-height: calc(100vh - var(--header-height));
    display: grid;
    align-content: center;
}

.project-detail__title{
    margin-bottom: var(--mb-4);
}

.project-detail__hero{
    align-items: center;
}

.project-detail__media{
    overflow: hidden;
    border-radius: .5rem;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(174, 190, 205, .3);
}

.project-detail__media img{
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.project-detail__content{
    background-color: #fff;
    border-radius: .5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(174, 190, 205, .3);
}

.project-detail__tag{
    display: inline-block;
    color: var(--first-color-light);
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-1);
}

.project-detail__heading{
    color: var(--first-color);
    font-size: var(--h2-font-size);
    line-height: 1.35;
    margin-bottom: var(--mb-2);
}

.project-detail__description{
    margin-bottom: var(--mb-3);
}

.project-detail__points{
    display: grid;
    gap: .75rem;
    margin-bottom: var(--mb-3);
}

.project-detail__points div{
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--first-color);
}

.project-detail__points i{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--first-color-lighten);
    font-size: 1.2rem;
}

.project-detail__actions{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.project-info__grid,
.project-achievements__list,
.project-gallery__grid{
    gap: 1rem;
}

.project-info__box,
.project-achievements__item{
    background-color: #fff;
    border-radius: .5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(174, 190, 205, .3);
}

.project-info__icon{
    color: var(--first-color);
    font-size: 2rem;
    margin-bottom: var(--mb-1);
}

.project-info__box h3{
    color: var(--first-color);
    margin-bottom: var(--mb-1);
}

.project-achievements__item{
    display: flex;
    gap: 1rem;
}

.project-achievements__item span{
    color: var(--first-color);
    font-size: var(--h2-font-size);
    font-weight: var(--font-bold);
    line-height: 1;
}

.project-gallery__grid img{
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: .5rem;
    box-shadow: 0 4px 6px rgba(174, 190, 205, .3);
}

/* contact */
.contact__container{
    row-gap: 2.5rem;
}

.contact__content{
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact__box{
    background-color: #FFF;
    border-radius: .5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(174, 190, 205, .3);
}

.contact__icon, .contact__title{
    color: var(--first-color)
}

.contact__icon{
    font-size: 2rem;
}

.contact__title{
    font-size: var(--h3-font-size);
    margin: var(--mb-1) 0;
}

.contact__box:hover{
    box-shadow: 0 6px 8px rgba(174,190,205,.4);
}

.contact__inputs{
    display: grid;
    grid-template-columns: repeat(2,1fr);
    column-gap: 1rem;
}

.contact__input, .contact__button{
    outline: none;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

.contact__input{
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--first-color-light);
    color: var(--first-color);
    border-radius: .5rem;
    margin-bottom: var(--mb-1);
}

.contact::placeholder{
    color: var(--first-color-light);
    font-family: var(--body-font);
    font-weight: var(--font-semi-bold);
}

.contact__button{
    cursor: pointer;
    border: none;
    padding-top: .45rem;
    padding-bottom: .45rem;
    line-height: 1.2;
    max-height: 8vh;
}

/* footer  */ 
.footer{
    background-color: var(--first-color-dark);
    color: var(--first-color-lighten);
    text-align: center;
}

.footer__container{
    padding: 3rem 0;
}

.footer__title{
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-1);
    font-weight: var(--font-semi-bold);
}

.footer__description{
    margin-bottom: var(--mb-3);
}

.footer__social{
    margin-bottom: var(--mb-6);
}

.footer__link{
    font-size: 1.4rem;
    color: var(--first-color-lighten);
    margin: 0 var(--mb-1);
    transition: .3s;
}

.footer__link:hover{
    color: var(--first-color-light);
}

.footer__copy{
    font-size: var(--smaller-font-size);
    color: var(--first-color-light);
}

@media screen and (min-width: 576px){
    .home__img img{
        width: 330px;
    }

    .about__container,
    .qualification__container,
    .profile__container{
        grid-template-columns: repeat(2,1fr);
    }

    .services__container{
        grid-template-columns: repeat(3, 170px);
    }

    .contact__form{
        width: 450px;
        justify-self: center;
    }
}

@media screen and (min-width: 576px){
    body{
        margin: 0;
    }
    .section{
        padding-top: 6px;
    }
    .section-title{
        margin-bottom: var(--mb-5);
    }

    .nav{
        height: calc(var(--header-height) + 1.5rem);
    }
    .nav__list{
        display: flex;
    }
    .nav__item{
        margin-left: var(--mb-5);
        margin-bottom: 0;

    }
    .nav__toggle{
        display: none;

    }

    .home__container{
        height: 100vh;
        grid-template-rows: max-content .5fr;
        align-content: flex-end;
    }

    .home__greeting{
        font-size: 1.25rem;
    }
    .home__profession{
        font-size: 2rem;
    }
    .home__social{
        flex-direction: row;
        align-items: center;
    }
    .home__social-icon{
        margin-right: var(--mb-4);
        margin-bottom: 0;
    }
    .home__img img{
        width: 440px;
    }

    .about__description{
        text-align: initial;
    }
    .about__img{
        width: 300px;
    }

    .qualification__box{
        display: flex;
        justify-content: space-between;
    }

    .portfolio__container{
        grid-template-columns: repeat(3, 1fr);
    }

    .project-page{
        padding-top: calc(var(--header-height) + 1.5rem);
    }

    .project-page .section{
        padding-top: 4rem;
    }

    .project-detail__hero{
        grid-template-columns: 1fr 1fr;
    }

    .project-info__grid,
    .project-gallery__grid{
        grid-template-columns: repeat(3, 1fr);
    }

    .services__container{
        grid-template-columns: repeat(5, 170px);
    }
    
    .project__container{
        padding: 4.5rem 0;
    }
    .project__data{
        display: flex;
        justify-content: space-evenly;
        align-items: center;
    }
    .project__icon, .project__title, .project__description{
        margin-bottom: 0;
    }

    .project__icon{
        font-size: 6rem;
    }
    .project__title{
        font-size: 2.5rem;
    }
}

@media screen and (min-width: 1024px){
    .bd-container{
        margin-left: auto;
        margin-right: auto;
    }

    .qualification__container{
        column-gap: 6rem;
    }
}
