/* Futuristic accents — works with gradients.css + animations.css */

/* Moving grid overlay on background */
.bg-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(44, 82, 130, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 82, 130, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridDrift 35s linear infinite;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, black 15%, transparent 78%);
  pointer-events: none;
}

@keyframes gridDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 40px;
  }
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero > .container {
  position: relative;
  max-width: min(900px, 92vw);
}

/* Hero particle canvas */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

.hero__card {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero__card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(44, 82, 130, 0.35),
    rgba(255, 255, 255, 0.1),
    rgba(44, 82, 130, 0.2)
  );
  background-size: 200% 200%;
  animation: borderGlow 8s ease infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes borderGlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Eyebrow pulse dot */
.hero__eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 0 rgba(44, 82, 130, 0.5);
  animation: eyebrowPulse 2s ease infinite;
}

@keyframes eyebrowPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(44, 82, 130, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(44, 82, 130, 0);
  }
}

/* Hero staggered entrance */
.hero__content > .hero__eyebrow,
.hero__content > .hero__title,
.hero__content > .hero__role,
.hero__content > .hero__tagline,
.hero__content > .hero__actions,
.hero__content > .hero__social,
.hero__photo-wrap {
  opacity: 0;
  transform: translateY(24px);
}

.hero.is-loaded .hero__eyebrow {
  animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.05s;
}

.hero.is-loaded .hero__title {
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
}

.hero.is-loaded .hero__role {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.4s;
}

.hero.is-loaded .hero__tagline {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.55s;
}

.hero.is-loaded .hero__actions {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.7s;
}

.hero.is-loaded .hero__social {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.85s;
}

.hero.is-loaded .hero__photo-wrap {
  animation: heroPhotoIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.25s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPhotoIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero__photo-wrap {
  transform: translateY(20px) scale(0.94);
}

.hero.is-loaded .hero__photo-wrap .hero__photo {
  animation: photoFloat 6s ease-in-out infinite;
  animation-delay: 1.2s;
}

@keyframes photoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Animated ring behind profile */
.hero__photo-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(44, 82, 130, 0.5),
    rgba(100, 130, 160, 0.2),
    rgba(44, 82, 130, 0.15),
    rgba(44, 82, 130, 0.5)
  );
  animation: ringRotate 10s linear infinite;
  z-index: 0;
}

.hero__photo-ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: rgba(248, 249, 250, 0.95);
}

@keyframes ringRotate {
  to {
    transform: rotate(360deg);
  }
}

/* Title gradient shimmer */
.hero__title-text {
  background: linear-gradient(
    120deg,
    var(--color-text) 0%,
    var(--color-primary) 40%,
    var(--color-text) 80%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 6s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.hero__title {
  text-shadow: none;
  filter: drop-shadow(0 4px 12px rgba(44, 82, 130, 0.12));
}

.hero__card {
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(44, 82, 130, 0.1),
    0 8px 60px rgba(44, 82, 130, 0.1);
}

.hero__role {
  min-height: 1.5em;
}

.hero__role::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--color-primary);
  animation: roleCaret 0.9s step-end infinite;
}

.hero__role.is-typing-done::after {
  animation: roleCaret 1.2s step-end infinite;
}

@keyframes roleCaret {
  50% {
    opacity: 0;
  }
}

/* Scroll hint */
.hero__scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2rem;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  animation: scrollHintIn 0.8s ease forwards;
  animation-delay: 1.1s;
  transition: color var(--transition);
}

.hero__scroll-hint:hover {
  color: var(--color-primary);
}

.hero__scroll-icon {
  width: 22px;
  height: 34px;
  border: 2px solid currentColor;
  border-radius: 12px;
  position: relative;
  opacity: 0.7;
}

.hero__scroll-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  background: currentColor;
  border-radius: 50%;
  animation: scrollWheel 1.8s ease infinite;
}

@keyframes scrollHintIn {
  to {
    opacity: 1;
  }
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* Section title shimmer (one-time when revealed) */
.section__title {
  background: linear-gradient(
    90deg,
    var(--color-text) 0%,
    var(--color-primary) 45%,
    var(--color-text) 90%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section__header.is-visible .section__title {
  animation: titleShimmer 2.4s cubic-bezier(0.22, 1, 0.36, 1) 1;
}

@keyframes titleShimmer {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* Staggered scroll reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Nav scroll state */
.site-header.is-scrolled {
  background: rgba(248, 249, 250, 0.97);
  box-shadow: 0 4px 24px rgba(26, 26, 46, 0.06);
  border-bottom-color: rgba(44, 82, 130, 0.12);
}

/* Nav active underline */
.nav__link[href^="#"] {
  position: relative;
}

.nav__link[href^="#"]::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.35rem;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), rgba(44, 82, 130, 0.4));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 1px;
}

.nav__link[href^="#"].is-active::after,
.nav__link[href^="#"]:hover::after {
  transform: scaleX(1);
}

/* Buttons — subtle shine */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.5s ease;
}

.btn--primary:hover::after {
  left: 120%;
}

/* Social links stagger hover */
.hero.is-loaded .social-link {
  transition: transform 0.3s ease, color 0.25s ease, box-shadow 0.3s ease;
}

.hero.is-loaded .social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(44, 82, 130, 0.15);
}

/* Achievement cards */
.achievement-card {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow:
    var(--shadow-lg),
    0 0 24px rgba(44, 82, 130, 0.1);
  border-color: rgba(44, 82, 130, 0.2);
}

.achievement-card.is-visible .achievement-card__icon {
  animation: iconPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.achievement-card.reveal-delay-1.is-visible .achievement-card__icon {
  animation-delay: 0.15s;
}

.achievement-card.reveal-delay-2.is-visible .achievement-card__icon {
  animation-delay: 0.25s;
}

.achievement-card.reveal-delay-3.is-visible .achievement-card__icon {
  animation-delay: 0.35s;
}

@keyframes iconPop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Project card futuristic hover */
.project-card {
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease,
    border-color 0.35s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow:
    var(--shadow-xl),
    0 0 40px rgba(44, 82, 130, 0.2),
    0 0 0 1px rgba(44, 82, 130, 0.14);
}

/* Skill chip pulse on first view */
.chip.is-pulsed {
  animation: chipPulse 0.65s ease;
}

@keyframes chipPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(44, 82, 130, 0.4);
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-gradient::after {
    animation: none;
  }

  .hero__card::before,
  .hero__photo-ring,
  .hero__title-text,
  .hero__eyebrow-dot {
    animation: none;
  }

  .hero__content > *,
  .hero__photo-wrap {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .hero__photo-wrap .hero__photo {
    animation: none;
  }

  .hero__role::after {
    display: none;
  }

  .hero__scroll-hint {
    opacity: 1;
    animation: none;
  }

  .hero__scroll-icon::after {
    animation: none;
  }

  .section__title,
  .hero__title-text {
    -webkit-text-fill-color: var(--color-text);
    background: none;
    animation: none;
  }

  .nav__link[href^="#"]::after {
    transition: none;
  }

  .chip.is-pulsed {
    animation: none;
  }

  .btn--primary::after {
    display: none;
  }
}
