/*==================== GOOGLE FONTS ====================*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*==================== VARIABLES CSS ====================*/
.loader {
  width: 48px;
  height: 48px;
  margin: 0;
  position: relative;
}

.loader:before {
  content: "";
  width: 48px;
  height: 5px;
  background: #f0808050;
  position: absolute;
  top: 60px;
  left: 0;
  border-radius: 50%;
  animation: shadow324 0.5s linear infinite;
}

.loader:after {
  content: "";
  width: 100%;
  height: 100%;
  background: transparent; /* Make box transparent */
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 4px;
  animation: jump7456 0.5s linear infinite;
}

/* 🖼️ Logo inside the box */
.logo-inside {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  animation: jump7456 0.5s linear infinite; /* Same bounce as the box */
}
@keyframes shadow324 {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.6;
  }
  50% {
    transform: scaleX(0.6);
    opacity: 0.2;
  }
}

@keyframes jump7456 {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Theme Switch */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 4em;
  height: 2.2em;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.switch-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 1rem; /* Add spacing from the menu toggle */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #00a6ff;
  transition: 0.4s;
  border-radius: 30px;
  overflow: hidden;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.2em;
  width: 1.2em;
  border-radius: 20px;
  left: 0.5em;
  bottom: 0.5em;
  transition: 0.4s;
  transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
  box-shadow: inset 15px -4px 0px 15px #ffcf48;
}

.switch input:checked + .slider {
  background-color: #2a2a2a;
}

.switch input:checked + .slider:before {
  transform: translateX(1.8em);
  box-shadow: inset 8px -4px 0px 0px #fff;
}

.star {
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  width: 5px;
  height: 5px;
  transition: all 0.4s;
  opacity: 0;
}

.star_1 {
  right: 2.5em;
  top: 0.5em;
}
.star_2 {
  right: 2.2em;
  top: 1.2em;
}
.star_3 {
  right: 3em;
  top: 0.9em;
}

.switch input:checked ~ .slider .star {
  opacity: 1;
}

.cloud {
  width: 3.5em;
  position: absolute;
  bottom: -1.4em;
  right: -1.1em;
  transition: all 0.4s;
  opacity: 1;
}

.switch input:checked ~ .slider .cloud {
  opacity: 0;
}
:root {
  --header-height: 3rem;

  /*========== Colors ==========*/
  --hue-color: 360;

  /* HSL color mode */
  --first-color: hsl(var(--hue-color), 69%, 61%);
  --first-color-second: hsl(var(--hue-color), 69%, 61%);
  --first-color-alt: hsl(var(--hue-color), 57%, 53%);
  --first-color-lighter: hsl(var(--hue-color), 92%, 85%);
  --title-color: hsl(var(--hue-color), 8%, 15%);
  --text-color: hsl(var(--hue-color), 8%, 45%);
  --text-color-light: hsl(var(--hue-color), 8%, 65%);
  --input-color: hsl(var(--hue-color), 70%, 96%);
  --body-color: hsl(var(--hue-color), 60%, 99%);
  --container-color: #fff;
  --scroll-bar-color: hsl(var(--hue-color), 12%, 90%);
  --scroll-thumb-color: hsl(var(--hue-color), 12%, 80%);

  /*========== Font and typography ==========*/
  --body-font: "Poppins", sans-serif;

  --big-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;

  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== Margenes Bottom ==========*/
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/* Font size for large devices */
@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 3rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --first-color-second: hsl(var(--hue-color), 30%, 8%);
  --title-color: hsl(var(--hue-color), 8%, 95%);
  --text-color: hsl(var(--hue-color), 8%, 75%);
  --input-color: hsl(var(--hue-color), 29%, 16%);
  --body-color: hsl(var(--hue-color), 28%, 12%);
  --container-color: hsl(var(--hue-color), 29%, 16%);
  --scroll-bar-color: hsl(var(--hue-color), 12%, 48%);
  --scroll-thumb-color: hsl(var(--hue-color), 12%, 36%);
}
/*========== Button Dark/Light ==========*/
.nav__btns {
  display: flex;
  align-items: center;
}

