/* ------------------------------------ *\
  #GLASSMORPHIC TO FLAT CURSOR SYSTEM
  Elegant Transitions Based on Context
\* ------------------------------------ */

/*
  DESIGN PHILOSOPHY:
  1. Default: Pure glassmorphic (transparent, subtle)
  2. Internal links: Transition to flat yellow + arrow-right
  3. External links: Transition to flat yellow + external-link
  4. Text interactions: Keep glassmorphic but add subtle feedback
  5. Gallery/media: Enhanced glassmorphic with scale
  
  INTERACTION HIERARCHY:
  - Glassmorphic = Subtle, non-disruptive
  - Flat Yellow = Clear navigational intent
  - Icons = /* Dark text/icons on yellow hover states for proper contrast */
.mf-cursor.-pointer .mf-cursor-text,
.mf-cursor.-link .mf-cursor-text,
.mf-cursor.-button .mf-cursor-text,
.mf-cursor.-icon .mf-cursor-text,
.mf-cursor.-opaque .mf-cursor-text {
    color: var(--bulma-black) !important; /* Pure black text on yellow background */
}
/* Dark icons on yellow hover states for proper contrast */
.mf-cursor.-pointer svg,
.mf-cursor.-link svg,
.mf-cursor.-button svg,
.mf-cursor.-icon svg,
.mf-cursor.-opaque svg {
    stroke: var(--bulma-black) !important;
} indicators
*/

.mf-cursor {
    position: fixed !important;
    top: 0;
    left: 0;
    z-index: 2147483647 !important; /* Maximum z-index to stay above all content including lightbox */
    direction: ltr;
    contain: layout style size;
    pointer-events: none;
    transition: opacity 0.3s, color 0.15s, backdrop-filter 0.3s;
    /* Force isolation to prevent being affected by stacking contexts */
    isolation: isolate !important;
    /* Create new stacking context above lightbox */
    transform: translateZ(0) !important;
    /* Default: More visible glassmorphic appearance */
    color: rgba(255, 255, 255, 0.4) !important; /* Force override Cuberto defaults */
}

/* Ensure cursor is always visible, especially in lightbox context */
body.lightbox-open .mf-cursor,
.lightbox-overlay ~ .mf-cursor,
.mf-cursor {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    z-index: 2147483647 !important;
    position: fixed !important;
}

/* Main glassmorphic ring */
.mf-cursor:before {
    content: "";
    position: absolute;
    top: -20px !important;    /* Reduced from -30px for smaller size */
    left: -20px !important;   /* Reduced from -30px for smaller size */
    display: block;
    width: 40px !important;   /* Reduced from 60px */
    height: 40px !important;  /* Reduced from 60px */
    transform: scale(1.2) translate(calc(var(--lens-parallax-x, 0px) * -0.3), calc(var(--lens-parallax-y, 0px) * -0.3)) !important; /* Subtle counter-parallax */
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    backdrop-filter: blur(8px) !important;
    transition: all 0.3s ease !important;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2), 
        inset 0 2px 4px rgba(255, 255, 255, 0.3) !important;
}

/* Inner container */
.mf-cursor-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Camera lens autofocus effect - breathing focal point */
.mf-cursor-inner:before {
    content: "";
    position: absolute;
    top: -6px;
    left: -6px;
    display: block;
    width: 12px;
    height: 12px;
    background: var(--color-text-primary);
    border: 1px solid var(--color-text-primary);
    border-radius: 50%;
    transform: scale(0.6) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
    opacity: 0.8;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2147483647 !important; /* Maximum z-index to stay above all content including lightbox */
    
    /* Dynamic animation duration controlled by JS */
    animation: camera-focus-breathe var(--lens-pulse-speed, 4s) ease-in-out infinite;
    /* Parallax offset controlled by CSS custom properties */
}

/* Text layer for icons and content - ALWAYS DARK WHEN VISIBLE */
.mf-cursor-text {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 400;
    color: var(--bulma-black) !important; /* Always pure black for maximum contrast */
    white-space: nowrap;
    pointer-events: none;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2147483647 !important; /* Maximum z-index to stay above all content including lightbox */
}

/* Media layer for enhanced glassmorphic effects */
.mf-cursor-media {
    position: absolute;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.mf-cursor-media-box {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}

/* ================================
   CAMERA LENS ANIMATIONS
   ================================ */

/* Breathing autofocus animation - base pattern */
@keyframes camera-focus-breathe {
    0%, 100% { 
        transform: scale(0.4) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.0) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 1.0;
    }
}

