@import url("https://fonts.googleapis.com/css2?family=Anta&display=swap");

/* ------------------------GENERAL------------------------ */

:root {
  --main-color: #0ef;
  --primary-color: #1f242e;
  --secondary-color: #323946;
  --text-color: #fff;
  --font-family: "Anta", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style-type: none;
  text-decoration: none;
  border: none;
  outline: none;
  caret-color: transparent;
}

/* in General HTML is for overall structure as well as behaviour of the page */
html {
  /*styling for typography*/
  font-size: 62.5%; /*if give font size of 100px will look like 62.5px on a page*/
  /* overflow-x: hidden; */
  font-family: var(--font-family);
  scroll-behavior: smooth;
}
/** body is the main content of the page */
body {
  background-color: var(--primary-color);
  color: var(--text-color);
}

section {
  min-height: 100vh;
  padding: 8rem 9% 2rem; /* rem is calculated of the font size of root element so if font size is 16 then 1 rem is equal to 16px */
  /* 10rem at top 2rem at bottom */
  /* 9% on right of left - of parent element */
  /* not recommended way of doing it */
}

span {
  color: var(--main-color);
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: var(--main-color);
  border-radius: 4rem;
  box-shadow: 0 0 2rem var(--main-color);
  font-weight: 700;
  color: var(--secondary-color);
  letter-spacing: 2px;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.btn:hover {
  box-shadow: none;
  color: #fa8943;
}

/* ------------------------GENERAL------------------------ */

/* ------------------------HEADER------------------------ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background-color: var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.logo {
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 600;
}

.navbar a {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-left: 4rem;
  transition: all 0.3s ease-in-out;
}

.navbar a:hover {
  color: var(--main-color);
}
/* ------------------------HEADER------------------------ */

/* ------------------------HOME------------------------ */

.home {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-content h3 {
  font-size: 3rem;
  font-weight: 700;
}

.home-content h3:last-child {
  margin-bottom: 2rem;
}

.home-content h1 {
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1.3; /*if a unit is not specified then 1.3 × my font size*/
}

.home-content p {
  font-size: 1.5rem;
}

.home-img {
  margin-left: 2rem;
  border-radius: 50%;
  background-color: var(--main-color);
  box-shadow: 0 0 2rem var(--main-color);
}

.home-img img {
  width: 35vw;
  border-radius: 50%;
  animation: floatImg 2s ease-in-out infinite;
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  border: 5px solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  margin: 3rem;
  transition: all 0.3s ease-in-out;
}

.social-media a:hover {
  background-color: var(--main-color);
  box-shadow: 0 0 1rem var(--main-color);
  color: var(--secondary-color);
  transform: scale(1.1);
}

/* ------------------------HOME------------------------ */

/* ------------------------ABOUT------------------------ */

.about {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--secondary-color);
  gap: 5rem;
}

.about-img .test {
  position: relative;
  overflow: hidden;
}

.about-img .test .top-image {
  transition: all 1s ease-in-out;
}

.about-img .image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateY(100%);
  transition: all 0.5s ease-in-out;
}

.about-img:hover .top-image {
  transform: scale(-1%);
}

.about-img:hover .top-image .top {
  box-shadow: none;
}

.about-img:hover .image-container {
  transform: translateY(0%);
}

.about-img img {
  box-sizing: content-box;
  margin: 2rem;
  width: 35vw;
  border-radius: 50%;
  box-shadow: 0 0 2rem var(--main-color);
  transition: all 0.3s ease-in-out;
}