.nav__toggle {
  color: var(--title-color);
  font-weight: var(--font-medium);
  font-size: 1.5rem;
  cursor: pointer;
}

/*==================== BASE ====================*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 0 var(--header-height) 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color 0.4s, color 0.4s;
}

h1,
h2,
h3,
h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}
a {
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
}

/*==================== REUSABLE CSS CLASSES ====================*/
.section {
  padding: 1.5rem 1rem;
}

.section__title {
  font-size: var(--h1-font-size);
  color: var(--title-color);
}

.section__subtitle {
  display: block;
  font-size: var(--small-font-size);
  margin-bottom: var(--mb-3);
}

.section__title,
.section__subtitle {
  text-align: center;
}

/*==================== LAYOUT ====================*/
.container {
  max-width: 768px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.header {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--body-color);
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
}

/*==================== NAV ====================*/
.nav {
  max-width: 968px;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.nav__link {
  color: var(--title-color);
  font-weight: var(--font-medium);
}
.nav__logo:hover,
.nav__link:hover {
  color: var(--first-color);
}

.nav__toggle {
  font-size: 1.2rem;
}

.active-link {
  color: var(--first-color);
}

/* Styles for MOBILE (up to 768px) */
@media screen and (max-width: 768px) {
  .header {
    bottom: 0;
    border-radius: 1.5rem 1.5rem 0 0;
  }
  .nav__menu {
    position: fixed;
    bottom: -100%; /* Hidden by default */
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    padding: 2rem 1.5rem 4rem;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
    border-radius: 1.5rem 1.5rem 0 0;
    transition: 0.3s;
  }

  .show-menu {
    bottom: 0;
  }

  .nav__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: var(--small-font-size);
  }

  .nav__icon {
    font-size: 1.2rem;
  }

  .nav__close {
    position: absolute;
    right: 1.3rem;
    bottom: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--first-color);
  }

  .nav__close:hover {
    color: var(--first-color-alt);
  }

  .nav__toggle {
    display: block;
  }

  body.mobile-view {
    padding-bottom: 0;
  }
}

/* Styles for DESKTOP (769px and up) */
@media screen and (min-width: 769px) {
  .header {
    top: 0;
    bottom: initial;
    padding: 0 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
    column-gap: 1rem;
  }

  .nav__icon,
  .nav__close,
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    margin-left: auto;
  }

  .nav__list {
    display: flex;
    flex-direction: row;
    column-gap: 2rem;
  }
}

/*==================== HOME ====================*/

.home__container {
  gap: 1rem;
}
.home__content {
  grid-template-columns: 0.5fr 3fr;
  padding-top: 3.5rem;
  align-items: center;
}

.home__social {
  display: grid;
  grid-template-columns: max-content;
  row-gap: 1rem;
}
.home__social-icon {
  font-size: 1.25rem;
  color: var(--first-color);
}
.home__social-icon:hover {
  color: var(--first-color-alt);
}
.home__blob {
  width: 200px;
  fill: var(--first-color);
}
.home__blob-img {
  width: 170px;
}
.home__data {
  grid-column: 1/3;
}
.home__title {
  font-size: var(--h1-font-size);
}
.home__subtitle {
  font-size: var(--h3-font-size);
  color: var(--text-color);
  font-weight: var(--font-medium);
  margin-bottom: var(--mb-0-75);
}
.home__description {
  margin-bottom: var(--mb-2);
}
.home__scroll {
  display: none;
}
.home__scroll-button {
  color: var(--first-color);
  transition: 0.3s;
}
.home__scroll-button:hover {
  transform: translateY(0.25rem);
}
.home__scroll-mouse {
  font-size: 2rem;
}
.home__scroll-name {
  font-size: var(--small-font-size);
  color: var(--title-color);
  font-weight: var(--font-medium);
  margin-right: var(--mb-0-25);
}
.home__scroll-arrow {
  font-size: 1.25rem;
}
/* Floating Skills */
/* Ensure the parent of floating-skills (home__img) is a positioning context */
.home__img {
  position: relative; /* Crucial for absolute positioning of children */
  display: flex; /* Helps center the SVG and skills container */
  justify-content: center;
  align-items: center;
  /* You might need to set a min-height or height for home__img
     depending on its overall layout in your page. */
}

