/* =============================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================================================= */

:root {
  /* Core palette */
  --bg-main: #0e1117;
  --bg-card: #1a1f27;
  --accent-primary: #3ab7ff;
  --accent-secondary: #13dea5;
  --text-strong: #ffffff;
  --text-body: #c9d1d9;
  --border-muted: #30363d;

  /* 2025 Palette Enhancements */
  --accent-tertiary: #A78BFA;
  /* Soft violet - adds sophistication */
  --accent-warm: #E9B872;
  /* Warm amber - human touch, success states */
  --accent-warm-rose: #E8B4B8;
  /* Muted rose - alternative warm accent */
  --metallic-silver: #C0C0C0;
  /* Metallic touch for tech elements */
  --metallic-highlight: #E8E8E8;
  /* Metallic highlight */

  /* Derived colors with opacity for layering */
  --violet-glow: rgba(167, 139, 250, 0.15);
  --warm-glow: rgba(233, 184, 114, 0.15);

  /* Scroll progress tracking */
  --scroll-progress: 0;
}

/* =============================================================================
   2025 VISUAL ENHANCEMENTS
   ============================================================================= */

/* 1. Gradient Animated Text - Hero Headlines */
.gradient-text {
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-tertiary),
      var(--accent-secondary),
      var(--accent-primary));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {

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

  50% {
    background-position: 100% 50%;
  }
}

/* 2. Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary), var(--accent-secondary));
  z-index: 9999;
  transform-origin: left;
  transform: scaleX(var(--scroll-progress, 0));
  transition: transform 50ms linear;
  pointer-events: none;
}

/* 3. Floating Background Orbs */
.floating-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  will-change: transform;
  animation-play-state: running;
  transform: translate(0, 0) scale(1);
}

.floating-orb--primary {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: 10%;
  left: 5%;
  animation: floatOrb1 12s ease-in-out infinite;
}

.floating-orb--secondary {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  top: 60%;
  right: 10%;
  animation: floatOrb2 10s ease-in-out infinite;
}

.floating-orb--tertiary {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
  bottom: 20%;
  left: 30%;
  animation: floatOrb3 8s ease-in-out infinite;
}

@keyframes floatOrb1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(80px, -50px) scale(1.15);
  }

  50% {
    transform: translate(-50px, 60px) scale(0.85);
  }

  75% {
    transform: translate(60px, 30px) scale(1.1);
  }
}

@keyframes floatOrb2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-60px, 50px) scale(1.15);
  }

  66% {
    transform: translate(50px, -60px) scale(0.9);
  }
}

@keyframes floatOrb3 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(100px, -80px) scale(1.2);
  }
}

/* 4. CTA Button Glow Pulse */
.beam-btn-pulse {
  animation: cta-pulse 2.5s ease-in-out infinite;
}