.about-content h2 {
  text-align: left;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.about-content h3 {
  text-align: left;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.about-content p {
  text-align: left;
  font-size: 1.3rem;
  font-weight: 400;
  margin: 1.3rem 0 2.3rem;
}

/* ------------------------ABOUT------------------------ */

/* ------------------------SERVICES------------------------ */

.services {
  background-color: var(--primary-color);
  text-align: center;
}

.services h2 {
  font-size: 4rem;
  padding: 3rem;
}

.services-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.services-container .services-box {
  flex: 1 1 30rem;
  border: 2px solid var(--main-color);
  border-radius: 2rem;
  padding: 3rem 2rem 4rem;
  transition: all 0.5s ease-in-out;
}

.services-container .services-box:hover {
  transform: scale(1.03);
  box-shadow: 0 0 2rem var(--main-color);
}

.services-box h3 {
  font-size: 2rem;
}

.services-box i {
  font-size: 6rem;
  color: var(--main-color);
}

.services-box p {
  font-size: 1.5rem;
  margin: 1rem 0 3rem;
}

/* ------------------------SERVICES------------------------ */

/* ------------------------PORTFOLIO------------------------ */

.portfolio {
  background-color: var(--secondary-color);
  text-align: center;
}

.portfolio h2 {
  font-size: 4rem;
  margin-bottom: 3rem;
}

.portfolio h3.My-Projects-Logo::before {
  content: "Hover over a card to reveal more ";
}

.portfolio h3 {
  font-size: 3rem;
  margin-bottom: 3rem;
}

.portfolio .portfolio-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  justify-content: center;
  margin: 0 auto;
  text-align: center;
}

.portfolio .portfolio-container .portfolio-box {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  margin: 1rem 1rem;
  border: 2px solid var(--main-color);
  box-shadow: 0 0 2rem var(--primary-color);
  min-height: 600px;
}

.portfolio-box-flex {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.portfolio-box i {
  font-size: 18rem;
}

.portfolio-box img {
  width: 100%;
  height: auto;
  border-radius: 2rem;
  margin-bottom: 1rem;
  transition: all 0.5s ease-in-out;
}

.portfolio-box img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 2rem var(--main-color);
}

.portfolio-box .portfolio-layer {
  color: white;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), var(--main-color));
  transform: translateY(100%);
  padding: 4rem;
  transition: all 0.5s ease-in-out;
}

.portfolio-box:hover .portfolio-layer {
  transform: translateY(0%);
}

.portfolio-box .portfolio-layer h3 {
  font-size: 5rem;
}

.portfolio-box .portfolio-layer p {
  font-size: 3rem;
  margin: 2rem 0;
}

.portfolio-box .portfolio-layer a i {
  font-size: 6rem;
  color: var(--text-color);
  border: 3px solid var(--text-color);
  padding: 1rem;
  border-radius: 50%;
}

.portfolio-box .portfolio-layer a i:hover {
  color: var(--main-color);
  border: 3px solid var(--main-color);
  box-shadow: 0 0 2rem var(--main-color);
}
/* ------------------------PORTFOLIO------------------------ */

/* ------------------------CONTACT------------------------ */

.contact {
  background-color: var(--primary-color);
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-color);
}
.contact h2 {
  font-size: 4rem;
  margin-bottom: 3rem;
}

.contact form {
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 3rem;
}

.contact form .form-group {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact form .form-group input,
.contact form textarea {
  background-color: var(--secondary-color);
  padding: 1.5rem;
  color: var(--text-color);
  border-radius: 2rem;
  width: 100%;
  margin: 2rem 0;
}

.contact form .form-group input {
  width: 49%;
}

.contact form textarea {
  resize: none;
}

/* ------------------------CONTACT------------------------ */

/* ------------------------FOOTER------------------------ */

.footer {
  background-color: var(--secondary-color);
  padding: 3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  font-size: 1.5rem;
}

.footer a i {
  color: var(--main-color);
  border: 2px solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  padding: 1rem;
}

.footer a i:hover {
  border: 2px solid var(--text-color);
  color: var(--text-color);
  box-shadow: 0 0 2rem var(--text-color);
}

/* ------------------------FOOTER------------------------ */

/* ------------------------ANIMATIONS------------------------ */

@keyframes floatImg {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.8);
  }
  100% {
    transform: scale(1);
  }
}

/* ------------------------ANIMATIONS------------------------ */

/* ------------------------MEDIA QUERIES------------------------ */