/* Floating Skills Container */
.floating-skills {
  position: absolute;
  /* Center the orbit container within home__img */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  /* Increase size for a larger orbit and better spacing */
  width: 480px; /* Adjust this based on your image size */
  height: 480px; /* Make it equal to width for a perfect circle */
  border-radius: 50%; /* Helps visualize the orbit area during development */
  /* Remove the border-radius or set to 0 if you don't want a visible circle */
  /* For debugging: border: 1px dashed rgba(255, 0, 0, 0.5); */
}

/* Skill Tags */
.skill-tag {
  position: absolute;
  background: var(--first-color, #ff4d4d);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transform: translate(
    -50%,
    -50%
  ); /* Center the tag itself on its absolute position */
  z-index: 10; /* Ensure tags appear above the image */
}

/* Define positions for each skill tag using their specific classes */
/* The goal is to distribute them evenly around the central image, 
   reducing overlaps based on the provided image and improving balance. */

/* Original skill mapping (from your HTML):
1: Technical Support
2: Debugging
3: Hardware | Software | System Maintenance
4: Javascript
5: React
6: Node.JS/Express.Js
7: HTML/CSS
8: Troubleshooting / Helpdesk
*/

.skill-tag-pos-1 {
  /* Technical Support - Top-right */
  top: 15%;
  left: 75%;
  animation-delay: 0s;
}
.skill-tag-pos-2 {
  /* Debugging - Bottom-left */
  top: 70%;
  left: 15%;
  animation-delay: 0.7s;
}
.skill-tag-pos-3 {
  /* Hardware | Software | System Maintenance - Bottom-center */
  top: 90%;
  left: 50%;
  animation-delay: 1.4s;
}
.skill-tag-pos-4 {
  /* Javascript - Mid-right */
  top: 40%;
  left: 98%;
  animation-delay: 2.1s;
}
.skill-tag-pos-5 {
  /* React - Top-left */
  top: 25%;
  left: 10%;
  animation-delay: 2.8s;
}
.skill-tag-pos-6 {
  /* Node.JS/Express.Js - Bottom-right */
  top: 65%;
  left: 85%;
  animation-delay: 3.5s;
}
.skill-tag-pos-7 {
  /* HTML/CSS - Top-center */
  top: 10%;
  left: 30%;
  animation-delay: 4.2s;
}
.skill-tag-pos-8 {
  /* Troubleshooting / Helpdesk - Mid-left */
  top: 50%;
  left: 0%;
  animation-delay: 4.9s;
}

/* Floating Animation - kept as is, it's good */
@keyframes float {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-13px);
  }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  /* .home__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 1rem;
    text-align: center;
  } */
  .home__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 1rem;
  }

  .home__img {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 320px; /* Control the size for mobile */
    margin: 0 auto; /* Center horizontally */
    height: auto;
  }
  /* width: 90vw; 
    height: 90vw;
    max-width: 400px; 
    max-height: 400px;
    margin: 0 auto;
  } */

  /* .home__blob {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
  } */
  .floating-skills {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
  }

  .skill-tag {
    position: absolute;
    background: var(--first-color, #ff4d4d);
    color: #fff;
    font-size: 0.6rem;
    padding: 0.3rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    animation: float 4s ease-in-out infinite;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  }

  /* Float Animation */
  @keyframes float {
    0%,
    100% {
      transform: translate(-50%, -50%) translateY(0);
    }
    50% {
      transform: translate(-50%, -50%) translateY(-8px);
    }
  }

  /* Floating skill positions — tuned for 90vw container */
  .skill-tag-pos-1 {
    top: 12%;
    left: 72%;
    animation-delay: 0s;
  }
  .skill-tag-pos-2 {
    top: 80%;
    left: 15%;
    animation-delay: 0.3s;
  }
  .skill-tag-pos-3 {
    top: 97%;
    left: 50%;
    animation-delay: 0.6s;
  }
  .skill-tag-pos-4 {
    top: 40%;
    left: 95%;
    animation-delay: 0.9s;
  }
  .skill-tag-pos-5 {
    top: 18%;
    left: 10%;
    animation-delay: 1.2s;
  }
  .skill-tag-pos-6 {
    top: 70%;
    left: 90%;
    animation-delay: 1.5s;
  }
  .skill-tag-pos-7 {
    top: 2%;
    left: 50%;
    animation-delay: 1.8s;
  }
  .skill-tag-pos-8 {
    top: 50%;
    left: 3%;
    animation-delay: 2.1s;
  }
}

