/* ==========================================================================
   AIFORA PORTFOLIO - CSS SCROLL MANJANG ELEGANT + NO DELAY PLANET
   ========================================================================== */

:root {
    --bg-color: #87CEEB; 
    --text-color: #1e293b; --text-muted: #475569;
    --sidebar-bg: rgba(255, 255, 255, 0.25); 
    --sidebar-text: #1e293b; --sidebar-heading: #0f172a; 
    --sidebar-border: rgba(255, 255, 255, 0.3);
    --accent-color: #0284c7; --accent-hover: #0369a1; 
    --card-bg: rgba(255, 255, 255, 0.85); 
    --border-color: rgba(255, 255, 255, 0.5); 
    --shadow: 0px 8px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg-color: #0b1120; 
    --text-color: #f8fafc; --text-muted: #94a3b8;
    --sidebar-bg: rgba(11, 17, 32, 0.4); 
    --sidebar-text: #cbd5e1; --sidebar-heading: #ffffff; 
    --sidebar-border: rgba(255, 255, 255, 0.05);
    --accent-color: #38bdf8; --accent-hover: #7dd3fc; 
    --card-bg: rgba(30, 41, 59, 0.85); 
    --border-color: rgba(255, 255, 255, 0.05); 
    --shadow: 0px 8px 30px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* KEMBALI SCROLL SMOOTH */
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; }

body { font-family: 'Inter', sans-serif; background-color: transparent; color: var(--text-color); line-height: 1.6; overflow-x: hidden; top: 0 !important; position: static !important; }
a { color: var(--accent-color); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--accent-hover); }

