/*
 * HERO SHOWCASE — Three.js interactive layer (v1.0, 2026-11-07)
 * ---------------------------------------------------------------
 * Layar pertama adalah etalase skill frontend. File ini MENAMBAH
 * lapisan di atas hero yang sudah ada: canvas jaringan partikel
 * interaktif + glow lembut (digerakkan scripts/hero-three.js),
 * lencana status "Indonesia · Remote" kini tinggal di kolom teks
 * (di bawah judul + teks peran), dipercantik jadi pill gradien +
 * glow + shine, plus cincin orbit berputar pelan di sekeliling foto.
 * Palet tetap navy + cyan situs.
 */

/* ===== THREE.JS CANVAS (di dalam .hero-background) ===== */
#hero-three-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.9;
}

/* Glow lembut di belakang foto hero */
.hero-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(520px, 90vw);
    height: min(520px, 90vw);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 180, 216, 0.22) 0%, rgba(99, 102, 241, 0.10) 45%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

.hero-visual {
    position: relative;
}

.hero-visual .hero-image-container-modern {
    position: relative;
    z-index: 1;
}

/* ===== LENCANA STATUS: pindah ke kolom teks, di bawah judul =====
 * Sebelumnya .hero-status-indicator absolute di bawah foto
 * (bottom -20px / 20px), menutupi foto dan teksnya terlipat
 * jadi 3 baris di HP. Sekarang lencana tinggal di .hero-content
 * (di bawah judul + teks peran), satu baris, selalu di tengah;
 * wadah foto tetap kolom dengan tinggi otomatis, frame kotak
 * selebar wadah (aspect-ratio). */
.hero-visual .hero-image-container-modern {
    height: auto;
    flex-direction: column;
}

.hero-visual .hero-image-container-modern .hero-image-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.hero-content .hero-status-indicator {
    position: relative;
    /* PENTING: aturan dasar (.hero-status-indicator) masih memberi
       left: 50% + transform: translateX(-50%) — tanpa reset ini pill
       yang sudah in-flow ikut kegeser ke kanan sampai terpotong di HP. */
    left: auto;
    transform: none;
    align-self: center;
    width: max-content;
    max-width: 100%;
    margin: 18px auto 0;
    white-space: nowrap;
    /* Pill gradien + glow: border gradien cyan-ungu, glow berdenyut */
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(rgba(10, 18, 34, 0.88), rgba(10, 18, 34, 0.88)) padding-box,
        linear-gradient(135deg, #00d4ff, #8b5cf6) border-box;
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: statusGlow 2.8s ease-in-out infinite;
}

.hero-content .hero-status-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    animation: statusShine 3.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes statusGlow {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 212, 255, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35); }
    50% { box-shadow: 0 0 34px rgba(0, 212, 255, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35); }
}

@keyframes statusShine {
    0% { left: -80%; }
    45%, 100% { left: 130%; }
}

/* ===== CINCIN ORBIT: garis putus-putus berputar di sekeliling foto =====
 * Lingkaran orbit halus yang selaras dengan orbit-dot teknologi
 * yang sudah ada; berputar pelan 30 detik per putaran. */
.hero-visual .hero-image-container-modern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 20px);
    aspect-ratio: 1 / 1;
    border: 1.5px dashed rgba(0, 212, 255, 0.4);
    border-radius: 50%;
    animation: orbitRingSpin 30s linear infinite;
    pointer-events: none;
}

@keyframes orbitRingSpin {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

@media (max-width: 768px) {
    .hero-content .hero-status-indicator {
        margin-top: 14px;
    }
}

/* Badge hero: denyut halus */
.hero-badge {
    box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.35);
    animation: heroBadgePulse 3s ease-in-out infinite;
}

@keyframes heroBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.30); }
    50% { box-shadow: 0 0 0 8px rgba(0, 180, 216, 0); }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    #hero-three-canvas {
        opacity: 0.65;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-badge {
        animation: none;
    }

    .hero-visual .hero-image-container-modern::before,
    .hero-content .hero-status-indicator,
    .hero-content .hero-status-indicator::after {
        animation: none;
    }

    #hero-three-canvas {
        display: none;
    }
}
