:root {
    --bg-dark: #0d1117;
    --bg-darker: #010409;
    --accent: #7c3aed;
    --accent-2: #06b6d4;
    --text-light: #e6edf3;
    --text-muted: #8b949e;
}

* { scroll-behavior: smooth; }

body {
    background: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow-x: hidden;
}

/* ===== Preloader ===== */
#preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-darker);
    display: flex; flex-direction: column; gap: 1rem;
    align-items: center; justify-content: center;
    transition: opacity .6s ease, visibility .6s;
}
#preloader.hide { opacity: 0; visibility: hidden; }
.loader-spinner {
    width: 54px; height: 54px;
    border: 4px solid rgba(124, 58, 237, .2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
    letter-spacing: .4em; font-size: .8rem;
    color: var(--text-muted); text-transform: uppercase;
}

/* ===== Navbar ===== */
#mainNav {
    padding: 1rem 0;
    background: transparent;
    transition: all .4s ease;
}
#mainNav.scrolled {
    background: rgba(1, 4, 9, .92);
    backdrop-filter: blur(12px);
    padding: .55rem 0;
    box-shadow: 0 4px 30px rgba(0,0,0,.4);
}
#mainNav .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 .35rem;
    position: relative;
    transition: color .3s;
}
#mainNav .nav-link::after {
    content: ''; position: absolute; left: 50%; bottom: 2px;
    width: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: all .3s; transform: translateX(-50%);
}
#mainNav .nav-link:hover, #mainNav .nav-link.active { color: #fff; }
#mainNav .nav-link:hover::after, #mainNav .nav-link.active::after { width: 70%; }
.navbar-brand { letter-spacing: .05em; }

/* ===== Buttons & Colors ===== */
.text-accent { color: var(--accent-2) !important; }
.bg-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; }
.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none; color: #fff; font-weight: 600;
    transition: transform .3s, box-shadow .3s;
}
.btn-accent:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(124,58,237,.45); }
.btn-outline-accent {
    border: 2px solid var(--accent); color: var(--text-light); font-weight: 600;
    transition: all .3s;
}
.btn-outline-accent:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }
.text-gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== Hero ===== */
.hero-section { position: relative; background: var(--bg-dark); overflow: hidden; }
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(124,58,237,.18), transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(6,182,212,.15), transparent 40%);
}
.hero-particles { position: absolute; inset: 0; z-index: 0; }
.particle {
    position: absolute; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    opacity: .35; animation: floatUp linear infinite;
}
@keyframes floatUp {
    from { transform: translateY(110vh) scale(0); opacity: 0; }
    20% { opacity: .4; }
    80% { opacity: .4; }
    to { transform: translateY(-10vh) scale(1); opacity: 0; }
}
.badge-hero {
    background: rgba(124,58,237,.15);
    border: 1px solid rgba(124,58,237,.45);
    color: #c4b5fd; border-radius: 50rem;
    padding: .5rem 1.1rem; font-size: .85rem; font-weight: 600;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.2; }
.hero-subtitle { min-height: 2.2em; font-weight: 500; }
.hero-desc { max-width: 540px; }

/* Hero floating illustration */
.hero-illustration {
    position: relative; height: 420px;
    display: flex; align-items: center; justify-content: center;
}
.hero-core {
    width: 210px; height: 210px; border-radius: 50%;
    background: linear-gradient(145deg, rgba(124,58,237,.25), rgba(6,182,212,.2));
    border: 2px solid rgba(124,58,237,.5);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 2.6rem; color: #c4b5fd;
    animation: pulseGlow 3s ease-in-out infinite;
    box-shadow: 0 0 60px rgba(124,58,237,.35);
}
.hero-core h5 { font-size: 1rem; color: var(--text-light); }
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(124,58,237,.3); transform: scale(1); }
    50% { box-shadow: 0 0 80px rgba(6,182,212,.45); transform: scale(1.03); }
}
.float-box {
    position: absolute;
    background: rgba(22,27,34,.9);
    border: 1px solid rgba(124,58,237,.4);
    border-radius: 1rem; padding: .9rem 1.3rem;
    display: flex; align-items: center; gap: .6rem;
    font-weight: 600; font-size: .9rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    animation: floatY 4s ease-in-out infinite;
}
.float-box i { font-size: 1.4rem; color: var(--accent-2); }
.box-1 { top: 6%; left: 4%; animation-delay: 0s; }
.box-2 { top: 42%; right: 0; animation-delay: 1.2s; }
.box-3 { bottom: 4%; left: 12%; animation-delay: 2.2s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}
.wave-bottom { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; }
.wave-bottom svg { width: 100%; height: 80px; }