/* Fast movement pattern - erratic, sharp pulses */
@keyframes camera-focus-fast {
    0% { 
        transform: scale(0.2) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.8;
    }
    15% { 
        transform: scale(1.4) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 1.0;
    }
    30% { 
        transform: scale(0.6) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.7;
    }
    60% { 
        transform: scale(1.2) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.9;
    }
    100% { 
        transform: scale(0.3) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.8;
    }
}

/* Medium movement pattern - steady, focused rhythm */
@keyframes camera-focus-medium {
    0%, 100% { 
        transform: scale(0.5) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.8;
    }
    33% { 
        transform: scale(1.1) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 1.0;
    }
    66% { 
        transform: scale(0.7) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.9;
    }
}

/* Slow movement pattern - gentle, wide pulses */
@keyframes camera-focus-slow {
    0%, 100% { 
        transform: scale(0.6) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.6;
    }
    50% { 
        transform: scale(0.9) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.8;
    }
}

/* Speed-responsive animation patterns */

/* Fast movement: Erratic, sharp focusing like trying to track fast subject */
.mf-cursor.cursor-fast .mf-cursor-inner:before {
    animation: camera-focus-fast var(--lens-pulse-speed, 0.3s) ease-out infinite;
}

/* Medium movement: Steady, confident focusing */
.mf-cursor.cursor-medium .mf-cursor-inner:before {
    animation: camera-focus-medium var(--lens-pulse-speed, 0.8s) ease-in-out infinite;
}

/* Slow movement: Gentle, wide focusing sweeps */
.mf-cursor.cursor-slow .mf-cursor-inner:before {
    animation: camera-focus-slow var(--lens-pulse-speed, 1.5s) ease-in-out infinite;
}

/* Contextual pulse modes controlled by JavaScript */

/* Idle: Slow, gentle breathing */
.mf-cursor.pulse-idle .mf-cursor-inner:before {
    --lens-pulse-speed: 4s;
    animation-timing-function: ease-in-out;
}

/* Hover: Medium speed, focused attention */
.mf-cursor.pulse-hover .mf-cursor-inner:before {
    --lens-pulse-speed: 2s;
    animation-timing-function: ease-out;
    opacity: 0.9;
}

/* Active: Fast pulse for clicks/interactions */
.mf-cursor.pulse-active .mf-cursor-inner:before {
    --lens-pulse-speed: 0.8s;
    animation-timing-function: ease-in;
    transform: scale(1.5) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
}

/* Moving: Speed-based dynamic pulsing */
.mf-cursor.cursor-moving .mf-cursor-inner:before {
    animation-timing-function: linear;
    /* Speed set dynamically by JS based on mouse velocity */
}

/* Loading: Continuous focused pulse for transitions */
.mf-cursor.pulse-loading .mf-cursor-inner:before {
    --lens-pulse-speed: 1.5s;
    animation-timing-function: ease-in-out;
    opacity: 1;
}

/* Fast focusing effect for interactions */
@keyframes camera-focus-snap {
    0% { 
        transform: scale(0.2);
        opacity: 0.2;
        backdrop-filter: blur(8px);
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.9;
        backdrop-filter: blur(0px);
    }
    100% { 
        transform: scale(0.8);
        opacity: 0.6;
        backdrop-filter: blur(3px);
    }
}

/* Loading/thinking animation */
@keyframes camera-focus-loading {
    0% { 
        transform: scale(0.1) rotate(0deg);
        opacity: 0.8;
        backdrop-filter: blur(10px);
    }
    33% { 
        transform: scale(0.9) rotate(120deg);
        opacity: 0.4;
        backdrop-filter: blur(2px);
    }
    66% { 
        transform: scale(0.5) rotate(240deg);
        opacity: 0.7;
        backdrop-filter: blur(6px);
    }
    100% { 
        transform: scale(0.1) rotate(360deg);
        opacity: 0.8;
        backdrop-filter: blur(10px);
    }
}

/* Page load animation - empty border filling in slowly */
@keyframes page-load-fill {
    0% {
        background: transparent;
        border: 2px solid var(--color-text-primary);
        transform: scale(0.6) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.9;
    }
    20% {
        background: transparent;
        border: 2px solid var(--color-text-primary);
        transform: scale(0.8) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 1;
    }
    100% {
        background: var(--color-text-primary);
        border: 1px solid var(--color-text-primary);
        transform: scale(0.6) translate(var(--lens-parallax-x, 0px), var(--lens-parallax-y, 0px));
        opacity: 0.8;
    }
}

