html, body {
    scroll-behavior: smooth;
    /* FIX UTAMA: Paksa agar tidak ada elemen yang bisa melampaui lebar layar */
    max-width: 100vw; 
    overflow-x: hidden;
    position: relative;
}

/* --- Palet Warna NEON TECH --- */
:root {
    --bg-dark: #050509; 
    --bg-card: #10101A; 
    --text-main: #E6E6FA; 
    --cyan-glow: #00FFFF; 
    --magenta-glow: #FF00FF; 
    --font-main: 'Space Grotesk', sans-serif;
    --font-heading: 'Syne', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; 
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    letter-spacing: -0.5px;
}

#tsparticles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#cursor {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--cyan-glow);
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    z-index: 9999;
    mix-blend-mode: difference;
    box-shadow: 0 0 20px var(--cyan-glow);
}

nav {
    padding: 20px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 9, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

nav .logo {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--text-main);
    text-shadow: 0 0 10px var(--cyan-glow);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 10vw;
}

.hero-content {
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 5vw; 
}

.hero-text {
    flex: 1.2; 
    text-align: left;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--cyan-glow), var(--magenta-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.4rem;
    font-weight: 300;
    max-width: 750px; 
    color: #AAA;
    margin-bottom: 40px;
}

.hero-image {
    flex: 1; 
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* Wrapper 3D untuk Foto Profil */
.hero-img-wrapper {
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    transform-style: preserve-3d;
    display: inline-block;
}

.hero-img-wrapper img {
    max-width: 100%; 
    height: auto;
    max-height: 70vh; 
    object-fit: cover;
    border-radius: 20px; 
    display: block;
    transform: translateZ(30px); 
}

.btn {
    padding: 15px 40px;
    background: transparent;
    color: var(--cyan-glow);
    border: 2px solid var(--cyan-glow);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn:hover {
    color: var(--bg-dark);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--cyan-glow);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::after { left: 0; }

section { padding: 100px 10vw; }

.section-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 3.5rem;
    margin-bottom: 50px;
    border-left: 8px solid var(--magenta-glow);
    padding-left: 20px;
    display: inline-block;
}

/* =========================================
   SLIDER NETFLIX UI (FIXED)
   ========================================= */
.slider-wrapper {
    padding: 80px 0; 
    margin: -80px 0;
}

.swiper {
    width: 100%;
    overflow: visible; 
}

.swiper-slide {
    position: relative;
    z-index: 1;
    transition: z-index 0s linear 0.4s; 
}

.swiper-slide:hover {
    z-index: 50; 
    transition: z-index 0s; 
}

.nf-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; 
    border-radius: 6px;
    cursor: pointer;
}

.nf-base-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.nf-popout {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%) scale(1);
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    transition-delay: 0.4s; 
    z-index: 100;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.05);
}

.nf-card:hover .nf-popout {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1.3); 
    pointer-events: auto;
}

.nf-popout-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.nf-popout-details {
    padding: 20px 15px; 
    color: #fff;
}

.nf-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--cyan-glow);
    line-height: 1.2;
}

.nf-desc {
    font-size: 0.85rem;
    color: #BBB;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-tags span {
    color: var(--magenta-glow);
    font-size: 0.75rem;
    font-weight: bold;
}
.nf-tags span:not(:last-child)::after {
    content: " • ";
    color: #666;
}

.swiper-button-next, .swiper-button-prev {
    color: white !important;
    background: rgba(0,0,0,0.5);
    padding: 30px 15px;
    border-radius: 5px;
    transform: scale(0.6);
    transition: background 0.3s ease;
    z-index: 1000;
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    background: rgba(0,0,0,0.8);
    color: var(--cyan-glow) !important;
}

/* --- Execution --- */
.about-text {
    max-width: 900px; 
    color: #CCC; 
    font-size: 1.2rem; 
    font-weight: 300; 
    line-height: 1.8;
    margin: 0 auto;
}

.highlight-box {
    border: 1px solid var(--cyan-glow); 
    padding: 25px; 
    color: var(--cyan-glow); 
    background: rgba(0,255,255,0.05);
    margin-top: 30px;
    border-radius: 5px;
}

