/* style.css - unified hover + glow */

/* root colors */
:root {
  --bg-card-dark: rgba(255, 255, 255, 0.05);
  --bg-card-light: #f9fafb;
  --text-primary-dark: #e2e8f0;
  --text-primary-light: #1e293b;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.04);
}


/* global font */
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
}

/* ====== Universal Card Styling ====== */
.card,
.project-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  transition: all 0.35s ease;
  overflow: hidden;
}

/* Hover state same for all cards */
.card:hover,
.project-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

/* Glow background */
.card::before,
.project-card::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -40%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.35), transparent 70%);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.6s ease;
  z-index: -1;
}

.card:hover::before,
.project-card:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* skills section spans */
#skills span {
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  transition: all 0.25s ease;
  cursor: default;
  display: inline-block;
  z-index: 1;
}

#skills span:hover {
  background: rgba(99, 102, 241, 0.25);
  transform: scale(1.05);
  border-color: rgba(99, 102, 241, 0.5);
}

/* Glow halo for skills */
#skills span::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
  opacity: 0;
  border-radius: inherit;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.5s ease;
  z-index: -1;
}

#skills span:hover::before {
  opacity: 1;
  transform: scale(1.1);
}

#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: rgba(99, 102, 241, .8);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease, transform .2s ease;
  z-index: 9999;
  /* bump for safety */
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  background-color: rgba(99, 102, 241, 1);
  transform: translateY(-2px);
}


/* floating animations */
@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes slowFloat {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }

  100% {
    transform: translateY(0px);
  }
}

.animate-slowSpin {
  animation: slowSpin 28s linear infinite;
}

.animate-slowFloat {
  animation: slowFloat 6s ease-in-out infinite;
  filter: blur(10px);
}

/* smooth image transforms */
img,
video {
  will-change: transform, opacity;
}

/* nav active */
.nav-link.active {
  color: #a78bfa;
  font-weight: 600;
}

/* typed cursor */
.typed-cursor {
  color: #60a5fa;
}

/* modal media */
#modalMedia video,
#modalMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* responsive tweaks */
@media (max-width: 768px) {

  .animate-slowSpin,
  .animate-slowFloat {
    display: none;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.4), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.4), transparent 60%);
  background-size: 200% 200%;
  animation: aurora 12s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes aurora {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}