/* ============================================================
   VK PORTFOLIO — animations.css
   All motion: particles, shimmer, glitch, floating orbs,
   magnetic buttons, page transitions
   ============================================================ */

/* ── PARTICLE CANVAS ─────────────────────────────────────── */
#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

/* ── FLOATING ORB BLOBS ──────────────────────────────────── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat linear infinite;
  will-change: transform;
}
.orb-gold {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(201,168,76,0.065), transparent 70%);
  animation-duration: 28s;
  top: -180px; right: -100px;
}
.orb-blue {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(94,106,210,0.07), transparent 70%);
  animation-duration: 22s;
  bottom: -120px; left: -80px;
  animation-delay: -8s;
}
.orb-teal {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(62,207,186,0.05), transparent 70%);
  animation-duration: 18s;
  top: 40%; left: 30%;
  animation-delay: -14s;
}
@keyframes orbFloat {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(40px, 30px) rotate(90deg); }
  50%  { transform: translate(-20px, 55px) rotate(180deg); }
  75%  { transform: translate(-45px, 20px) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* ── SHIMMER EFFECT ──────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold-light) 30%,
    #fff8e7 50%,
    var(--gold-light) 70%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ── HERO WORD HOVER ─────────────────────────────────────── */
/* Clean per-word shimmer on hover — no broken pseudo-element glitch */
.hero-word {
  display: inline-block;
  position: relative;
  cursor: default;
  transition: letter-spacing 0.5s var(--ease-out);
}

/* Shimmer sweep on hover */
.hero-word:hover {
  letter-spacing: 0.01em;
}
.hero-word::after {
  content: attr(data-word);
  position: absolute;
  inset: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 248, 200, 0.55) 50%,
    transparent 70%
  );
  background-size: 220% 100%;
  background-position: 150% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.hero-word:hover::after {
  opacity: 1;
  animation: wordSweep 0.65s var(--ease-out) forwards;
}
.hero-word-italic::after {
  font-style: italic;
  /* gold tint sweep for the italic "Karpe" */
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(232, 201, 122, 0.7) 50%,
    transparent 75%
  );
  background-size: 220% 100%;
  background-position: 150% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes wordSweep {
  from { background-position: 150% center; }
  to   { background-position: -50% center; }
}

/* ── MAGNETIC BUTTON RIPPLE ──────────────────────────────── */
.btn-gold, .btn-ghost {
  position: relative;
  overflow: hidden;
}
.btn-gold .ripple,
.btn-ghost .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: scale(0);
  animation: rippleOut 0.6s linear;
  pointer-events: none;
}
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

/* ── STAT NUMBER TICK ────────────────────────────────────── */
.stat-num.counting { color: var(--gold-light); }

/* ── TIMELINE PROGRESS LINE ──────────────────────────────── */
.tl-track::before {
  transform-origin: top;
  animation: lineGrow 1.2s var(--ease-out) 0.3s both;
}
@keyframes lineGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ── CARD TILT (3D hover) ────────────────────────────────── */
.tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.1s;
}
.tilt-inner {
  transform: translateZ(20px);
}

/* ── TYPING CURSOR ───────────────────────────────────────── */
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--gold);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── PAGE ENTER OVERLAY ──────────────────────────────────── */
#page-enter {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: enterFade 0.7s 0.5s var(--ease-out) forwards;
}
#page-enter-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.1em;
  animation: logoScale 0.5s var(--ease-out) forwards;
}
@keyframes logoScale {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes enterFade {
  to { opacity: 0; }
}

/* ── SCROLL PROGRESS BAR ─────────────────────────────────── */
#scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--gold-glow);
}

/* ── ACTIVE NAV DOT ──────────────────────────────────────── */
.nav-links a.active::before {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold);
}

/* ── HOVER LINK UNDERLINE SLIDE ──────────────────────────── */
.underline-slide {
  position: relative;
  display: inline-block;
}
.underline-slide::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease-out);
}
.underline-slide:hover::after { width: 100%; }

/* ── SECTION DIVIDERS ────────────────────────────────────── */
.section-divider {
  position: absolute;
  bottom: 0; left: 52px; right: 52px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hi), transparent);
}

/* ── AMBIENT PARALLAX LAYER ──────────────────────────────── */
[data-parallax] {
  will-change: transform;
}
