/* ── Dot-mesh background + per-theme mouse glow ──────────────────────────── */

.mesh-bg {
    position: relative;
}

/* The dot grid */
.mesh-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, var(--mesh-dot-color, rgba(255,255,255,0.07)) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 0;
}

/* The mouse-tracked spotlight */
.mesh-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--mesh-glow-color, rgba(79,195,247,0.08)) 0%,
        transparent 70%
    );
    z-index: 0;
    transition: background 0.05s ease;
}

/* Make direct children sit above the mesh */
.mesh-bg > * {
    position: relative;
    z-index: 1;
}

/* ── Per-theme dot & glow colours ─────────────────────────────────────────── */
.theme-dark .mesh-bg {
    --mesh-dot-color:  rgba(255, 255, 255, 0.06);
    --mesh-glow-color: rgba(79, 195, 247, 0.09);
}

.theme-light .mesh-bg {
    --mesh-dot-color:  rgba(0, 0, 0, 0.07);
    --mesh-glow-color: rgba(25, 118, 210, 0.07);
}

.theme-genz .mesh-bg {
    --mesh-dot-color:  rgba(0, 229, 255, 0.08);
    --mesh-glow-color: rgba(0, 229, 255, 0.12);
}

/* Uncle '95 skips the mesh — uses retro tiled pattern instead */
.theme-uncle .mesh-bg::before,
.theme-uncle .mesh-bg::after {
    display: none;
}
