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

:root {
  --main-bg-color: #121212;
  --text-color: #fff;
  --heading-color: wheat;
  --link-color: beige;
  --primary-color: #3a86ff; /* More vibrant blue */
  --secondary-color: #2667cc; /* Darker blue */
  --white-color: #fff;
  --black-color: #000;
  --second-bg-color: #161618;
  --third-bg-color: #181818;
  --grey-color: #444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: "Jersey 15", sans-serif;
  background-color: var(--main-bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: var(--link-color);
  -webkit-tap-highlight-color: transparent;
}

ul {
  list-style-type: none;
}

section {
  padding: 8rem 2rem;
  width: 100%;
}

/* ===== NAVIGATION ===== */
.bottom-nav-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  z-index: 1000;
  padding: 0 10px;
}

nav {
  position: relative;
  width: 100%;
  padding: 10px;
  background-image: url(./assets/img/wonders-night-sky-beautiful-wallpaper-with-shiny-star_1017-50570.jpg);
  background-size: cover;
  border-radius: 34px;
}

nav ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

nav li a {
  width: 50px;
  height: 50px;
  margin: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  z-index: 10;
  transition: all 0.3s ease;
}

nav > ul > li > a:hover {
  transform: translateY(-5px);
}

nav ul li.active > a {
  background-color: var(--primary-color);
  color: var(--link-color);
  border-radius: 50%;
  transform: translateY(-20px);
}

nav li.last {
  position: absolute;
  width: 100px;
  height: 80px;
  background-color: transparent;
  border-radius: 0 0 50% 50% / 0 0 80% 80%;
  top: -40px;
  left: 10px;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

nav li:nth-child(1).active ~ .last {
  transform: translateX(calc(80px * 0));
}
nav li:nth-child(2).active ~ .last {
  transform: translateX(calc(80px * 1));
}
nav li:nth-child(3).active ~ .last {
  transform: translateX(calc(80px * 2));
}
nav li:nth-child(4).active ~ .last {
  transform: translateX(calc(80px * 3));
}
nav li:nth-child(5).active ~ .last {
  transform: translateX(calc(80px * 4));
}
nav li:nth-child(6).active ~ .last {
  transform: translateX(calc(80px * 5));
}

/* DropDown Menu */
nav .dropdown-menu {
  position: absolute;
  background-image: url(./assets/img/istockphoto-1363947120-612x612.jpg);
  left: -100px;
  top: -100px;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  z-index: 10;
  clip-path: inset(0 120px 0 round 60px);
}
nav ul li.has-child.active > .dropdown-menu {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.3s;
  transition-delay: 1s;
}
nav .dropdown-menu li a {
  color: var(--white-color);
  font-size: 1.15em;
  border-radius: 50%;
  margin: 0;
  clip-path: inset(10px round 20px);
  transition: background-color 0.3s, color 0.3s, clip-path 0.3s;
}
nav .dropdown-menu li a:hover {
  background-color: rgb(255 255 255/20%);
}

/* ===== HOME SECTION ===== */
.home {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 12rem;
  text-align: center;
  gap: 3rem;
}

.home-content {
  max-width: 800px;
  width: 100%;
}

.home-img img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 25px var(--primary-color);
  border: 3px solid var(--primary-color);
  transition: all 0.3s ease;
}

.home-img img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px var(--primary-color);
}

.home-content h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: var(--heading-color);
}

.home-content h3 {
  font-size: 2.8rem;
  margin-bottom: 2rem;
}

.home-content p {
  font-size: 1.9rem;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  background: var(--primary-color);
  border-radius: 4rem;
  font-size: 1.6rem;
  color: var(--text-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-group a:nth-of-type(2) {
  background-color: var(--black-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-group a:nth-of-type(2):hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}

/* Text Animation */
.text-animation {
  font-size: 3.4rem;
  font-weight: 600;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.text-animation span {
  position: relative;
  display: inline-block;
}

.text-animation span::before {
  content: "Web Developer";
  color: lightblue;
  animation: words 20s infinite;
}

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

@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);
  }
}

@keyframes words {
  0%,
  20% {
    content: "FrontEnd Developer";
  }
  21%,
  40% {
    content: "WordPress Developer";
  }
  41%,
  60% {
    content: "Mobile App Developer";
  }
  61%,
  80% {
    content: "Web Developer";
  }
  81%,
  100% {
    content: "UI/UX Designer";
  }
}

/* ===== ABOUT SECTION ===== */
.about {
  background: var(--second-bg-color);
}

.about-heading {
  font-size: 2rem;
}

.section-heading {
  font-size: 5rem;
  text-align: center;
  margin-bottom: 5rem;
  color: var(--heading-color);
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.9rem;
  line-height: 1.7;
  text-align: left;
}

/* ===== EDUCATION SECTION ===== */
.education {
  background: var(--second-bg-color);
}

.heading {
  font-size: 2rem;
}

.timeline-items {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.timeline-items::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 100%;
  background-color: var(--primary-color);
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item {
  margin-bottom: 40px;
  width: 100%;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item:nth-child(odd) {
  padding-right: calc(50% + 30px);
  text-align: right;
}

.timeline-item:nth-child(even) {
  padding-left: calc(50% + 30px);
  text-align: left;
}

.timeline-dot {
  height: 16px;
  width: 16px;
  background-color: var(--primary-color);
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  box-shadow: 0 0 25px var(--secondary-color), 0 0 50px var(--white-color);
}

.timeline-date {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-color);
  margin: 6px 0 15px;
}

.timeline-content {
  background-color: var(--main-bg-color);
  border: 3px solid var(--primary-color);
  padding: 30px;
  border-radius: 4rem;
  box-shadow: 0 0 10px var(--secondary-color);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.timeline-content:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--white-color);
}

.timeline-content h3 {
  font-size: 2rem;
  color: var(--text-color);
  margin: 0 0 10px;
  font-weight: 500;
}

.timeline-content p {
  color: var(--text-color);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.5;
}

/* ===== SKILLS SECTION ===== */
.skills {
  background-color: var(--third-bg-color);
}

.skills-heading {
  font-size: 2rem;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  gap: 2rem;
}

.skill {
  font-size: 6rem;
  border: 2px solid var(--primary-color);
  text-align: center;
  border-radius: 50px;
  background-color: var(--second-bg-color);
  padding: 1rem 2rem;
  transition: all 0.3s ease;
}

.skill:hover {
  cursor: pointer;
  transform: scale(1.1);
  box-shadow: 0 0 25px var(--primary-color);
}

/* ===== PROJECTS SECTION ===== */
.projects {
  background-color: var(--third-bg-color);
}

.projects p {
  font-size: 1.6rem;
}

.projects h2 {
  font-size: 2rem;
}
.project-categories {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin: 3rem 0 2.5rem;
  flex-wrap: wrap;
}

.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem;
  margin: 0 auto;
  max-width: 1200px;
}