@keyframes cta-pulse {

  0%,
  100% {
    box-shadow: 0 4px 15px rgba(58, 183, 255, 0.3),
      0 0 0 0 rgba(58, 183, 255, 0.4);
  }

  50% {
    box-shadow: 0 6px 25px rgba(58, 183, 255, 0.5),
      0 0 20px 5px rgba(58, 183, 255, 0.2);
  }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Screen reader only utility - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

/* =============================================================================
   BASE STYLES
   ============================================================================= */

body {
  color: var(--text-body);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  /* 2025 Enhanced: Added violet glow for depth and sophistication */
  background:
    radial-gradient(circle at 20% 20%, rgba(58, 183, 255, 0.06), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(19, 222, 165, 0.08), transparent 28%),
    radial-gradient(circle at 60% 80%, rgba(167, 139, 250, 0.04), transparent 30%),
    var(--bg-main);
}

/* Smooth scroll offset for anchor links */
section[id] {
  scroll-margin-top: 90px;
}

/* =============================================================================
   CARD COMPONENTS
   ============================================================================= */

/* Glass card with elevated appearance */
.glass-card {
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Holographic glass card overlay */
.holo-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* Enhancement #6: 3D tilt effect */
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.holo-card::before,
.holo-card::after {
  content: '';
  position: absolute;
  inset: -40%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease-out, transform 200ms ease-out;
}

/* Soft glow base layer */
.holo-card::before {
  background: radial-gradient(circle at center,
      rgba(58, 183, 255, 0.18),
      transparent 55%);
  mix-blend-mode: screen;
}

/* Holographic conic gradient that follows cursor */
.holo-card::after {
  background: conic-gradient(from calc(var(--holo-angle, 0rad)),
      rgba(58, 183, 255, 0.04),
      rgba(19, 222, 165, 0.16),
      rgba(58, 183, 255, 0.28),
      rgba(255, 255, 255, 0.16),
      rgba(58, 183, 255, 0.04));
  mix-blend-mode: overlay;
  transform: translate3d(calc(var(--holo-x, 0) * 1px), calc(var(--holo-y, 0) * 1px), 0);
}

.holo-card.is-holo-active::before,
.holo-card.is-holo-active::after {
  opacity: 0.85;
}

/* Enhancement #6: 3D tilt on hover */
.holo-card.is-holo-active {
  transform:
    perspective(1000px) rotateX(calc(var(--holo-y, 0) * 0.5deg)) rotateY(calc(var(--holo-x, 0) * -0.5deg)) translateZ(4px);
}

/* Flashlight card effect: Creates a subtle radial gradient that follows cursor position */
.flashlight-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.flashlight-card::before {
  content: '';
  position: absolute;
  inset: -30% -30%;
  z-index: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgba(255, 255, 255, 0.12), transparent 35%);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.flashlight-card:hover::before,
.flashlight-card:focus-within::before {
  opacity: 1;
}

.flashlight-card>* {
  position: relative;
  z-index: 1;
}

/* Schematic card with corner brackets (HUD/Data file style) */
.schematic-card {
  position: relative;
}

.schematic-card::after {
  content: '';
  position: absolute;
  inset: 6px;
  z-index: 10;
  border: 1px solid transparent;
  background:
    linear-gradient(to right, var(--accent-primary) 2px, transparent 2px) 0 0,
    linear-gradient(to bottom, var(--accent-primary) 2px, transparent 2px) 0 0,
    linear-gradient(to left, var(--accent-primary) 2px, transparent 2px) 100% 0,
    linear-gradient(to bottom, var(--accent-primary) 2px, transparent 2px) 100% 0,
    linear-gradient(to right, var(--accent-primary) 2px, transparent 2px) 0 100%,
    linear-gradient(to top, var(--accent-primary) 2px, transparent 2px) 0 100%,
    linear-gradient(to left, var(--accent-primary) 2px, transparent 2px) 100% 100%,
    linear-gradient(to top, var(--accent-primary) 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 8px 8px;
  opacity: 0.3;
  transition: opacity 0.3s ease, background-size 0.3s ease;
  pointer-events: none;
}

.schematic-card:hover::after {
  background-size: 12px 12px;
  opacity: 1;
}

/* Featured card with 3D perspective */
.featured-card {
  perspective: 1200px;
}

.featured-card-inner {
  transform-style: preserve-3d;
  transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card-inner[data-state='enter'] {
  transform: rotateY(-12deg) translateX(-8px) scale(0.98);
}

.featured-card-inner[data-state='active'] {
  transform: rotateY(0deg) translateX(0) scale(1);
}

.featured-card-inner[data-state='exit'] {
  transform: rotateY(12deg) translateX(8px) scale(0.98);
  opacity: 0.85;
}

/* =============================================================================
   FEATURED SHADER CANVAS (WebGL)
   ============================================================================= */

/* Container for WebGL shader canvas */
#featured-shader-container {
  position: relative;
  overflow: hidden;
}

#featured-shader-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  z-index: 1;
}

/* Hide original images when shader is active */
#featured-shader-container img {
  position: relative;
  z-index: 0;
  transition: opacity 0.3s ease;
}

/* Fallback image styles */
#featured-fallback-image {
  transition: opacity 0.3s ease;
}

/* Instagram-style card (3:4 aspect ratio) */
.ig-card {
  aspect-ratio: 3 / 4;
}

/* Profile card with image and shine effect */
.profile-card {
  position: relative;
  isolation: isolate;
}