/* ================================
   CAMERA LENS STATES
   ================================ */

/* Default: Gentle breathing autofocus */
.mf-cursor:not(.-pointer):not(.-opaque):not(.-text):not(.-link-hover):not(.-icon) .mf-cursor-inner:before {
    animation: camera-focus-breathe 4s ease-in-out infinite;
}

/* Sharp focus snap on clickable elements */
.mf-cursor.-pointer .mf-cursor-inner:before {
    animation: camera-focus-snap 0.8s ease-out infinite alternate;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Enhanced focus for gallery/media - like camera focusing on subject */
.mf-cursor.-opaque .mf-cursor-inner:before {
    transform: scale(1);
    opacity: 0.8;
    animation: camera-focus-breathe 2s ease-in-out infinite;
    border-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

/* Subtle focus for text - like reading mode */
.mf-cursor.-text .mf-cursor-inner:before {
    transform: scale(0.5);
    opacity: 0.3;
    animation: camera-focus-breathe 6s ease-in-out infinite;
    backdrop-filter: blur(1px);
}

/* Loading/thinking state when transitioning between links */
.mf-cursor.-link-hover .mf-cursor-inner:before,
.mf-cursor.-icon .mf-cursor-inner:before {
    animation: camera-focus-loading 1.5s ease-in-out infinite;
    transform: scale(0.2);
    opacity: 0.5;
}

/* Page loading state - border fills in slowly */
.mf-cursor.page-loading .mf-cursor-inner:before {
    animation: page-load-fill 3s ease-out forwards;
    /* Override all other animations during page load */
}

/* ================================
   INTERACTION STATES
   ================================ */

/* INTERNAL LINKS: Glassmorphic → Flat Yellow + Arrow */
.mf-cursor.-link-hover {
    color: var(--bulma-warning);
}

.mf-cursor.-link-hover:before {
    background: var(--bulma-warning) !important;
    border-color: var(--bulma-warning) !important;
    backdrop-filter: none !important;
    transform: scale(1) !important; /* 40px × 1.0 = 40px (smaller than default 48px) */
    box-shadow: 0 2px 8px var(--bulma-warning-30) !important;
}

.mf-cursor.-link-hover .mf-cursor-inner:before {
    background: var(--bulma-black) !important;
    transform: scale(0) !important; /* Keep center dot hidden */
    opacity: 0 !important;
}

.mf-cursor.-link-hover .mf-cursor-text {
    color: var(--bulma-black);
    transform: scale(1);
    opacity: 1;
}

/* EXTERNAL LINKS: Flat Yellow + External Icon (using proper Cuberto -icon state) */
.mf-cursor.-icon {
    color: var(--bulma-warning);
}

.mf-cursor.-icon:before {
    background: var(--bulma-warning) !important;
    border-color: var(--bulma-warning) !important;
    backdrop-filter: none !important;
    transform: scale(1) !important; /* Consistent with link hover */
    box-shadow: 0 2px 8px var(--bulma-warning-30) !important;
}

.mf-cursor.-icon .mf-cursor-inner:before {
    transform: scale(0) !important; /* Keep center dot hidden */
    opacity: 0 !important;
}

.mf-cursor.-icon .mf-cursor-media {
    opacity: 1;
}

/* TEXT STATE: Flat Yellow + Text (using proper Cuberto -text state) */
.mf-cursor.-text {
    color: var(--bulma-warning);
}

.mf-cursor.-text:before {
    background: var(--bulma-warning);
    border-color: var(--bulma-warning);
    backdrop-filter: none;
    transform: scale(0.6); /* 60px × 0.6 = 36px (consistent with other flat states) */
    box-shadow: 0 2px 8px var(--bulma-warning-30);
}

.mf-cursor.-text .mf-cursor-inner:before {
    transform: scale(0);
}

.mf-cursor.-text .mf-cursor-text {
    color: var(--bulma-black);
    transform: scale(1);
    opacity: 1;
}

/* GALLERY/SEARCH: Enhanced glassmorphic (using existing data attributes) */
.mf-cursor.-opaque {
    color: rgba(255, 255, 255, 0.2);
}

.mf-cursor.-opaque:before {
    transform: scale(1); /* 60px × 1.0 = 60px (larger than default for dramatic effect) */
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.mf-cursor.-opaque .mf-cursor-inner:before {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.mf-cursor.-opaque .mf-cursor-media {
    opacity: 0.3;
}

.mf-cursor.-opaque .mf-cursor-media-box {
    transform: scale(0.8);
    opacity: 0.4;
}

/* Gallery/opaque state should also use dark icons */
.mf-cursor.-opaque .mf-cursor-text {
    color: var(--text-aa-on-light) !important; /* Always dark for gallery icons */
}

.mf-cursor.-opaque svg {
    stroke: var(--text-aa-on-light) !important; /* Always dark for gallery icons */
}

/* BUTTON/POINTER INTERACTIONS: Subtle glassmorphic enhancement */
.mf-cursor.-pointer {
    color: rgba(255, 255, 255, 0.15);
}

.mf-cursor.-pointer:before {
    transform: scale(0.5); /* 60px × 0.5 = 30px (smallest for subtle interactions) */
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.mf-cursor.-pointer .mf-cursor-inner:before {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

/* HIDDEN STATE */
.mf-cursor.-hidden:before,
.mf-cursor.-hidden .mf-cursor-inner:before,
.mf-cursor.-hidden .mf-cursor-text,
.mf-cursor.-hidden .mf-cursor-media-box {
    transform: scale(0);
    opacity: 0;
}

/* INVERSE STATE: For light backgrounds */
.mf-cursor.-inverse {
    color: rgba(0, 0, 0, 0.1);
}

.mf-cursor.-inverse:before {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: 
        0 4px 12px rgba(255, 255, 255, 0.1),
        inset 0 1px 1px rgba(0, 0, 0, 0.1);
}

.mf-cursor.-inverse .mf-cursor-inner:before {
    background: rgba(0, 0, 0, 0.6);
}

/* EXCLUSION BLEND */
.mf-cursor.-exclusion {
    mix-blend-mode: exclusion;
}

.mf-cursor.-exclusion:before {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
}

/* ================================
   RESPONSIVE & PERFORMANCE
   ================================ */

/* Reduce effects on smaller screens */
@media (max-width: 768px) {
    .mf-cursor:before {
        backdrop-filter: blur(4px);
    }
    
    .mf-cursor-media-box {
        backdrop-filter: blur(2px);
    }
}

/* Disable blur on low-end devices */
@media (prefers-reduced-motion: reduce) {
    .mf-cursor:before,
    .mf-cursor-media-box {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.15);
    }
}

.mf-cursor.-text.-active:before {
    transform: scale(1.6);
    transition-duration: 0.2s;
}

/* Icon hover state - yellow background */
.mf-cursor.-icon:before {
    transform: scale(1.5);
    background: var(--bulma-warning);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--color-border-interactive);
    box-shadow: 0 0 16px var(--bulma-warning-30);
}

.mf-cursor.-icon.-active:before {
    transform: scale(1.4);
}

/* Hidden state */
.mf-cursor.-hidden:before {
    transform: scale(0);
}

/* Cursor Text Element - Theme-aware text colors */
.mf-cursor-text {
    position: absolute;
    top: -18px;
    left: -18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0) rotate(10deg);
    opacity: 0;
    color: var(--color-text-primary); /* Theme-aware text color for default state */
    font-size: 16px;
    font-weight: var(--weight-semibold);
    line-height: 20px;
    text-align: center;
    transition: opacity 0.4s, transform 0.3s, color 0.15s;
}

/* Active text scaling for interactivity */
.mf-cursor.-text .mf-cursor-text,
.mf-cursor.-icon .mf-cursor-text {
    opacity: 1;
    transform: scale(1);
}

/* Dark text/icons on yellow hover states for proper contrast */
.mf-cursor.-pointer .mf-cursor-text,
.mf-cursor.-link .mf-cursor-text,
.mf-cursor.-button .mf-cursor-text,
.mf-cursor.-icon .mf-cursor-text {
    color: var(--bulma-black) !important; /* Pure black text on yellow background */
}

/* Default theme-aware icons - ALWAYS DARK */
.mf-cursor svg {
    stroke: var(--bulma-black) !important; /* Always pure black for maximum visibility */
    fill: none !important;
    stroke-width: 2px !important;
    width: 16px !important;
    height: 16px !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    transition: stroke 0.3s ease;
}

/* Dark icons on yellow hover states for proper contrast */
.mf-cursor.-pointer svg,
.mf-cursor.-link svg,
.mf-cursor.-button svg,
.mf-cursor.-icon svg {
    stroke: var(--color-text-on-light) !important;
}

/* Link hover with yellow background */
.mf-cursor.-link:before {
    background: var(--bulma-warning);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--color-border-interactive);
    box-shadow: 0 0 16px var(--bulma-warning-20);
    transform: scale(1.2);
}

/* Button hover state - enhanced yellow */
.mf-cursor.-button:before {
    transform: scale(1.3);
    background: var(--bulma-warning);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--color-border-interactive);
    box-shadow: 0 0 24px var(--bulma-warning-40);
}

/* Gallery image hover - subtle yellow with theme awareness */
.mf-cursor.-gallery:before {
    transform: scale(1.0);
    background: var(--bulma-warning-50);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--bulma-warning);
    box-shadow: 0 0 20px var(--bulma-warning-30);
}

