/* --- Variables & Global --- */
:root {
    --bg-dark: #050505; /* Lebih gelap untuk kesan ultra-premium */
    --bg-card: rgba(255, 255, 255, 0.03); 
    --text-main: #f8fafc; 
    --text-muted: #888; 
    --accent-color: #00ffcc; /* Cyan/Emerald */
    --accent-secondary: #0066ff;
}

/* Lenis Smooth Scroll Requirement */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; cursor: none; }
body { background-color: var(--bg-dark); color: var(--text-main); overflow-x: hidden; }

.highlight { color: var(--accent-color); }
/* --- Perbaikan Text Gradient SplitType --- */
.text-gradient { display: inline-block; }

.text-gradient .char {background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));-webkit-background-clip: text;-webkit-text-fill-color: transparent;display: inline-block;}

/* --- Preloader --- */
.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: #000; z-index: 9999; display: flex; justify-content: center; align-items: center; color: var(--accent-color); font-size: 4rem; font-weight: 900; }

/* --- Cursor --- */
.cursor { width: 6px; height: 6px; background: var(--accent-color); border-radius: 50%; position: fixed; pointer-events: none; z-index: 10000; transform: translate(-50%, -50%); }
.cursor-follower { width: 40px; height: 40px; border: 1px solid rgba(0, 255, 204, 0.5); border-radius: 50%; position: fixed; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background 0.3s; }

/* --- Bg Blobs --- */
.bg-shape { position: fixed; border-radius: 50%; filter: blur(120px); z-index: -1; opacity: 0.3; animation: float 10s infinite alternate; }
.shape-1 { width: 400px; height: 400px; background: var(--accent-secondary); top: 10%; left: -10%; }
.shape-2 { width: 500px; height: 500px; background: var(--accent-color); bottom: -10%; right: -10%; animation-delay: -5s; }
@keyframes float { 100% { transform: translate(50px, 50px) scale(1.1); } }

/* --- Layout --- */
.section-padding { padding: 150px 10%; }
.section-title { font-size: 3.5rem; text-align: center; margin-bottom: 60px; font-weight: 700; line-height: 1.1; }

/* --- Navbar --- */
nav { position: fixed; width: 100%; top: 0; z-index: 1000; padding: 30px 10%; transition: 0.4s; mix-blend-mode: difference; }
nav.scrolled { padding: 20px 10%; background: rgba(5, 5, 5, 0.8); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.05); mix-blend-mode: normal; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 900; }
.logo span { color: var(--accent-color); }
.nav-links { list-style: none; display: flex; gap: 40px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 2px; }

/* --- Hero --- */
#hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 10%; }
.greeting { color: var(--accent-color); font-size: 1.2rem; margin-bottom: 20px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.hero-title { font-size: 5rem; font-weight: 900; margin-bottom: 30px; line-height: 1.1; clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
.hero-title .char { transform: translateY(110%); transition: transform .5s; } /* Setup untuk SplitType */
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 50px; max-width: 600px; margin-inline: auto; line-height: 1.8; }

.magnetic-wrapper { display: inline-block; padding: 20px; }
.btn-primary { 
    display: inline-block; 
    background: var(--text-main); 
    color: var(--bg-dark); 
    padding: 18px 45px; 
    border-radius: 50px; 
    font-weight: 700; 
    text-decoration: none; 
    border: none; 
    font-size: 1.1rem; 
    
    /* PERBAIKAN: Ganti 'transition: 0.3s' dengan nilai spesifik di bawah ini */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; 
}
.btn-primary:hover { 
    background: var(--accent-color); 
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.4); 
}

/* --- Marquee --- */
.marquee-section { padding: 30px 0; background: var(--accent-color); transform: rotate(-3deg) scale(1.1); margin: 50px 0; }
.marquee-container { width: 100%; white-space: nowrap; overflow: hidden; }
.marquee-content { display: inline-block; animation: marquee 15s linear infinite; font-size: 2.5rem; font-weight: 900; color: var(--bg-dark); text-transform: uppercase; letter-spacing: 2px; }
@keyframes marquee { 100% { transform: translateX(-50%); } }

/* --- Experience Timeline --- */
.experience-container { display: flex; justify-content: space-between; gap: 50px; }
.experience-left { flex: 1; position: sticky; top: 150px; height: fit-content; }
.experience-right { flex: 1.5; }
.timeline { border-left: 1px solid rgba(255,255,255,0.1); padding-left: 40px; margin-left: 20px; }
.timeline-item { position: relative; margin-bottom: 60px; }
.timeline-dot { position: absolute; left: -46px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-color); box-shadow: 0 0 15px var(--accent-color); }
.timeline-item h3 { font-size: 1.8rem; margin-bottom: 5px; }
.timeline-date { color: var(--accent-color); font-weight: 600; font-size: 0.9rem; margin-bottom: 15px; display: inline-block; }
.timeline-item p { color: var(--text-muted); line-height: 1.7; }

