* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  scroll-behavior: smooth;
  font-family: "Poppins";
}
:root {
  --bg-color: #fffdfa;
  --second-bg-color: hsla(41, 71%, 57%, 0.651);
  --text-color: hsl(41, 60%, 55%);
  --main-color: #4d3714a6;
  --third-bg-color: hsla(41, 100%, 79%, 0.959);
}
html {
  font-size: 60%;
  overflow-x: hidden;
}
body {
    background: var(--bg-color);
    color: var(--text-color);
}
.header{
    position: fixed;
    width: 100%;
    height: 50px;
    top: 0;
    left: 0;
    padding: 4rem 15%;
    background: linear-gradient(
      270deg,
      var(--second-bg-color),
      var(--main-color),
      #e99d2ba8,
      #5f4f08
    );
    background-size: 400% 400%;
    animation: gradientMove 10s ease infinite;
    backdrop-filter: blur(10px); /* for glass effect*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
#menu-icon{
  font-size: 3rem;
  color: var(--main-color);
  display: none;
}
.logo{
  font-size: 3rem;
  color: var(--bg-color);
  font-weight: 800;
  cursor: pointer;
} 
span{
  background: linear-gradient(
    270deg,
   var(--second-bg-color) 10%,
    var(--main-color) 100%,
    var(--third-bg-color) 100%);
  background-clip: text;
  color: transparent;
  animation: gradientMove 10s ease infinite;
}
.navbar a{
  font-size: 1.8rem;
  color: var(--bg-color);
  margin-left: 4rem;
  font-weight: 500;
  transition: 0.3s ease-in-out;
  border-bottom: 3px solid transparent;
}
.navbar a:hover{
  color: var(--main-color);
  border-bottom: 3px solid var(--main-color);
}
.gradient-btn{
  font-size: 1.8rem;
  padding: 1rem 2rem;
  border-radius: 3rem;
  background: linear-gradient(
    270deg,
    #ffd28e 10%,
    var(--main-color) 100%
  );
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
  color: var(--text-color);
  border: none;
  text-wrap: nowrap;
}
.gradient-btn:hover{
  transform: scale(1.05);
}

section{
  min-height: 100vh;
  padding: 10rem 15%;
}
.home{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15rem;
}
.home-content{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.home-content h1{
  font-size: 8rem;
  font-weight: 700;
  margin-top: 1.5rem;
  line-height: 1;
}
.home-content h3{
  margin: 1rem 0;
  font-size: 4rem;
}
.home-content p{
  font-size: 1.5rem;
  font-weight: 500;
  line-height:1.8;
}
.home-img img{
  width: 32vw;
  aspect-ratio: 1/1; /*Forces the image to stay a square*/
  object-fit: cover; /*to cover the entire area/ to prevent stretching/squishing*/
  border-radius: 50%;
  background-color: var(--third-bg-color);
  box-shadow: 0 0 20px var(--second-bg-color),
              0 0 25px var(--third-bg-color),
              0 0 25px var(--second-bg-color);
  transition: 0.4s ease-in-out;
}

.home-img img:hover{
box-shadow: 0 0 20px var(--second-bg-color),
            0 0 30px var(--third-bg-color),
            0 0 50px var(--second-bg-color),
            0 0 50px var(--second-bg-color);
              
}
.social-icons a{
  display: inline-flex; /*to stay side by side*/
  justify-content: center; /*to center the icons*/
  align-items: center;
  font-size: 3rem;
  padding: 1rem;
  background: transparent;
  border: 2px solid var(--third-bg-color);
  border-radius: 50%;
  color: var(--text-color);
  box-shadow: 0 0 5px var(--second-bg-color);
  margin: 3rem 0.5rem;
  transition: 0.3s ease-in-out;
}
.social-icons a:hover{
  color:var(--text-color);
  background-color: var(--main-color);
  transform: scale(1.2)translateY(-5px); /* hover size and movement upwards y direction*/
  box-shadow: 0 0 25px var(--main-color);
}
.btn-group{
  display: flex;
  gap: 1.5rem;
}
.btn{
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--third-bg-color);
  box-shadow: 0 0 10px var(--text-color),
              0 0 15px var(--third-bg-color);
  border-radius: 3rem;
  font-size: 1.8rem;
  color: var(--text-color);
  border: 4px solid transparent;
  font-weight: 600;
  transition: 0.3s ease-in-out;
}
.btn:hover{
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--text-color),
              0 0 20px var(--second-bg-color);
}

