/* Motion — all of it is disabled under prefers-reduced-motion */
@keyframes blink { 50% { opacity: 0; } }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Hero entrance: starts immediately, never waits on a loader */
.hero-line { animation: rise 700ms var(--ease) both; }
.hero-line:nth-child(1) { animation-delay: 40ms; }
.hero-line:nth-child(2) { animation-delay: 120ms; }
.hero-line:nth-child(3) { animation-delay: 200ms; }
.hero-line:nth-child(4) { animation-delay: 280ms; }
.hero-line:nth-child(5) { animation-delay: 360ms; }
.hero-title .hero-line { display: inline-block; }
.hero-title .hero-title-sub { display: block; }
.portrait { animation: rise 900ms 200ms var(--ease) both; }

/* Scroll reveal (only hides content when JS is running) */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow), transform var(--t-slow); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Theme change transition for key surfaces */
.site-header, .skill-group, .project-card, .edu-card, .oop-topics, .site-footer { transition: background-color var(--t-med), border-color var(--t-med), color var(--t-med); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .caret { display: none; }
  .hero-line, .portrait { animation: none; }
}
