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

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

:root {
  --bg-color: #080808;
  --second-bg-color: #131313;
  --text-color: white;
  --main-color: #00ffee;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 8% 1rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.logo {
  font-size: 2rem;
  color: var(--text-color);
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease;
}

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

.logo span {
  text-shadow: 0 0 25px var(--main-color);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  margin-left: auto;
}

.navbar a {
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 2px;
  background: var(--main-color);
  box-shadow: 0 0 8px var(--main-color);
  transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

.nav.hide {
  transform: translatey(-100%);
}

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

/* Mid-size screens: tighten spacing so links never overflow */
@media (max-width: 1280px) {
  .header {
    padding: 1rem 4%;
  }

  .logo {
    font-size: 1.7rem;
  }

  .navbar {
    gap: 1.5rem;
  }

  .navbar a {
    font-size: 0.95rem;
  }

  #theme-toggle {
    margin-left: 1rem;
  }
}

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

.home-both {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2rem;
}

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

.home-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 600px;
}

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

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

.home-content h3 {
  margin-bottom: 1rem;
  margin-top: 1rem;
  font-size: 2.5rem;
}

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

.btn-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.both-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-group a {
  padding: 12px 24px;
  background-color: white;
  color: black;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
  letter-spacing: 1px;
  font-weight: 600;
  transition: 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-group a:hover {
  background-color: var(--main-color);
}

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

.home-img img {
  width: 100%;
  max-width: 400px;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--main-color);
  cursor: pointer;
  transition: 0.4s ease-in-out;
}

.bounce {
  animation: bounce 3s ease infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-30px);
  }

  60% {
    transform: translateY(-15px);
  }
}

.home-img img:hover {
  box-shadow: 0 0 25px var(--main-color);
  box-shadow: 0 0 50px var(--main-color);
  box-shadow: 0 0 100px var(--main-color);
}

.home-content p {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.8;
  max-width: 1000px;
}

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

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

.text-animation {
  font-size: 34px;
  font-weight: 700;
  min-width: 280px;

  span {
    position: relative;
  }
}

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

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

@keyframes cursor {
  to {
    border-left: 2px solid var(--main-color);
  }
}

@keyframes words {

  0%,
  20% {
    content: "Frontend Developer";
  }

  21%,
  40% {
    content: "React Developer";
  }

  41%,
  60% {
    content: "UI/UX Designer";
  }

  61%,
  80% {
    content: "MERN Stack 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);
  }
}

.img {
  width: 100%;
  max-width: 400px;
  /* Limit image width */
  border-radius: 50px;
  box-shadow: 0 0 10px var(--main-color);
  cursor: pointer;
  transition: 0.4s ease-in-out;
  display: block;
  /* Ensure it behaves like a block element */
  margin: 0 auto;
  /* Center it */
}

.img:hover {
  box-shadow: 0 0 25px var(--main-color);
  box-shadow: 0 0 50px var(--main-color);
  box-shadow: 0 0 100px var(--main-color);
}

.about-h5 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: 3rem;
}

.about {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.total {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  /* Replaced margin-left with gap */
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
}

.about-text {
  flex: 1;
  /* Allow text to take remaining space */
  min-width: 300px;
  /* Minimum width before wrapping */
}

.about-text h4 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
  color: var(--main-color);
}

#more {
  display: none;
}

#myBtn {
  padding: 10px 20px;
  background-color: white;
  color: black;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 18px;
  letter-spacing: 1px;
  font-weight: 600;
  transition: 0.3s ease;
  cursor: pointer;
  transform: scale(1.05);
  margin-top: 1rem;
}

#myBtn:hover {
  background-color: var(--main-color);
}

.skills {
  min-height: auto;
  /* padding-bottom: 5rem; */
}

.skill {
  /* position: relative;
  top: -36rem; */
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--main-color);
}

.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  align-items: center;
  text-align: center;
  grid-gap: 1rem;
  padding: 1rem 80px;
  font-size: 1.2rem;
  /* position: relative;
  top: -34rem; */
}