.btn-group a:nth-of-type(2){
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--third-bg-color);
  box-shadow: 0 0 0px transparent;
}
.btn-group a:nth-of-type(2):hover{
  box-shadow: 0 0 25px var(--second-bg-color);
  background-color: var(--third-bg-color);
  color: var(--text-color);
}
.about{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10rem;
  background: var(--second-bg-color);
}
.about-img img{
  width: 32vw;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 50%;
  background-color: rgb(255, 241, 215);
  box-shadow: 0 0 20px var(--text-color),
              0 0 30px var(--third-bg-color);
  transition: 0.4s ease-in-out;
}
.about-img img:hover{
 box-shadow: 0 0 15px #ffeb77,
             0 0 20px #ffee8d,
             0 0 40px #fff8d3,
             0 0 50px #fcdda4;
}
.about-content h2{
  font-size: 7rem;
  text-align: left;
}
.about-content p{
  display: block;
  text-align: justify;
  font-style: italic;
  padding: 2em;
  width: 100%;
  max-width: 500px;
  font-size: 1.8rem;
  color: var(--main-color);
  border-radius: 10px;
  will-change: transform;
  cursor: pointer;
  perspective: 1000px;
}

::-webkit-scrollbar{
  width: 8px;
}
::-webkit-scrollbar-thumb{
  background-color: var(--second-bg-color);
}
::-webkit-scrollbar-track{
  background-color: var(--main-color);
}

.heading{
  text-align: center;
  font-size: 7rem;
  margin: 5rem 0; /*top & bottom*/
}
.services{
  background-color: var(--bg-color);
  color: black;
}
.services h2{
  color: var(--text-color);
}
.services-container{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* to automatically fit*/
  align-items: center;
  gap: 2.5rem;
}
.service-box{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--main-color);
  height: 600px;
  border-radius: 3rem;
  cursor: pointer;
  border: 5px solid transparent;
  transition: 0.4s ease-in-out;
}
.service-box:hover{
  background: var(--second-bg-color);
  color: var(--bg-color);
  border: 5px solid var(--main-color);
  transform: scale(1.03);
}
.service-info{
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 5rem;
}
.service-info h4{
  font-size: 4rem;
  margin: 2rem 0;
  font-weight: 800;
}
.service-info p{
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.7;
}
.service-info i{
  font-size: 8rem;
}

.projects{
  color: var(--main-color);
  background-color: var(--second-bg-color);
}

.projects-box{
  display: grid;
  grid-template-columns: minmax(350px, 1fr);
  place-items: center;
  gap: 3rem;
  row-gap: 5rem;
}
.project-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg-color);
  border: 2px solid var(--main-color);
  border-radius: 3rem;
  gap: 2rem;
  padding: 5rem 2rem;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}
.project-card:hover{
  box-shadow: 0 0 10px var(--main-color),
              0 0 20px var(--main-color);
  transform: scale(1.02);
}
.project-card img{
  max-width: 300px;
  border-radius: 2em;
  object-fit: cover;
}
.project-card h3{
  font-size: 3rem;
} 
.project-card p{
  font-size: 1.6rem;
}
.contact{
  background-color: var(--bg-color);
}
.contact h2{
  margin-bottom: 3rem;
  text-align: center;
  font-size: 3em;
}
.contact form{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin: 5rem 0;
  text-align: center;
}
.contact form .input-box input,
.contact form textarea{
  width: 100%;
  padding: 2.5rem;
  font-size: 1.8rem;
  color: var(--text-color);
  background-color: var(--bg-color);
  border-radius: 2rem;
  border: 2px solid var(--main-color);
  margin: 1.5rem 0; /*to/bottom*/
  resize: none; 
}