.shine-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: linear-gradient(105deg,
      transparent 20%,
      rgba(255, 255, 255, 0.05) 40%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.05) 60%,
      transparent 80%);
  animation: shine-slide 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform: translateX(-100%) skewX(-15deg);
  pointer-events: none;
}

.animate-ripple {
  animation: avatar-pulse 2s ease-in-out infinite;
}

.profile-stats-glass {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 17, 23, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* =============================================================================
   PARALLAX ABOUT CARD
   ============================================================================= */

[data-parallax-root] {
  position: relative;
  overflow: hidden;
}

.parallax-layer {
  will-change: transform;
}

.parallax-glow {
  position: absolute;
  inset: -20%;
  /* 2025 Enhanced: Added violet glow layer */
  background:
    radial-gradient(circle at 10% 0%, rgba(58, 183, 255, 0.24), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(19, 222, 165, 0.2), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.12), transparent 45%);
  opacity: 0.85;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

/* =============================================================================
   BUTTON COMPONENTS
   ============================================================================= */

/* Button with beam animation effect */
.beam-btn {
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.beam-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(58, 183, 255, 0.25);
}

.beam-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 200ms ease;
}

.beam-btn:hover::before,
.beam-btn:focus-visible::before {
  animation: beam 1.4s linear infinite;
  opacity: 1;
}

/* 2025 Enhancement: Violet secondary button variant */
.beam-btn--violet {
  background: var(--accent-tertiary);
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.2);
}

.beam-btn--violet:hover {
  box-shadow: 0 4px 16px rgba(167, 139, 250, 0.35);
}

/* 2025 Enhancement: Warm tertiary button variant */
.beam-btn--warm {
  background: var(--accent-warm);
  box-shadow: 0 2px 8px rgba(233, 184, 114, 0.2);
}

.beam-btn--warm:hover {
  box-shadow: 0 4px 16px rgba(233, 184, 114, 0.35);
}

/* 2025 Enhancement: Ghost button with violet border */
.btn-ghost-violet {
  background: transparent;
  border: 1px solid var(--accent-tertiary);
  color: var(--accent-tertiary);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  transition: background 200ms ease, box-shadow 200ms ease, color 200ms ease;
}

.btn-ghost-violet:hover {
  background: rgba(167, 139, 250, 0.1);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
}

/* =============================================================================
   PROJECT CARDS
   ============================================================================= */

/* Project card hover overlay */
.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */

/* Header with glassmorphism effect */
header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Nav link states */
.nav-link {
  position: relative;
  padding-bottom: 4px;
  color: var(--text-body);
  transition: color 300ms ease;
}

.nav-link:hover {
  color: var(--text-strong);
}

.nav-link.active {
  color: var(--text-strong);
}

