@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Roboto', sans-serif;
}

:root{
  --bg-color: #1f242d;
  --second-bg-color: #323946;
  --text-color: #ffffff;
  --main-color: #03fc76;
  --heading-fonts: 'Cal Sans', sans-serif;
}

html{
  font-size: 62.5%;
  overflow-x: hidden;
}

body{
  background-color: var(--bg-color);
  color: var(--text-color);
}
section{
  min-height: 100vh;
  padding: 10rem 9% 2rem;
}
header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background-color: var(--bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}
header a, .navbar a{
  font-family: var(--heading-fonts);
}
.logo{
  font-size: 2.5rem;
  color: var(--main-color);
}
.navbar a{
  font-size: 1.7rem;
  color: var(--text-color);
  margin-left: 4rem;
}
.navbar a:hover, .navbar a.active{
  color: var(--main-color);
}
#menu-icon{
  font-size: 3.6rem;
  color: var(--text-color);
  display: none;
}

/*Home section styling*/
.home{
  display: flex;
  justify-content: center;
  align-items: center; 
}
.home-content{
  width: 40vw;
}
.home-img img{
  width: 35vw;
}
.home-content h3{
  font-size: 3.2rem;
  font-weight: 700;
}
.home-content h1, .home-content h3, .home-content span{
  font-family: var(--heading-fonts);
}
.home-content span{
  color: var(--main-color);
}
.home-content h1{
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.3;
}
.home-content p{
  margin-top: 2rem;
  font-size: 2.2rem;
  font-weight: 400;
}

/*Button Styles*/
.btn{
  margin: 2rem 0;
  display: inline-block;
  padding: 1rem 2.8rem;
  background-color: var(--main-color);
  border-radius: 4rem;
  box-shadow: 0 0 1rem var(--main-color);
  font-size: 1.6rem;
  color: var(--second-bg-color);
  font-weight: 600;
  transition: .5s ease-in-out;
}
.btn:hover{
  box-shadow: none;
}

/*About Section Title Styling*/
.about{
  background-color: var(--second-bg-color);
}
.about-heading{
  text-align: center;
  margin-bottom: 5rem;
}
.about-heading .heading{
  padding-bottom: 1rem;
}
.about-heading h2, .about-heading span{
  font-size: 4.4rem;
  font-family: var(--heading-fonts);
}
.about-heading span{
  color: var(--main-color);
}
.about-heading h3{
  font-size: 3.2rem;
  font-family: var(--heading-fonts);
}

/*All Timeline Styling*/
.timeline{
  position: relative;
  margin-bottom: 5rem;
}
.container{
  padding: 1rem 5rem;
  position: relative;
  width: 50%;
  z-index: 10;
}
.text-box{
  padding: 2rem 3rem;
  background-color: #fff;
  color: #000;
  border-radius: 0.5rem;
  font-size: 1.6rem;
  box-shadow: 0 0 1rem var(--bg-color);
  position: relative;
}
.left-container{
  left: 0;
}
.right-container{
  left: 50%;
}
.container img{
  position: absolute;
  width: 30px;
  border-radius: 50%;
  right: -15px;
  top: 32px;
}
.right-container img{
  left: -15px;
}
.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background: #fff;
  top: 1%;
  left: 50%;
  margin-left: -3px;
  height: 97%;
}
@keyframes moveline{
  0%{
    height: 0%;
  }
  100%{
    height: 97%;
  }
}
@keyframes movedown{
  0%{
    opacity: .8;
    transform: translateY(-30px);
  }
  100%{
    opacity: 1;
    transform: translateY(0px);
  }
}
.text-box h3{
  font-size: 1.8rem;
  font-family: var(--heading-fonts);
  margin-bottom: 1rem;
}
.left-container-arrow{
  height: 0;
  width: 0;
  position: absolute;
  top: 20px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 15px solid #fff;
  right: -14px;
}
.right-container-arrow{
  height: 0;
  width: 0;
  position: absolute;
  top: 20px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-right: 15px solid #fff;
  left: -14px;
}
@media (prefers-reduced-motion: no-preference){
  .container {
    opacity: 0;
    transform: translateY(-30px);
  }

  .timeline::after {
    height: 0%;
  }
  .timeline.animate-line::after{
    animation: moveline 6.5s linear forwards;
  }
  .animate-container{
    opacity: 0;
    animation: movedown 1s ease-out forwards;
  }
  .animate-container:nth-child(1){
    animation-delay: 0s;
  }
  .animate-container:nth-child(2){
    animation-delay: .95s;
  }
  .animate-container:nth-child(3){
    animation-delay: 1.90s;
  }
  .animate-container:nth-child(4){
    animation-delay: 2.85s;
  }
  .animate-container:nth-child(5){
    animation-delay: 3.80s;
  }
  .animate-container:nth-child(6){
    animation-delay: 4.75s;
  }
  .animate-container:nth-child(7){
    animation-delay: 5.70s;
  }
}