.project {
  background: var(--grey-color);
  transition: all 0.3s ease;
  padding-bottom: 1.5rem;
  border: 0.5rem solid var(--secondary-color);
  border-radius: 18px;
  overflow: hidden;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project:hover .project-image img {
  transform: scale(1.05);
}

.project h4 {
  padding: 0 1.2rem;
  font-size: 2rem;
  text-align: center;
  margin: 1.5rem 0;
}

.project p {
  margin: 0.5rem 0 1.5rem;
  padding: 0 1.2rem;
  font-size: 1.6rem;
  text-align: center;
}

.project-cta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 1.2rem 1.5rem;
}

.project-cta a {
  font-size: 1.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.ri-link-m {
  background: var(--secondary-color);
  color: var(--text-color);
}

.ri-github-line {
  background: var(--primary-color);
  color: var(--text-color);
}

.project-cta a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== SERVICES SECTION ===== */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--primary-color);
  min-height: 400px;
  border-radius: 2rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  padding: 2rem;
}

.service-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--secondary-color);
}

.service-info {
  color: var(--text-color);
  text-align: center;
}

.service-info i {
  font-size: 5rem;
  margin-bottom: 2rem;
}

.service-info h4 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.service-info p {
  font-size: 1.6rem;
  line-height: 1.6;
}

.services-heading {
  font-size: 2rem;
  padding: 1.5rem;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
  background-color: var(--second-bg-color);
}

.testimonial-heading {
  font-size: 2rem;
  padding: 1.8rem;
}

.wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-item {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(238, 238, 238, 0.2);
  border-radius: 2rem;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

.testimonial-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.testimonials-container img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--secondary-color);
  object-fit: cover;
}

.testimonial-item h2 {
  font-size: 2rem;
  color: var(--heading-color);
}

.rating {
  display: flex;
  gap: 0.5rem;
}

#star {
  color: gold;
  font-size: 1.8rem;
}

.testimonial-item p {
  font-size: 1.6rem;
  line-height: 1.6;
}

/* ===== CONTACT SECTION ===== */
.contact form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-heading {
  font-size: 2rem;
}

.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.input-box {
  flex: 1;
  min-width: 250px;
}

.contact form label {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}

.contact form input,
.contact form textarea {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.6rem;
  color: var(--text-color);
  background: var(--third-bg-color);
  border-radius: 1rem;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
}

.contact form input:focus,
.contact form textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 10px var(--primary-color);
}

.contact form textarea {
  min-height: 150px;
  resize: vertical;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--second-bg-color);
  padding: 3rem 0;
  text-align: center;
  margin-top: auto;
}

.footer .social-media {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer .social-media a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  font-size: 2rem;
  transition: all 0.3s ease;
}

.footer .social-media a:hover {
  background: var(--primary-color);
  transform: translateY(-5px);
}

.footer .copyright {
  font-size: 1.4rem;
  color: var(--text-color);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 5px;
}

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

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
  html {
    font-size: 55%;
  }

  .home {
    padding: 6rem 2rem;
  }

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

  .home-img img {
    width: 200px;
    height: 200px;
  }

  .section-heading {
    font-size: 4rem;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding: 0;
    text-align: center;
    padding-left: 50px;
  }

  .timeline-items::before {
    left: 25px;
  }

  .timeline-dot {
    left: 25px;
  }

  .project-container {
    grid-template-columns: 1fr;
  }

  .service-box {
    min-height: 300px;
  }
}

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

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

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

  .btn-group {
    flex-direction: column;
  }

  nav li a {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }

  nav ul li.active > a {
    transform: translateY(-15px);
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .home {
    padding: 8rem 4rem;
  }

  .home-img img {
    width: 250px;
    height: 250px;
  }

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

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