/* ============================
   Background Grid / Dot Effect
   ============================ */

/* Canvas overlay for animated dots */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* Subtle static grid lines fallback (CSS-only) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* fine grid lines */
    background-image:
        linear-gradient(rgba(16,185,129,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,185,129,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 30%, transparent 100%);
    transition: background-image 0.3s;
}

body:not(.dark-mode)::before {
    background-image:
        linear-gradient(rgba(5,150,105,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(5,150,105,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Make sure main content sits above the canvas.
   NOTE: Do NOT touch .sidebar, .mobile-header, .sidebar-overlay here —
   they already have position:fixed / their own z-index in style.css. */
.main-content {
    position: relative;
    z-index: 1;
}

/* Glowing accent orbs – subtle ambient light blobs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 12s ease-in-out infinite alternate;
    opacity: 0.18;
}

.bg-orb-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #10b981 0%, transparent 70%);
    top: -80px;
    right: 15%;
    animation-delay: 0s;
    animation-duration: 14s;
}

.bg-orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #059669 0%, transparent 70%);
    bottom: 10%;
    right: 30%;
    animation-delay: -5s;
    animation-duration: 18s;
    opacity: 0.10;
}

body:not(.dark-mode) .bg-orb {
    opacity: 0.08;
}

@keyframes orbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -20px) scale(1.05); }
    66%  { transform: translate(-15px, 15px) scale(0.97); }
    100% { transform: translate(20px, -10px) scale(1.03); }
}