@media screen and (max-width: 500px) {
  /* Even smaller screens */
  .home__img {
    max-width: 500px;
    height: 300px;
  }
  .floating-skills {
    width: 300px; /* Further reduction */
    height: 300px;
  }
  .skill-tag {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }
  /* Further re-adjust positions for very small screens */
  .skill-tag-pos-1 {
    top: 15%;
    left: 80%;
  }
  .skill-tag-pos-2 {
    top: 80%;
    left: 10%;
  }
  .skill-tag-pos-3 {
    top: 98%;
    left: 50%;
  }
  .skill-tag-pos-4 {
    top: 45%;
    left: 95%;
  }
  .skill-tag-pos-5 {
    top: 20%;
    left: 10%;
  }
  .skill-tag-pos-6 {
    top: 75%;
    left: 85%;
  }
  .skill-tag-pos-7 {
    top: 6%;
    left: 40%;
  }
  .skill-tag-pos-8 {
    top: 50%;
    left: 0%;
  }
}
/*==================== BUTTONS ====================*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
}

.button:hover {
  background-color: var(--first-color-alt);
}
.button__icon {
  font-size: 1.25rem;
  margin-left: var(--mb-0-5);
  transition: 0.3s;
}

.button--white {
  background-color: #fff;
  color: var(--first-color);
}

.button--white:hover {
  background-color: #d8d8d8de;
}

.button--flex {
  display: inline-flex;
  align-items: center;
}

.button--small {
  padding: 0.75rem 1rem;
}

.button--link {
  padding: 0;
  background-color: transparent;
  color: var(--first-color);
}
.button--link:hover {
  background-color: transparent;
  color: var(--first-color-alt);
}
/*==================== ABOUT ====================*/
.about__img {
  width: 200px;
  border-radius: 0.5rem;
  justify-self: center;
  align-self: center;
}

.about__description {
  text-align: center;
  margin-bottom: var(--mb-2-5);
}
.about__info {
  display: flex;
  justify-content: space-evenly;
  margin-bottom: var(--mb-2-5);
}
.about__info-title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
}
.about__info-name {
  font-size: var(--small-font-size);
}
.about__info-title,
.about__info-name {
  display: block;
  text-align: center;
}

.about__buttons {
  display: flex;
  justify-content: center;
}

/*==================== SKILLS (NEW & PROFESSIONAL) ====================*/
.skills__container {
  row-gap: 2.5rem;
}

.skills__area {
  margin-bottom: var(--mb-2);
}

.skills__area-title {
  font-size: var(--h3-font-size);
  text-align: center;
  margin-bottom: var(--mb-1-5);
}

/* Make sure skill boxes are centered */
.skills__box {
  display: grid;
  justify-content: center; /* centers the grid within its container */
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem;
}

.skill__card {
  background-color: var(--container-color);
  padding: 1.5rem 1rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.skill__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.skill__icon {
  font-size: 3rem; /* for UIcons (UIL API) */
  color: var(--first-color);
  margin-bottom: var(--mb-1);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px; /* fixed height box */
  width: 60px; /* fixed width box */
  margin: 0 auto var(--mb-1);
}

/* Images inside .skill__icon */
.skill__icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.skill__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--mb-0-5);
}

.skill__name {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
}