.skill-box {
  padding: 1rem;
  color: #ddd;
  cursor: pointer;
}

.skill-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.img1 {
  width: 50%;
  aspect-ratio: 1/1;
  object-fit: cover;
  position: relative;
  border-radius: 100px;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.jumba {
  width: 80px;
  height: 80px;
}

.heading {
  position: relative;
  top: -4rem;
  text-align: center;
  color: var(--main-color);
}

.projectss {
  min-height: auto;
}

.project-box {
  /* position: relative;
  top: -40rem; */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  gap: 3rem;
  row-gap: 5rem;
}

.project-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: 2rem 2rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 5px var(--main-color);
  transition: 0.3s ease;

  h3 {}
}

.jumba1 {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 2rem;
}

.button {
  padding: 10px 20px;
  background-color: var(--main-color);
  color: black;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 18px;
  letter-spacing: 1px;
  font-weight: 600;
  transition: 0.3s ease;
  cursor: pointer;
  transform: scale(1.05);
}

.field {
  width: 50%;
  background: transparent;
  border: 0.125rem solid #00abf0;
  border-radius: 0.3rem;
  padding: 0.8rem;
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.field::placeholder {
  color: var(--text-color);
}

.btn1 {
  padding: 10px 20px;
  background-color: var(--main-color);
  color: black;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 18px;
  letter-spacing: 1px;
  font-weight: 600;
  transition: 0.3s ease;
  cursor: pointer;
  transform: scale(1.05);
  margin: 2rem;
  margin-top: 3rem;
}

.contact {
  min-height: auto;
  padding-bottom: 10rem;
}

.conheading {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--main-color);
}

.contact-box textarea {
  resize: none;
  height: 15rem;
}

.footcontain {
  width: 100%;
  padding: 50px 30px 30px;
  background-color: var(--second-bg-color);
  /* Sleeker dark background */
  border-top: 2px solid var(--main-color);
  /* Neon accent line */
  box-shadow: 0 -5px 15px rgba(0, 255, 238, 0.1);
}

.social-iconss {
  display: flex;
  justify-content: center;
}

.social-iconss a {
  text-decoration: none;
  padding: 12px;
  background-color: transparent;
  margin: 10px;
  border-radius: 50%;
  border: 2px solid var(--main-color);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.5s ease;
}

.social-iconss a i {
  font-size: 1.5rem;
  color: var(--main-color);
  opacity: 1;
  transition: 0.5s ease;
}

.social-iconss a:hover {
  background-color: var(--main-color);
  transform: translateY(-5px);
  box-shadow: 0 0 20px var(--main-color);
}

.social-iconss a:hover i {
  color: black;
  background-color: transparent;
}

/* .footcontain {
  position: relative;
  top: -40rem;
} */

.footnav {
  margin: 30px 0;
}

.footnav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
  gap: 1rem;
  margin-top: 2rem;
}

.footnav ul li a {
  color: white;
  font-size: 1.1rem;
  opacity: 0.8;
  border-bottom: 2px solid transparent;
  transition: 0.3s ease-in-out;
  margin: 0;
  /* Remove massive margins */
  padding: 5px 10px;
}

.footnav ul li a:hover {
  border-bottom: 2px solid var(--main-color);
  opacity: 1;
  color: var(--main-color);
}

/* @media (max-width: 1285px) {
  html {
    font-size: 55%;
  }
  .service-container {
    padding-bottom: 7rem;
    grid-template-columns: repeat(2, 1fr);
    margin: 0 5rem;
  }
} */

