/* animations.css — Juicy animations for both views */

:root {
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --expo-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Scroll-reveal base classes ──────────────────────────────────────── */
.js-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.75s var(--expo-out),
    transform 0.75s var(--spring);
  transition-delay: var(--stagger, 0ms);
  will-change: opacity, transform;
}
.js-reveal.on { opacity: 1; transform: none; }

.js-spring {
  opacity: 0;
  transform: translateY(20px) scale(0.93);
  transition:
    opacity 0.6s var(--expo-out),
    transform 0.65s var(--spring);
  transition-delay: var(--stagger, 0ms);
  will-change: opacity, transform;
}
.js-spring.on { opacity: 1; transform: none; }

.js-left {
  opacity: 0;
  transform: translateX(-24px);
  transition:
    opacity 0.6s var(--expo-out),
    transform 0.65s var(--spring);
  transition-delay: var(--stagger, 0ms);
}
.js-left.on { opacity: 1; transform: none; }

/* ─── Portfolio nav ───────────────────────────────────────────────────── */
.pf-nav-inner {
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.pf-nav-inner.pf-nav-scrolled {
  background: rgba(10,10,12,0.9);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.1);
}

.pf-nav-cta {
  transition: background .2s ease, transform .45s var(--spring);
}
.pf-nav-cta:hover  { transform: translateY(-2px) scale(1.06); }
.pf-nav-cta:active { transform: scale(0.93); transition-duration: 0.1s; }

.pf-nav-link {
  transition: color .2s ease, background .2s ease, transform .35s var(--spring);
}
.pf-nav-link:active { transform: scale(0.88); transition-duration: 0.1s; }

/* ─── Portfolio project cards ─────────────────────────────────────────── */
.pf-card {
  transition:
    border-color .35s ease,
    background .35s ease,
    transform .55s var(--spring),
    box-shadow .55s var(--expo-out);
}
.pf-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 28px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}
.pf-card:active {
  transform: translateY(-2px) scale(0.997);
  transition-duration: 0.1s;
}

/* ─── Portfolio stack cells ───────────────────────────────────────────── */
.pf-stack-cell {
  transition: background .3s ease, transform .5s var(--spring);
}
.pf-stack-cell:hover {
  transform: translateY(-5px) scale(1.07);
  background: rgba(255,255,255,0.05);
}

/* ─── Portfolio service cards ─────────────────────────────────────────── */
.pf-service {
  transition:
    border-color .3s ease,
    background .3s ease,
    transform .5s var(--spring),
    box-shadow .45s var(--expo-out);
}
.pf-service:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.45);
}

/* ─── Portfolio testimonial cards ─────────────────────────────────────── */
.pf-quote {
  transition:
    border-color .3s ease,
    background .3s ease,
    transform .5s var(--spring),
    box-shadow .45s var(--expo-out);
}
.pf-quote:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.38);
  border-color: rgba(255,255,255,0.14);
}

/* ─── Portfolio process steps ─────────────────────────────────────────── */
.pf-step {
  transition: background .3s ease, transform .5s var(--spring);
}
.pf-step:hover {
  transform: translateX(10px);
  background: rgba(255,255,255,0.02);
}

/* ─── Portfolio buttons ───────────────────────────────────────────────── */
.pf-btn {
  transition: background .2s ease, border-color .2s ease, transform .45s var(--spring);
}
.pf-btn:hover  { transform: translateY(-3px) scale(1.05); }
.pf-btn:active { transform: scale(0.94); transition-duration: 0.1s; }

/* ─── Bio link page — profile entrance ───────────────────────────────── */
@keyframes profileBounce {
  0%   { opacity: 0; transform: scale(0.45) translateY(30px); }
  55%  { transform: scale(1.12) translateY(-10px); }
  75%  { transform: scale(0.96) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.profile { animation: profileBounce 0.95s var(--spring) 0.05s both; }

/* ─── Bio link page — social icons stagger ────────────────────────────── */
@keyframes socialPop {
  from { opacity: 0; transform: translateY(12px) scale(0.65); }
  to   { opacity: 1; transform: none; }
}
.social {
  animation: socialPop 0.55s var(--spring) both;
  transition:
    color .25s ease,
    background .25s ease,
    border-color .25s ease,
    transform .45s var(--spring);
}
.social:hover  { transform: translateY(-6px) scale(1.22); }
.social:active { transform: scale(0.84); transition-duration: 0.1s; }

/* ─── Bio link page — link cards ─────────────────────────────────────── */
@keyframes linkSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.link {
  animation: linkSlideUp 0.7s var(--spring) both;
  transition:
    transform .5s var(--spring),
    border-color .35s ease,
    background .35s ease,
    box-shadow .5s var(--expo-out);
}
.link:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.link:active {
  transform: scale(0.985);
  transition-duration: 0.1s;
}

/* ─── Tech stack badges (enlaces page) ───────────────────────────────── */
.tech-stack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.tech-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  cursor: default;
  animation: socialPop 0.55s var(--spring) both;
  transition:
    transform .45s var(--spring),
    background .3s ease,
    border-color .3s ease,
    box-shadow .4s var(--expo-out);
}
.tech-badge:hover {
  transform: translateY(-5px) scale(1.1);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}
.tech-badge img {
  width: 32px;
  height: 32px;
  display: block;
}
.tech-badge-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

/* ─── Link icon (platform icon on left of link card) ─────────────────── */
.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.link:hover .link-icon {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.16);
  color: var(--accent);
}

/* ─── Bio link page — subscribe & footer ─────────────────────────────── */
.subscribe-btn {
  transition: background .25s ease, border-color .25s ease, transform .4s var(--spring);
}
.subscribe-btn:hover  { transform: translateY(-2px) scale(1.05); }
.subscribe-btn:active { transform: scale(0.95); transition-duration: 0.1s; }

.subscribe-input {
  transition: border-color .25s ease, background .25s ease, transform .4s var(--spring);
}
.subscribe-input:focus { transform: scale(1.01); }