/* --- Skills 3D --- */
.skills-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    overflow: hidden;
}

.tagcloud {
    color: var(--cyan-glow);
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0,255,255,0.5);
}

/* --- Deployments Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.tilt-container {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    height: 100%;
}

.project-card-img {
    width: 100%;
    aspect-ratio: 16 / 9; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
}

.project-card {
    background-color: var(--bg-card);
    padding: 25px; 
    border: 1px solid rgba(255,255,255,0.03);
    transition: border 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (hover: hover) {
    .project-card { transform: translateZ(20px); }
    .project-card:hover {
        border: 1px solid var(--magenta-glow);
        box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
    }
    .project-card h3 { transform: translateZ(50px); }
    .project-card p { transform: translateZ(30px); }
    .tags { transform: translateZ(40px); }
    .views-badge { transform: translateZ(60px); }
}

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: white;
}

.project-card p {
    font-size: 1rem;
    color: #BBB;
    margin-bottom: 20px;
    font-weight: 300;
    flex-grow: 1;
}

.tags span {
    display: inline-block;
    background: rgba(255, 0, 255, 0.1);
    color: var(--magenta-glow);
    border: 1px solid var(--magenta-glow);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.views-badge {
    margin-top: 15px;
    color: var(--cyan-glow);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 10px var(--cyan-glow);
    display: inline-block;
}

footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background-color: #020205;
}

/* =========================================
   RESPONSIVE MOBILE STYLES (FIXED)
   ========================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 4rem; }
    .hero-content { gap: 3vw; } 
}

@media (max-width: 768px) {
    /* Matikan custom cursor di HP */
    * { cursor: auto !important; }
    #cursor { display: none !important; }
    nav { padding: 15px 5vw; justify-content: center; }
    
    .hero { padding: 100px 5vw 40px 5vw; align-items: center;}
    .hero-content { flex-direction: column-reverse; text-align: center; gap: 30px; }
    .hero-text { flex: none; text-align: center; width: 100%; }
    
    /* Kurangi ukuran font agar kata panjang seperti "DEVELOPER" tidak merusak layout */
    .hero h1 { font-size: 2.2rem; line-height: 1.3; text-align: center; word-wrap: break-word; }
    .hero p { font-size: 1.05rem; text-align: center; margin-bottom: 30px; }
    .hero-image { flex: none; order: 1; margin-bottom: 20px;} 
    
    .hero-img-wrapper { max-width: 80%; }
    .hero-img-wrapper img { width: 100%; max-height: 50vh; transform: none; }

    section { padding: 50px 5vw; }
    .section-title { 
        font-size: 2rem; text-align: center; border-left: none; 
        border-bottom: 4px solid var(--magenta-glow); padding-left: 0; padding-bottom: 10px; display: block;
    }
    
    /* FIX SLIDER BOCOR: Batasi lebar di HP dan sembunyikan kelebihannya */
    .slider-wrapper { 
        margin: 0; 
        padding: 0; 
        width: 100%;
        max-width: 100vw;
        overflow: hidden; /* Potong sisa slider di HP */
    }
    
    .swiper { 
        overflow: hidden !important; /* Mencegah pelebaran viewport */
        padding: 20px 10px !important; /* Beri sedikit ruang agar efek scale 1.05 tidak terpotong */
    }
    
    /* Sembunyikan tombol panah di HP (karena user bisa swipe) */
    .swiper-button-next, .swiper-button-prev { display: none !important; }
    
    .nf-card:hover .nf-popout { transform: translate(-50%, -50%) scale(1.05); } 
    .nf-popout-details { padding: 10px; } /* Kurangi padding dalam popout */
    .nf-title { font-size: 1rem; margin-bottom: 5px; }
    .nf-desc { font-size: 0.75rem; margin-bottom: 8px; }

    .about-text { text-align: center; font-size: 1rem; }
    .highlight-box { text-align: left; font-size: 0.95rem; padding: 20px; }
    .skills-container { min-height: 350px; }
    
    .projects-grid { gap: 20px; }
    .project-card { padding: 20px; }
    .project-card h3 { font-size: 1.3rem; }
}