/* --- VARIABLE & GLOBAL SETUP --- */
:root {
    --bg-dark-navy: #0A192F;
    --bg-light-navy: #172A45;
    --text-light: #CCD6F6;
    --text-slate: #8892B0;
    --accent-cyan: #64FFDA;
    --font-primary: 'Poppins', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --transition-speed: 0.3s;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-primary);
    color: var(--text-slate);
    background-color: var(--bg-dark-navy);
    background-image: linear-gradient(180deg, var(--bg-dark-navy) 0%, var(--bg-light-navy) 80%);
    overflow-x: hidden;
}
.text-accent { color: var(--accent-cyan); }
section { padding: 100px 0; }
.fullscreen-section { min-height: 100vh; display: flex; align-items: center; }
.main-container { padding: 0 10%; max-width: 1600px; margin: 0 auto; }
.content-wrapper { max-width: 1000px; width: 100%; margin: 0 auto; }

/* --- ELEMEN GLOBAL --- */
.cursor-glow{position:fixed;width:400px;height:400px;border-radius:50%;background:radial-gradient(circle, rgba(100, 255, 218, 0.08) 0%, rgba(100, 255, 218, 0) 60%);transform:translate(-50%, -50%);pointer-events:none;z-index:99;transition:width 0.3s, height 0.3s;}
.welcome-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--bg-dark-navy);display:flex;justify-content:center;align-items:center;z-index:100;transition:opacity .8s ease-in-out, visibility .8s;text-align:center;}
.welcome-overlay.hidden{opacity:0;visibility:hidden;}
.welcome-title{
    font-family:var(--font-mono);
    font-size:3rem;
    color:var(--text-light);
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.5s;
}
.welcome-subtitle{color:var(--accent-cyan);letter-spacing:2px; font-family: var(--font-mono);}

/* PERUBAHAN DI SINI: Animasi per huruf */
.welcome-subtitle span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: fadeIn-up 0.5s ease forwards;
    margin: 0 1px;
}
.welcome-subtitle .space { width: 8px; }

/* Delay animasi untuk "Connecting" */
.welcome-subtitle span:nth-child(1) { animation-delay: 1.2s; }
.welcome-subtitle span:nth-child(2) { animation-delay: 1.25s; }
.welcome-subtitle span:nth-child(3) { animation-delay: 1.3s; }
.welcome-subtitle span:nth-child(4) { animation-delay: 1.35s; }
.welcome-subtitle span:nth-child(5) { animation-delay: 1.4s; }
.welcome-subtitle span:nth-child(6) { animation-delay: 1.45s; }
.welcome-subtitle span:nth-child(7) { animation-delay: 1.5s; }
.welcome-subtitle span:nth-child(8) { animation-delay: 1.55s; }
.welcome-subtitle span:nth-child(9) { animation-delay: 1.6s; }
.welcome-subtitle span:nth-child(10) { animation-delay: 1.65s; }
.welcome-subtitle span:nth-child(11) { animation-delay: 1.7s; } /* spasi */
/* Delay animasi untuk "ideas" */
.welcome-subtitle span:nth-child(12) { animation-delay: 1.75s; }
.welcome-subtitle span:nth-child(13) { animation-delay: 1.8s; }
.welcome-subtitle span:nth-child(14) { animation-delay: 1.85s; }
.welcome-subtitle span:nth-child(15) { animation-delay: 1.9s; }
.welcome-subtitle span:nth-child(16) { animation-delay: 1.95s; }
.welcome-subtitle span:nth-child(17) { animation-delay: 2.0s; } /* spasi */
/* Delay animasi untuk "through" */
.welcome-subtitle span:nth-child(18) { animation-delay: 2.05s; }
.welcome-subtitle span:nth-child(19) { animation-delay: 2.1s; }
.welcome-subtitle span:nth-child(20) { animation-delay: 2.15s; }
.welcome-subtitle span:nth-child(21) { animation-delay: 2.2s; }
.welcome-subtitle span:nth-child(22) { animation-delay: 2.25s; }
.welcome-subtitle span:nth-child(23) { animation-delay: 2.3s; }
.welcome-subtitle span:nth-child(24) { animation-delay: 2.35s; }
.welcome-subtitle span:nth-child(25) { animation-delay: 2.4s; } /* spasi */
/* Delay animasi untuk "code..." */
.welcome-subtitle span:nth-child(26) { animation-delay: 2.45s; }
.welcome-subtitle span:nth-child(27) { animation-delay: 2.5s; }
.welcome-subtitle span:nth-child(28) { animation-delay: 2.55s; }
.welcome-subtitle span:nth-child(29) { animation-delay: 2.6s; }
.welcome-subtitle span:nth-child(30) { animation-delay: 2.65s; }
.welcome-subtitle span:nth-child(31) { animation-delay: 2.7s; }
.welcome-subtitle span:nth-child(32) { animation-delay: 2.75s; }

