.hero__title,
.section-title {
  perspective: 900px;
  transform: rotateX(var(--text-rotate-x, 0deg)) rotateY(var(--text-rotate-y, 0deg)) translate3d(var(--text-shift-x, 0px), var(--text-shift-y, 0px), 0);
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.text-depth__char {
  display: inline-block;
  transform: translateZ(0);
  transform-origin: 50% 100%;
  animation: text-depth-in .8s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--char-index) * 24ms);
  text-shadow: 0 1px 0 color-mix(in srgb, var(--text) 38%, transparent), 0 12px 24px color-mix(in srgb, var(--accent) 12%, transparent);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), color .35s ease, text-shadow .35s ease;
}

.text-depth__word { display: inline-block; white-space: nowrap; }

.text-depth__char:hover {
  color: var(--accent);
  transform: translate3d(0, -8px, 26px) rotateX(-12deg);
  text-shadow: 0 16px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}

.text-depth__space { display: inline-block; width: .28em; }

@keyframes text-depth-in {
  from { opacity: 0; transform: translate3d(0, 24px, -80px) rotateX(70deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotateX(0deg); }
}

.project-card__demo,
.repo__demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--accent);
  font: 11px "JetBrains Mono", monospace;
  transition: color .2s ease, transform .2s ease;
}

.project-card__demo:hover,
.repo__demo:hover { color: var(--accent-2); transform: translateX(4px); }
.repo__source { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hero__title, .section-title { transform: none; }
  .text-depth__char { animation: none; text-shadow: none; }
}