@media (max-width: 991px) {
  .header {
    padding: 2rem 4%;
  }

  section {
    padding: 5rem 4% 2rem;
  }

  .home-both {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .home-content {
    align-items: center;
    text-align: center;
    max-width: 100%;
    margin-top: 0;
  }

  .btn-group {
    justify-content: center;
  }

  .total {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .about-text {
    margin-left: 0;
    width: 100%;
  }

  .img {
    width: 70vw;
    max-width: 350px;
  }

  .container {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for tablet */
  }
}

/* ---- Collapse nav into hamburger before links can crowd ---- */
@media (max-width: 1200px) {
  #menu-icon {
    display: block;
    margin-left: 1rem;
  }

  /* Push theme toggle + menu icon to the right edge */
  #theme-toggle {
    margin-left: auto;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    padding: 1.5rem 3%;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--main-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: none;
    text-align: center;
    gap: 0;
    margin-left: 0;
  }

  body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.97);
  }

  .navbar.active {
    display: flex;
  }

  .navbar a {
    display: block;
    font-size: 1.3rem;
    margin: 1.1rem 0;
  }

  .navbar a::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

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

/* ---------- Extra Mobile Fixes ---------- */
@media (max-width: 768px) {

  /* Fix image overflow */
  .both-img {
    position: relative;
    left: auto;
    margin: 2rem auto;
  }

  .home-img img {
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }

  /* Responsive text sizes */
  .home-content h1 {
    font-size: clamp(2rem, 5vw, 6rem);
  }

  .home-content h3 {
    font-size: clamp(1.5rem, 3vw, 3rem);
  }

  /* Button group wraps nicely */
  .btn-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .btn-group a {
    flex: 1 1 auto;
    text-align: center;
  }

  /* Skills + Projects */
  .project-box {
    grid-template-columns: 1fr;
  }

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

/* Tiny screens (phones <600px) */
@media (max-width: 600px) {
  .home-content p {
    font-size: 0.9rem;
  }

  .social-icon a {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }

  .home-img img {
    width: 90%;
    max-width: 250px;
  }
}

/* --- Mobile Optimization Fixes --- */
@media (max-width: 768px) {
  html {
    font-size: 55%;
  }

  body {
    overflow-x: hidden;
  }

  .home {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 5%;
  }

  .home-content {
    align-items: center;
    margin-top: 2rem;
  }

  .home-content h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.2;
  }

  .home-content h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }

  .home-content p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 90%;
    margin: 1rem auto;
  }

  .btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
  }

  .btn-group a {
    flex: 1 1 45%;
    text-align: center;
  }

  .home-img {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
  }

  .home-img img {
    width: 70%;
    max-width: 250px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 20px var(--main-color);
  }

  .about-text,
  .skills,
  .projects,
  .contact {
    text-align: center;
    padding: 2rem 5%;
  }

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

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

  .social-icon a {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }

  /* FIXED: Ensure skill icons fit inside the white circle */
  .img1 {
    width: 60px;
    /* Fixed small size for mobile grid */
    height: 60px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
  }

  .jumba {
    width: auto !important;
    /* Override global fixed width */
    height: auto !important;
    max-width: 60%;
    /* internal icon size relative to circle */
    max-height: 60%;
    object-fit: contain;
  }
}

/* === Scroll Reveal Animation === */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================== */
/* ============= EXTRA ANIMATIONS / POLISH ============= */
/* ===================================================== */

/* --- Animated glow on the name --- */
.home-content h1 span {
  animation: nameGlow 2.5s ease-in-out infinite alternate;
}

@keyframes nameGlow {
  from {
    text-shadow: 0 0 8px var(--main-color);
  }
  to {
    text-shadow: 0 0 25px var(--main-color), 0 0 45px var(--main-color);
  }
}

/* --- Smoother base transitions --- */
.btn-group a,
.button,
.btn1,
#myBtn {
  position: relative;
  overflow: hidden;
}

/* Shine sweep across buttons on hover */
.btn-group a::after,
.button::after,
.btn1::after,
#myBtn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.6),
      transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-group a:hover::after,
.button:hover::after,
.btn1:hover::after,
#myBtn:hover::after {
  left: 130%;
}

.btn-group a:hover,
.button:hover,
.btn1:hover,
#myBtn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 255, 238, 0.4);
}

