/* Pretext animation scaffolding */

/* Hero animation container */
.hero-title[data-hero-text] {
  position: relative;
}

.hero-line {
  position: absolute;
  white-space: nowrap;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.hero-line.revealed {
  opacity: 1;
  transform: translateY(0);
  text-shadow: 0 0 20px var(--bg-primary), 0 0 40px var(--bg-primary);
}

/* Theme overrides for hero lines */
.theme-futurism .hero-line {
  color: #f0e8f8;
  -webkit-text-fill-color: unset;
}

/* Typing reveal */
[data-typing-reveal] {
  position: relative;
}

.typing-line {
  position: absolute;
  white-space: nowrap;
  left: 0;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--text-accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: cursor-blink 800ms ease-in-out infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Particle canvas */
.particle-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* opacity and mix-blend-mode set by settings.ts inline */
  overflow: hidden;
  font-family: var(--font-mono);
  /* Fade out center so particles don't obscure content */
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 40%, transparent 0%, black 100%);
  mask-image: radial-gradient(ellipse 55% 50% at 50% 40%, transparent 0%, black 100%);
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-muted);
}

.particle-row {
  white-space: pre;
  height: 12px;
}

/* Post card entrance */
.post-card {
  animation: card-enter 500ms ease both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card:nth-child(1) { animation-delay: 0ms; }
.post-card:nth-child(2) { animation-delay: 80ms; }
.post-card:nth-child(3) { animation-delay: 160ms; }
.post-card:nth-child(4) { animation-delay: 240ms; }
.post-card:nth-child(5) { animation-delay: 320ms; }
.post-card:nth-child(6) { animation-delay: 400ms; }

/* Category filter transition */
.post-card.hiding {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 200ms ease, transform 200ms ease;
}
.post-card.showing {
  animation: card-enter 300ms ease both;
}
