/* =========================================
   1. AURORA MESH & DOT GRID BACKGROUND
========================================= */
.bg-dot-grid {
    background-size: 28px 28px;
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.16) 1px, transparent 1px);
  }
  html.dark .bg-dot-grid {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.065) 1px, transparent 1px);
  }
  
  @keyframes aurora-float-1 {
    0%, 100% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-25px, 25px) scale(0.95); }
  }
  @keyframes aurora-float-2 {
    0%, 100% { transform: translate(0px, 0px) scale(1); }
    50% { transform: translate(-45px, 35px) scale(1.1); }
  }
  .animate-aurora-1 { animation: aurora-float-1 18s ease-in-out infinite; }
  .animate-aurora-2 { animation: aurora-float-2 22s ease-in-out infinite; }
  
  /* =========================================
     2. CURSOR-TRACKING SPOTLIGHT BENTO CARDS
  ========================================= */
  .spotlight-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  }
  .spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    background: radial-gradient(
      480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(99, 102, 241, 0.14),
      rgba(6, 182, 212, 0.06) 40%,
      transparent 75%
    );
    z-index: 1;
  }
  html:not(.dark) .spotlight-card::before {
    background: radial-gradient(
      480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(99, 102, 241, 0.10),
      rgba(6, 182, 212, 0.04) 40%,
      transparent 75%
    );
  }
  .spotlight-card:hover::before { opacity: 1; }
  .spotlight-card:hover { transform: translateY(-2px); }
  
  /* =========================================
     3. DUAL-ROW INFINITE TECH MARQUEE
  ========================================= */
  @keyframes marquee-left {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
  }
  @keyframes marquee-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
  }
  .marquee-track-left {
    display: flex;
    width: max-content;
    animation: marquee-left 36s linear infinite;
  }
  .marquee-track-right {
    display: flex;
    width: max-content;
    animation: marquee-right 40s linear infinite;
  }
  .marquee-wrapper:hover .marquee-track-left,
  .marquee-wrapper:hover .marquee-track-right {
    animation-play-state: paused;
  }
  .marquee-mask {
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  }
  
  /* =========================================
     4. GLOSSY SHIMMER-ON-HOVER CARDS
  ========================================= */
  .shimmer-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  }
  .shimmer-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
  }
  html:not(.dark) .shimmer-card::after {
    background: linear-gradient(115deg, transparent 0%, rgba(99, 102, 241, 0.08) 50%, transparent 100%);
  }
  .shimmer-card:hover::after { left: 160%; }
  
  /* =========================================
     5. ROTATING SUBTITLE & ACCORDION
  ========================================= */
  .rotating-word {
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .rotating-word.is-exiting {
    opacity: 0;
    transform: translateY(-10px);
  }
  .rotating-word.is-entering {
    opacity: 0;
    transform: translateY(10px);
  }
  
  .accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
  }
  .accordion-content.open {
    grid-template-rows: 1fr;
    opacity: 1;
  }
  .accordion-inner { overflow: hidden; }
  
  /* =========================================
     6. SAFE SCROLL REVEAL (NEVER BLANK)
  ========================================= */
  html.js-ready .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  }
  html.js-ready .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* =========================================
     7. ABSTRACT MICRO-VISUAL & MODAL ANIMATIONS
  ========================================= */
  @keyframes dash-flow {
    to { stroke-dashoffset: -28; }
  }
  .animate-dash {
    stroke-dasharray: 6 8;
    animation: dash-flow 1.8s linear infinite;
  }
  
  @keyframes bar-pulse {
    0%, 100% { transform: scaleY(0.45); opacity: 0.6; }
    50% { transform: scaleY(1); opacity: 1; }
  }
  .animate-bar-1 { transform-origin: bottom; animation: bar-pulse 2.2s ease-in-out infinite; }
  .animate-bar-2 { transform-origin: bottom; animation: bar-pulse 2.2s ease-in-out 0.3s infinite; }
  .animate-bar-3 { transform-origin: bottom; animation: bar-pulse 2.2s ease-in-out 0.6s infinite; }
  .animate-bar-4 { transform-origin: bottom; animation: bar-pulse 2.2s ease-in-out 0.9s infinite; }
  
  .magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  #toast-container {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }
  
  /* Lightbox Modal */
  body.modal-open { overflow: hidden; }
  
  .modal-backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .modal-box {
    transform: translateY(16px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .modal-backdrop.open .modal-box {
    transform: translateY(0) scale(1);
  }