/* Performance optimizations */
.mf-cursor,
.mf-cursor:before,
.mf-cursor-text {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* ------------------------------------ *\
  #THEME-SPECIFIC CURSOR VARIATIONS
\* ------------------------------------ */

/* Light theme adjustments for better visibility */
html[data-theme="light"] .mf-cursor:before {
    /* More opaque glassmorphic effect for light backgrounds */
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border-primary);
    box-shadow: var(--shadow-sm);
}

/* Light theme text adjustments - ALWAYS DARK */
html[data-theme="light"] .mf-cursor-text {
    color: var(--text-aa-on-light) !important; /* Always dark for consistency */
}

html[data-theme="light"] .mf-cursor svg {
    stroke: var(--text-aa-on-light) !important; /* Always dark for consistency */
}

/* Dark theme maintains the default styling but with explicit variables */
html[data-theme="dark"] .mf-cursor:before {
    background: var(--color-bg-overlay);
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-md);
}

/* Yellow states remain consistent across themes */
html[data-theme="light"] .mf-cursor.-pointer:before,
html[data-theme="light"] .mf-cursor.-text:before,
html[data-theme="light"] .mf-cursor.-link:before,
html[data-theme="light"] .mf-cursor.-button:before,
html[data-theme="light"] .mf-cursor.-icon:before {
    background: var(--bulma-warning);
    border: 1px solid var(--color-border-interactive);
}

