/* === hero.css === */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-text h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary); /* Nombre en blanco */
}

/* Si se usa la clase .highlight en algún otro lugar, mantiene el color acento */
.hero-text .highlight {
  color: var(--accent);
  text-shadow: var(--neon-shadow);
}

/* Pero si el nombre tiene .highlight, lo sobrescribimos para que sea blanco */
.hero-text h1 .highlight {
  color: var(--text-primary);
  text-shadow: none;
}

.dynamic-text {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.typed {
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-image {
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.portrait-stage {
  width: min(100%, 540px);
  aspect-ratio: 4 / 5;
  position: relative;
  isolation: isolate;
  transform-style: preserve-3d;
}

.portrait-stage::before {
  content: "";
  position: absolute;
  inset: 9% 9% 5% 11%;
  border: 1px solid rgba(77, 216, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(77, 216, 255, 0.14), rgba(0, 255, 157, 0.05) 42%, transparent 72%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 42px rgba(77, 216, 255, 0.2);
  transform: skewY(-3deg);
  z-index: -1;
}

.portrait-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(77, 216, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 157, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.35;
  z-index: -2;
}

.hero-portrait {
  --angle: 0deg;
  margin: 0;
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55), 0 0 28px rgba(77, 216, 255, 0.18);
  transform: rotate(var(--angle));
  transform-origin: center;
  will-change: transform, opacity;
}

.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%, rgba(0, 0, 0, 0.34));
  pointer-events: none;
}

.hero-portrait-inner,
.hero-portrait img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-portrait-inner {
  will-change: transform;
}

.hero-portrait img {
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.hero-portrait--primary {
  --angle: 2deg;
  top: 1%;
  left: 17%;
  width: 66%;
  height: 86%;
  z-index: 3;
}

.hero-portrait--primary img {
  object-position: 50% 24%;
}

.hero-portrait--secondary {
  --angle: -7deg;
  top: 21%;
  left: 0;
  width: 42%;
  height: 58%;
  z-index: 2;
}

.hero-portrait--secondary img {
  object-position: 52% 20%;
}

.hero-portrait--tertiary {
  --angle: 8deg;
  right: 0;
  bottom: 3%;
  width: 41%;
  height: 55%;
  z-index: 1;
}

.hero-portrait--tertiary img {
  object-position: 50% 18%;
}

.portrait-scanline {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-130%);
  z-index: 6;
}

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

/* Responsive */
@media (max-width: 980px) {
  .hero-content {
    gap: 34px;
  }

  .hero-image {
    min-height: 540px;
  }

  .hero-text h1 {
    font-size: 3.2rem;
  }
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-image {
    min-height: 470px;
  }

  .portrait-stage {
    width: min(100%, 390px);
    aspect-ratio: 1 / 1.15;
    margin: 0 auto;
  }

  .hero-portrait--primary {
    left: 19%;
    width: 62%;
    height: 84%;
  }

  .hero-portrait--secondary {
    top: 24%;
    width: 40%;
    height: 54%;
  }

  .hero-portrait--tertiary {
    width: 38%;
    height: 50%;
  }
}

@media (max-width: 480px) {
  #hero {
    padding-top: calc(80px + var(--navbar-height));
  }

  .hero-text h1 {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .dynamic-text {
    font-size: 1.1rem;
  }

  .hero-image {
    min-height: 390px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-portrait,
  .hero-portrait-inner,
  .portrait-scanline {
    transition: none;
    animation: none;
  }
}