@keyframes fadeIn-up {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.main-header{position:fixed;top:0;left:0;width:100%;z-index:50;padding:0 50px;transition:all .3s ease-in-out;}
.main-header.scrolled{background-color:rgba(10, 25, 47, .85);box-shadow:0 10px 30px -10px rgba(2, 12, 27, .7);backdrop-filter:blur(10px);}
.header-content{display:flex;justify-content:space-between;align-items:center;height:80px;max-width:1600px;margin:0 auto;}
.logo{font-family:var(--font-mono);color:var(--accent-cyan);font-size:1.5rem;}
.header-nav ul{list-style:none;display:flex;gap:30px;}
.header-nav a{text-decoration:none;color:var(--text-light);font-family:var(--font-mono);font-size:.9rem;transition:color .3s ease;}
.header-nav a:hover{color:var(--accent-cyan);}
.side-nav{position:fixed;right:30px;top:50%;transform:translateY(-50%);z-index:10;}
.side-nav ul{list-style:none;}
.side-nav li{margin:20px 0;}
.nav-dot{display:block;width:10px;height:10px;background-color:var(--text-slate);border-radius:50%;transition:all var(--transition-speed) ease;}
.nav-dot.active, .nav-dot:hover{background-color:var(--accent-cyan);transform:scale(1.5);}
.main-footer{padding:25px;text-align:center;}
.social-links{margin-bottom:15px;}
.social-links a{color:var(--text-slate);font-size:1.5rem;margin:0 15px;transition:all .3s ease;}
.social-links a:hover{color:var(--accent-cyan);transform:translateY(-5px);}
.main-footer p{font-family:var(--font-mono);font-size:.8rem;color:var(--text-slate);}

/* --- ANIMASI & JUDUL SECTION --- */
.reveal{opacity:0;transform:translateY(50px);transition:opacity .6s ease-out, transform .6s ease-out;}
.reveal.active{opacity:1;transform:translateY(0);}
.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: clamp(26px, 5vw, 32px);
    color: var(--text-light);
    margin-bottom: 40px;
}
.section-title span {
    color: var(--accent-cyan);
    font-size: 0.8em;
}
.section-title::after {
    content: '';
    display: block;
    flex-grow: 1;
    height: 1px;
    background-color: var(--bg-light-navy);
}