/* --- Project card hover lift + image zoom --- */
.project-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 0 35px var(--main-color);
  border-color: var(--text-color);
}

.jumba1 {
  transition: transform 0.5s ease, box-shadow 0.4s ease;
}

.project-card:hover .jumba1 {
  transform: scale(1.08);
  box-shadow: 0 0 20px var(--main-color);
}

.project-card h3 {
  transition: color 0.3s ease;
}

.project-card:hover h3 {
  color: var(--main-color);
}

/* --- Skill icons: lift, scale & glow on hover --- */
.skill-box .img1 {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.skill-box:hover .img1 {
  transform: translateY(-8px) scale(1.15);
  box-shadow: 0 0 25px var(--main-color);
}

.skill-box:hover .jumba {
  animation: wobble 0.6s ease;
}

@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* --- About image floats gently --- */
.about-img .img {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* --- Section headings underline grow on reveal --- */
.about-h5,
.skill h3,
.heading,
.conheading {
  position: relative;
}

.about-h5::after,
.skill h3::after,
.heading::after,
.conheading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 0;
  height: 3px;
  background: var(--main-color);
  transform: translateX(-50%);
  transition: width 0.8s ease 0.3s;
  box-shadow: 0 0 10px var(--main-color);
}

.reveal.active .about-h5::after,
.about-h5.active::after,
.skills.active .skill h3::after,
.projectss.active .heading::after,
.contact.active .conheading::after {
  width: 80%;
}

/* --- Input focus glow --- */
.field:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 12px rgba(0, 255, 238, 0.4);
}

/* ===================================================== */
/* ============= NEW SECTIONS & COMPONENTS ============= */
/* ===================================================== */

/* --- Scroll progress bar --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--main-color), #00abf0);
  box-shadow: 0 0 10px var(--main-color);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* --- Animated hero background blobs --- */
.home-section {
  position: relative;
  overflow: hidden;
}

.home-both {
  position: relative;
  z-index: 2;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 1;
  pointer-events: none;
}

.blob-1 {
  width: 350px;
  height: 350px;
  background: var(--main-color);
  top: 10%;
  left: -5%;
  animation: blobMove 14s ease-in-out infinite;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: #00abf0;
  bottom: 5%;
  right: -5%;
  animation: blobMove 18s ease-in-out infinite reverse;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: #7b2ff7;
  top: 40%;
  left: 50%;
  animation: blobMove 20s ease-in-out infinite;
}

@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.15); }
  66% { transform: translate(-40px, 50px) scale(0.9); }
}

/* --- Stats / Counter section --- */
.stats {
  min-height: auto;
  padding: 4rem 9%;
}

.stats-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  background: var(--second-bg-color);
  border: 2px solid transparent;
  border-radius: 1.5rem;
  padding: 2.5rem 1rem;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.stat-item:hover {
  transform: translateY(-10px);
  border-color: var(--main-color);
  box-shadow: 0 0 30px rgba(0, 255, 238, 0.3);
}

.stat-item i {
  font-size: 3rem;
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.stat-item .counter {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-color);
}

.stat-item .counter::after {
  content: "+";
  color: var(--main-color);
}

.stat-item .counter.no-plus::after {
  content: "";
}

.stat-item p {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 0.3rem;
}

/* --- Project tech tags --- */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tech-tags span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 2rem;
  padding: 0.25rem 0.8rem;
  transition: all 0.3s ease;
}

.tech-tags span:hover {
  background: var(--main-color);
  color: var(--bg-color);
}

/* --- Back to top button --- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.2rem;
  height: 3.2rem;
  background: var(--main-color);
  color: var(--bg-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
  box-shadow: 0 0 20px var(--main-color);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
}

/* --- Stats responsive --- */
@media (max-width: 991px) {
  .stats-box {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-box {
    grid-template-columns: 1fr;
  }

  #back-to-top {
    bottom: 1.2rem;
    right: 1.2rem;
  }
}

