@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

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

    /* Colors */
    --first-color: rgba(252, 130, 17, 0.747);
    --black-color: #000000;
    --black-color-light: #000000;
    --heading-color: #b1835b;
    --white-color: #ffffff;
    --text-color:#000000;
    --body-color: #ffffff;
    --container-color: #b1835b;
    --red-color: #e75714;

    /* Font size */
    --biggest-font-size: 2.5rem;
    --big-font-size: 2rem;
    --h1-font-size: 1.75rem;
    --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-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /* Font family */
    --body-font: 'DM Sans', sans-serif;

    /* z index */
    --z-tooltip: 10;
    --z-fixed: 100;

    /* Border radius */
    --border-radius: .25rem;

}

@media screen and (min-width: 1150px) {
    :root {
        --biggest-font-size: 4.5rem;
        --h1-font-size: 3rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

html{
    scroll-behavior: smooth;
}

body{
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    background-color: var(--body-color);
    color: var(--text-color);
}

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

ul{
    list-style: none;
}

a{
    text-decoration: none;
}

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


/* THEME */

/* Variable Dark Theme */

/* Color changes in some parts of the website, in dark theme */

/* Reusable css classes */
.container{
    max-width: 1120px;
    margin-inline: 1.5rem;
}

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

.section{
    padding-block: 1rem;
}

.section__title-1,
.section__title-2{
    position: relative;
    font-size: var(--h1-font-size);
    margin-bottom: 1rem;
    width: max-content;
    margin: .75rem auto 2rem;
}

.section__title-1 span,
.section__title-2 span{
    position: relative;
    z-index: 5;
}

.section__title-1::after,
.section__title-2::after{
    content: "";
    position: absolute;
    bottom: -4px;
    left: -8px;
    width: 40px;
    height: 28px;
    background-color: var(--first-color);
}

.section__title-1::after{
    transform: rotate(-2deg);
    top:initial;
    bottom: -4px;
}

.geometric-box{
    margin-top: 0;
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--red-color);
    transform: rotate(-30deg);
}

.geometric-box::after{
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background-color:3px solid var(--first-color);
    left: -5px;
    top: -5px;
}

.main {
    overflow: hidden;
}

/* header & nav */
.header{
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: var(--heading-color);
    z-index: var(--z-fixed);
    transition: box-shadow .3s ease;
}

.nav{
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 1.5rem;
}

.nav__logo{
    display: flex;
    column-gap: .5rem;
    align-items: center;
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
}

.nav__logo-circle, 
.nav__toggle{
    width: 40px;
    height: 40px;
    background-color: var(--black-color);
    color: var(--white-color);
    display: grid;
    place-items: center;
}

.nav__logo-circle{
    font-size: 1.25rem;
    border-radius: 50%;
}

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

.nav__dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background-color: transparent;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
}

.nav__dropdown option {
    background-color: var(--heading-color);
    color: var(--black-color);
}

/* Style for the label */
.nav__link-label {
    display: none;
}

/* Style for the selected option */
.nav__dropdown option:checked {
    font-weight: bold;
}


/* mobile navigation */
@media screen and (max-width: 1200px){
    .nav__menu{
        position: fixed;
        top: -100%;
        left: 0;
        background-color: var(--body-color);
        width: 100%;
        padding-block: 1.8rem 5rem;
        text-align: center;
        /* backdrop-filter: blur(5px); */
        box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
        padding: 1rem 0;
        transition: top .3s ease;
    }

    .nav__title,
    .nav__name,
    .nav__close{
        color: var(--black-color-light);
    }

    .nav__title{
        display: block;
        font-size: var(--h2-font-size);
        font-weight: var(--font-semi-bold);
        margin: 0 auto 2.5rem;
    }

    .nav__name{
        position: relative;
        width: max-content;
        margin: 0 auto 3rem;
        font-size: var(--h2-font-size);
    }

    .nav__name::after,
    .nav__name::before{
        content: "";
        position: absolute;
        top: 50%;
        left: -4rem;
        width: 40px;
        height: 1px;
        background-color: var(--text-color);
    }

    .nav__name::before{
        left: initial;
        right: -4rem;
    }
    .nav__list{
        display: flex;
        flex-direction: column;
        row-gap: 2.5rem;
    }

    .nav__link{
        position: relative;
        font-size: var(--normal-font-size);
        font-weight: var(--font-medium);
        transition: color .3s ease;
        color: var(--black-color);
    }

    .nav__link::after{
        content: "";
        position: absolute;
        bottom: -.5rem;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--red-color);
        transition: width .3s ease;
    }

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

    .nav__link:hover::after{
        width: 100%;
    }

    .nav__close{
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .nav__close:hover{
        color: var(--red-color);
    }

    /* show menu */
    .show-menu{
        top: 0;
        transition: .5s ease-in-out;
    }
}