/* --- HOME SECTION --- */
.hero-intro { color: var(--accent-cyan); font-family: var(--font-mono); margin-bottom: 1rem; }
.hero-name { 
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.1;
    background: linear-gradient(90deg, var(--text-light), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-tagline { font-size: clamp(28px, 5vw, 54px); color: var(--text-slate); margin: 0.5rem 0 1.5rem 0; }
.hero-description { max-width: 600px; margin-bottom: 2.5rem; line-height: 1.6; }
.btn-primary{display:inline-block;padding:1rem 1.75rem;border:1px solid var(--accent-cyan);border-radius:5px;color:var(--accent-cyan);text-decoration:none;font-family:var(--font-mono);background-color:transparent;transition:all var(--transition-speed) ease;}
.btn-primary:hover{background-color:rgba(100, 255, 218, .1);}

/* --- ABOUT & EXPERIENCE --- */
.about-container { display: flex; gap: 50px; align-items: center; flex-wrap: wrap; }
.about-text { flex: 3; min-width: 300px; }
.about-photo { flex: 2; max-width: 300px; min-width: 250px; position: relative; margin: 0 auto; }
.about-photo::before { content: ''; position: absolute; width: 100%; height: 100%; border: 2px solid var(--accent-cyan); border-radius: 50%; top: 15px; left: 15px; z-index: -1; transition: all 0.3s ease; }
.about-photo:hover::before { top: 10px; left: 10px; }
.about-photo img { 
    width: 100%; 
    border-radius: 50%; 
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.experience-tabs { max-width: 700px; margin: 0 auto; }
.tab-buttons { display: flex; border-bottom: 1px solid var(--bg-light-navy); margin-bottom: 20px; }
.tab-btn { background: none; border: none; color: var(--text-slate); padding: 10px 20px; font-family: var(--font-mono); cursor: pointer; position: relative; transition: color 0.3s ease; }
.tab-btn.active { color: var(--accent-cyan); }
.tab-btn::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background-color: var(--accent-cyan); transform: scaleX(0); transition: transform 0.3s ease; }
.tab-btn.active::after { transform: scaleX(1); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.5s; }
.exp-date { font-family: var(--font-mono); font-size: 0.9rem; margin-bottom: 15px; }
.tab-pane h3 { color: var(--text-light); margin-bottom: 5px; }
.tab-pane ul { list-style: none; padding-left: 20px; }
.tab-pane li { position: relative; margin-bottom: 10px; line-height: 1.5; }
.tab-pane li::before { content: '▹'; position: absolute; left: -20px; color: var(--accent-cyan); }

/* --- PROJECTS SECTION --- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; }
.project-card { background-color: var(--bg-light-navy); border-radius: 5px; display: flex; flex-direction: column; transition: all 0.3s ease; overflow: hidden; }
.project-card:hover { transform: translateY(-7px); box-shadow: 0 10px 30px -15px rgba(2,12,27,0.7); }
.project-card img { width: 100%; height: 180px; object-fit: cover; cursor: zoom-in; }
.project-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 2rem; color: var(--accent-cyan); }
.project-links { display: flex; gap: 15px; }
.project-links a { color: var(--text-slate); font-size: 1.2rem; transition: color 0.3s ease; }
.project-links a:hover { color: var(--accent-cyan); }
.project-title { color: var(--text-light); margin-bottom: 10px; }
.project-desc { flex-grow: 1; font-size: 0.95rem; }
.project-tech { list-style: none; display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; font-family: var(--font-mono); font-size: 0.8rem; }

/* --- SKILLS SECTION --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.skill-category { background-color: var(--bg-light-navy); padding: 1.5rem; border-radius: 5px; }
.skill-category h3 { color: var(--text-light); margin-bottom: 15px; border-bottom: 1px solid var(--accent-cyan); padding-bottom: 10px; }
.skill-category ul { list-style: none; }
.skill-category li { margin-bottom: 10px; }

/* --- CERTIFICATES & EDUCATION SECTION --- */
.certificate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; }
.certificate-card { background-color: var(--bg-light-navy); border-radius: 5px; transition: all 0.3s ease; display: flex; flex-direction: column; overflow: hidden; }
.certificate-card:hover { transform: scale(1.03); box-shadow: 0 10px 30px -15px rgba(2,12,27,0.7); }
.certificate-card img { width: 100%; height: 180px; object-fit: cover; cursor: zoom-in; }
.certificate-content { padding: 1.5rem; position: relative; flex-grow: 1; border-left: 3px solid var(--accent-cyan); }
.certificate-link { position: absolute; top: 1.5rem; right: 1.5rem; color: var(--text-slate); font-size: 1.2rem; transition: color 0.3s ease; }
.certificate-link:hover { color: var(--accent-cyan); }
.education-card { background-color: var(--bg-light-navy); padding: 1.5rem; border-radius: 5px; border-left: 3px solid var(--accent-cyan); max-width: 700px; margin: 0 auto;}
.certificate-card h4, .education-card h3 { color: var(--text-light); margin-bottom: 5px; }
.certificate-card p, .education-card p { font-size: 0.9rem; }
.relevant-courses { font-size: 0.85rem; margin-top: 15px; font-style: italic; opacity: 0.8; }

/* --- CONTACT SECTION --- */
.contact-layout { text-align: center; }
.contact-subheading { font-family: var(--font-mono); color: var(--accent-cyan); }
.contact-heading { font-size: clamp(40px, 5vw, 60px); color: var(--text-light); margin: 10px 0 20px; }
.contact-text { max-width: 600px; margin: 0 auto 30px auto; }

/* --- STYLE UNTUK NAVIGASI MOBILE --- */
.mobile-nav-toggle {
    display: none; /* Sembunyikan di desktop */
    position: relative;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 60; /* Pastikan di atas elemen lain */
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-bar:not(:last-child) {
    margin-bottom: 5px;
}

/* Animasi Tombol Hamburger menjadi 'X' */
.mobile-nav-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-nav-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- MEDIA QUERIES (RESPONSIVE) --- */
@media (max-width: 768px) {
    .side-nav {
        display: none;
    }

    /* Tampilkan tombol hamburger */
    .mobile-nav-toggle {
        display: block;
    }

    /* Atur menu navigasi utama untuk mobile */
    .header-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(75vw, 400px); /* Lebar menu 75% dari layar, maks 400px */
        height: 100vh;
        background-color: var(--bg-light-navy);
        box-shadow: -10px 0px 30px -15px rgba(2,12,27,0.7);
        transform: translateX(100%); /* Sembunyikan di luar layar */
        transition: transform 0.3s ease-in-out;
        z-index: 55;
    }

    .header-nav.active {
        transform: translateX(0); /* Tampilkan menu */
    }

    .header-nav ul {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        height: 100%;
        padding-top: 50px;
    }

    .header-nav a {
        font-size: 1.1rem;
    }
}

/* --- STYLE UNTUK IMAGE MODAL --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-modal-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, .7);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: zoom 0.4s;
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.modal-filename {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.image-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

@keyframes zoom {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-modal {
    color: #555;
    font-size: 28px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
}