.footer{
  background-color: var(--second-bg-color);
  padding:50px 0;
}
.footer .social-icons{
  text-align: center;
}
.footer ul{
  text-align: center;
  font-size: 1.8rem;
}
.footer ul li{
  display: inline-block;
  margin-left: 20px;
}
.footer ul li a{
  color: white;
  border-bottom: 3px solid transparent;
  transition: 0.3s ease-in-out;
}
.footer ul li a:hover{
  border-bottom: 3px solid var(--main-color);
}
.footer .copyright{
  text-align: center;
  margin-top: 40px;
  font-size: 16px;
}
/* thank you page styles */
.modal-overlay{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #3a3123;
  display: none; /*hidden by default*/
  justify-content: center;
  align-items: center;
  z-index: 2000; /*above header*/
  backdrop-filter: blur(5px); /*glass effect*/
}
.modal-content {
  width: 90%;
  background: var(--bg-color);
  padding: 3rem 2rem;
  border-radius: 3rem;
  text-align: center;
  position: relative;
  max-width: 500px;
  border: 2px solid var(--main-color);
  box-shadow: 0 0 30px var(--main-color);
}

.close-btn {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  font-size: 4rem;
  color: var(--second-bg-color);
  cursor: pointer;
  line-height: 1;
}
.close-btn:hover {
  color: var(--text-color);
  transform: scale(1.1);
}

.modal-content h1{
  font-size: 4rem; 
  margin-bottom: 2rem;
}
.modal-content p{
  font-size:2rem; 
  margin-bottom: 2rem;
}

/*for responsiveness*/ 
@media(max-width:1285px){
  #menu-icon{
    display: block;
  }
  .navbar{
    position: absolute; /*removed from the normal document flow*/
    top: 100%;
    right: 0;
    width: 50%;
    padding: 1rem 3rem;
    background: rgba(0, 0, 0, 0.801);
    border-bottom-left-radius: 2rem;
    border-left: 2px solid var(--main-color);
    border-bottom: 2px solid var(--main-color);
    display: none;
  }
  .navbar a{
    display: block; /*To make hidden sub-menus visible when triggered*/
    font-size: 2rem;
    margin: 3rem 0;
    color: var(--text-color);
  }
  .navbar.active{ /*works as a toggle when menu icon is clicked*/
    display: block;
  }
  .gradient-btn{
    display: none;
  }
  .home{
    flex-direction: column-reverse;
    margin: 5rem 0;
    gap: 5rem;
  }
  .home-content{
    align-items: center;
    text-align: center;
  }
  .home-img img{
    width: 56vw;
  }
  .about{
    flex-direction: column-reverse;
    text-align: center;
  }
  .about h2{
    text-align: center;
    margin: 2rem 0;
  }
  .about img{
    width: 52vw;
  }
  .contact form{
    flex-direction: column;
  }
}
html, body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

@media (max-width: 450px){
  /* 1. Reduce the side gaps so content's lopsideness is minimized */
  .header, section {
    padding-left: 5% !important;
    padding-right: 5% !important;
  }
  section {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
    width: 100%;
  }

  .projects-box {
    display: flex !important; /* Flex is more suitable for single-column layouts */
    flex-direction: column;
    grid-template-columns: 1fr;
    /* justify-items: center; */
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  /*Ensures cards never exceed phone screen width*/
  .project-card {
    width: 100% !important; /* Ensures the card fills the mobile screen width*/
    max-width: 320px !important; /*keeps the card from becoming too wide on slightly larger phones */
    margin: 0 auto !important; /* Sets the top and bottom margins to 0 and automatically calculates equal left and right margins*/
    padding: 3rem 2rem;
  }
}