/* ============================================================
   EDITORIAL EDITION — animations.css
   Motion is quiet: fades, hairlines, and one ink ripple.
   ============================================================ */

@keyframes ink-ripple {
  0% {
    transform: scale(0.4);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 67, 58, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(217, 67, 58, 0); }
}

@keyframes node-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes scroll-hint {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* --- reveal on scroll --- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* hero lines get a slightly slower entrance */
html.js .hero__line.reveal {
  transform: translateY(0.24em);
  transition-duration: 1.1s;
}

/* --- availability pulse --- */
.status__dot { animation: status-pulse 2.8s ease-in-out infinite; }

/* --- topology --- */
.topology__nodes circle.is-accent {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-drift 5s ease-in-out infinite;
}
.topology__lines line {
  stroke-dasharray: 2 4;
  animation: none;
}

/* --- section index hairline --- */
.section-index {
  position: relative;
}
.section-index::after {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  margin-top: 10px;
  background: var(--red);
}

/* --- hero scroll cue --- */
.hero__foot-note {
  position: relative;
  padding-bottom: 12px;
  overflow: hidden;
}
.hero__foot-note::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rule);
}

/* --- interactive timing --- */
.project,
.stack__row,
.cert,
.record__item,
.contact-link,
.btn,
.copy-btn {
  -webkit-tap-highlight-color: transparent;
}

/* --- reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal,
  html.js .hero__line.reveal {
    opacity: 1;
    transform: none;
  }
  .status__dot { animation: none; }
  .topology__nodes circle.is-accent { animation: none; }
  .cursor,
  .cursor-ripples { display: none; }
}
