/* ==========================================================================
   Grade 2: Bootstrap + GSAP Portfolio Demo
   Custom styles extending Bootstrap 5
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   2. Base Overrides
   -------------------------------------------------------------------------- */
body {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.bg-dark {
  background-color: var(--color-bg-alt) !important;
}

/* Section spacing */
.py-lg-6 {
  padding-top: 6rem !important;
  padding-bottom: 6rem !important;
}

/* --------------------------------------------------------------------------
   3. Navigation
   -------------------------------------------------------------------------- */
.navbar {
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s;
}

.navbar.scrolled {
  background: rgba(15, 15, 15, 0.95);
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--bs-primary);
  transition: width 0.3s, left 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

.custom-toggler .bar {
  display: block;
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: white;
  transition: all 0.4s ease;
  left: 0;
}

.custom-toggler .bar.top {
  top: 0;
}

.custom-toggler .bar.middle {
  top: 50%;
  transform: translateY(-50%);
}

.custom-toggler .bar.bottom {
  bottom: 0;
}

/* Estado activo (cruz) */
.custom-toggler.active .bar.top {
  transform: rotate(45deg);
  top: 50%;
}

.custom-toggler.active .bar.middle {
  opacity: 0;
}

.custom-toggler.active .bar.bottom {
  transform: rotate(-45deg);
  bottom: 50%;
}

.hero-title {
  letter-spacing: -0.03em;
}

.hero-subtitle {
  opacity: 0.8;
}

/* Scroll indicator */
.scroll-indicator {
  z-index: 10;
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 13px;
  position: relative;
}

.mouse::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  animation: scrollMouse 1.5s ease-in-out infinite;
}

@keyframes scrollMouse {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(12px);
  }
}

/* --------------------------------------------------------------------------
   5. About Section
   -------------------------------------------------------------------------- */
.about-image {
  position: relative;
}

.about-image::before {
  content: "";
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 2px solid var(--bs-primary);
  border-radius: 1rem;
  z-index: -1;
}

.about-image img {
  position: relative;
  z-index: 1;
}

/* Skills progress bars */
.progress {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--bs-primary), #818cf8);
  border-radius: 4px;
  width: 0; /* Animated by GSAP */
}

/* /* --------------------------------------------------------------------------
   6. Projects Section
   -------------------------------------------------------------------------- */

/*  */

.card-title {
  margin-bottom: 0.75rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Imagen */
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.6s ease;
  display: block;
}

/* Overlay oscuro + texto */
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  opacity: 0;
  /* transition: opacity 0.4s ease; */
  transition: background-color 0.6s ease, opacity 0.6s ease;
}

/* Texto */
.project-overlay p {
  color: #fff;
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  line-height: 1.4;
  text-align: left;
}

/* Texto para la primera card  */
.col-md-8 .project-overlay p {
  max-width: 50%;
}

.col-md-4 .project-overlay p {
  max-width: 80%;
}

.col-6 .project-overlay p {
  max-width: 80%;
}
/* Hover */

.project-card:hover img {
  transform: scale(1.08);
  transition: 0.5s;
}

.project-card img:hover {
  transform: scale(1.08) important;
  transition: 0.5s;
  background-color: black;
  opacity: 0.4;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

/* Badge styling */
/* .bg-primary-subtle {
  background-color: rgba(99, 102, 241, 0.15) !important;
}

.text-primary {
  color: var(--bs-primary) !important;
}
*/
*/

/* --------------------------------------------------------------------------
   7. Contact Section
   -------------------------------------------------------------------------- */
.social-links a {
  transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
  color: var(--bs-primary) !important;
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  background: #818cf8;
  border-color: #818cf8;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-outline-light {
  padding: 0.75rem 2rem;
  font-weight: 600;
}

.btn-outline-light:hover {
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   9. Utilities
   -------------------------------------------------------------------------- */
.z-1 {
  z-index: 1;
}

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

  .project-card img,
  .project-overlay {
    transition: none;
  }

  .project-card:hover {
    transform: none;
  }

  .project-card:hover .card-img-wrapper img {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   11. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 3rem;
  }

  .shape {
    transform: scale(0.6);
  }

  .col-md-8 .project-overlay p {
    max-width: 80;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }

  .hero-cta .btn:last-child {
    margin-bottom: 0;
  }

  .about-image::before {
    display: none;
  }

  .col-md-8 .project-overlay p {
    max-width: 80%;
  }
}

/* --------------------------------------------------------------------------
  NAVBAR
   -------------------------------------------------------------------------- */

.navbar {
  --bs-navbar-padding-y: 1rem;
}

.navbar-toggler {
  border: none;
}