/* Nav marker for sliding active state indicator */
.nav-marker {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 1px;
  height: 2px;
  background: var(--accent-primary);
  opacity: 0;
  transform-origin: 0 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  will-change: transform;
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

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

/* Animated grid background with perspective */
.hero-grid-bg {
  position: absolute;
  inset: -20%;
  z-index: 0;
  width: 140%;
  height: 140%;
  background-image:
    linear-gradient(to right, rgba(58, 183, 255, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(58, 183, 255, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  /* Animation handled by JS for smoother velocity control */
  /* animation: grid-flow var(--grid-speed, 3s) linear infinite; */
  /* transition: animation-duration 0.5s ease-out; */
  background-position: 0 0;
  transform: perspective(500px) rotateX(60deg);
  transform-style: preserve-3d;
  mask-image: linear-gradient(to bottom, transparent 10%, black 50%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 10%, black 50%, black 100%);
  pointer-events: none;
}

/* Data City: Active grid cells container */
.hero-data-cells {
  position: absolute;
  inset: -20%;
  z-index: 0;
  width: 140%;
  height: 140%;
  transform: perspective(500px) rotateX(60deg);
  transform-style: preserve-3d;
  pointer-events: none;
}

/* Individual data cell */
.data-cell {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--accent-secondary);
  box-shadow: 0 0 15px var(--accent-secondary);
  opacity: 0;
  animation: cell-pulse 2s ease-out forwards;
}

@keyframes cell-pulse {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  10% {
    opacity: 0.8;
    transform: scale(1);
  }

  80% {
    opacity: 0.8;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* =============================================================================
   SCROLL ANIMATIONS
   ============================================================================= */

/* Scroll-triggered fade-in animation */
[data-animate] {
  filter: blur(12px);
  opacity: 0.7;
  transform: translateY(28px);
  transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1),
    filter 700ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 700ms cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
}

[data-animate].is-visible {
  filter: blur(0);
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================================
   MARQUEE COMPONENTS
   ============================================================================= */

/* Marquee with alpha mask on edges */
.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  animation: marquee 22s linear infinite;
}

.testimonials-track {
  animation-duration: 28s;
}

/* Pause marquee on keyboard focus for accessibility */
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

/* =============================================================================
   CONTACT PIPELINE
   ============================================================================= */

.contact-pipeline {
  width: 100%;
  height: 120px;
  pointer-events: none;
}

.contact-pipeline-path {
  fill: none;
  stroke: url(#pipelineGradient);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 10;
  stroke-dashoffset: 0;
  opacity: 0.7;
  filter: drop-shadow(0 0 8px rgba(58, 183, 255, 0.45));
  transition: opacity 200ms ease;
}

.contact-pipeline-path.is-active {
  animation: pipeline-flow 2s linear infinite;
  opacity: 1;
}

.contact-pipeline-packet {
  fill: var(--accent-secondary);
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(19, 222, 165, 0.9));
  transition: opacity 200ms ease;
}

.contact-pipeline-packet.is-visible {
  opacity: 1;
}

/* Enhancement #10: Pipeline branches */
.pipeline-branch {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 4 6;
  opacity: 0;
  transition: opacity 300ms ease;
}

.contact-pipeline-path.is-active~.pipeline-branch {
  opacity: 0.6;
  animation: pipeline-flow 2s linear infinite;
}

/* =============================================================================
   TECH PILLS (MAGNETIC EFFECT)
   ============================================================================= */

/* Magnetic tech pills with floating animation */
.tech-pill {
  position: relative;
  display: inline-block;
  background: var(--bg-main);
  transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.tech-pill:hover,
.tech-pill:focus-visible {
  z-index: 10;
  border-color: var(--accent-primary);
  color: var(--text-strong);
}

.tech-pill:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Floating animations (paused when magnetized) */
.tech-pill:nth-child(odd) {
  animation: float-1 3s ease-in-out infinite;
}

.tech-pill:nth-child(even) {
  animation: float-2 4s ease-in-out infinite;
}

.tech-pill.is-magnetic {
  animation: none;
}

/* =============================================================================
   PUBLICATION SPOTLIGHT COMPONENT
   ============================================================================= */

/* Main container with relative positioning for spotlight overlay */
.pub-spotlight {
  position: relative;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-muted);
  overflow: hidden;
}

/* Spotlight Glow Overlay - radial gradient beam from top */
.pub-spotlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 120px;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, 
    rgba(58, 183, 255, 0.25) 0%, 
    rgba(167, 139, 250, 0.1) 40%,
    transparent 70%);
  pointer-events: none;
  animation: spotlight-pulse 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes spotlight-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleY(1); }
  50% { opacity: 1; transform: translateX(-50%) scaleY(1.1); }
}

/* Stage Container for stacked cards */
.pub-spotlight-stage {
  position: relative;
  min-height: 150px; /* Increased to accommodate 3-line titles + pills without jumping */
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Publication Card - hidden by default */
.pub-card {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  filter: blur(4px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  pointer-events: none;
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Active publication card - revealed with animation */
.pub-card[aria-hidden="false"] {
  position: relative;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  animation: pub-enter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pub-enter {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Exit animation class */
.pub-card.pub-exit {
  animation: pub-exit 0.4s ease forwards;
}

@keyframes pub-exit {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(0.98); }
}

/* Publication Title */
.pub-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* Topic Pills Container */
.pub-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Topic Pills with staggered entry animation */
.pub-topic-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  background: var(--bg-main);
  border: 1px solid var(--border-muted);
  color: var(--text-body);
  opacity: 0;
  transform: translateY(10px);
  animation: pill-pop 0.3s ease forwards;
}

/* Staggered animation delays for topic pills */
.pub-card[aria-hidden="false"] .pub-topic-pill:nth-child(1) { animation-delay: 0.3s; }
.pub-card[aria-hidden="false"] .pub-topic-pill:nth-child(2) { animation-delay: 0.4s; }
.pub-card[aria-hidden="false"] .pub-topic-pill:nth-child(3) { animation-delay: 0.5s; }

@keyframes pill-pop {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Dot Navigation Indicators */
.pub-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-muted);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.pub-dot:hover {
  transform: scale(1.3);
}

.pub-dot:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.pub-dot--active {
  background: var(--accent-primary);
  box-shadow: 0 0 8px rgba(58, 183, 255, 0.5);
}

/* Google Scholar Link */
.pub-scholar-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pub-scholar-link:hover {
  color: var(--text-strong);
}

/* Pause animation on hover/focus for accessibility */
.pub-spotlight:hover .pub-spotlight::before,
.pub-spotlight:focus-within .pub-spotlight::before {
  animation-play-state: paused;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .pub-spotlight::before {
    animation: none;
    opacity: 0.8;
  }
  
  .pub-card {
    transition: opacity 0.2s ease;
    filter: none !important;
    transform: none !important;
  }
  
  .pub-card[aria-hidden="false"] {
    animation: none;
  }
  
  .pub-topic-pill {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  @keyframes pub-enter {
    0%, 100% { opacity: 1; transform: none; }
  }
}

/* =============================================================================
   FOCUS STATES & ACCESSIBILITY
   ============================================================================= */

.beam-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.glass-card:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* =============================================================================
   KEYFRAME ANIMATIONS
   ============================================================================= */

/* Beam animation for buttons */
@keyframes beam {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Marquee scrolling animation */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Pipeline dash offset animation */
@keyframes pipeline-flow {
  0% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -160;
  }
}

/* Grid flow animation */
@keyframes grid-flow {
  0% {
    background-position: 0 0;
  }

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

/* Shine slide animation */
@keyframes shine-slide {
  0% {
    transform: translateX(-100%) skewX(-15deg);
  }

  20%,
  100% {
    transform: translateX(200%) skewX(-15deg);
  }
}

/* Avatar pulse animation */
@keyframes avatar-pulse {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.15);
  }
}

/* Floating animations for tech pills */
@keyframes float-1 {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes float-2 {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(2px);
  }
}

/* =============================================================================
   STATS COUNTER ANIMATIONS
   ============================================================================= */

/* Base state for stat counters - hidden until triggered */
.stat-counter {
  opacity: 0;
  transform: scale(0.5);
}

/* Animated state - triggered by JS */
.stat-counter.is-counting {
  animation: statBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.stat-number {
  transition: filter 0.3s ease;
}

/* Glow pulse on completion */
.stat-number.is-complete {
  animation: statGlowPulse 0.8s ease-out;
}

/* Scale bounce entry animation */
@keyframes statBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  60% {
    opacity: 1;
    transform: scale(1.15);
  }

  80% {
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Glow pulse on count completion */
@keyframes statGlowPulse {
  0% {
    filter: drop-shadow(0 0 0 transparent);
  }

  50% {
    filter: drop-shadow(0 0 12px currentColor);
  }

  100% {
    filter: drop-shadow(0 0 0 transparent);
  }
}


/* =============================================================================
   MEDIA QUERIES
   ============================================================================= */

/* Reduced motion preferences for accessibility */
/* --- Case Study Cards (ArtGuard) - Enhanced Animations --- */
.case-study-card {
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-muted);
  transition:
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    border-color 0.3s ease,
    background-size 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

/* Gradient overlay with transition */
.case-study-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 17, 23, 0.95) 0%, rgba(14, 17, 23, 0.6) 50%, rgba(14, 17, 23, 0.2) 100%);
  z-index: 1;
  transition: opacity 0.4s ease;
}

/* Shine effect overlay - COMBINED with expand icon below */

/* Hover state - lift, glow, and shine */
.case-study-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px -10px rgba(58, 183, 255, 0.4),
    0 0 30px rgba(58, 183, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
}

.case-study-card:hover::before {
  opacity: 0.7;
}

.case-study-card:hover::after {
  transform: translateX(100%) skewX(-15deg);
}

/* Background zoom on hover */
.case-study-card:hover {
  background-size: 110%;
}

/* Content container */
.case-study-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  transform: translateZ(20px);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.case-study-card:hover .case-study-content {
  transform: translateZ(30px) translateY(-4px);
}

.case-study-content--cta {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Badge with pulse animation */
.case-study-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-strong);
  margin-bottom: 0.5rem;
  width: fit-content;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
  position: relative;
}

.case-study-card:hover .case-study-badge {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Badge variants with glow */
.case-study-badge--warning {
  background: rgba(255, 170, 0, 0.15);
  border-color: rgba(255, 170, 0, 0.3);
  color: #ffaa00;
}

.case-study-card:hover .case-study-badge--warning {
  background: rgba(255, 170, 0, 0.25);
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.4);
}

.case-study-badge--success {
  background: rgba(19, 222, 165, 0.15);
  border-color: rgba(19, 222, 165, 0.3);
  color: var(--accent-secondary);
}

.case-study-card:hover .case-study-badge--success {
  background: rgba(19, 222, 165, 0.25);
  box-shadow: 0 0 20px rgba(19, 222, 165, 0.4);
}

/* 2025 Enhancement: Violet accent badge for AI/innovation elements */
.case-study-badge--ai {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--accent-tertiary);
}

.case-study-card:hover .case-study-badge--ai {
  background: rgba(167, 139, 250, 0.25);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.4);
}