.skill__percentage-value {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

.skills__bar {
  background-color: var(--first-color-lighter);
  height: 6px;
  border-radius: 0.5rem;
  overflow: hidden;
}

.skills__percentage-bar {
  display: block;
  background-color: var(--first-color);
  height: 100%;
  border-radius: 0.5rem;
  width: 0; /* Start at 0 width for animation */
  transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}
/* --- Default: Mobile/Tablet Layout (up to 991px) --- */

.skills__container {
  /* Mobile/Tablet: Stacked categories */
  display: block;
  max-width: 500px; /* Constrain width for cleaner mobile presentation */
  margin-left: auto;
  margin-right: auto;
}

.skills__box {
  /* Mobile/Tablet: Auto-fit cards (1 or 2 across) */
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

/* --- Desktop Layout (Professional, Centered Look) --- */
@media screen and (min-width: 992px) {
  /* 1. Define the Master Layout: Two fixed-width columns, centered */
  /* .skills__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    align-items: start;
  } */
  .skills__container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers everything horizontally */
    justify-content: center; /* Optional: centers vertically if height is set */
    text-align: center; /* Ensures titles and text inside align */
    margin: 0 auto;
  }

  /* 2. Position the Skill Categories */
  .skills__area:nth-child(1) {
    grid-column: 1 / 2;
    margin-bottom: 0;
  }
  .skills__area:nth-child(2) {
    grid-column: 1 / 2;
    margin-top: 3rem;
    margin-bottom: 0;
  }
  .skills__area:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }

  /* 3. Card Layout */
  .skills__box {
    /* Force 2 columns that fill the 350px container width */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1.5rem;
  }
}
/*==================== QUALIFICATION ====================*/
.qualification__tabs {
  display: flex;
  justify-content: space-evenly;
  margin-bottom: var(--mb-2);
}
/* .qualification__button {
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  padding: var(--mb-0-5) var(--mb-1);
} */
.qualification__button {
  /* Increased padding for large, easy-to-hit targets on all devices */
  padding: var(--mb-0-25) var(--mb-1);
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: color 0.3s;
}
.qualification__button:hover {
  color: var(--first-color);
}
.qualification__icon {
  font-size: 1.8rem;
  margin-right: var(--mb-0-25);
}
.qualification__active {
  color: var(--first-color);
}
.qualification__sections {
  margin-top: 2rem;
}
.qualification__content {
  display: none;
}
.qualification__content-active {
  display: block;
}
.qualification__data {
  display: grid;
  grid-template-columns: 1fr max-content 1fr;
  column-gap: 1.5rem;
}
.qualification__title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
}
.qualification__subtitle {
  display: inline-block;
  font-size: var(--small-font-size);
  margin-bottom: var(--mb-1);
}
.qualification__calendar {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}
.qualification__rounder {
  display: inline-block;
  width: 13px;
  height: 13px;
  background-color: var(--first-color);
  border-radius: 50%;
}
.qualification__line {
  display: block;
  width: 1px;
  height: 100%;
  background-color: var(--first-color);
  transform: translate(6px, -7px);
}
.qualification [data-content] {
  display: none;
}
.qualification__active[data-content] {
  display: block;
}
.qualification__button.qualification__active {
  color: var(--first-color);
} /* ==================== BASE STYLES (Desktop/Tablet) ==================== */

.qualification__tabs {
  display: flex;
  justify-content: space-evenly;
  margin-bottom: var(--mb-2);
}

.qualification__button {
  /* Increased padding for large, easy-to-hit targets on all devices */
  padding: var(--mb-0-5) var(--mb-1);
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: color 0.3s;
}

/* ==================== MEDIA QUERIES (Mobile Optimization) ==================== */
@media screen and (max-width: 768px) {
  .qualification__tabs {
    /* FIX 1: Stop stretching the buttons. Group and center them instead. */
    justify-content: center;

    /* Space between buttons */
    gap: var(--mb-1);
    /* FIX 2: Frame Gutter (pushes content away from the edges) */
    padding-left: var(--mb-2);
    padding-right: var(--mb-2);
  }

  .qualification__button {
    font-size: var(--normal-font-size);

    /* *** SIZING ADJUSTMENT *** 
           Increase vertical padding to make the tap target taller, 
           and use a consistent horizontal padding for balanced spacing. */
    padding: var(--mb-0-25) var(--mb-0-25); /* Vertical: 0.75rem, Horizontal: 0.75rem */
  }
}

