/* BHAVESH personal website — continuous, restrained SAY HELLO finale.
   Scoped to closing HELLO only. Existing letter physics and scroll-reveal
   underline remain authoritative; the new motion is an additive overlay. */
.contact-section h2 em {
  --hello-breathe-x: 1.012;
  --hello-breathe-y: 1.006;
  --hello-breathe-rise: -1.4px;
  transform-origin: 0% 74%;
  animation: hello-live-breathe 8.8s cubic-bezier(.43, 0, .56, 1) infinite;
}
@keyframes hello-live-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1, 1); }
  50% { transform: translate3d(0, var(--hello-breathe-rise), 0) scale(var(--hello-breathe-x), var(--hello-breathe-y)); }
}
/* ::after is the approved, scroll-driven underline: never animate its transform.
   ::before adds a quiet glint travelling along the already-visible line. */
.contact-section h2 em::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -.082em;
  width: calc(100% + .07em);
  height: clamp(3px, .025em, 7px);
  min-height: 3px;
  pointer-events: none;
  z-index: 1;
  opacity: var(--contact-line, 0);
  background-image: linear-gradient(90deg, transparent 0%, rgba(255,254,250,.48) 50%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 19% 100%;
  animation: hello-underline-glide 10.6s linear infinite;
}
@keyframes hello-underline-glide {
  0%, 15% { background-position: -30% 0; }
  85%, 100% { background-position: 130% 0; }
}
/* Original cursor-driven letters have priority while the pointer is nearby. */
@media (hover: hover) and (pointer: fine) {
  .contact-section h2 em:hover { animation-play-state: paused; }
}
@media (max-width: 600px) {
  .contact-section h2 em {
    --hello-breathe-x: 1.004;
    --hello-breathe-y: 1.004;
    --hello-breathe-rise: -.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .contact-section h2 em { animation: none !important; transform: none !important; }
  .contact-section h2 em::before { animation: none !important; display: none !important; }
}
