/* P0 only: three restrained beats; all content shares the final beat. */
.motion-first .terminal > :is(header, nav, section, footer) {
  animation: p0-enter 240ms ease-out both paused;
  animation-delay: 120ms;
}
.motion-first .terminal > .topbar { animation-delay: 0ms; }
.motion-first .terminal > .navigation { animation-delay: 60ms; }
.motion-first.motion-ready .terminal > :is(header, nav, section, footer) { animation-play-state: running; }
@keyframes p0-enter {
  from { opacity: .88; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
.navigation a:not(.is-current) {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 140ms ease-out;
}
.navigation a:not(.is-current):is(:hover, :focus-visible) { text-decoration-color: currentColor; }
.skill-row, .article-row { transition: background-color 120ms ease-out; }
.skill-row .external-arrow, .article-row .external-arrow { transition: transform 120ms ease-out; }
:is(.skill-row, .article-row):is(:hover, :focus-visible) .external-arrow { transform: translateX(2px); }
:is(.skill-row, .article-row):active { background-color: #0d0d0c; transition-duration: 80ms; }
.tabs button, .category-list button {
  transition: color 140ms ease-out, background-color 140ms ease-out, border-color 140ms ease-out, outline-color 140ms ease-out;
}
/* Keep outline geometry stable so the selected outline can fade. */
.tabs button:not([aria-selected=true]):not(:focus-visible) { outline: 1px solid transparent; outline-offset: 2px; }
.category-list button:not([aria-pressed=true]):not(:focus-visible) { outline: 1px dotted transparent; outline-offset: 2px; }
.copy-flash {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  animation: p0-copy-flash 160ms ease-out;
}
@keyframes p0-copy-flash {
  from { outline-color: var(--ink); }
  to { outline-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .copy-flash { animation: none; }
  .motion-first .terminal > :is(header, nav, section, footer) { animation: none; }
  .navigation a:not(.is-current), .tabs button, .category-list button,
  .skill-row, .article-row, .skill-row .external-arrow, .article-row .external-arrow { transition: none; }
  :is(.skill-row, .article-row):is(:hover, :focus-visible) .external-arrow { transform: none; }
}