/* For very small devices (e.g., screens smaller than 350px) - Vertical Stack */
@media screen and (max-width: 350px) {
  .qualification__tabs {
    flex-direction: column;
    align-items: center;
    gap: 0;

    /* Maintain the generous frame spacing */
    padding-left: var(--mb-2);
    padding-right: var(--mb-2);
  }
  .qualification__button {
    width: 100%;
    text-align: center;
    margin-bottom: var(--mb-0-5);

    /* *** SIZING ADJUSTMENT FOR STACKED BUTTONS *** 
           Make the buttons look like solid blocks using even more padding 
           (1rem vertical padding ensures a big, easy block tap target). */
    padding: var(--mb-1) var(--mb-1);
  }
}
/*==================== SERVICES ====================*/
.services__container {
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

.services__content {
  position: relative;
  background-color: var(--container-color);
  padding: 3.5rem 0.5rem 1.25rem 1.5rem;
  border-radius: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: 0.3s;
}

.services__content:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.services__icon {
  display: block;
  font-size: 1.5rem;
  color: var(--first-color);
  margin-bottom: var(--mb-1);
}

.services__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  font-weight: var(--font-medium);
}

.services__button {
  cursor: pointer;
  font-size: var(--small-font-size);
}

.services__button:hover .button__icon {
  transform: translateX(0.25rem);
}

.services__modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.services__modal-content {
  position: relative;
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 0.5rem;
}
.services__modal-services {
  row-gap: 1rem;
}
.services__modal-service {
  display: flex;
}
.services__modal-title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  margin-bottom: var(--mb-1-5);
}
.services__modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--first-color);
  cursor: pointer;
}
.services__modal-icon {
  color: var(--first-color);
  margin-right: var(--mb-0-25);
}
/* Active Modal */
.active-modal {
  opacity: 1;
  visibility: visible;
}
/*==================== PORTFOLIO ====================*/
.portfolio__container {
  overflow: initial;
  padding-bottom: 70px;
  position: relative;
}
.portfolio__content {
  padding: 0 1.5rem;
}
.portfolio__img {
  width: 265px;
  border-radius: 0.5rem;
  justify-self: center;
}
.portfolio__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-5);
}
.portfolio__description {
  margin-bottom: var(--mb-0-75);
}
.portfolio__button:hover .button__icon {
  transform: translateX(0.25rem);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  content: "";
}

.swiper-portfolio-icon {
  font-size: 2rem;
  color: var(--first-color);
}

.swiper-button-prev {
  left: -0.5rem;
}
.swiper-button-next {
  right: -0.5rem;
}
/* Style the pagination container */
.swiper-pagination {
  position: relative;
  bottom: 30px; /* Position it comfortably above the bottom edge */
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 10;
}
/* Style the individual dots (bullets) */
.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(
    --text-color-light
  ); /* Assuming a light gray for inactive dots */
  opacity: 0.7;
  border-radius: 50%;

  /* THE KEY FIX: Increase margin for better spacing and larger touch area */
  margin: 0 15px; /* Generous horizontal spacing */

  transition: all 0.3s ease;
}

/* Style the active dot */
.swiper-pagination-bullet-active {
  background: var(--first-color); /* Assuming your primary theme color */
  opacity: 1;
}
.swiper-button-prev,
.swiper-button-next,
.swiper-pagination-bullet {
  outline: none;
}
@media screen and (max-width: 768px) {
  /* Reduce the required space on mobile */
  .portfolio__container {
    padding-bottom: 55px;
  }

  /* Move pagination slightly closer to the bottom */
  .swiper-pagination {
    bottom: 20px;
    position: absolute;
  }

  /* Adjust dot size and spacing for mobile */
  .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    /* Reduce the margin, but keep separation effective for touch */
    margin: 0 8px;
  }
}

