/* UTILIDADES Y EXTRAS */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}
.custom-link {
  color: #0000ee;
  text-decoration: none;
}
.custom-link:hover {
  color: lightgray;
}
/* Light Theme Adjustments */
body.light-theme .project-language {
  background: hsla(150, 70%, 35%, 0.08);
  border-color: hsla(150, 70%, 35%, 0.22);
  color: #15803d;
}
body.light-theme .project-language:hover {
  background: hsla(150, 70%, 35%, 0.16);
  border-color: hsla(150, 70%, 35%, 0.45);
  color: #166534;
}

body.light-theme .project-framework {
  background: hsla(205, 85%, 45%, 0.08);
  border-color: hsla(205, 85%, 45%, 0.22);
  color: #0284c7;
}
body.light-theme .project-framework:hover {
  background: hsla(205, 85%, 45%, 0.16);
  border-color: hsla(205, 85%, 45%, 0.45);
  color: #0369a1;
}

body.light-theme .project-library {
  background: hsla(280, 80%, 50%, 0.08);
  border-color: hsla(280, 80%, 50%, 0.22);
  color: #7c3aed;
}
body.light-theme .project-library:hover {
  background: hsla(280, 80%, 50%, 0.16);
  border-color: hsla(280, 80%, 50%, 0.45);
  color: #6d28d9;
}

.tech-badge-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsla(260, 15%, 22%, 0.65);
  border: 1px solid hsla(260, 15%, 34%, 0.5);
  color: var(--text-secondary);
  padding: 3.5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.2px;
  cursor: default;
  transition: all 0.2s ease;
}
.tech-badge-more:hover {
  background: hsla(280, 80%, 60%, 0.15);
  border-color: hsla(280, 80%, 60%, 0.4);
  color: var(--accent-color);
}
body.light-theme .tech-badge-more {
  background: hsla(260, 20%, 92%, 0.85);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.project-details-title {
  color: var(--white-2);
  font-size: var(--fs-4);
  font-weight: var(--fw-600);
  line-height: 1.3;
  margin-bottom: 8px;
}
.project-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.hidden {
  display: none;
}
.img-project {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--br-3);
  transition: var(--transition-1);
}
.contact-link:hover {
  color: var(--orange-yellow-crayola);
}
.project-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 2px 0 6px 0;
  padding: 0;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Loader */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--smoky-black);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.loader-container.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader {
  color: var(--text-primary);
  font-size: 10px;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  position: relative;
  text-indent: -9999em;
  box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em,
    -3em 0 0 -1em, -2em -2em 0 0;
}
@media (prefers-reduced-motion: no-preference) {
  .loader {
    animation: mulShdSpin 1.3s infinite linear;
  }
}
@keyframes mulShdSpin {
  0%,
  100% {
    box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em,
      -3em 0 0 -1em, -2em -2em 0 0;
  }
  12.5% {
    box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em,
      -2em -2em 0 -1em;
  }
  25% {
    box-shadow: 0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em,
      -2em -2em 0 -1em;
  }
  37.5% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, -2em 2em 0 -1em,
      -3em 0em 0 -1em, -2em -2em 0 -1em;
  }
  50% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, -2em 2em 0 0,
      -3em 0em 0 -1em, -2em -2em 0 -1em;
  }
  62.5% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0,
      -2em -2em 0 -1em;
  }
  75% {
    box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0,
      -3em 0em 0 0.2em, -2em -2em 0 0;
  }
  87.5% {
    box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0,
      -2em -2em 0 0.2em;
  }
}

/* TOAST NOTIFICATION SYSTEM */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: hsla(260, 15%, 18%, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--br-2);
  color: var(--text-primary);
  font-size: var(--fs-5);
  box-shadow: var(--shadow-3);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(15px) scale(0.95);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.light-theme .toast {
  background: hsla(0, 0%, 100%, 0.9);
  box-shadow: 0 10px 30px hsla(260, 20%, 20%, 0.12);
}
.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast-icon {
  font-size: 1.4rem;
  color: var(--accent-color);
  flex-shrink: 0;
}
.toast-message {
  font-weight: var(--fw-500);
}
@media (max-width: 580px) {
  .toast-container {
    bottom: 80px;
    right: 20px;
    left: 20px;
  }
  .toast {
    width: 100%;
    justify-content: center;
  }
}

/* ACCESSIBILITY & FOCUS VISIBLE */
:focus-visible {
  outline: 2px solid var(--accent-color) !important;
  outline-offset: 3px !important;
}

.service-item,
.contact-me-item,
.cert-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-item:hover,
.contact-me-item:hover,
.cert-card:hover {
  transform: translateY(-2px);
}

