/* ═══════════════════════════════════════════════
   ANIMATIONS & KEYFRAMES
   ═══════════════════════════════════════════════ */

/* ─── PROFILE PHOTO ─── */
@keyframes photo-entrance {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bracket-glow {
  0%, 100% { opacity: 0.4; filter: drop-shadow(0 0 2px rgba(76, 158, 235, 0)); }
  50%       { opacity: 1;   filter: drop-shadow(0 0 6px rgba(76, 158, 235, 0.7)); }
}

.hero__photo-wrap {
  animation: photo-entrance 600ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
  transition: transform 300ms ease;
}

.hero__photo-wrap:hover {
  transform: translateY(-5px);
}

.hero__photo-bracket {
  animation: bracket-glow 2.5s ease-in-out infinite;
}

.hero__photo-bracket--tr { animation-delay: 0.6s; }
.hero__photo-bracket--bl { animation-delay: 1.2s; }
.hero__photo-bracket--br { animation-delay: 1.8s; }

/* ─── TYPEWRITER CURSOR ─── */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero__cursor {
  display: inline-block;
  width: 2px;
  height: 1.4em;
  background: var(--color-accent-blue);
  border-radius: 1px;
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink-cursor 1s step-end infinite;
  box-shadow: 0 0 8px var(--color-accent-blue);
}

/* ─── HERO GRID PULSE ─── */
@keyframes grid-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.85; }
}

.hero__bg-grid {
  animation: grid-pulse 8s ease-in-out infinite;
}

/* ─── FLOATING ORBS ─── */
@keyframes orb-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -25px) scale(1.08); }
  66%  { transform: translate(-20px, 15px) scale(0.94); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes orb-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  40%  { transform: translate(-35px, 20px) scale(1.06); }
  70%  { transform: translate(15px, -30px) scale(0.96); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero__orb--1 { animation: orb-drift-1 18s ease-in-out infinite; }
.hero__orb--2 { animation: orb-drift-2 22s ease-in-out infinite; }

/* ─── HERO NAME ENTRANCE ─── */
@keyframes hero-name-in {
  from {
    opacity: 0;
    transform: translateY(30px);
    letter-spacing: -0.06em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -0.03em;
  }
}

.hero__name {
  animation: hero-name-in 900ms cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
}

/* ─── HERO CONTENT STAGGER ─── */
@keyframes fade-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__greeting  { animation: fade-slide-up 600ms cubic-bezier(0.22, 1, 0.36, 1) 100ms both; }
.hero__typewriter-wrap { animation: fade-slide-up 600ms cubic-bezier(0.22, 1, 0.36, 1) 650ms both; }
.hero__location  { animation: fade-slide-up 600ms cubic-bezier(0.22, 1, 0.36, 1) 750ms both; }
.hero__ctas      { animation: fade-slide-up 600ms cubic-bezier(0.22, 1, 0.36, 1) 850ms both; }
.hero__nav-hint  { animation: fade-slide-up 600ms ease 1400ms both; }

/* ─── STAGGER ENTRANCE (re-triggered per section visit) ─── */
@keyframes animate-in-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: animate-in-up 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── HIGHLIGHT CARD SHIMMER ─── */
@keyframes shimmer-sweep {
  0%   { background-position: -300% 0; }
  100% { background-position:  300% 0; }
}

.highlight-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(76, 158, 235, 0.07) 50%,
    transparent 100%
  );
  background-size: 300% 100%;
  animation: shimmer-sweep 4s ease-in-out infinite;
  pointer-events: none;
}

/* ─── SECTION COUNTER FADE-IN ─── */
@keyframes counter-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-counter {
  animation: counter-in 600ms ease 1s both;
}

/* ─── NAV HINT PULSE ─── */
@keyframes nav-hint-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.hero__nav-hint-text {
  animation: nav-hint-pulse 3s ease-in-out 2s infinite;
}

/* ─── CERT CARD GLOW ON HOVER ─── */
.cert-card[data-color="blue"]:hover  { box-shadow: var(--shadow-card), 0 0 30px rgba(76,158,235,0.16); }
.cert-card[data-color="mint"]:hover  { box-shadow: var(--shadow-card), 0 0 30px rgba(100,216,163,0.14); }
.cert-card[data-color="amber"]:hover { box-shadow: var(--shadow-card), 0 0 30px rgba(240,180,41,0.14); }

/* ─── SIDEBAR BRAND GLOW PULSE ─── */
@keyframes monogram-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(76, 158, 235, 0.25); }
  50%       { box-shadow: 0 0 32px rgba(76, 158, 235, 0.45), 0 0 60px rgba(100, 216, 163, 0.12); }
}

.sidebar__monogram {
  animation: monogram-glow 4s ease-in-out infinite;
}

/* ─── PAGE LOAD REVEAL ─── */
@keyframes app-reveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.app--ready .sidebar {
  animation: app-reveal 500ms ease both;
}

body.app--ready .progress-bar {
  animation: app-reveal 500ms ease 200ms both;
}

/* ─── CONTACT LINK ICON NUDGE ─── */
.contact-link svg {
  transition: transform var(--transition-base);
}

.contact-link:hover svg {
  transform: scale(1.15);
}

/* ─── PROJECT STATUS BADGE PULSE ─── */
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(100, 216, 163, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(100, 216, 163, 0); }
}

.project-card__status--production {
  animation: status-pulse 3s ease-in-out infinite;
}