@media screen and (max-width: 1200px) {
  html {
    font-size: 55%;
  }

  .portfolio .portfolio-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio .portfolio-container h3 {
    font-size: 4rem;
  }

  .portfolio .portfolio-container p {
    font-size: 3rem;
  }

  .portfolio .portfolio-container a i {
    font-size: 3rem;
  }
}

@media screen and (max-width: 991px) {
  section {
    padding: 10rem 3% 2rem;
  }

  .header {
    padding: 2rem 3%;
  }

  .footer {
    padding: 2rem 3%;
  }

  .services {
    padding: 7rem;
  }

  .portfolio {
    padding: 7rem;
  }

  .portfolio .portfolio-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio .portfolio-container h3 {
    font-size: 4rem;
  }

  .portfolio .portfolio-container p {
    font-size: 3rem;
  }

  .portfolio .portfolio-container a i {
    font-size: 3rem;
  }
}

@media screen and (max-width: 768px) {
  html {
    font-size: 50%;
  }

  .header {
    flex-direction: column;
    padding: 2rem;
  }

  .navbar {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    align-items: center;
  }

  .home {
    flex-direction: column;
  }

  .home-content h3 {
    font-size: 2.5rem;
  }

  .home-content h1 {
    font-size: 5rem;
  }

  .home-img img {
    margin-top: 4rem;
    width: 70vw;
  }

  .about {
    flex-direction: column-reverse;
  }

  .about-img img {
    margin-top: 2rem;
    width: 70vw;
  }

  .about-content h2 {
    font-size: 5rem;
  }

  .about-content h3 {
    font-size: 3rem;
  }

  .about-content p {
    font-size: 2rem;
  }

  .btn {
    font-size: 1.5rem;
    padding: 1rem 2rem;
  }

  .portfolio h2 {
    font-size: 3rem;
  }

  .portfolio .portfolio-container .portfolio-box {
    min-height: 280px;
  }

  .portfolio h3.My-Projects-Logo::before {
    content: "Click a card to reveal more";
  }

  .portfolio .portfolio-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio .portfolio-container h3 {
    font-size: 2.8rem;
  }

  .portfolio .portfolio-container p {
    font-size: 2rem;
  }

  .portfolio .portfolio-container a i {
    font-size: 3rem;
  }
}

@media screen and (max-width: 576px) {
  html {
    font-size: 50%;
  }

  .portfolio .portfolio-container .portfolio-box {
    min-height: 280px;
  }

  .portfolio .portfolio-container {
    grid-template-columns: repeat(1, 1fr);
  }

  .portfolio .portfolio-container h3 {
    font-size: 2rem;
  }

  .portfolio .portfolio-container p {
    font-size: 1.7rem;
  }

  .portfolio .portfolio-container a i {
    font-size: 2rem;
  }

  .contact form .form-group input {
    width: 100%;
  }
}

@media screen and (max-width: 390px) {
  .portfolio .portfolio-container h3 {
    font-size: 2.3rem;
  }

  .portfolio .portfolio-container p {
    font-size: 2rem;
  }

  .portfolio .portfolio-container a i {
    font-size: 2rem;
  }
}

@media screen and (max-width: 350px) {
  .home-img img {
    width: 90vw;
  }
  .about-img img {
    width: 80vw;
  }

  .portfolio .portfolio-container h3 {
    font-size: 3rem;
  }

  .portfolio .portfolio-container p {
    font-size: 2rem;
  }

  .portfolio .portfolio-container a i {
    font-size: 2rem;
  }

  .footer {
    flex-direction: column-reverse;
  }
}

@media screen and (max-width: 320px) {
  .home-img img {
    width: 80vw;
  }
  .about-img img {
    width: 80vw;
  }

  .portfolio .portfolio-container h3 {
    font-size: 2rem;
  }

  .portfolio .portfolio-container p {
    font-size: 1.5rem;
  }

  .portfolio .portfolio-container a i {
    font-size: 1.5rem;
  }

  .footer {
    flex-direction: column-reverse;
  }
}

/* ------------------------MEDIA QUERIES------------------------ */