/* --- Projects --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.project-card { background: var(--bg-card); border-radius: 20px; padding: 50px 40px; border: 1px solid rgba(255, 255, 255, 0.05); transform-style: preserve-3d; transition: border-color 0.3s; }
.project-card:hover { border-color: var(--accent-color); }
.project-icon { font-size: 3rem; color: var(--accent-color); margin-bottom: 30px; transform: translateZ(50px); }
.project-card h3 { font-size: 1.6rem; margin-bottom: 15px; transform: translateZ(40px); }
.project-card p { color: var(--text-muted); font-size: 1rem; transform: translateZ(20px); }
/* --- Tech Stack Section --- */
.tech-stack-box {
    text-align: center;
    margin-bottom: 100px;
    padding: 0 5%;
}
.tech-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: -30px auto 60px;
    line-height: 1.8;
}
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}
.tech-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px 25px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}
/* Efek cahaya berpendar dari atas kartu saat di-hover */
.tech-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 255, 204, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
}
.tech-card:hover {
    border-color: rgba(0, 255, 204, 0.4);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}
.tech-card:hover::before {
    opacity: 1;
}
.tech-icon, .tech-card h3, .tech-card p {
    position: relative;
    z-index: 1; /* Memastikan teks di atas efek cahaya */
}
.tech-icon {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 25px;
    transition: color 0.4s;
}
.tech-card:hover .tech-icon {
    color: var(--accent-color);
}
.tech-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}
.tech-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.tech-card strong {
    color: var(--text-main);
    font-weight: 600;
}


/* --- Footer --- */
footer { padding: 100px 10% 50px; background: #000; position: relative; overflow: hidden; }
.contact-box { text-align: center; margin-bottom: 100px; }
.contact-box h2 { font-size: 4rem; margin-bottom: 20px; }
.contact-box p { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 40px; }
.giant-text { font-size: 15vw; font-weight: 900; line-height: 0.8; text-align: center; color: rgba(255,255,255,0.03); -webkit-text-stroke: 1px rgba(255,255,255,0.1); user-select: none; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.footer-links { width: 100%; display: flex; justify-content: space-between; align-items: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); }
.socials a { color: var(--text-main); font-size: 1.5rem; margin-left: 20px; transition: 0.3s; }
.socials a:hover { color: var(--accent-color); }

/* --- About / Profil Section --- */
.about-container { 
    display: flex; 
    align-items: center; 
    gap: 80px; 
    justify-content: space-between; 
}
.about-image-wrapper { 
    flex: 1; 
    position: relative; 
    max-width: 450px; 
    border-radius: 20px;
    transform-style: preserve-3d;
}
.about-img { 
    width: 100%; 
    aspect-ratio: 4/5; 
    object-fit: cover; 
    border-radius: 20px; 
    border: 1px solid rgba(255,255,255,0.05); 
    position: relative; 
    z-index: 2; 
    filter: grayscale(30%); 
    transition: all 0.5s ease;
    transform: translateZ(30px); /* Efek 3D Vanilla Tilt */
}
.about-image-wrapper:hover .about-img { 
    filter: grayscale(0%); 
    border-color: var(--accent-color); 
    box-shadow: 0 0 40px rgba(0,255,204,0.15); 
}
.about-shape { 
    width: 300px; 
    height: 300px; 
    background: var(--accent-color); 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 1; 
    opacity: 0.15; 
}
.about-content { 
    flex: 1.2; 
}
.about-content p { 
    color: var(--text-muted); 
    font-size: 1.1rem; 
    line-height: 1.8; 
    margin-bottom: 20px; 
}
.about-content p strong, .about-content p em { 
    color: var(--text-main); 
    font-weight: 600; 
}



/* Responsivitas untuk layar kecil */
@media (max-width: 900px) {
    .about-container { 
        flex-direction: column; 
    }
    .about-image-wrapper {
        max-width: 100%;
        margin-bottom: 40px;
    }
    .about-content h2 { 
        text-align: center !important; 
    }
}

@media (max-width: 900px) {
    .experience-container { flex-direction: column; }
    .experience-left { position: relative; top: 0; margin-bottom: 50px; }
    .hero-title { font-size: 3rem; }
    .nav-links { display: none; }
    .cursor, .cursor-follower { display: none; }
    * { cursor: auto; }
}

/* --- Responsivitas Lanjutan Khusus Mobile (Max-width: 768px) --- */
@media (max-width: 768px) {
    /* 1. Kunci Paksa Overflow Horizontal */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
    }

    /* 2. Kurangi Padding Kiri-Kanan agar ruang konten lebih lega */
    .section-padding {
        padding: 80px 5%; /* Ubah dari 10% menjadi 5% */
    }
    nav, nav.scrolled {
        padding: 20px 5%;
    }

    /* 3. Sesuaikan Ukuran Font agar tidak menabrak tepi */
    .hero-title {
        font-size: 2.2rem; /* Diperkecil dari 3rem/5rem */
    }
    .section-title {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }
    .giant-text {
        font-size: 20vw; /* Sedikit diperbesar proporsinya untuk mobile */
    }

    /* 4. PERBAIKAN GRID (PENYEBAB UTAMA OVERFLOW) */
    .projects-grid {
        grid-template-columns: 1fr; /* Paksa menjadi 1 kolom penuh di mobile */
    }
    .tech-grid {
        grid-template-columns: 1fr; /* Paksa menjadi 1 kolom penuh di mobile */
    }

    /* 5. Penyesuaian Elemen Timeline */
    .timeline {
        margin-left: 10px;
        padding-left: 25px;
    }
    .timeline-dot {
        left: -31px;
    }

    /* 6. Penyesuaian Tombol & Footer */
    .btn-primary {
        padding: 15px 30px;
        font-size: 1rem;
    }
    .footer-links {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .socials a {
        margin: 0 10px;
    }
}