/* Smooth transitions when navigating between pages of this site.
   Cross-document View Transitions (Chrome/Edge 126+). Every page links this, so
   any new same-origin page animates automatically — just link transitions.css.
   Browsers without support simply navigate normally (no breakage). */
@view-transition {
  navigation: auto;
}

/* Outgoing page: a quick, quiet fade-out. */
::view-transition-old(root) {
  animation: vt-fade-out 220ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

/* Incoming page: fade up gently into place — a polished "new content arriving"
   feel rather than a flat crossfade. */
::view-transition-new(root) {
  animation: vt-fade-up 400ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

@keyframes vt-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