/* --- Preloader --- */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 3px solid transparent;
  border-top-color: var(--main-color);
  border-bottom-color: var(--main-color);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  box-shadow: 0 0 20px rgba(0, 255, 238, 0.4);
}

.loader-text {
  font-size: 2rem;
  font-weight: 800;
  color: var(--main-color);
  text-shadow: 0 0 15px var(--main-color);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.6; }
}

/* --- Custom cursor --- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3000;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--main-color);
  transition: transform 0.1s ease;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 2px solid var(--main-color);
  transition: transform 0.18s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  opacity: 0.7;
}

.cursor-ring.hovered {
  width: 60px;
  height: 60px;
  background: rgba(0, 255, 238, 0.15);
}

/* Hide custom cursor on touch devices */
@media (hover: none), (max-width: 768px) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* --- Services section --- */
.services {
  min-height: auto;
  padding-top: 6rem;
}

.services-heading {
  top: 0;
  margin-bottom: 3rem;
}

.services-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--second-bg-color);
  border: 2px solid transparent;
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
  transform: translateY(-12px);
  border-color: var(--main-color);
  box-shadow: 0 0 30px rgba(0, 255, 238, 0.3);
}

.service-card i {
  font-size: 3.5rem;
  color: var(--main-color);
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform 0.4s ease;
}

.service-card:hover i {
  transform: scale(1.15) rotate(-6deg);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
}

@media (max-width: 991px) {
  .services-box {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .services-box {
    grid-template-columns: 1fr;
  }
}

/* ===================================================== */
/* ============ THEME TOGGLE + LIGHT THEME ============= */
/* ===================================================== */

body {
  transition: background 0.4s ease, color 0.4s ease;
}

#theme-toggle {
  font-size: 1.6rem;
  color: var(--main-color);
  cursor: pointer;
  margin-left: 2rem;
  transition: transform 0.4s ease, color 0.3s ease;
}

#theme-toggle:hover {
  transform: rotate(25deg) scale(1.15);
}

body.light-theme {
  --bg-color: #eef1f5;
  --second-bg-color: #ffffff;
  --text-color: #1a1a1a;
  --main-color: #0091a0;
}

body.light-theme .header {
  background: rgba(255, 255, 255, 0.6);
}

body.light-theme .btn-group a {
  background-color: var(--main-color);
  color: #fff;
}

body.light-theme .blob {
  opacity: 0.18;
}

/* ===================================================== */
/* =============== ANIMATED SKILL BARS ================= */
/* ===================================================== */

.skill-bars {
  max-width: 800px;
  margin: 3rem auto 0;
  padding: 0 1rem;
}

.skill-bar {
  margin-bottom: 1.4rem;
}

.skill-bar-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.skill-bar-info span:last-child {
  color: var(--main-color);
}

.skill-bar .bar {
  height: 12px;
  background: var(--second-bg-color);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 238, 0.2);
}

.skill-bar .bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--main-color), #00abf0);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--main-color);
  transition: width 1.5s ease-in-out;
}

.skill-bars.active .bar span {
  /* width applied via inline style; trigger transition by class swap in JS */
}

/* ===================================================== */
/* ================= TECH STACK MARQUEE ================ */
/* ===================================================== */

.marquee {
  overflow: hidden;
  width: 100%;
  padding: 2rem 0;
  background: var(--second-bg-color);
  border-top: 1px solid rgba(0, 255, 238, 0.2);
  border-bottom: 1px solid rgba(0, 255, 238, 0.2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(40%);
  opacity: 0.85;
  transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.marquee-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.15);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===================================================== */
/* ==================== TESTIMONIALS =================== */
/* ===================================================== */

.testimonials {
  min-height: auto;
  padding-bottom: 4rem;
}

.testi-heading {
  top: 0;
  margin-bottom: 3rem;
}

.testi-slider {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  min-height: 260px;
}

.testi-card {
  position: absolute;
  inset: 0;
  background: var(--second-bg-color);
  border: 2px solid var(--main-color);
  border-radius: 1.5rem;
  padding: 3rem 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 255, 238, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.97);
  transition: all 0.6s ease;
}