/* 2025 Enhancement: Warm accent badge for achievements/human elements */
.case-study-badge--warm {
  background: rgba(233, 184, 114, 0.15);
  border-color: rgba(233, 184, 114, 0.3);
  color: var(--accent-warm);
}

.case-study-card:hover .case-study-badge--warm {
  background: rgba(233, 184, 114, 0.25);
  box-shadow: 0 0 20px rgba(233, 184, 114, 0.4);
}

/* Staggered entrance animation for case study cards */
.case-study-card:nth-child(1) {
  animation-delay: 0ms;
}

.case-study-card:nth-child(2) {
  animation-delay: 80ms;
}

.case-study-card:nth-child(3) {
  animation-delay: 160ms;
}

.case-study-card:nth-child(4) {
  animation-delay: 240ms;
}

.case-study-card:nth-child(5) {
  animation-delay: 320ms;
}

.case-study-card:nth-child(6) {
  animation-delay: 400ms;
}

.case-study-card:nth-child(7) {
  animation-delay: 480ms;
}

.case-study-card:nth-child(8) {
  animation-delay: 560ms;
}

/* Text elements fade in on hover */
.case-study-content>* {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.case-study-card:hover .case-study-content>* {
  opacity: 1;
  transform: translateY(0);
}

/* Background image zoom effect */


.case-study-card:hover {
  background-size: 110%;
}

/* Glow ring effect on hover */
.case-study-card {
  position: relative;
}

.case-study-card::before {
  transition: opacity 0.4s ease, box-shadow 0.4s ease;
}

.case-study-card:hover::before {
  box-shadow: inset 0 0 60px rgba(58, 183, 255, 0.15);
}

/* Add subtle border glow */
@keyframes border-glow {

  0%,
  100% {
    border-color: var(--border-muted);
  }

  50% {
    border-color: var(--accent-primary);
  }
}

.case-study-card:hover {
  animation: border-glow 2s ease-in-out infinite;
}

/* Shine sweep effect - uses ::after pseudo-element */
.case-study-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg,
      transparent 30%,
      rgba(255, 255, 255, 0.05) 45%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.05) 55%,
      transparent 70%);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.case-study-card:hover::after {
  transform: translateX(100%) skewX(-15deg);
}

