/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600;700&display=swap");


* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Bai Jamjuree", sans-serif;
  font-size: .938rem;
  background-color: hsl(0, 0%, 87%);
  color: hsl(0, 0%, 35%);
}

h1, h2, h3, h4 {
  color: hsl(0, 0%, 0%);
  font-weight: 700;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*------ reusable css class------- */
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 4rem 2rem;
}

.section__title-1, 
.section__title-2 {
  position: relative;
  font-size: 1.75rem;
  width: max-content;
  margin: .75rem auto 2rem;
}

.section__title-1 span, 
.section__title-2 span {
  z-index: 5;
  position: relative;
}

.section__title-1::after, 
.section__title-2::after {
  content: "";
  width: 40px;
  height: 28px;
  background-color: hsla(14, 98%, 50%, .2);
  position: absolute;
  top: -4px;
  right: -8px;
}

.section__title-2::after {
  top: initial;
  bottom: -4px;
}

.geometric-box {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: hsl(14, 98%, 50%);
  rotate: -30deg;
}

.geometric-box::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid hsl(0, 0%, 0%);
  left: -5px;
  top: -5px;
}

.main {
  overflow: hidden;
}
/*----- header and nav------ */
.header{
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: hsl(0, 0%, 87%);
  z-index: 100;
  transition: box-shadow .4s;
}
.nav{
  position: relative;
  height: 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav__logo{
  display: flex;
  column-gap: .5rem;
  align-items: center;
  font-weight: 600;
  color: hsl(0, 0%, 0%);
}
.nav__logo-circle,
.nav__toggle{
  width: 32px;
  height: 32px;
  background-color: hsl(0, 0%, 0%);
  color: hsl(0, 0%, 95%);
  display: grid;
  place-items: center;
}
.nav__logo-circle{
  border-radius: 50%;
}
.nav__toggle{
  font-size: 1.25rem;
  cursor:pointer;
}
/* ------nav for mobile------- */
@media screen  and (max-width: 1150px){
  .nav__menu{
    position: fixed;
    top: -100%;
    left: 0;
    background-color: hsl(0, 0%, 0%, .75);
    width: 100%;
    padding-block: 1.8rem 5rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: top .4s;
  }
}
.nav__title,
.nav__name,
.nav__close{
  color: hsl(0, 0%, 95%);
}

.nav__title{
  display: block;
  font-size: .813rem;
  font-weight: 600;
  margin-bottom: 3.5rem;
}

.nav__name{
  position: relative;
  width: max-content;
  margin: 0 auto 3rem;
  font-size: 1.25rem;
}

.nav__name::after,
.nav__name::before{
  content: '';
  width: 40px;
  height: 1px;
  background-color: hsl(0, 0%, 64%);
  position: absolute;
  top: 50%;
  left: -4rem;
}
.nav__name::before{
  left: initial;
  right: -4rem;
}
.nav__list{
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
}
.nav__link {
  position: relative;
  color: hsl(0, 0%, 64%);
  font-size: 1.125rem;
  font-weight: 600;
  transition: color .3s;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -.5rem;
  width: 0;
  height: 2px;
  background-color: hsl(0, 0%, 95%);
  transition: width .3s;
}

.nav__link:hover::after {
  width: 40%;
}

.nav__link.active::after {
  width: 40%;
}
.nav__close{
  position: absolute;
  font-size: 1.5rem;
  top: 1rem;
  right: 1.5rem;
  cursor: pointer;
}
.show-menu{
  top: 0;
}

.shadow-header{
  box-shadow: 0 1px 16px hsla(0, 0%, 0%, .12);
}

/*---- home -----*/
.home__container{
  padding-top: 2rem;

}
.home__name{
  font-size: 2.5rem;
  text-align: center;
}
.home__perfil{
  position: relative;
  justify-self: center;
}
.home__image{
  width:220px; 
}
.home__img{
  position: relative;
  z-index: 10;
}
.home__shadow{
  width: 100%;
  height: 100%;
  background-color: hsl(0, 0%, 83%);
  position: absolute;
  bottom: -.75rem;
  right: -.75rem;
  border: 4px solid hsl(0, 0%, 0%);
  z-index: 5;
  transition: background-color .4s;
}
.home__arrow,
.home__line{
  position:absolute;
  filter:invert(1);
  width:50px;
  
  transition:filter .4s;
}
.home__arrow{
  left:40%;
  bottom:-4rem;
}
.home__line{
  right: -2rem;
  bottom: -3rem;
}
.home__perfil .geometric-box{
  top: 2.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: hsl(0, 0%, 40%);
  color:hsl(0, 0%, 95%);
  font-size: 1.25rem;
  padding: 6px;
  display: grid;
  place-items: center;
  transition: background-color .3s;
}
.home__social-link:hover{
  background-color: hsl(0, 0%, 0%);
}
.home__info{
  margin-top: 4rem;
}
.home__description{
  text-align: center;
  color: hsl(0, 0%, 0%);
  margin-bottom: 1.5rem;
}
.home__description b{
  background: linear-gradient(90deg, 
              hsla(14, 98%, 50%, .3),
              hsla(14, 98%, 50%, 0));
}
.home__scroll{
  display: block;
  width: max-content;
  margin: 0 auto;
}
.home__scroll-text{
  display: none;
}
.home__scroll-box{
  background-color: hsl(0, 0%, 0%);
  color: hsl(0, 0%, 95%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: background-color .4s;
}
.home__scroll-box i{
  animation: scroll-down 3s infinite;
}
/*---- scroll icon anime----- */
@keyframes scroll-down{
  0%{
    transform: translateY(0);
    opacity: 1;
  }
  50%{
    transform: translateY(0);
    opacity: 1;
  }
  100%{
    transform: translateY(.6rem);
    opacity: 1;
  }
}

.button,
.button__ghost{
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: .5rem;
}
.button{
  background-color: hsl(0, 0%, 0%);
  padding: 1.1rem 1.5rem;
  color: hsl(0, 0%, 95%);
  font-weight: 500;
  transition: background-color .4s;
}
.button i{
  font-size: 1.25rem;
}
.button:hover{
  background-color: hsl(14, 98%, 50%);
}
.button__ghost{
  border: 3px solid hsl(0, 0%, 0%);
  color:hsl(0, 0%, 0%);
  padding: .5rem;
  transition: border .4s, color .4s;
}
.button__ghost i{
  font-size:1.25rem;
}
.button__ghost:hover{
  border: 3px solid hsl(14, 98%, 50%);
}
/* ----anime for skill ---*/
@keyframes slide{
  from{
    transform: translateX(0);
  }
  to{
    transform: translate(-100%);
  }
  to{
    transform: translate(-200%);
  }
}

/*------ about --------*/
.about{
  background-color: hsl(0, 0%, 83%);
  transition: background-color .4s;
}
.about__container{
  row-gap: 0;
}
.about__perfil{
  position: relative;
  justify-self: center;
  margin-block: 2.5rem 4.5rem;
  padding-bottom: 50px;
}
.about__image{
  width: 220px;
}
.about__img{
  position: relative;
  border: 4px solid hsl(0, 0%, 95%);
  z-index: 1;
}
.about__shadow,
.about__line,
.about__box{
  position: absolute;
}
.about__shadow{
  width: 150px;
  height: 385px;
  background-color: hsl(0, 0%, 87%);
  top: -2.5rem;
  right: -3.5rem;
  border-bottom: 4px solid hsl(14, 98%, 50%);
  transition: background-color .4s;
}
.about__perfil .geometric-box{
  top: 1.5rem;
  right: -2.8rem;
}
.about__line{
  filter: invert(1);
  right: -2rem;
  top: 12rem;
  width: 50px;
  transition: filter .4s;
}
.about__box{
  width: 40px;
  height: 40px;
  background-color: hsl(14, 98%, 50%);
  right: -0.5rem;
  bottom: 4rem;
}
.about__info{
  padding-left: 1.25rem;
}
.about__description{
  position: relative;
  color: hsl(0, 0%, 0%);
  margin-bottom: 1.5rem;
}
.about__description::after{
  content: '';
  width: 20px;
  height: 1px;
  background-color: hsl(0, 0%, 0%);
  position: absolute;
  left: -1.75rem;
  top: .5rem;
}
.skillSlideContainer{
  display: inline-block;
 height: 50px;
margin-bottom: 3rem;
width: 470px;
overflow: hidden;
}
.skillSlide{
  display: flex;
  gap: 30px;
  width: 100%;
  white-space:nowrap;
  animation: 5s slide infinite linear;
}
.skillSlide img{
  height: 50px;
}
.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: hsl(0, 0%, 87%);
  border: 4px solid hsl(0, 0%, 0%);
  padding: 6rem 1rem 3rem;
  z-index: 5;
  position: relative;
  transition: background-color .4s, border .4s;
}
.services__border{
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid hsl(14, 98%, 50%);
  top: 0;
  left: 0;
  transition: transform .4s;
}
.services__card:hover .services__border{
  transform: translate(.75rem, .75rem);
}
.services__icon{
  position: relative;
  display: inline-block;
}
.services__icon i{
  font-size: 2rem;
  color: hsl(0, 0%, 0%);
  position: relative;
  z-index: 5;
}
.services__box{
  position: absolute;
  width: 24px;
  height: 24px;
  background-color: hsl(14, 98%, 50%);
  right: -2px;
  top: -2px;
}
.services__title{
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

/* -------projects------------- */
.projects{
  background-color: #d4d4d4;
  transition: background-color .4s;
}
.projects__container{
  row-gap: 2rem;
}
.projects__card{
  padding: 1rem 1rem 2rem;
  transition: bacground-color .4s;
}
.projects__image{
  position:relative;
  margin-bottom: .75rem;
}
.projects__button{
  position: absolute;
  right: 1rem;
  bottom: -1rem;
  padding: 1rem;
}
.projects__content{
  margin-bottom: 1.25rem;
}
.project__subtitle{
  position:relative;
  display: inline-block;
  font-size: .813rem;
  font-weight: 500;
  color: hsl(0, 0%, 35%);
  margin-bottom: .75rem;
  padding-left: 1.75rem;
}
.project__subtitle::after{
  content: '';
  width: 20px;
  height: 1px;
  background-color: hsl(0, 0%, 35%);
  position: absolute;
  top: 50%;
  left: 0;
}
.project__title{
  font-size: 1.125rem;
  margin-bottom: .75rem;
}
.projects__buttons{
  display: flex;
  align-items: center;
  column-gap: 1rem;
}
.projects__link{
  display: flex;
  align-items: center;
  column-gap: .25rem;
  color: hsl(0, 0%, 35%);
  font-size: .813rem;
  font-weight: 500;
  transition: color .4s;
}
.projects__link i{
  font-size: 1rem;
  color:hsl(0, 0%, 0%);
  transition: color .4s;
}
.projects__link:hover,
.projects__link:hover i{
  color: hsl(14, 98%, 50%);
}

.projects__card:hover{
  background-color: hsl(0, 0%, 95%);
}

/* ---------contact------------- */
#contact{
  position: relative;
  grid-template-rows: 300px max-content max-content;
  row-gap: 0;
}
.contact__data{
  position: relative;
  width: 300px;
  height: 300px;
  background-color: hsl(0, 0%, 83%);
  padding: 3rem 1.5rem 3.5rem;
  margin-left: auto;
  border-bottom: 4px solid hsl(14, 98%, 50%);
  z-index: 5;
  transition: background-color .4s;
}
.contact__data .section__title-2{
  margin: 0 0 1.5rem;
  transform: translateX(-3rem);
}
.contact__description-1{
  color: hsl(0, 0%, 0%);
  font-weight: 500;
  margin-bottom: 2rem;
}
.contact__description-2{
  color: hsl(0, 0%, 0%);
  font-size: .813rem;
}
.contact__data .geometric-box{
  top: 2rem;
  right: 2.5rem;
}
.contact__mail{
  position: relative;
  background-color: hsl(0, 0%, 0%);
  padding: 5rem 1.5rem 2.5rem;
  margin-top: -2.5rem;
  transition: background-color .4s;
}
.contact__title{
  color: hsl(0, 0%, 95%);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  text-align: center;
}
.contact__form,
.contact__group{
  display: grid;
  row-gap: 1.25rem;  
}
.contact__form{
  position: relative;
}
.contact__box{
  position: relative;
  width: 100%;
  height: 58px;
}
.contact__input,
.contact__button{
  font-family: "Bai Jamjuree", sans-serif;
  font-size: .938rem;
  outline: none;
  border: none;
}
.contact__input{
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: hsl(0, 0%, 0%);
  border: 3px solid hsl(0, 0%, 40%);
  color: hsl(0, 0%, 95%);
  padding: .5rem 1rem;
  font-weight: 500;
  transition: border .4s, background-color .4s;
}
.contact__input::placeholder{
  color: hsl(0, 0%, 64%);
  transition: opacity .4s;
}

.contact__input:focus {
  border: 3px solid hsl(0, 0%, 95%);
}

.contact__input .contact__input:-webkit-autofill{
  transition: background-color 6000s, color 6000s;
}
.contact__label{
  position: absolute;
  top: -16px;
  left: 10px;
  color: hsl(0, 0%, 64%);
  font-size: .813rem;
  font-weight: 500;
  background-color: hsl(0, 0%, 0%);
  padding: 8px;
  pointer-events: none;
  transition: top .4s, opaciy .4s, background-color .4s;
  opacity: 0;
}
.contact__form .contact__area{
  height: 10rem;
}
.contact__area textarea{
  resize: none;
  padding-top: 1rem;
}
.contact__button{
  background-color: hsl(14, 98%, 50%);
  cursor: pointer;
}
.contact__input:focus::placeholder{
  opacity: 0;
}
.contact__input:focus + .contact__label,
.contact__input:not(:placeholder-shown).contact__input:not(:focus) + .contact__label{
  opacity: 1;
  top: -16px;
}
.contact__social {
  display: grid;
  row-gap: 1rem;
  background-color: hsl(0, 0%, 10%);
  padding-block: 1rem 2rem;
  text-align: center;
}

.contact__social-arrow {
  width: 32px;
  margin: 0 auto;
}

.contact__social-data {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the content horizontally */
  row-gap: .5rem;
}

.contact__social-description-1 {
  color: hsl(0, 0%, 64%);
  font-size: .813rem;
  margin-bottom: 0.5rem;
}

.contact__social-description-2 {
  color: hsl(0, 0%, 95%);
  font-size: .813rem;
  font-weight: 600;
}

.contact__social-links {
  display: flex;
  justify-content: center;
  column-gap: 0.75rem;
}

.contact__social-link {
  background-color: hsl(0, 0%, 40%);
  padding: 6px;
  color: hsl(0, 0%, 95%);
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  transition: background-color 0.3s;
  row-gap: 1.5rem;

}

.contact__social-link:hover {
  background-color: hsl(14, 98%, 50%);
}
/*------ footer -----*/
.footer{
  background-color: hsl(0, 0%, 0%);
}
.footer__container{
  padding-block: 3rem 2rem;
  row-gap: 2.5rem;
}
.footer__links{
  display: flex;
  justify-content: center;
  column-gap: 2rem;
}
.footer_link{
  color: hsl(0, 0%, 95%);
  transition: color .4s;
}
.footer__link{
  color: hsl(0, 0%, 95%);
  transition: color .4s;
}
.footer__link:hover{
  color: hsl(0, 0%, 64%);
}
.footer__copy{
  color:hsl(0, 0%, 64%);
  font-size: .813rem;
  text-align: center;
}
.footer__copy a{
  color: hsl(0, 0%, 95%);
  font-weight: 500;
}
/*-------- devices -------*/
/* For small devices */
@media screen and (max-width: 575px) {

  .skillSlide img{
    height: 30px;
  }
  .container{
    margin-inline: 1rem;
  }
  .home__image{
    width: 180px;
  }
  .about__image{
    width: 180px;
  }
  .about__shadow{
    height: 330px;
    right: -2.5rem;
  }
  .contact__data{
    width: 100%;
  }
  .contact__data .section__title-2{
    transform: translateX(0);
  }
  .about__arrow{
    position: relative;
    top: 19rem;
  }
}
/* For medium devices */
@media screen and (min-width:576px) {
  .home__container,
  .about__container,
  .projects__container{
    grid-template-columns: 350px;
    justify-content: center;
  }
  .skillSlideContainer{
    width: 350px;
  }
  .skillSlide img{
    height: 30px;
  }
  .contact__data{
    width: 350px;
    padding: 4rem 1.5rem;
    margin-inline: auto;
  }
  .contact__container{
    grid-template-columns: 500px;
    justify-content: center;
  }
  .contact__group{
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
  }
  .contact__social{
    background-color: transparent;
  }
  .contact__social-arrow{
    filter:invert(1);
  }
  .contact__social-description-1{
    color: hsl(0, 0%, 35%);
  }
  .contact__social-description-2{
    color: hsl(0, 0%, 0%);
  }
}
@media screen and (min-width: 768px) {
  .skillSlideContainer{
    width: 350px;
  }
  .services__container{
    grid-template-columns: repeat(1, 250px);
  }
  .projects__container{
    grid-template-columns: repeat(2, 350px);
  }
}

/* For large devices */
 @media screen and (min-width: 1150px) {
  .skillSlideContainer{
    width: 470px;
  }
  .skillSlide img{
    height: 50px;
  }
  .container{
    margin-inline: auto ;
  }
  .section{
    padding-block: 7rem 2rem;
  }
  .section__title-1::after,
  .section__title-2::after{
    width: 70px;
    height: 48px;
  }
  .geometric-box{
    transform: scale(1.2);
  }
  .nav{
    column-gap: 4rem;
  }
  .nav__close,
  .nav__toggle,
  .nav__title,
  .nav__name{
    display: none;
  }
  .nav__list{
    flex-direction: row;
    column-gap: 4rem;
  }
  .nav__menu{
    margin-left: auto;
  }
  .nav__link{
    color: hsl(0, 0%, 35%);
    font-size: .938rem;
  }
  .nav__link::before{
    color: hsl(0, 0%, 0%);
    background-color: hsl(0, 0%, 96%);
  }
  .nav__link:hover{
    color: hsl(0, 0%, 0%);

    /* background-color: hsl(0, 0%, 0%); */
  }
  .nav__link::after{
    background-color: hsl(0, 0%, 0%);
  }
  .active-link{
    color: hsl(0, 0%, 0%)
  }
  .nav__link-button{
    background-color: hsl(0, 0%, 0%);
    color: hsl(0, 0%, 95%);
    padding: 1.1rem 1.5rem;
  }
  .nav__link-button:hover{
    color: hsl(0, 0%, 95%);
  }
  .nav__link-button::after{
    background-color: transparent;
  }
  .home__container{
    grid-template-columns: repeat(2, 460);
    gap: 1rem 15rem;
    align-items: center;
    padding-block: 5.5rem ;
  }
  .home__perfil{
    grid-column: 2 / 3;
    grid-row: 1/3;
  }
  .home__image{
    width: 350px;
  }
  .home__shadow{
    right: -1.25rem;
    bottom: -1.25rem;
    border: 6px solid hsl(0, 0%, 0%);
  }
  .home__name,
  .home__description{
    text-align: initial;
  }
  .home__name{
    margin-top: 50px;
    align-self: flex-start;
  }
  .home__info{
    /* margin-top: 12rem; */
    align-self: flex-start;
  }
  .home__description{
    position: relative;
    font-size: 1.25rem;
    margin-bottom: 10rem;
    padding-left: 3rem;
  }
  .home__description::before{
    content: '';
    width: 32px;
    height: 2px;
    background-color: hsl(0, 0%, 0%);
    position: absolute;
    left: 0;
    top: 14px;
  }
  .home__scroll{
    margin: 0;
    display: flex;
    align-items: center;
    column-gap: .7rem;
  }
  .home__scroll-text{
    display: block;
    color: hsl(0, 0%, 35%);
    font-size: .75rem;
    font-weight: 500;
  }
  .home__scroll-box{
    width: 44px;
    height: 44px;
  }
  .home__scroll-box i{
    font-size: 1.25rem;
  }
  .home__perfil .geometric-box{
    top: 15rem;
  }
  .home__arrow{
    top: 15rem;
    left: -8rem;
    rotate: 90deg;
    width: 80px;
  }
  .home__line{
    right: -100px;
    bottom: -5rem;
    width: 80px;
    right: 30deg;
  }
  .home__social{
    left:initial;
    right: -6rem;
  }
  .home__social-link{
    font-size: 1.5rem;
    padding: .5rem;
  }
  .about__container{
    grid-template-columns: 440px 525px;
    gap: 1rem 9rem;
    align-items: center;
    padding-block: 1rem;
  }
  .about_perfil{
    order: -1;
    grid-row: 1/3;
  }
  .about__image{
    width: 350px;
  }
  .about__img{
    border: 8px solid hsl(0, 0%, 95%);
  }
  .about__shadow{
    width: 240px;
    height: 615px;
    top: -4rem;
    right: -5.5rem;
    border-bottom: 6px solid hsl(0, 0%, 95%);
  }
  .about__perfil .geometric-box{
    right: -4rem;
    top: 4.5rem;
  }
  .about__line{
    width: 80px;
    right: -5rem;
    top: 25rem;
   
  }
  .about__arrow{
    position: relative;
    height: 5rem;
    right: -16rem;
    top: 10rem;
    rotate: -25deg;
  }
  .about__box{
    width: 64px;
    height: 64px;
    right: -0.75rem;
  }
  .about__container .section__title-1{
    align-self: flex-end;
    margin-inline: 0;
  }
  .about__info{
    align-self:flex-start;
    padding-left: 3rem;
    margin-top: 20rem;
  }
  .about__description{
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }

  .services__container{
    grid-template-columns: repeat(3, 282px);
    column-gap: 5rem;
    padding-block: 3rem 5rem;
  }
  .projects__container{
    grid-template-columns: repeat(3, 352px);
    padding-block: 3rem 1rem;
  }
  .contact__container{
    grid-template-areas: 'data mail', 'social-link mail';
    grid-template-columns: 440px 670px;
    grid-template-rows: initial;
    padding-bottom: 2rem;
  }
  .contact__social{
    margin-left: 8rem;
    text-align: initial;
  }
 }
