/* ===== AMBIENT GRADIENT BACKGROUND ===== */

/* Subtle animated gradient background that shifts over time */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(139, 92, 241, 0.08), transparent 40%),
    radial-gradient(ellipse at 80% 80%, rgba(69, 198, 255, 0.06), transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 107, 107, 0.04), transparent 50%);
  background-size: 200% 200%;
  animation: drift 25s ease-in-out infinite alternate;
}

@keyframes drift {
  0% { background-position: 0% 0%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* Add subtle grain for texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Glitch accent color scheme improvements */
.accent {
  /* Dynamic accent that responds to time of day */
  color: 
    hsl(var(--glitch-hue), 100%, 65%);
  filter: drop-shadow(0 0 4px hsla(var(--glitch-hue), 100%, 70%, 0.5));
}

.accent::selection {
  background: hsl(var(--glitch-hue), 95%, 50%);
  color: hsl(var(--glitch-hue), 100%, 50%);
}

/* Hierarchy: Make headings more distinct */
h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-bottom: 0.75em;
}

/* Heading underline grows on hover (uses ::after so it doesn't conflict with the scroll-reveal accent bar in style.css) */
h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    hsl(280, 100%, 65%), 
    hsl(180, 100%, 75%), 
    hsl(0, 100%, 65%));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

h2:hover::after {
  width: 8em;
}

/* Card borders get a subtle glow */
.about-card,
.mood-card,
.wisdom-card {
  border-left: 3px solid hsl(var(--glitch-hue), 90%, 70%);
  transition: border-left-color 0.4s ease, box-shadow 0.4s ease;
}

.about-card:hover,
.mood-card:hover,
.wisdom-card:hover {
  border-left-color: hsl(var(--glitch-hue), 100%, 60%);
  box-shadow: 0 8px 32px hsla(var(--glitch-hue), 80%, 50%, 0.15);
}

/* Terminal gets a new subtle gradient border */
.terminal {
  position: relative;
  border: 1px solid hsla(var(--glitch-hue), 60%, 50%, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 241, 0.05) 0%,
    rgba(69, 198, 255, 0.03) 50%,
    rgba(255, 107, 107, 0.04) 100%
  );
}

/* Particle spawn points get better glow */
.spark {
  box-shadow: 0 0 12px currentColor, 0 0 24px currentColor;
}

/* Wisdom card gets a new gradient border */
.wisdom-card {
  border-radius: 16px;
  border: 1px solid hsla(var(--glitch-hue), 70%, 60%, 0.2);
  background: linear-gradient(
    180deg,
    rgba(139, 92, 241, 0.05),
    rgba(69, 198, 255, 0.04)
  );
  transition: border-color 0.5s ease, transform 0.3s ease;
}

.wisdom-card:hover {
  border-color: hsl(var(--glitch-hue), 95%, 65%);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px hsla(var(--glitch-hue), 80%, 50%, 0.15);
}

/* Typewriter cursor gets a glow */
.cursor,
.cursor-blink {
  box-shadow: 0 0 8px hsl(var(--glitch-hue), 100%, 70%);
}

/* Footer gets a subtle new treatment */
footer {
  border-top: 1px solid hsla(var(--glitch-hue), 60%, 60%, 0.2);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(139, 92, 241, 0.05) 50%,
    transparent 100%
  );
}

footer p {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

footer:hover p {
  opacity: 1;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  h2::after {
    height: 1.5px;
  }
  
  h2:hover::after {
    width: 4em;
  }
}
