/* ============================
   GLOBAL & BASE STYLES
   ============================ */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    background-color: #080c16;
}

body {
    color: white;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #080c16; }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* ============================
   PARTICLES BACKGROUND
   ============================ */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -3;
    pointer-events: none;
}

/* ============================
   AMBIENT GLOW ORBS
   ============================ */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -4;
    overflow: hidden;
}

.ambient-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: float-ambient infinite ease-in-out;
    mix-blend-mode: screen;
}

.light-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(59,130,246,0.6) 0%, transparent 70%);
    animation-duration: 30s;
}

.light-2 {
    bottom: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(6,182,212,0.5) 0%, transparent 70%);
    animation-duration: 35s;
    animation-delay: -5s;
}

@keyframes float-ambient {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(3%, 5%) scale(1.05); }
    66%       { transform: translate(-3%, -3%) scale(0.95); }
}

/* ============================
   MOUSE GLOW
   ============================ */
#mouse-glow {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(59, 130, 246, 0.06),
        transparent 40%
    );
    transition: opacity 0.3s ease;
}

/* ============================
   TILT CARD — CLEAN GLOW HOVER
   ============================ */
.tilt-card {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.1s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Shine overlay on hover */
.tilt-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.04) 0%,
        rgba(59,130,246,0.04) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.tilt-card:hover::before {
    opacity: 1;
}

.tilt-card:hover {
    box-shadow:
        0 0 0 1px rgba(59,130,246,0.35),
        0 20px 50px rgba(0,0,0,0.5),
        0 0 35px rgba(59,130,246,0.1);
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.tilt-card > * { position: relative; z-index: 2; }

.inner-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -50px;
    right: -50px;
    pointer-events: none;
    z-index: 0;
}

/* ============================
   GLASS EFFECT
   ============================ */
.glass-effect {
    background: rgba(16, 23, 37, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* ============================
   UI ELEMENTS
   ============================ */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.skill-bar {
    width: 0;
    transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.skill-bar.active { width: var(--width); }

/* ============================
   MOBILE MENU
   ============================ */
#mobile-menu {
    transition: max-height 0.4s ease-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.open { max-height: 400px; }

/* ============================
   HOVER LIFT
   ============================ */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ============================
   GRADIENT RADIAL UTILITY
   (Tailwind CDN tidak memiliki bg-gradient-radial bawaan)
   ============================ */
.bg-gradient-radial {
    background-image: radial-gradient(var(--tw-gradient-stops));
}

/* ============================
   KEYFRAMES
   ============================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-20px); }
}

/* border-beam removed — replaced with glow effect */

/* ============================
   PROJECT CARD CLICKABLE
   ============================ */
.project-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 1rem;
    position: relative;
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
}

/* Ripple / press effect */
.project-card-link:active .project-card-inner {
    transform: scale(0.985);
    transition: transform 0.1s ease;
}

.project-card-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: transform 0.25s ease;
}

/* "Klik untuk buka" hint badge */
.project-card-link .card-hint {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(8,12,22,0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59,130,246,0.3);
    color: rgba(147,197,253,0.9);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 20;
    letter-spacing: 0.5px;
}

.project-card-link:hover .card-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Arrow icon pulse on card hover */
.project-card-link:hover .lihat-detail-btn {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59,130,246,0.45);
}

.lihat-detail-btn {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