/* Click indicator - uses a child element instead of ::after */
.case-study-card {
  position: relative;
}



/* Expand icon indicator - added via JavaScript as separate element */
.case-study-expand-icon {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(58, 183, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--bg-main);
  font-weight: bold;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(58, 183, 255, 0.4);
}

.case-study-card:hover .case-study-expand-icon {
  opacity: 1;
  transform: scale(1);
}

/* Improve focus states for accessibility */
.case-study-card:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  transform: translateY(-8px) scale(1.02);
}

/* Add loading skeleton animation for images */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.case-study-card[data-loading="true"]::before {
  background: linear-gradient(90deg,
      rgba(14, 17, 23, 0.95) 0%,
      rgba(58, 183, 255, 0.1) 50%,
      rgba(14, 17, 23, 0.95) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .marquee-track {
    animation: none;
  }

  .featured-card-inner {
    transition: none;
  }

  .hero-grid-bg {
    animation: none;
  }

  [data-animate] {
    filter: none;
    opacity: 1;
    transform: none;
  }

  .flashlight-card::before {
    display: none;
  }

  .nav-marker {
    transition: none !important;
  }

  .beam-btn::before {
    animation: none !important;
    opacity: 0 !important;
  }

  .tech-pill {
    animation: none !important;
  }

  .contact-pipeline-path.is-active {
    animation: none;
  }

  .contact-pipeline-packet {
    opacity: 0 !important;
  }

  .holo-card::before,
  .holo-card::after {
    opacity: 0.35;
  }

  [data-parallax-root] .parallax-layer {
    transform: none !important;
  }

  /* Disable infinite animation on hover */
  .case-study-card:hover {
    animation: none;
  }

  /* 2025 Enhancements - Reduced motion support */
  .gradient-text {
    animation: none;
    background: var(--accent-primary);
    -webkit-background-clip: text;
    background-clip: text;
  }

  .floating-orb {
    animation: none;
    opacity: 0.2;
  }

  .beam-btn-pulse {
    animation: none;
  }

  .scroll-progress {
    display: none;
  }
}

/* =============================================================================
   2025 PALETTE UTILITY CLASSES
   ============================================================================= */

/* Text colors */
.text-violet {
  color: var(--accent-tertiary);
}

.text-warm {
  color: var(--accent-warm);
}

.text-warm-rose {
  color: var(--accent-warm-rose);
}

.text-metallic {
  color: var(--metallic-silver);
}

/* Background colors */
.bg-violet {
  background-color: var(--accent-tertiary);
}

.bg-warm {
  background-color: var(--accent-warm);
}

.bg-violet-subtle {
  background-color: var(--violet-glow);
}

.bg-warm-subtle {
  background-color: var(--warm-glow);
}

/* Border colors */
.border-violet {
  border-color: var(--accent-tertiary);
}

.border-warm {
  border-color: var(--accent-warm);
}

/* Gradient utilities */
.gradient-violet-blue {
  background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-primary));
}

.gradient-warm-violet {
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-tertiary));
}

.gradient-metallic {
  background: linear-gradient(180deg, var(--metallic-highlight), var(--metallic-silver));
}

/* Glow effects */
.glow-violet {
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.glow-warm {
  box-shadow: 0 0 20px rgba(233, 184, 114, 0.3);
}

/* 2025 Accent hover effects */
.hover-glow-violet:hover {
  box-shadow: 0 0 25px rgba(167, 139, 250, 0.4);
  border-color: var(--accent-tertiary);
}

.hover-glow-warm:hover {
  box-shadow: 0 0 25px rgba(233, 184, 114, 0.4);
  border-color: var(--accent-warm);
}

/* Metallic text effect for tech elements */
.text-metallic-shimmer {
  background: linear-gradient(90deg, var(--metallic-silver), var(--metallic-highlight), var(--metallic-silver));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: metallic-shimmer 3s linear infinite;
}

@keyframes metallic-shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Achievement/Success highlight with warm glow */
.achievement-highlight {
  position: relative;
}

.achievement-highlight::after {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, rgba(233, 184, 114, 0.2), rgba(167, 139, 250, 0.2));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.achievement-highlight:hover::after {
  opacity: 1;
}