/* --- Custom Cursor Styles for Inverse Effect --- */

/* Firefox Fix: mix-blend-mode requires a base background color to calculate against */
html, body {
  cursor: none !important;
  background-color: #000; /* Match your site's background */
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  /* Keep your original centering and initial scale */
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  /* Firefox Optimization */
  backface-visibility: hidden;
  will-change: top, left, transform;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.2s ease;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  /* Firefox Optimization */
  backface-visibility: hidden;
  will-change: top, left;
  /* Removed 'transform' from transition to prevent JS/CSS conflict in Firefox */
  transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.cursor.visible,
.cursor-ring.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cursor.hovered {
  transform: translate(-50%, -50%) scale(1.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.cursor-ring.hovered {
  width: 45px;
  height: 45px;
  border-width: 3px;
  opacity: 0.8;
  transform: translate(-50%, -50%) scale(1);
}

/* Hide the default cursor */
body, a, button, .year-btn, .socials a {
  cursor: none !important;
}

@media (max-width: 768px), (pointer: coarse) {
  .cursor, .cursor-ring {
    display: none !important;
  }
  body, a, button, .year-btn, .socials a {
    cursor: auto !important;
  }
}