/* OPTIONAL: Tighter spacing for very small phone screens */
@media screen and (max-width: 350px) {
  .swiper-pagination-bullet {
    margin: 0 5px; /* Only 5px margin on tiny screens */
  }
}
/* ------------------------ */
/* . Brand Partner Section */
/* ------------------------ */
.brand-partner {
  padding: 40px 0;
  background-color: var(--light-bg);
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}
.brand-partner:before,
.brand-partner:after {
  content: "";
  position: absolute;
  top: 0;
  width: 150px;
  height: 100%;
  z-index: 2;
}
.brand-partner:before {
  left: 0;
  background: linear-gradient(to right, var(--light-bg), transparent);
}
.brand-partner:after {
  right: 0;
  background: linear-gradient(to left, var(--light-bg), transparent);
}
.logo-scroller {
  display: inline-block;
  animation: scroll 30s linear infinite;
}
.col-brand {
  display: inline-block;
  padding: 0 40px;
}
.Logo-Partner {
  height: 60px;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.col-brand:hover .Logo-Partner {
  filter: grayscale(0%);
  opacity: 1;
}
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/*==================== PROJECT IN MIND ====================*/
.project {
  text-align: center;
}
.project__bg {
  background-color: var(--first-color-second);
  padding-top: 3rem;
}
.project__title {
  font-size: var(--h2-font-size);
  margin-bottom: var(--mb-0-75);
}

.project__description {
  margin-bottom: var(--mb-1-5);
}

.project__title,
.project__description {
  color: #fff;
}
.project__img {
  width: 232px;
  justify-self: center;
}

/*==================== CONTACT ME ====================*/
.contact__container {
  row-gap: 3rem;
}
.contact__information {
  display: flex;
  margin-bottom: var(--mb-2);
}
.contact__icon {
  font-size: 2rem;
  color: var(--first-color);
  margin-right: var(--mb-0-75);
}
.contact__title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
}
.contact__subtitle {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}
.contact__content {
  background-color: var(--input-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem 0.25rem;
}

.contact__label {
  font-size: var(--smaller-font-size);
  color: var(--title-color);
}

.contact__input {
  width: 100%;
  background-color: var(--input-color);
  color: var(--text-color);
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  border: none;
  outline: none;
  padding: 0.25rem 0.5rem 0.5rem 0;
}
/*==================== FOOTER ====================*/
.footer {
  padding-top: 2rem;
}
.footer__bg {
  background-color: var(--first-color-second);
  padding: 2rem 0 3rem;
}
.footer__container {
  row-gap: 3.5rem;
}
.footer__title {
  font-size: var(--h1-font-size);
  margin-bottom: var(--mb-0-25);
}
.footer__subtitle {
  font-size: var(--small-font-size);
}
.footer__links {
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
}
.footer__link:hover {
  color: var(--first-color-lighter);
}
.footer__socials {
  display: flex;
  justify-content: center;
  column-gap: 1.5rem;
}
.footer__social {
  font-size: 1.25rem;
}
.footer__social:hover {
  color: var(--first-color-lighter);
}
.footer__copy {
  font-size: var(--smaller-font-size);
  text-align: center;
  color: var(--text-color-light);
  margin-top: var(--mb-3);
}
.footer__title,
.footer__subtitle,
.footer__link,
.footer__social {
  color: #fff;
}
/*========== SCROLL UP ==========*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -20%;
  background-color: var(--first-color);
  opacity: 0.8;
  padding: 0.3rem 0.5rem;
  border-radius: 0.4rem;
  z-index: var(--z-tooltip);
  transition: 0.4s;
}
.scrollup:hover {
  background-color: var(--first-color-alt);
}
.scrollup__icon {
  font-size: 1.5rem;
  color: #fff;
}

/* Show scroll */
.show-scroll {
  bottom: 5rem;
}

/*========== SCROLL BAR ==========*/
::-webkit-scrollbar {
  width: 0.6rem;
  background-color: var(--scroll-bar-color);
  border-radius: 0.5rem;
}
::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb-color);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-color-light);
}
/*==================== MEDIA QUERIES ====================*/
/* For small devices */
@media screen and (max-width: 350px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }
  .nav__menu {
    padding: 2rem 0.25rem 4rem;
  }
  .nav__list {
    column-gap: 0;
  }
  .home__content {
    grid-template-columns: 0.25fr 3fr;
  }
  .home__blob {
    width: 180px;
  }
  .qualification__data {
    gap: 0.5rem;
  }
  .services__container {
    grid-template-columns: max-content;
    justify-content: center;
  }
  .services__content {
    padding-right: 3.5rem;
  }
  .services__modal {
    padding: 0 0.5rem;
  }
  .project__img {
    width: 200px;
  }
}

