/* ============================================================
   BOUNCING BLOBS BACKGROUND
   Animated colored circles that drift across the viewport,
   blurred by a glass overlay. Two modes:
   - data-blob-mode="palette" (default on main page): per-blob
     classes determine colors (orange/green/teal/...)
   - data-blob-mode="accent" (project pages): all blobs share
     --c-accent-rgb (must be set as "R G B" triplet on :root)
   ============================================================ */

.bouncing-blobs-container {
    position: fixed;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* Safari needs extended bounds for smooth blob edges */
html.is-safari .bouncing-blobs-container {
    top: -100px;
    height: calc(100% + 200px);
}

.bouncing-blobs {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bouncing-blob {
    width: 32vw;
    aspect-ratio: 1;
    border-radius: 50%;
    will-change: transform;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    transform-origin: left top;
    mix-blend-mode: screen;
}

/* Palette mode — fixed colors per project (used on main page) */
.bouncing-blob--orange   { background: rgba(255, 107, 53, 0.4); }   /* Skills / Portfolio */
.bouncing-blob--green    { background: rgba(0, 120, 88, 0.4); }    /* MOECK */
.bouncing-blob--teal     { background: rgba(0, 132, 172, 0.35); }  /* Thesis */
.bouncing-blob--purple   { background: rgba(139, 92, 246, 0.35); } /* Archive */
.bouncing-blob--gold     { background: rgba(157, 131, 62, 0.4); }  /* Publicis */
.bouncing-blob--burgundy { background: rgba(116, 33, 40, 0.35); }  /* Education */
.bouncing-blob--gray     { background: rgba(160, 160, 160, 0.25); }
.bouncing-blob--blue     { background: rgba(95, 169, 197, 0.35); }
.bouncing-blob--indigo   { background: rgba(99, 102, 241, 0.35); }
.bouncing-blob--red      { background: rgba(255, 61, 107, 0.35); }
.bouncing-blob--cyan     { background: rgba(50, 200, 220, 0.35); }
.bouncing-blob--amber    { background: rgba(245, 158, 11, 0.35); }

/* Accent mode — derive from --c-accent-rgb defined per page (e.g. "201 162 39") */
.bouncing-blob--accent {
    background: rgb(var(--c-accent-rgb, 160 160 160) / 0.4);
}

.bouncing-blobs-glass {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backdrop-filter: blur(140px);
    backdrop-filter: blur(140px);
    pointer-events: none;
}

@media (max-width: 1200px) {
    .bouncing-blobs-glass {
        -webkit-backdrop-filter: blur(120px);
        backdrop-filter: blur(120px);
    }
}

@media (max-width: 500px) {
    .bouncing-blob { width: 60vw; }

    .bouncing-blobs-glass {
        -webkit-backdrop-filter: blur(90px);
        backdrop-filter: blur(90px);
    }

    /* Slightly lower opacity on mobile (matches main-page tuning) */
    .bouncing-blob--orange   { background: rgba(255, 107, 53, 0.35); }
    .bouncing-blob--green    { background: rgba(0, 120, 88, 0.35); }
    .bouncing-blob--teal     { background: rgba(0, 132, 172, 0.35); }
    .bouncing-blob--purple   { background: rgba(139, 92, 246, 0.35); }
    .bouncing-blob--gold     { background: rgba(157, 131, 62, 0.35); }
    .bouncing-blob--burgundy { background: rgba(116, 33, 40, 0.35); }
    .bouncing-blob--accent   { background: rgb(var(--c-accent-rgb, 160 160 160) / 0.35); }
}

/* Honour user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .bouncing-blob { animation: none !important; }
}
