:root {
    --space-black: #05050A;
    --neon-purple: #8A2BE2;
    --neon-cyan: #00FFFF;
    --glass-bg: rgba(20, 20, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Variabel Transisi Mulus */
    --smooth-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--space-black); }
::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 10px; }

/* Smooth Scroll Global */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--space-black);
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Ambient Nebula Glow */
.ambient-glow {
    position: fixed; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(138,43,226,0.15) 0%, rgba(0,0,0,0) 70%);
    top: -200px; left: -200px; border-radius: 50%; z-index: -1; filter: blur(50px);
}
.ambient-glow.right {
    background: radial-gradient(circle, rgba(0,255,255,0.1) 0%, rgba(0,0,0,0) 70%);
    top: auto; bottom: -200px; left: auto; right: -200px;
}

#galaxy-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; }

/* Navigasi */
nav {
    position: fixed; top: 0; width: 100%; padding: 25px 8%;
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(to bottom, rgba(5,5,10,0.9), transparent);
    backdrop-filter: blur(10px); z-index: 1000;
    transition: all 0.5s var(--smooth-ease);
}
.logo { 
    font-weight: 900; font-size: 1.5rem; letter-spacing: 2px; 
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
nav ul { display: flex; list-style: none; gap: 30px; }
nav ul a { 
    color: #fff; text-decoration: none; font-size: 0.95rem; font-weight: 400;
    position: relative; padding-bottom: 5px; transition: color 0.4s var(--smooth-ease);
}
nav ul a::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 0%; height: 2px; background: var(--neon-cyan); 
    transition: width 0.4s var(--smooth-ease), box-shadow 0.4s var(--smooth-ease);
}
nav ul a:hover { color: var(--neon-cyan); }
nav ul a:hover::after { width: 100%; box-shadow: 0 0 10px var(--neon-cyan); }

/* Sections */
section {
    min-height: 100vh; padding: 120px 8% 80px;
    display: flex; flex-direction: column; justify-content: center; position: relative;
}
.section-title { font-size: 3rem; margin-bottom: 10px; text-align: center; font-weight: 900; }
.section-subtitle { text-align: center; color: #a0a0b0; margin-bottom: 50px; font-size: 1.1rem; }

/* Hero */
.hero { align-items: flex-start; text-align: left; }
.hero h1 { font-size: clamp(3rem, 8vw, 5rem); line-height: 1.1; margin-bottom: 15px; font-weight: 900; }
.hero .subtitle {
    font-size: 1.5rem; color: #a0a0b0; margin-bottom: 40px;
    display: inline-block; overflow: hidden; white-space: nowrap;
    border-right: 3px solid var(--neon-cyan);
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--neon-cyan); } }

/* Tombol Mulus */
.btn {
    padding: 15px 40px; border-radius: 30px; font-size: 1.1rem;
    background: transparent; border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan); text-decoration: none; font-weight: 700;
    position: relative; overflow: hidden; z-index: 1; 
    transition: all 0.6s var(--smooth-ease);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2); display: inline-block;
}
.btn::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    z-index: -1; transition: width 0.6s var(--smooth-ease);
}
.btn:hover { color: #fff; box-shadow: 0 0 30px rgba(138, 43, 226, 0.6); border-color: transparent; transform: translateY(-3px); }
.btn:hover::before { width: 100%; }

/* Kartu Glassmorphism Umum */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.6s var(--smooth-ease), box-shadow 0.6s var(--smooth-ease);
}
.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

/* Tentang Saya */
.about-content {
    max-width: 800px; margin: 0 auto; text-align: center;
    font-size: 1.15rem; color: #e0e0e0; line-height: 1.8;
}
.highlight-text { color: var(--neon-cyan); font-weight: 700; }

/* Skill & Proyek Bars */
.skills-container { max-width: 800px; margin: 0 auto; width: 100%; }
.skill-item { margin-bottom: 25px; }
.skill-info {
    display: flex; justify-content: space-between; margin-bottom: 8px;
    font-weight: 600; letter-spacing: 1px;
}
.skill-bar-bg {
    width: 100%; height: 12px; background: rgba(255, 255, 255, 0.05);
    border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1);
}
.skill-fill {
    height: 100%; width: 0%; 
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 10px; transition: width 2s var(--smooth-ease);
    box-shadow: 0 0 15px var(--neon-cyan);
}

/* Grid Karya & Gambar Proyek */
.project-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px; width: 100%; perspective: 1200px;
}

.project-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 30px; text-decoration: none; color: white;
    position: relative; overflow: hidden; display: flex; flex-direction: column; 
    justify-content: flex-start; transform-style: preserve-3d; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.project-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, transparent, var(--neon-cyan), var(--neon-purple), transparent);
    animation: rotate 6s linear infinite; opacity: 0; transition: opacity 0.8s var(--smooth-ease); z-index: -1;
}
.project-card::after {
    content: ''; position: absolute; inset: 2px; background: #0d0b17; border-radius: 18px; z-index: -1;
}
.project-card:hover::before { opacity: 1; }
@keyframes rotate { 100% { transform: rotate(360deg); } }

/* Pengaturan Gambar Proyek */
.project-image {
    width: 100%; height: 180px; object-fit: cover; border-radius: 12px;
    margin-bottom: 25px; border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(50px); 
    transition: transform 0.6s var(--smooth-ease), box-shadow 0.6s var(--smooth-ease), border-color 0.6s var(--smooth-ease);
}
.project-card:hover .project-image {
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-color: rgba(0, 255, 255, 0.4);
    transform: translateZ(60px) scale(1.02);
}

.project-card h3 { font-size: 1.5rem; color: #fff; margin-bottom: 10px; transform: translateZ(30px); transition: transform 0.6s var(--smooth-ease); }
.project-card p { font-size: 0.95rem; color: #b0b0c0; margin-bottom: 25px; transform: translateZ(20px); flex-grow: 1; transition: transform 0.6s var(--smooth-ease); }

.visit-link {
    font-size: 0.9rem; font-weight: 700; text-transform: uppercase;
    color: var(--neon-cyan); display: inline-flex; align-items: center; gap: 8px; transform: translateZ(40px);
    margin-top: auto; transition: transform 0.6s var(--smooth-ease), color 0.4s ease;
}
.visit-link svg { width: 16px; height: 16px; fill: currentColor; transition: transform 0.4s var(--smooth-ease); }
.project-card:hover .visit-link svg { transform: translateX(8px); }
.project-card:hover .visit-link { color: #fff; }

/* Kontak */
#kontak { text-align: center; align-items: center; }

/* Reveal Animation - Super Mulus */
.reveal { 
    opacity: 0; 
    transform: translateY(60px) scale(0.95); 
    transition: all 1s var(--smooth-ease); 
}
.reveal.active { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
}

@media (max-width: 768px) {
    nav { padding: 20px 5%; }
    nav ul { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .hero .subtitle { font-size: 1.1rem; }
    section { padding: 100px 5% 60px; }
    .section-title { font-size: 2.2rem; }
    .glass-panel { padding: 25px; }
}