/* For medium devices */
@media screen and (min-width: 568px) {
  .home__content {
    grid-template-columns: max-content 1fr 1fr;
  }
  .home__data {
    grid-column: initial;
  }
  .home__img {
    order: 1;
    justify-self: center;
  }
  .about__container,
  .project__container,
  .contact__container {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio__content {
    grid-template-columns: repeat(2, 1fr);
  }
  .qualification__sections {
    display: grid;
    grid-template-columns: 0.6fr;
    justify-content: center;
  }
}
@media screen and (min-width: 769px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  body {
    margin: 0;
  }
  .section {
    padding: 6rem 0 2rem;
  }
  .section__subtitle {
    margin-bottom: 4rem;
  }

  .main,
  .footer__container {
    padding: 0 1rem;
  }

  .home__container {
    row-gap: 5rem;
  }
  .home__content {
    padding-top: 5.5rem;
    column-gap: 2rem;
    grid-template-columns: max-content 1fr 1fr;
  }
  .home__blob {
    width: 270px;
  }
  .home__scroll {
    display: block;
  }
  .home__scroll-button {
    margin-left: 3rem;
  }
  .about__container {
    column-gap: 5rem;
  }
  .about__img {
    width: 350px;
  }
  .about__description {
    text-align: initial;
  }
  .about__info {
    justify-content: space-between;
  }
  .about__buttons {
    justify-content: initial;
  }
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
  }
  .qualification__tabs {
    justify-content: center;
  }
  .qualification__button {
    margin: 0 var(--mb-1);
  }
  .qualification__sections {
    grid-template-columns: 0.5fr;
  }
  .services__container {
    grid-template-columns: repeat(3, 218px);
    justify-content: center;
  }
  .services__icon {
    font-size: 2rem;
  }
  .services__content {
    padding: 6rem 0 2rem 2.5rem;
  }
  .services__modal-content {
    width: 450px;
  }
  .portfolio__img {
    width: 320px;
  }
  .portfolio__content {
    align-items: center;
  }
  .project {
    text-align: initial;
  }
  .project__bg {
    background: none;
  }
  .project__container {
    background-color: var(--first-color-second);
    border-radius: 1rem;
    padding: 3rem 2.5rem 0;
    grid-template-columns: 1fr max-content;
    column-gap: 3rem;
  }
  .project__data {
    padding-top: 0.8rem;
  }
  .footer__container {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer__bg {
    padding: 3rem 0 3.5rem;
  }
  .footer__links {
    flex-direction: row;
    column-gap: 2rem;
  }
  .footer__socials {
    justify-self: flex-end;
  }
  .footer__copy {
    margin-top: 4.5rem;
  }
  .show-scroll {
    bottom: 3rem;
  }
}

/* For large devices */
@media screen and (min-width: 1024px) {
  .header,
  .main,
  .footer__container {
    padding: 0;
  }
  .home__blob {
    width: 320px;
  }
  .home__social {
    transform: translateX(-6rem);
  }
  .services__container {
    grid-template-columns: repeat(3, 238px);
  }
  .portfolio__content {
    column-gap: 5rem;
  }
  .swiper-portfolio-icon {
    font-size: 3.5rem;
  }
  .swiper-button-prev {
    left: -3.5rem;
  }
  .swiper-button-next {
    right: -3.5rem;
  }
  .swiper-container-horizontal > .swiper-pagination-bullets {
    bottom: -4.5rem;
  }
  .contact__form {
    width: 460px;
  }
  .contact__inputs {
    grid-template-columns: repeat(2, 1fr);
  }
}