/* ===== Sections ===== */
.section-dark { background: var(--bg-dark); }
.section-darker { background: var(--bg-darker); }
.section-badge {
    display: inline-block; padding: .45rem 1.1rem;
    background: rgba(6,182,212,.12); border: 1px solid rgba(6,182,212,.4);
    color: var(--accent-2); border-radius: 50rem;
    font-size: .85rem; font-weight: 600;
}
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }

/* ===== About ===== */
.about-img-wrapper { position: relative; }
.about-img-frame {
    position: absolute; inset: -18px 18px 18px -18px;
    border: 3px solid rgba(124,58,237,.5); border-radius: 1.5rem;
}
.about-img-content {
    position: relative; border-radius: 1.5rem;
    background: linear-gradient(145deg, #161b22, #0d1117);
    border: 1px solid rgba(124,58,237,.35);
    min-height: 320px; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.exp-badge {
    position: absolute; bottom: -18px; right: -10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 1rem; padding: 1rem 1.4rem;
    color: #fff; text-align: center; line-height: 1.1;
    box-shadow: 0 15px 40px rgba(124,58,237,.5);
}
.exp-badge h3 { font-size: 2rem; }
.exp-badge small { font-size: .72rem; opacity: .9; }
.about-point {
    display: flex; gap: .9rem; align-items: flex-start;
    background: rgba(22,27,34,.6); border: 1px solid rgba(139,148,158,.15);
    border-radius: 1rem; padding: 1rem 1.2rem;
    transition: transform .3s, border-color .3s; height: 100%;
}
.about-point:hover { transform: translateY(-5px); border-color: var(--accent); }
.about-point > i { color: var(--accent-2); font-size: 1.5rem; margin-top: .1rem; }

/* ===== Services ===== */
.service-card {
    position: relative;
    background: rgba(22,27,34,.7);
    border: 1px solid rgba(139,148,158,.15);
    border-radius: 1.4rem; padding: 2.2rem 1.8rem;
    transition: transform .35s ease, box-shadow .35s, border-color .35s;
    overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.service-card:hover { transform: translateY(-10px); border-color: rgba(124,58,237,.6); box-shadow: 0 20px 50px rgba(124,58,237,.25); }
.service-card:hover::before { transform: scaleX(1); }
.service-card.featured { border-color: rgba(6,182,212,.55); background: linear-gradient(160deg, rgba(6,182,212,.08), rgba(22,27,34,.9)); }
.service-badge {
    position: absolute; top: 1.1rem; right: 1.1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; font-size: .72rem; font-weight: 700;
    padding: .3rem .8rem; border-radius: 50rem; letter-spacing: .05em;
}
.service-icon {
    width: 68px; height: 68px; border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(6,182,212,.2));
    border: 1px solid rgba(124,58,237,.5);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; color: var(--accent-2);
    transition: transform .35s;
}
.service-card:hover .service-icon { transform: rotate(-8deg) scale(1.1); }
.service-list { list-style: none; padding: 0; margin: 1rem 0; }
.service-list li { padding: .3rem 0; color: var(--text-muted); font-size: .92rem; }
.service-list i { color: var(--accent-2); margin-right: .5rem; }
.service-link {
    color: var(--accent-2); text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: .4rem;
    transition: gap .3s;
}
.service-link:hover { gap: .8rem; color: #fff; }

/* Skills */
.skill-item { margin-bottom: 1.1rem; }
.skill-item span { font-size: .9rem; font-weight: 600; }
.progress {
    height: 8px; background: rgba(139,148,158,.2);
    border-radius: 50rem; margin-top: .4rem; overflow: visible;
}
.progress-bar {
    width: 0; height: 8px; border-radius: 50rem;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px rgba(124,58,237,.6);
    transition: width 1.4s cubic-bezier(.25,.8,.25,1);
}

/* ===== Stats ===== */
.stats-section {
    background: linear-gradient(120deg, rgba(124,58,237,.16), rgba(6,182,212,.12));
    border-top: 1px solid rgba(124,58,237,.3);
    border-bottom: 1px solid rgba(124,58,237,.3);
}
.stat-item i { font-size: 2.2rem; color: var(--accent-2); }
.stat-item h2 { font-size: 2.6rem; margin: .4rem 0 0; }
.stat-item p { color: var(--text-muted); margin: 0; font-size: .92rem; }

/* ===== Contact ===== */
.contact-item {
    display: flex; align-items: center; gap: 1rem;
    background: rgba(22,27,34,.6); border: 1px solid rgba(139,148,158,.15);
    border-radius: 1rem; padding: 1rem 1.2rem; margin-bottom: 1rem;
    transition: transform .3s, border-color .3s;
}
.contact-item:hover { transform: translateX(8px); border-color: var(--accent); }
.contact-item > i {
    font-size: 1.5rem; color: #fff; width: 52px; height: 52px;
    border-radius: .9rem; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    flex-shrink: 0;
}
.contact-form-card {
    background: rgba(22,27,34,.8);
    border: 1px solid rgba(124,58,237,.35);
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,.45);
}
.form-control, .form-select {
    background: rgba(13,17,23,.9); border: 1px solid rgba(139,148,158,.3);
    color: var(--text-light); padding: .75rem 1rem; border-radius: .8rem;
}
.form-control:focus, .form-select:focus {
    background: rgba(13,17,23,.9); color: var(--text-light);
    border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(124,58,237,.25);
}
.form-control::placeholder { color: var(--text-muted); }

/* ===== Footer ===== */
.footer-section { background: var(--bg-darker); border-top: 1px solid rgba(139,148,158,.1); }
.footer-link li { padding: .25rem 0; }
.footer-link a { color: var(--text-muted); text-decoration: none; transition: color .3s, padding-left .3s; }
.footer-link a:hover { color: var(--accent-2); padding-left: 6px; }
.social-icon {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid rgba(139,148,158,.3);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: all .3s;
}
.social-icon:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; transform: translateY(-4px); border-color: transparent;
}

/* ===== Back to top ===== */
.back-to-top {
    position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 900;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 1.2rem;
    opacity: 0; visibility: hidden; transform: translateY(16px);
    transition: all .35s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { color: #fff; box-shadow: 0 10px 25px rgba(124,58,237,.5); }

@media (max-width: 575px) {
    .hero-title { font-size: 2rem; }
    .exp-badge { right: 0; }
}

/* ===== LOGO ===== */
.nav-logo-badge {
    width: 42px; height: 42px; border-radius: 50%;
    background: #ffffff;
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    box-shadow: 0 0 14px rgba(124, 58, 237, .55);
    transition: transform .3s;
}
.nav-logo-badge img { width: 82%; height: 82%; object-fit: contain; }
.navbar-brand:hover .nav-logo-badge { transform: rotate(-10deg) scale(1.08); }
.brand-text { letter-spacing: .04em; font-size: 1.05rem; }

/* Preloader logo */
.loader-logo-wrap { animation: logoPulse 1.6s ease-in-out infinite; }
.loader-logo { width: 90px; height: 90px; object-fit: contain; }
@keyframes logoPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(124,58,237,.5)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(6,182,212,.7)); }
}

/* Logo di hero */
.hero-logo {
    width: 120px; height: 120px; object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(255,255,255,.25));
}

/* Logo di section tentang */
.about-logo {
    width: 150px; height: 150px; object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(124,58,237,.4));
}

/* Kontras teks diperjelas */
.hero-subtitle { color: #a5d8ff !important; }
.text-muted { color: #9aa7b4 !important; }
.footer-section .text-muted { color: #8b98a5 !important; }