.testi-card.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  position: relative;
}

.testi-card .quote {
  font-size: 2.5rem;
  color: var(--main-color);
  opacity: 0.5;
}

.testi-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
  margin: 1rem 0 1.5rem;
}

.testi-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.testi-avatar {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--main-color), #00abf0);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
}

.testi-author h4 {
  font-size: 1.1rem;
  color: var(--main-color);
}

.testi-author span {
  font-size: 0.85rem;
  opacity: 0.8;
  color: var(--text-color);
}

.testi-dots {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2rem;
}

.testi-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--main-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.testi-dots .dot.active {
  background: var(--main-color);
  box-shadow: 0 0 10px var(--main-color);
  transform: scale(1.2);
}

@media (max-width: 560px) {
  .testi-card {
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .marquee-track img {
    height: 45px;
  }
}

/* ===================================================== */
/* =============== AVAILABILITY BADGE ================== */
/* ===================================================== */

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--main-color);
  border: 1px solid var(--main-color);
  background: rgba(0, 255, 238, 0.08);
  padding: 0.45rem 1.1rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2bff88;
  box-shadow: 0 0 0 rgba(43, 255, 136, 0.6);
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(43, 255, 136, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(43, 255, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 255, 136, 0); }
}

/* ===================================================== */
/* =========== EXPERIENCE / EDUCATION TIMELINE ========= */
/* ===================================================== */

.resume {
  min-height: auto;
  padding-top: 6rem;
}

.resume-heading {
  top: 0;
  margin-bottom: 3rem;
}

.timeline-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-title {
  font-size: 1.6rem;
  color: var(--main-color);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.2rem;
  border-left: 2px solid rgba(0, 255, 238, 0.3);
  margin-left: 0.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--main-color);
  box-shadow: 0 0 12px var(--main-color);
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bg-color);
  background: var(--main-color);
  padding: 0.2rem 0.7rem;
  border-radius: 1rem;
  margin-bottom: 0.6rem;
}

.timeline-item h4 {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.timeline-company {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.timeline-item p {
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .timeline-wrap {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ===================================================== */
/* ================ PROJECT FILTER TABS ================ */
/* ===================================================== */

.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--main-color);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--main-color);
  color: var(--bg-color);
  box-shadow: 0 0 15px rgba(0, 255, 238, 0.4);
}

.project-card.hide {
  display: none;
}

.project-card.show {
  animation: fadeInScale 0.5s ease forwards;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ===================================================== */
/* ============ CONTACT INFO + FLOATING CTA ============ */
/* ===================================================== */

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--second-bg-color);
  border: 1px solid transparent;
  border-radius: 1rem;
  padding: 1.2rem 1.3rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateX(6px);
  border-color: var(--main-color);
  box-shadow: 0 0 18px rgba(0, 255, 238, 0.2);
}

.info-card i {
  font-size: 1.6rem;
  color: var(--main-color);
  background: rgba(0, 255, 238, 0.1);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.info-card h4 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.info-card a,
.info-card span {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.85;
  word-break: break-word;
}

.info-card a:hover {
  color: var(--main-color);
}

.contact-wrap .contact-box {
  width: 100%;
}

.contact-wrap .field {
  width: 100%;
}

@media (max-width: 768px) {
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

/* Floating WhatsApp button */
#whatsapp-float {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 3.4rem;
  height: 3.4rem;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  z-index: 999;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.5);
  animation: floatPulse 2.5s ease-in-out infinite;
  transition: transform 0.3s ease;
}

#whatsapp-float:hover {
  transform: scale(1.12);
}

@keyframes floatPulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 4px 28px rgba(37, 211, 102, 0.8); }
}

@media (max-width: 480px) {
  #whatsapp-float {
    bottom: 1.2rem;
    left: 1.2rem;
    width: 3rem;
    height: 3rem;
    font-size: 1.7rem;
  }
}

/* --- Respect reduced-motion preference --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}