@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&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");

* {
  margin: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #000;
  --second-bg-color: #161616;
  --text-color: #fff;
  --main-color: #ed2323;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
}

html::-webkit-scrollbar {
  width: 0.8rem;
}

html::-webkit-scrollbar-track {
  background: var(--bg-color);
}

html::-webkit-scrollbar-thumb {
  background: var(--main-color);
}

main {
  flex: 1;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 3rem 9%;
  background: rgba(0, 0, 0, 0.7);
  filter: drop-shadow(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.logo {
  font-size: 3rem;
  color: var(--main-color);
  font-weight: 800;
  cursor: pointer;
  transition: 0.5s ease;
}

.logo:hover {
  transform: scale(1.1);
}

.navbar a {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-left: 4rem;
  font-weight: 500;
  transition: 0.3s ease;
  border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a:active {
  color: var(--main-color);
  border-bottom: 3px solid var(--main-color);
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--main-color);
  display: none;
}

@media (max-width: 995px) {
  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    right: 0;
    width: 40%;
    border-left: 3px solid var(--main-color);
    border-bottom: 3px solid var(--main-color);
    border-bottom-left-radius: 2rem;
    padding: 1rem 3%;
    background-color: var(--second-bg-color);
    border-top: 0.1rem solid rgba(0, 0, 0, 0.1);
    display: none;
  }
  .navbar.active {
    display: block;
  }
  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
  }
  .navbar a:hover,
  .navbar a:active {
    padding: 1rem;
    border-radius: 0.5rem;
    border-bottom: 0.5rem solid var(--main-color);
  }
}

section {
  min-height: 100vh;
  padding: 5rem 9% 5rem;
}

.home {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8rem;
  background: var(--bg-color);
}

.home .home-content h1 {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1.3;
}

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

.home-content h3 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.home-img {
  border-radius: 50%;
}

.home-img img {
  position: relative;
  width: 450px;
  border-radius: 50%;
  box-shadow: 0 0 25px var(--main-color);
  cursor: pointer;
  margin-right: 20px;
}

.home-img img:hover {
  transform: scale(1.01);
  filter: drop-shadow(0 0 25px var(--main-color));
}

.home-content p {
  font-size: 1.8rem;
  font-weight: 500;
}

.social-icon a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  font-size: 2rem;
  border-radius: 50%;
  color: var(--main-color);
  margin: 3rem 1.5rem 3rem 0;
  transition: 0.3s ease;
}

.social-icon:hover a:hover {
  color: black;
  transform: scale(1.3) translateY(-5px);
  background: var(--main-color);
  box-shadow: 0 0 25px var(--main-color);
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background: var(--bg-color);
  border-radius: 4rem;
  font-size: 1.6rem;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  letter-spacing: 0.1rem;
  font-weight: 600;
  transition: 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  transform: scale(1.01);
  background-color: var(--main-color);
  color: black;
  box-shadow: 0 0 25px var(--main-color);
}

.typing-text {
  font-size: 34px;
  font-weight: 600;
  min-width: 280px;
}

.typing-text span {
  position: relative;
}

.typing-text span::before {
  content: "Web Developer";
  color: var(--main-color);
  animation: words 20s infinite;
}

.typing-text span::after {
  content: "";
  background: var(--bg-color);
  position: absolute;
  width: calc(100% + 8px);
  height: 100%;
  border-left: 3px solid var(--main-color);
  right: -8px;
  animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
  0%,
  100% {
    border-left-color: transparent;
  }
  50% {
    border-left-color: var(--main-color);
  }
}

@keyframes words {
  0%,
  20% {
    content: "Web Developer";
  }
  21%,
  40% {
    content: "Software Developer";
  }
  41%,
  60% {
    content: "Web Designer";
  }
  61%,
  80% {
    content: "College Student";
  }
  81%,
  100% {
    content: "Junior Web Developer";
  }
}

@keyframes typing {
  10%,
  15%,
  30%,
  35%,
  50%,
  55%,
  70%,
  75%,
  90%,
  95% {
    width: 0;
  }
  5%,
  20%,
  25%,
  40%,
  45%,
  60%,
  65%,
  80%,
  85% {
    width: calc(100% + 8px);
  }
}

@media (max-width: 1000px) {
  .home {
    gap: 4rem;
  }
}

@media (max-width: 995px) {
  .home {
    flex-direction: column;
    margin: 5rem 4rem;
  }

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

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

/* service section */

.heading {
  font-size: 40px;
  margin-bottom: 3rem;
  text-align: center;
}

.experience {
  background: var(--bg-color);
}

.experience-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 2.5rem;
}

.experience-box {
  background-color: var(--main-color);
  height: 300px;
  border-radius: 3rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.experience-box:hover {
  background: var(--second-bg-color);
  color: var(--text-color);
  transform: scale(1.03);
  border: 1px solid var(--main-color);
}

.experience .experience-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  max-height: 200px;
  justify-content: center;
  align-items: center;
  padding: 5rem;
}

.experience-info h4 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.experience-info p {
  font-size: 1.6rem;
  font-weight: 400;
  max-height: 100px;
  margin: auto;
}

@media (max-width: 991px) {
  section {
    padding: 10rem 3% 2rem;
  }
  .experience {
    padding-bottom: 7rem;
  }
}

@media (max-width: 895px) {
  .experience h2 {
    margin-bottom: 3rem;
  }
  .experience-container {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Contact Section */

.contact {
  background: var(--bg-color);
  margin-bottom: 0;
  flex: 1;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 2.5rem;
}

.contact-box {
  background-color: var(--main-color);
  width: 1000px;
  border-radius: 3rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.contact-box:hover {
  background: transparent;
  color: var(--text-color);
  transform: scale(1.03);
  border: 1px solid var(--main-color);
}

.contact .contact-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  max-height: 200px;
  justify-content: center;
  align-items: center;
  padding: 5rem;
}

.contact-info h4 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 4rem;
  padding-left: 15px;
}

.social-icon-contact a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: var(--second-bg-color);
  border: 0.2rem solid var(--text-color);
  font-size: 2rem;
  border-radius: 50%;
  color: var(--main-color);
  margin: 3rem 1.5rem 3rem 0;
  transition: 0.3s ease;
}

.social-icon-contact:hover a:hover {
  color: black;
  transform: scale(1.3) translateY(-5px);
  background: var(--main-color);
  box-shadow: 0 0 25px var(--main-color);
}

@media (max-width: 991px) {
  section {
    padding: 10rem 3% 2rem;
  }
  .experience {
    padding-bottom: 7rem;
  }
}

@media (max-width: 895px) {
  .experience h2 {
    margin-bottom: 3rem;
  }
  .experience-container {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* footer */

footer {
  text-align: center;
  font-size: 15px;
  background-color: var(--main-color);
  color: white;
  padding: 5px;
  width: 100vw;
  position: relative;
  margin-top: auto;
  box-sizing: border-box;
}