/* Projects Section styling */
.projects h2, .projects span{
  font-size: 4.4rem;
  font-family: var(--heading-fonts);
}
.projects span{
  color: var(--main-color);
}
.projects .heading{
  text-align: center;
}

.projects-container{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 4rem 0rem;
  width: 100%;
}
.projects-card{
  background-color:var(--second-bg-color);
  padding: 2rem;
  border-radius: 1rem;
  border: 0.2rem solid var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: .5s ease;
}
.projects-card img{
  width: 100%;
  border-radius: 1rem 1rem 0rem 0rem;
}
.projects-card h3{
  font-size: 2.3rem;
  font-weight: 500;
  font-family: var(--heading-fonts);
  padding: 1rem 0rem;
}
.projects-card p{
  font-size: 1.9rem;
  padding-bottom: 2rem;
}
.projects-card p a:link{
  color: #00F7FF;
}
.projects-card p a:visited{
  color:#00E0E7;
}
.projects-card-text{
  text-align: center;
  padding: 1rem 2rem;
}
.projects-card:hover{
  transform: scale(1.02);
  border-color: var(--main-color);
}

/*Contact Section Styles*/
.contact{
  margin: 2rem 0;
}
.contact .heading, .contact .heading span{
  margin-bottom: 4rem;
  font-size: 4.4rem;
  font-family: var(--heading-fonts);
}
.contact .heading span{
  color: var(--main-color);
}
.contact .heading{
  text-align: center;
}
.contact form{
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 3rem;
}
.contact form .input-box{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.contact form .input-box input, 
.contact form textarea{
  width: 100%;
  padding: 1.5rem;
  font-size: 1.6rem;
  color: var(--text-color);
  background-color: var(--second-bg-color);
  border-radius: .8rem;
  margin: .7rem 0;
}
.contact form .input-box input{
  width: 49%;
}
.contact form textarea{
  resize: none;
}
.contact form button:hover{
  cursor: pointer;
}

/*Footer Styling*/
.footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background-color: var(--second-bg-color);
}
.footer-text p{
  font-size: 1.6rem;
}
.footer-icon-top a{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .8rem;
  background-color: var(--main-color);
  border-radius: .8rem;
  transition: .7s ease;
}
.footer-icon-top a:hover{
  transform: translateY(-3px);
  box-shadow: 0 0 1rem var(--main-color);
}
.footer-icon-top a i{
  font-size: 2.4rem;
  color: var(--second-bg-color);
}

/*Breakpoints*/
@media screen and (max-width: 992px){
  .header{
    padding: 2rem 3%;
  }
  section{
    padding: 10rem 3% 2rem;
  }
  .home-content{
    width: 50vw;
  }
  .footer{
    padding: 2rem 3%;
  }
}


/*Small Screens*/
@media screen and (max-width: 768px){
  html{
    font-size: 60%;
  }
  #menu-icon{
    display: block;
  }
  .navbar{
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 3%;
    background-color: var(--bg-color);
    border-top: .1rem solid #00000033;
    box-shadow: 0 .5rem 1rem #00000033;
    display: none;
  }
  .navbar.active{
    display: block;
  }
  .navbar a{
    display: block;
    font-size: 2.5rem;
    margin: 3rem 0;
  }
  section{
    min-height: auto;
    padding: 7rem 2rem;
    font-size: 5rem;
  }

  /*Home styling*/
  .home{
    padding-top: 15rem;
    flex-direction: column;
  }
  .home-content{
    width: 85vw;
  }
  .home-content h3{
    font-size: 2.6rem;
  }
  .home-content h1{
    font-size: 5rem;
  }
  .home-img img{
    width: 70vw;
    margin-top: 4rem;
  }

  /*Timeline styling for small screens*/
  .timeline{
    margin: 10% auto;
  }
  .timeline::after{
    left: 0px;
  }
  .container{
    width: 100%;
    padding-left: 10%;
    padding-right: 0%;
  }
  .textbox{
    font-size: 2rem;
  }
  .right-container{
    left: 0;
  }
  .left-container img, .right-container img{
    left: -15px;
  }
  .left-container-arrow, .right-container-arrow{
    border-right: 15px solid #fff;
    border-left: 0;
    left: -14px;
  }

  .projects-container{
    grid-template-columns: repeat(1, 1fr);
  }
}

@media screen and (max-width: 492px){
  html{
    font-size: 60%;
  }
  .home-content .btn{
    width: 70%;
    display: block;
    text-align: center;
    margin: 2rem auto;
  }
  .footer{
    flex-direction: column-reverse;
    font-size: 1rem;
  }
  .footer p{
    text-align: center;
    margin: 1.5rem;
  }
}