/* shadow header */
.shadow-header{
    box-shadow: 0 1px 16px rgba(0, 0, 0, .12);
}

/* Active link */
.active-link{
    color: var(--red-color);
}


/* home section */
.home__container{
    padding-top: 2rem;
}

.home__name{
    font-size: var(--big-font-size);
    font-weight: var(--font-bold);
    margin-bottom: 1rem;
    text-align: center;
}

.home__profile{
    position: relative;
    justify-self: center;
}

.home__image{
    width: 250px;
}

.home__img{
    position: relative;
    z-index: 10;
    object-fit: cover;
}

.home__shadow{
    position: absolute;
    bottom: -.75rem;
    right: -.75rem;
    width: 100%;
    height: 100%;
    background-color: var(--container-color);
    z-index: 5;
    border: 4px solid var(--black-color);
    transition: bacckground-color .3s ease;
}

.home__profile .geometric-box{
    top: 1.5rem;
    left: -.7rem;
    z-index: 10;
}

.home__social{
    height: max-content;
    position: absolute;
    left: -3rem;
    top: 0;
    bottom: 0;
    margin: auto 0;
    display: grid;
    row-gap: 1rem;
}

.home__social-link{
    background-color: var(--black-color-light);
    color: var(--white-color);
    font-size: 1.25rem;
    padding: 6px;
    display: grid;
    place-items: center;
    transition: background-color .3s ease;
}

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

.home__info{
    margin-top: 4rem;
}

.home__decription{
    text-align: center;
    color: var(--title-color);
    margin-bottom: 1.5rem;
}

.home__description b:hover{
    color: var(--red-color);
}

.home__scroll{
    display: block;
    width: max-content;
    margin: 0 auto;
}

.home__scroll-text{
    display: none;
}

.home__scroll-box{
    background-color: var(--black-color);
    color: var(--white-color);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: background-color .4s ease-in-out;
}

.home__scroll-box{
    animation: scroll-down 3s ;
}

/* Animate scroll icon */
@keyframes scroll-down {
    0%{
        transform: translateY(-1rem);
        opacity: 0;
    }
    50% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(.6rem);
        opacity: 0;
    }
}

/* buttons */
.button,
.button__ghost{
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: .5rem;
}

.button{
    background-color: var(--black-color);
    padding: 1.1rem 1.5rem;
    color: var(--white-color);
    font-weight: var(--font-medium);
    transition: background-color .3s ease;
}

.button i{
    font-size: 1.25rem;
}

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

.button__ghost{
    border: 3px solid var(--black-color);
    color: var(--black-color);
    padding: .5rem;
    transition: border .4s, color .4s ease;
}

.button__ghost i{
    font-size: 1.25rem;
}

.button__ghost:hover{
    border: 3px solid var(--red-color);
    color: var(--red-color);
}
/* about section */
.about{
    background-color: var(--container-color);
    transition: background-color .3s ease;
}
.about__container{
    row-gap: 0;
}

.about__profile{
    display: grid;
    justify-content: center;
    margin-block: 2.5rem 4.5rem;
}

.about__image{
    width: 280px;
}

.about__img{
    position: relative;
    z-index: 1; 
    border: 4px solid var(--white-color);
}


.about__shadow{
    position: absolute;
    width: 100px;
    right: 1.5rem;
    height: 80px;
    background-color: var(--body-color);
    border-bottom: 4px solid var(--black-color);
    transition: background-color .3s ease;
}

.about__profile .geometric-box{
    right: 2.5rem;
}

.about__info{
    margin-top: 2rem;
    margin-left: 2rem;
    padding: 1rem;
}

.about__description{
    position: relative;
    color: var(--title-color);
    margin-bottom: 1.5rem;
}

.about__description::after{
    content: '';
    width: 20px;
    height: 2px;
    background-color: var(--title-color);
    position: absolute;
    left: -1.75rem;
    top: .5rem;
}