/* Text on yellow backgrounds - always dark for readability */
html[data-theme="light"] .mf-cursor.-pointer .mf-cursor-text,
html[data-theme="light"] .mf-cursor.-link .mf-cursor-text,
html[data-theme="light"] .mf-cursor.-button .mf-cursor-text,
html[data-theme="light"] .mf-cursor.-icon .mf-cursor-text {
    color: var(--bulma-black) !important;
}

html[data-theme="light"] .mf-cursor.-pointer svg,
html[data-theme="light"] .mf-cursor.-link svg,
html[data-theme="light"] .mf-cursor.-button svg,
html[data-theme="light"] .mf-cursor.-icon svg {
    stroke: var(--bulma-black) !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mf-cursor,
    .mf-cursor:before,
    .mf-cursor-text {
        transition: none !important;
    }
    
    .mf-cursor:before {
        transform: scale(0.3) !important;
    }
}

/* Hide on touch devices */
@media (hover: none), (pointer: coarse) {
    .mf-cursor {
        display: none !important;
    }
}

/* ------------------------------------ *\
  #LIGHTBOX CURSOR OVERRIDE
  Force cursor above all lightbox elements
\* ------------------------------------ */

/* Ensure cursor stays above lightbox with full opacity */
.lightbox-overlay ~ .mf-cursor,
.lightbox-container ~ .mf-cursor,
body.lightbox-open .mf-cursor {
    z-index: 2147483647 !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Force new stacking context above lightbox */
    isolation: isolate !important;
    transform: translateZ(1px) !important;
}

/* Enhanced visibility when over lightbox */
.lightbox-overlay ~ .mf-cursor:before,
.lightbox-container ~ .mf-cursor:before,
body.lightbox-open .mf-cursor:before {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Keep cursor text/icons dark even in lightbox */
.lightbox-overlay ~ .mf-cursor .mf-cursor-text,
.lightbox-container ~ .mf-cursor .mf-cursor-text,
body.lightbox-open .mf-cursor .mf-cursor-text {
    color: var(--bulma-black) !important;
    z-index: 2147483647 !important;
}

.lightbox-overlay ~ .mf-cursor svg,
.lightbox-container ~ .mf-cursor svg,
body.lightbox-open .mf-cursor svg {
    stroke: var(--bulma-black) !important;
    z-index: 2147483647 !important;
}