/* --- SIDEBAR --- */
.sidebar-wrapper { display: flex; flex-direction: column; height: 100%; }
#header { position: fixed; top: 0; left: 0; bottom: 0; width: 300px; transition: 0.5s; z-index: 9997; background: var(--sidebar-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); padding: 0 15px; overflow-y: auto; border-right: 1px solid var(--sidebar-border); }
.profile img { margin: 25px auto 15px auto; display: block; width: 120px; height: 120px; border: 4px solid var(--accent-color); padding: 4px; background: rgba(255,255,255,0.2); object-fit: cover; transition: 0.4s; border-radius: 50%; }
.profile img:hover { transform: scale(1.05) rotate(3deg); }
.profile h1 { font-size: 24px; font-weight: 700; text-align: center; }
.profile h1 a { color: var(--sidebar-heading); }
.social-links a { display: inline-block; background: transparent; color: var(--sidebar-text); padding: 10px 0; margin-right: 4px; border-radius: 50%; text-align: center; width: 40px; height: 40px; border: 1px solid var(--sidebar-border); transition: 0.3s; }
.social-links a:hover { background: var(--accent-color); color: #fff; transform: translateY(-3px); border-color: var(--accent-color); }
.nav-menu { padding: 30px 0 0 0; }
.nav-menu li { margin-bottom: 8px; list-style: none; }
.nav-menu a { display: flex; align-items: center; color: var(--sidebar-text); padding: 12px 15px; border-radius: 8px; font-weight: 600; transition: 0.3s; cursor: pointer;}
.nav-menu a i { font-size: 20px; padding-right: 15px; color: var(--sidebar-text); transition: 0.3s; opacity: 0.8;}
.nav-menu a:hover, .nav-menu .active { color: var(--accent-color); background: rgba(255, 255, 255, 0.15); transform: translateX(5px); }
[data-theme="dark"] .nav-menu a:hover, [data-theme="dark"] .nav-menu .active { background: rgba(0, 0, 0, 0.2); }
.nav-menu a:hover i, .nav-menu .active i { color: var(--accent-color); opacity: 1;}
.sidebar-footer { margin-top: auto; font-size: 0.8rem; color: var(--text-muted); padding-bottom: 20px; text-align: center;}

#main { margin-left: 300px; transition: 0.5s; position: relative; z-index: 1;}
.mobile-nav-toggle { position: fixed; right: 20px; top: 20px; z-index: 9999; border: 0; font-size: 24px; background-color: var(--accent-color); color: #fff; width: 45px; height: 45px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; box-shadow: var(--shadow); transition: 0.3s;}
.mobile-nav-toggle:hover { transform: scale(1.1); }
.desktop-hide { display: none; }
@media (max-width: 1199px) { #header { left: -300px; } #main { margin-left: 0; } .desktop-hide { display: inline-flex; } .mobile-nav-active #header { left: 0; } .mobile-nav-active { overflow: hidden; } }

/* --- KONTROL ATAS --- */
.top-controls { position: fixed; top: 20px; right: 80px; z-index: 9998; display: flex; align-items: center; background: var(--sidebar-bg); padding: 8px 15px; border-radius: 50px; border: 1px solid var(--sidebar-border); box-shadow: var(--shadow); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
#lang-toggle, #theme-toggle { background: transparent; border: none; font-family: 'Inter', sans-serif; color: var(--sidebar-text); font-size: 1.1rem; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
#lang-toggle span { font-weight: 700; }
#lang-toggle:hover, #theme-toggle:hover { color: var(--accent-color); transform: scale(1.05); }
.separator { width: 1px; height: 20px; background-color: var(--sidebar-border); margin: 0 10px; }

#google_translate_element { position: absolute !important; top: -10000px !important; left: -10000px !important; width: 1px !important; height: 1px !important; z-index: -9999 !important; opacity: 0 !important; pointer-events: none !important; }
.goog-te-banner-frame { display: none !important; }
.skiptranslate > iframe { display: none !important; }

/* --- ANIMASI LANGIT --- */
.sky-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: var(--bg-color); pointer-events: none; z-index: -10; overflow: hidden; transition: background-color 0.5s ease; }
.cloud-layer, .planet, .astronaut-costume-container { will-change: transform; }

.celestial-body { position: absolute; top: 15%; right: 15%; font-size: 5rem; transition: 0.5s; z-index: 2; }
[data-theme="light"] .celestial-body::before { content: '\f185'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #fbbf24; animation: spin-slow 20s linear infinite; display: inline-block; filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.6));}
.cloud-layer { position: absolute; background: white; border-radius: 50%; filter: blur(12px); opacity: 0; transition: 0.5s; z-index: 1; display: none; }
[data-theme="light"] .cloud-layer { opacity: 0.8; display: block; }
.cloud-layer::before, .cloud-layer::after { content: ''; position: absolute; background: #fff; border-radius: 50%; opacity: 0.9; }

/* AWAN TANPA DELAY */
.c1 { top: 20%; left: -300px; animation: floatObj 30s linear infinite -5s; } 
.c1::before { width: 100px; height: 100px; box-shadow: 60px 20px 0 -10px #fff, 110px 0px 0 #fff, 170px 15px 0 -10px #fff; }
.c2 { top: 40%; left: -200px; animation: floatObj 45s linear infinite -20s; } 
.c2::before { width: 80px; height: 80px; box-shadow: 50px 10px 0 -10px #fff, 90px -10px 0 #fff; }
.c3 { top: 10%; left: -250px; animation: floatObj 35s linear infinite -15s; } 
.c3::before { width: 90px; height: 90px; box-shadow: 45px 15px 0 -5px #fff, 100px 5px 0 #fff; }

[data-theme="dark"] .celestial-body::before { content: '\f186'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #e2e8f0; filter: drop-shadow(0 0 15px rgba(255,255,255,0.5)); transform: rotate(-20deg); display: inline-block; }
.stars-layer { position: absolute; width: 100%; height: 100%; z-index: 1; opacity: 0; transition: 0.5s; display: none; background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(2px 2px at 150px 80px, #fff, transparent), radial-gradient(2px 2px at 80px 150px, #fff, transparent), radial-gradient(2px 2px at 250px 60px, #fff, transparent), radial-gradient(2px 2px at 300px 200px, #fff, transparent); background-repeat: repeat; background-size: 350px 350px; animation: twinkle 3s infinite alternate; }
[data-theme="dark"] .stars-layer { opacity: 0.8; display: block; }

.planet { position: absolute; border-radius: 50%; display: none; opacity: 0; z-index: 1; transition: opacity 0.5s ease; }
[data-theme="dark"] .planet { display: block; opacity: 0.9; }

@media (max-width: 768px) { .planet, .helmet-overlay-frame { filter: none !important; box-shadow: none !important; } .top-controls { top: 15px; right: 75px; padding: 5px 12px; } #lang-toggle span { font-size: 0.9rem; } }

/* PLANET TANPA DELAY (LANGSUNG MUNCUL & MENYEBAR) */
.p-merkurius { width: 18px; height: 18px; top: 10%; background: #a8a8a8; animation: floatObj 25s linear infinite -2s; }
.p-venus { width: 30px; height: 30px; top: 25%; background: #e08926; animation: floatObj 35s linear infinite -15s; }
.p-bumi { width: 40px; height: 40px; top: 45%; background: radial-gradient(circle, #4facfe, #228b22); animation: floatObj 45s linear infinite -25s; }
.p-mars { width: 25px; height: 25px; top: 75%; background: #c1440e; animation: floatObj 55s linear infinite -35s; }
.p-jupiter { width: 120px; height: 120px; top: 15%; background: linear-gradient(to bottom, #d39c7e, #c88b3a, #e2c092, #a6582c); box-shadow: inset -15px -15px 30px rgba(0,0,0,0.6); animation: floatObj 80s linear infinite -10s; }
.p-saturnus { width: 90px; height: 90px; top: 60%; background: #e3d599; animation: floatObj 90s linear infinite -45s; box-shadow: inset -10px -10px 20px rgba(0,0,0,0.6);}
.p-saturnus::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotateX(75deg); width: 160px; height: 160px; border: 15px solid rgba(200, 180, 140, 0.6); border-radius: 50%; }
.p-uranus { width: 60px; height: 60px; top: 85%; background: #4b70dd; animation: floatObj 70s linear infinite -55s; }
.p-neptunus { width: 60px; height: 60px; top: 35%; background: #274687; animation: floatObj 65s linear infinite -20s; }

@keyframes spin-slow { 100% { transform: rotate(360deg); } }
@keyframes twinkle { 0% { opacity: 0.3; transform: scale(1); } 100% { opacity: 0.8; transform: scale(1.05); } }
@keyframes floatObj { 0% { transform: translate3d(-150px, 0, 0) rotate(0deg); } 100% { transform: translate3d(120vw, 0, 0) rotate(360deg); } }

/* --- HERO ASTRONOT --- */
#hero { width: 100%; min-height: 100vh; background: transparent; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero-content-wrapper { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 30px; z-index: 1; }
.hero-text-box { flex: 1; min-width: 300px; padding-right: 30px; }
.hero-text-box h1 { font-size: 4rem; font-weight: 800; margin-bottom: 20px; background: linear-gradient(135deg, var(--text-color), var(--accent-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.hero-text-box p { font-size: 1.15rem; color: var(--text-color); font-weight: 500; font-style: italic; border-left: 4px solid var(--accent-color); padding-left: 20px; line-height: 1.8; text-shadow: 0 1px 5px rgba(255,255,255,0.3); }
[data-theme="dark"] .hero-text-box p { text-shadow: 0 1px 5px rgba(0,0,0,0.5); }
.hero-img-box { flex: 1; min-width: 300px; text-align: right; }

.astronaut-costume-container { position: relative; display: inline-block; width: 100%; max-width: 450px; height: auto; animation: floatAstro 5s ease-in-out infinite; }
.helmet-overlay-frame { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0px 15px 30px rgba(0,0,0,0.15)); }
[data-theme="dark"] .helmet-overlay-frame { filter: drop-shadow(0px 15px 30px rgba(20, 157, 221, 0.15)); }
@keyframes floatAstro { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -20px, 0); } }
@media (max-width: 992px) { .hero-content-wrapper { flex-direction: column; text-align: center; margin-top: 60px; } .hero-text-box { padding-right: 0; margin-bottom: 40px; background: var(--sidebar-bg); padding: 20px; border-radius: 12px; backdrop-filter: blur(10px); } .hero-text-box h1 { font-size: 3rem; } .astronaut-costume-container { max-width: 300px; } .hero-text-box p { border-left: none; padding-left: 0;} }

/* --- SECTIONS UMUM --- */
.section { padding: 80px 0; overflow: hidden; background: transparent;}
.bg-alt { background: rgba(255, 255, 255, 0.1); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
[data-theme="dark"] .bg-alt { background: rgba(0, 0, 0, 0.1); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 30px; position: relative; z-index: 1; }
.section-title { font-size: 36px; font-weight: 800; margin-bottom: 15px; padding-bottom: 20px; position: relative; color: var(--text-color); }
.section-title::after { content: ''; position: absolute; display: block; width: 60px; height: 4px; border-radius: 4px; background: var(--accent-color); bottom: 0; left: 0; }
.section-subtitle { margin-bottom: 50px; color: var(--text-color); font-size: 1.1rem; }
.divider-line { margin: 3rem auto; text-align: center; }
.divider-line span { display: inline-block; width: 60px; height: 5px; background-color: var(--accent-color); border-radius: 10px; opacity: 0.5; }

.about-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.sub-heading-inline { font-size: 1.5rem; color: var(--text-color); margin-bottom: 25px; display: flex; align-items: center; gap: 12px; }
.network-title { margin-top: 3rem; }
.about-text p { margin-bottom: 15px; color: var(--text-color); font-weight: 500;}
.tech-stack { margin-top: 2rem; }
.tech-icons i { font-size: 2.5rem; color: var(--text-muted); margin-right: 15px; margin-top: 15px; transition: 0.3s; }
.tech-icons i:hover { color: var(--accent-color); transform: translateY(-5px) scale(1.1); filter: drop-shadow(0 5px 10px rgba(var(--accent-color),0.3)); }

.timeline { border-left: 2px dashed var(--border-color); padding-left: 25px; margin-left: 10px; }
.timeline-item { position: relative; margin-bottom: 30px; padding: 20px; background: var(--card-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 12px; border: 1px solid var(--border-color); transition: 0.3s; box-shadow: var(--shadow); }
.timeline-item:hover { transform: translateX(10px); border-color: var(--accent-color); }
.timeline-dot { position: absolute; left: -33px; top: 25px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-color); box-shadow: 0 0 0 4px var(--bg-color); }
.timeline-item h4 { font-size: 1.1rem; margin-bottom: 5px; color: var(--text-color); }
.timeline-item p { margin: 0; color: var(--text-color);}
.edu-desc { margin-top: 10px !important; font-size: 0.95rem !important; color: var(--text-muted) !important; font-weight: 500;}

.track-record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; align-items: start; }
.track-accordion { background: var(--card-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.track-accordion:hover { border-color: var(--accent-color); transform: translateY(-5px); }
.accordion-header { padding: 22px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: 0.3s; }
.accordion-header:hover { background: rgba(var(--accent-color), 0.05); }
.accordion-header h3 { font-size: 1.15rem; margin: 0; color: var(--text-color); display: flex; align-items: center; gap: 15px; }
.accordion-header i.fa-chevron-down { transition: 0.4s; color: var(--text-muted); background: rgba(0,0,0,0.05); padding: 8px; border-radius: 50%; }
[data-theme="dark"] .accordion-header i.fa-chevron-down { background: rgba(255,255,255,0.05); }
.accordion-content { max-height: 0; overflow: hidden; background: transparent; transition: max-height 0.5s ease, padding 0.5s ease; }

.portfolio-grid, .lab-grid, .about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }
.card, .list-card { transition: 0.3s !important; position: relative; overflow: hidden; background: var(--card-bg) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card:hover { transform: translateY(-8px) !important; box-shadow: var(--shadow) !important; }
.list-card { border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; margin-bottom: 15px; cursor: pointer; border-left: 4px solid var(--card-accent, var(--accent-color)); box-shadow: var(--shadow); }
.list-card:hover { transform: translateX(8px); border-color: var(--card-accent, var(--accent-color)); }
.list-card h4 { margin: 0 0 10px 0; color: var(--text-color); display: flex; justify-content: space-between; align-items: center; line-height: 1.4; }
.list-card h4 i.icon-chevron { font-size: 0.9rem; color: var(--text-muted); transition: 0.3s; }
.list-card.active h4 i.icon-chevron { transform: rotate(180deg); color: var(--accent-color); }
.list-meta { display: flex; gap: 15px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; flex-wrap: wrap; }
.list-meta span i { color: var(--accent-color); margin-right: 5px; }
.list-desc { max-height: 0; overflow: hidden; opacity: 0; transition: 0.4s; font-size: 0.95rem; color: var(--text-color); margin-top: 0; }
.list-card.active .list-desc { max-height: 800px; opacity: 1; margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color); }
.tech-tag { font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }

.article-card { text-align: center; padding: 50px 30px; background: var(--card-bg); backdrop-filter: blur(10px); border-radius: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow); }
.article-icon { font-size: 4rem; color: var(--accent-color); margin-bottom: 20px; }
.article-card h3 { margin-bottom: 15px; color: var(--text-color); }
.btn-submit { display: inline-block; background: var(--accent-color); color: white; padding: 12px 30px; border-radius: 8px; font-weight: bold; transition: 0.3s; border: none; cursor: pointer; text-decoration: none;}
.btn-submit:hover { background: var(--accent-hover); transform: translateY(-3px); box-shadow: var(--glow); color: white; }

/* KEMBALI MENGGUNAKAN REVEAL ANIMATION SAAT DI-SCROLL */
.reveal { opacity: 0; transform: translateY(40px); transition: 0.8s; }
.reveal.active { opacity: 1; transform: translateY(0); }

.footer { padding: 40px 30px; text-align: center; background: var(--card-bg); border-top: 1px solid var(--border-color); position: relative; z-index: 1; margin-top: 50px; backdrop-filter: blur(10px);}
.social-links-footer { margin-bottom: 20px; }
.social-links-footer a { display: inline-block; font-size: 1.5rem; color: var(--text-muted); background: rgba(0,0,0,0.05); width: 45px; height: 45px; line-height: 45px; border-radius: 50%; margin: 0 8px; transition: 0.3s; border: 1px solid var(--border-color); }
[data-theme="dark"] .social-links-footer a { background: rgba(255,255,255,0.05); }
.social-links-footer a:hover { color: #fff; background: var(--accent-color); transform: translateY(-5px) rotate(360deg); border-color: var(--accent-color); box-shadow: var(--glow); }
.footer p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }


/* =========================================================
   PATCH RESPONSIVE & SCROLL MOBILE (TAMBAHAN PERBAIKAN)
   ========================================================= */

/* 1. Mencegah layar terpotong ke samping (Horizontal Overflow) */
html, body {
    overflow-x: hidden; 
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* Memastikan semua gambar responsif dan tidak mendesak layar */
img {
    max-width: 100%;
    height: auto;
}

/* 2. Memperbaiki konten akordion agar bisa di-scroll JIKA kontennya banyak */
.track-accordion.active .accordion-content {
    max-height: 60vh; 
    padding: 25px;
    border-top: 1px solid var(--border-color);
    overflow-y: auto !important; 
    overflow-x: hidden;
}

/* Mempercantik Scrollbar di dalam Akordion khusus Webkit (Chrome/Safari/Edge) */
.accordion-content::-webkit-scrollbar {
    width: 6px;
}
.accordion-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05); 
    border-radius: 4px;
}
.accordion-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}
[data-theme="dark"] .accordion-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 3. Memperbaiki tampilan flex/grid di layar HP secara global */
@media (max-width: 768px) {
    .about-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    /* Memastikan Grid Tech Stack tetap rapi saat diakses lewat HP */
    .tech-icons {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)) !important;
        gap: 15px !important;
    }
    
    .track-accordion {
        margin-bottom: 10px;
    }
}