.about__list{
    list-style: square;
    color: var(--title-color);
    padding: 2rem 0 1rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.about__list2{
    list-style: bullet;
    color: var(--title-color);
    margin-top: 1rem;
    margin-bottom: 3rem;
}


.about__buttons{
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 1rem;

}

/* Services */

.services__container{
    grid-template-columns: 250px;
    justify-content: center;
    row-gap: 2rem;
    padding-top: 1rem;
}

.services__card{
    position: relative;
}

.services__content{
    height: 100%;
    background-color: var(--body-color);
    border: 4px solid var(--black-color);
    margin-top: 2rem;
    padding: 6rem 1.5rem 3rem;
    z-index: 5;
    position: relative;
    transition: background-color .3s ease, border 3s ease;
}

.services__border{
    position: absolute;
    display: none;
    width: 100%;
    height: 100%;
    border: 4px solid var(--first-color);
    top: 0;
    left: 0;
    transition: transform .4s ease;
}

.services__card:hover .services__border{
    transform: translate(1rem, 1rem);
    display: block;
}

.services__icon{
    position: relative;
    display: inline-block;
}

.services__icon i{
    font-size: 2rem;
    color: var(--black-color);
    position: relative;
    transition: color .3s ease;
    z-index: 5;
}

.services__title{
    font-size: var(--h2-font-size);
    margin-bottom: 1.25rem;
}

/* projects */
.projects{
    margin-top: 2rem;
    background-color: var(--container-color);
    transition: background-color .3s ease;
    border-radius: .3rem;
}

.projects__container{
    row-gap: 2rem;
}

.projects__card{
    padding: 1rem 1rem 2rem;
    margin-top: 1rem;
    border-radius: .3rem;
    transition: background-color .3s ease;
    background-color: var(--container-color);
}

.projects__image{
    position: relative;
    overflow: hidden;
    border-radius: .3rem;
    margin-bottom: .75rem;
}

.projects__button{
    position: absolute;
    right: .75rem;
    bottom: -.5rem;
    padding: 1rem;
}

.projects__content{
    margin-bottom: 1.5rem;
}

.projects__subtitle{
    position: relative;
    display: inline-block;
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.projects__subtitle::after{
    content: '';
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    top: 50%;
    left: 0;
}

.projects__title{
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
    margin-bottom: 1rem;
}

.projects__buttons{
    display: flex;
    align-items: center;
    column-gap: 1rem;
}

.projects__link{
    display: flex;
    align-items: center;
    column-gap: .5rem;
    color: var(--text-color);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    transition: color .3s ease;
}

.projects__link i{
    font-size: 1.25rem;
    color: var(--text-color);
    transition: color .4s;
}

.projects__link:hover,
.projects__link:hover i{
    color: var(--red-color);
}

.projects__card:hover{
    background-color: var(--white-color);
}

.read-more-button {
    background-color: var(--red-color); 
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* Modal CSS */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    width: 50%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

h2 {
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

button[type="submit"] {
    background-color: var(--red-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: var(--first-color);
}



/* Contact */
.contact{
    background-color: var(--white-color);
    transition: background-color .3s ease;
    padding-bottom: 0;
}

.contact__container{
    position: relative;
    grid-template-rows: 250px;
    row-gap: 0;
}   

.contact__data{
    position: relative;
    width: 300px;
    background-color: var(--container-color);
    padding: 2rem;
    margin: auto;
    border-radius: .3rem;
    border-bottom: 4px solid var(--first-color);
    z-index: 5;
    transition: background-color .3s ease;
}

.contact__data .section__title-2{
    margin: 0 0 1.5rem;
    transform: translateY(-3rem);
}

.contact__description-1{
    color: var(--title-color);
    font-weight: var(--font-medium);
    margin-bottom: 1.5rem;
}

.contact__data .geometric-box{
    top: 2rem;
    right: 2.5rem;
}

.contact__mail{
    position: relative;
    background-color: var(--black-color);
    padding: 5rem 1.5rem 2.5rem;
    margin-top: -2.5rem;
    border-radius: .3rem;
    transition: background-color .3s ease;
}

.contact__title {
    color: var(--white-color);
    font-size: var(--h2-font-size);
    margin-bottom: 2rem;
    text-align: center;
}

.contact__form,
.contact__group{
    display: grid;
    row-gap: 1.5rem;
}

.contact__form{
    position: relative;
}

.contact__box{
    position: relative;
    width: 100%;
    height: 58px;
}

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

.contact__input{
    width: 100%;
    height: 100%;
    padding: 1.5rem 1rem;
    background-color: var(--black-color);
    border: 2px solid var(--white-color);
    border-radius: .3rem;
    transition: background-color .3s ease, border .3s ease;
    color: var(--white-color);
    font-weight: var(--font-medium);
}

.contact__input::placeholder{
    color: var(--white-color);
    font-weight: var(--font-medium);
}

.contact__label{
    opacity: 0;
    position: absolute;
    top: -18px;
    left: 10px;
    color: var(--white-color);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    background-color: var(--black-color);
    padding: 8px;
    pointer-events: none;
    transition: top .4s, left .4s, color .4s, font-size .4s, background-color .4s, opacity .4s;
}

.contact__form .contact__area{
    height: 10rem;
}

.contact__area textarea{
    resize: none;
    padding-top: 1rem;
}

.contact__button{
    background-color: var(--first-color);
    cursor: pointer;
}

/* opaque placeholder */
.contact__input:focus::placeholder{
    opacity: 0;
}

.contact__input:focus + .contact__label{
    opacity: 1;
    top:-16px;
}

/* footer */

.footer{
    margin-top: 1rem;
    background-color: var(--black-color);
    color: var(--white-color);
    padding: 2rem 1.5rem;
    margin: .75rem;
    text-align: center;
    border-radius: .3rem;
}

.footer__container{
    padding-block: 1rem auto;
}

.footer__links{
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    column-gap: 2rem;
}

.footer__link{
    color: var(--white-color);
    transition: color .3s ease;
}

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

.footer__copy{
    font-size: var(--small-font-size);
    text-align: center;
}

.footer__copy span{
    color: var(--white-color);
    font-weight: var(--font-medium);
}

/* scroll bar */
::-webkit-scrollbar{
    width: .6rem;
    border-radius: .5rem;
    background-color: hsl(0, 0, 65%);
}
::-webkit-scrollbar-thumb {
    border-radius: .5rem;
    background-color: hsl(0, 0, 55%);
}
::-webkit-scrollbar-thumb:hover {
    background-color: hsl(0, 0, 45%);
}

/* scroll up */
.scrollup{
    position: fixed;
    right: 1rem;
    bottom: -50%;
    background-color: var(--black-color);
    padding: 8px;
    font-size: 1.25rem;
    color: var(--white-color);
    display: inline-flex;
    z-index: var(--z-tooltip);
    transition: bottom .3s ease, transform .3s ease, background-color .3s ease;
    border-radius: .3rem;
}

.scrollup:hover{
    transform: translateY(-.5rem);
}

/* show scroll */
.show-scroll{
    bottom: 1rem;
}


/* Breakpoints */

/* small devices */
@media screen and (max-width: 340px) {

    /* .container{
        margin-inline: 1rem;
    } */

    .home__image{
        width: 200px;
    }

    .about__image{
        width: 200px;
    }
    .about__shadow{
        height: 330px;
        right: -2.5rem;
    }
    
    .contact__data{
        width: 100%;
    }

    .contact__data .section__title-2{
        transform: translateX(0);
    }
}

/* medium devices */
@media screen and (min-width:576px) {
    .home__container,
    .about__container,
    .projects__container{
        grid-template-columns: 650px;
        justify-content: center;
    }
    .about__image {
        width: 400px;
    }

    .contact__container{
        grid-template-rows: 500px;
        justify-content: center;
    }

    .contact__data{
        width: 550px;
        padding: 4rem 1.5rem;
        margin-inline: auto;
    }

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

}

/* medium devices  */
@media screen and (min-width: 768px) { 
    .services__container{
        grid-template-columns: repeat(2, 350px);
        column-gap: 3rem;
    }

    .projects__container{
        grid-template-columns: repeat(3, 350px);
        column-gap: 5rem;
    }
}

/* large devices */

@media screen and (min-width:1150px){
    .container{
        margin-inline: auto;
    }

    .section{
        padding: 7rem 2rem;
    }
    .section__title-1::after,
    .section__title-2::after{
        width: 70px;
        height: 48px;
    }

    .geometric-box{
        transform: scale(1.2);
    }

    .nav{
        height: calc(var(--header-height) + 1rem);
    }

    .nav__buttons,
    .nav__close,
    .nav__toggle,
    .nav__title,
    .nav__name{
        display: none;
    }

    .nav__list {
        display: flex;
        flex-direction: row;
        column-gap: 4rem;
    }

    .nav__menu{
        margin-left: auto;
    }

    .nav__link{
        color: var(--black-color);
        font-size: var(--normal-font-size);
        padding: 0.75rem 1rem;
    }

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

    .nav__link::after{
        background-color: var(--title-color);
    }

    .active-link{
        color: var(--title-color);
    }

    .nav__link-button{
        background-color: var(--black-color);
        color: var(--white-color);
        padding: 0.75rem 1rem;
        border-radius: .3rem;
    }

    .nav__link-button:hover{
        background-color: var(--red-color);
    }

    .home__container{
        grid-template-columns: repeat(2, 460px);
        gap: 2rem 4rem;
        align-items: center;
        padding-bottom: 5rem;
    }

    .home__profile{
        grid-column: 2/3;
        grid-row: 1/2;
    }

    .home__image{
        width: 400px;
    }

    .home__info{
        margin-top: -160px;
    }

    .home__scroll{
        margin-top: 50px;
    }

    .about__container{
        grid-template-columns: 1000px;
    }

    .contact__container{
        grid-template-columns: 1000px;
    }

}
