/* Fonts */

@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* Resets */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

:root {
  /* Colors */
  --bg-color: #080808;
  --second-bg-color: #101010;
  --text-color: whitesmoke;
  --main-color: #6f00ff;

  /* Fonts */
  --ff: "Poppins", sans-serif;
  --fs: clamp(1rem, 2.2vh, 1.5rem);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

button {
  font-size: 1.7rem;
  font-weight: 500;
}

/* Utility Classes */

.center {
  text-align: center;
}

.offscreen {
  position: absolute;
  left: -100000;
}

.nowrap {
  white-space: nowrap;
}

/* General Styles */

html {
  font-family: var(--ff);
  scroll-behavior: smooth;
  line-height: 1.5;
  overflow-x: hidden;
  font-size: 60%;
}

body {
  position: relative;
  font-size: var(--fs);
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Header */

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: 100%;
  position: sticky;
  top: 0;
  background: transparent;
  padding: 4rem 15%;
  backdrop-filter: blur(10px);
  z-index: 999;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2rem;
  max-width: 1600px;
}

.navbar-logo {
  color: var(--text-color);
  font-size: 3rem;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease-in-out;
  white-space: nowrap;
}

.navbar-logo:hover {
  transform: scale(1.1);
}

span {
  background: linear-gradient(270deg, #6f00ff, #ff1d15);
  background-clip: text;
  color: transparent;
}

.navbar-container .navbar-menu {
  display: flex;
  text-align: center;
  gap: 1.5rem;
  list-style: none;
}

.navbar-container .navbar-menu li a {
  text-decoration: none;
  color: whitesmoke;
  font-size: 1.8rem;
  font-weight: 500;
  padding: 3px 20px;
  transition: all 0.5s ease;
  white-space: nowrap;
}

.navbar-container .navbar-menu li a:hover,
.navbar-container .navbar-menu li a.active {
  color: var(--main-color);
}

.navbar-toggle {
  display: none;
  background: transparent;
  padding: 10px;
  border: none;
  cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: whitesmoke;
    transition: all 0.3s ease-in-out;
}

/* Section */

section {
  min-height: 100vh;
  align-items: center;
}

/* Home */

.home {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 4rem;
  padding: 10rem 15%;
  background-color: var(--second-bg-color);
}

.home__h1 {
  font-size: 8rem;
  font-weight: 700;
  margin-top: 1.5rem;
  line-height: 1;
}

.home__h2 {
  font-size: 4rem;
  font-weight: 700;
  margin-top: 1rem;
  line-height: 1;
}

.home__p {
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.8;
}

.main__img {
  width: 50vh;
}

.btn,
.link {
  background-color: var(--main-color);
  color: var(--text-color);
  box-shadow: 0 0 25px var(--main-color);
  padding: 1rem 2rem;
  border-radius: 3rem;
  transition: 0.3s ease-in-out;
  text-wrap: nowrap;
  border: none;
  margin-top: 1rem;
}

.btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 50px var(--main-color);
}

/* About */

.about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10rem;
  padding: 10rem 15%;
}

.about__img {
  width: 50vh;
  border: 10px double #6f00ff;
  border-radius: 10px;
}

.tag {
  padding: 2rem;
  font-size: 2rem;
}

.about__h2 {
  font-size: 4rem;
  font-weight: 700;
  margin-top: 1.5rem;
  line-height: 1;
}

.about__p {
  font-size: 1.7rem;
  line-height: 1.8;
}

.about__ul {
  list-style-type: none;
  font-size: 1.7rem;
  padding: 1rem;
}

.about__ul li::before {
  content: "☑️";
  font-size: 2rem;
  margin-left: 1rem;
  margin-right: 0.5rem;
}

.about__btn {
  background-color: transparent;
  border: 2px solid var(--main-color);
  padding: 1rem 2rem;
  border-radius: 3rem;
  transition: 0.3s ease-in-out;
  text-wrap: nowrap;
}

.about__btn a {
  font-size: 1.7rem;
  color: var(--text-color);
}

.about__btn:hover {
  transform: scale(1.05);
  background-color: var(--main-color);
}

/* Projects */

.projects {
  background-color: var(--second-bg-color);
  text-align: center;
  padding: 10rem 15%;
}

.projects__article {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  place-items: center;
  gap: 3rem;
  row-gap: 5rem;
}

.projects__h2 {
  font-size: 4rem;
  font-weight: 700;
  margin-top: 1.5rem;
  padding: 4rem;
  line-height: 1;
}

.projects-card h3 {
  font-size: 3rem;
}

.projects-card p {
  font-size: 1.7rem;
  text-align: start;
}

.projects-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;
  box-shadow: 0 0 5px var(--main-color);
  transition: 0.3s ease-in-out;
}

.projects-card:hover {
  box-shadow: 0 0 50px var(--main-color);
  transform: scale(1.02);
}

.projects-card img {
  max-width: 300px;
}

/* Contact */

.contact {
  background-color: var(--bg-color);
  text-align: center;
  padding: 10rem 15%;
}

.contact__h2 {
  font-size: 4rem;
  font-weight: 700;
  margin-top: 1.5rem;
  padding: 4rem;
  line-height: 1;
}

.form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin: 5rem 0;
  text-align: center;
}

.input-box input,
.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;
  resize: none;
}

/* Footer */
.footer {
  position: sticky;
  bottom: 0;
  width: 100%;
  background-color: var(--second-bg-color);
  padding: 20px 0;
}

.footer__p {
  text-align: center;
  margin-top: 10px;
  font-size: 16px;
}

/* Animation */

/* Text Animation */
.autoShow {
  animation: text-appear both;
  animation-timeline: view(50% auto);
  animation-range: entry 20% 100vh;
}

@keyframes text-appear {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image Animation */
.imageReveal {
  animation: imageReveal both;
  animation-timeline: view(10% 5%);
}

@keyframes imageReveal {
  from {
    filter: saturate(0) contrast(4) brightness(.1) blur(5px);
    opacity: 0;
    scale: .95s;
    translate: 0 4rem;
  }
  to {
    filter: none;
    opacity: 1;
    scale: 1;
    translate: 0 0;
  }
}

/* Card fade Animation */

.fadeUp {
  animation: fadeUp both;
  animation-timeline: view();
}

.projects-card:nth-child(1) {
  animation-range: entry 20% cover 40%;
}

.projects-card:nth-child(2) {
  animation-range: entry 40% cover 60%;
}

.projects-card:nth-child(3) {
  animation-range: entry 60% cover 80%;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* Media Query */
/* Responsive Design */
@media (max-width: 880px) {

  .navbar {
    padding: 2rem 7.5%;
  }
  img {
    max-width: 100%;
  }

  .navbar-container .navbar-menu {
      display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.7rem;
        position: absolute;
        height: 100vh;
        width: 250px;
        top: 0;
        right: 0;
        padding: 5rem 1.5rem;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.5);
        background: #210b2c;
        backdrop-filter: blur(10px);
    }

    .navbar-container .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: block;
        z-index: 999;
    }

    .navbar-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .navbar-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .home, .about, .form {
      flex-direction: column;
      text-align: center;
      gap: 5rem;
    }

    .projects__article {
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .contact__h2 {
      white-space: nowrap;
    }

    .footer__p {
      font-size: 10px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 1rem;
    }

    .navbar-logo {
        font-size: 2.5rem;
    }

    .navbar-container .navbar-menu li a {
        font-size: 1.7rem;
        padding: 3px 20px;
    }

    .navbar-container .navbar-menu {
      align-items: center;
    }

}
