/* Import Font dari Google */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Poppins:wght@400;600;700&display=swap');

/* Variabel Warna */
:root {
    --bg-color: #101010;
    --surface-color: #1d1d1d;
    --primary-color: #00f2ea;
    --secondary-color: #ff00ff;
    --text-color: #f5f5f5;
    --subtle-text-color: #b0b0b0;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* Animasi */
@keyframes animate-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 234, 0.5); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 242, 234, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 234, 0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink-caret { from, to { background-color: transparent; } 50% { background-color: var(--primary-color); } }
@keyframes grow-line { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes tilt-in { from { opacity: 0; transform: rotateX(30deg) rotateY(-30deg) translateY(50px); } to { opacity: 1; transform: rotateX(0) rotateY(0) translateY(0); } }

/* Dasar */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: var(--font-body); background-color: var(--bg-color); color: var(--text-color); background: linear-gradient(-45deg, #101010, #2a002a, #002a2a, #101010); background-size: 400% 400%; animation: animate-gradient 20s ease infinite; }
.container { width: 90%; max-width: 1100px; margin: 0 auto; }
section { padding: 100px 0; }
h2 { font-family: var(--font-heading); font-size: 2.8rem; text-align: center; margin-bottom: 60px; font-weight: 700; text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--secondary-color); }

/* Preloader */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-color); display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.8s ease, visibility 0.8s ease; }
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-content { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.preloader-icons { display: flex; gap: 30px; font-size: 2.5rem; margin-bottom: 20px; color: var(--subtle-text-color); }
.preloader-icons .fa-github, .preloader-icons .fa-firebase, .preloader-icons .fa-code { animation: pulse 2s infinite ease-in-out; }
.preloader-icons svg { width: 40px; height: 40px; fill: currentColor; animation: pulse 2s 0.5s infinite ease-in-out; }
#progress-container { width: 100%; max-width: 400px; text-align: center; position: relative; transition: opacity 0.5s ease; }
#progress-bar { width: 0%; height: 10px; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); border-radius: 5px; box-shadow: 0 0 15px var(--primary-color); }
#progress-counter { margin-top: 15px; font-family: var(--font-heading); font-size: 1.5rem; color: var(--text-color); text-shadow: 0 0 10px var(--primary-color); }
#spinner-container { text-align: center; transition: opacity 0.5s ease; }
.spinner { width: 50px; height: 50px; border: 5px solid var(--surface-color); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px auto; }
#preloader-typing { font-family: var(--font-heading); font-size: 1.5rem; min-height: 2rem; }

/* PERBAIKAN: Logika untuk menyembunyikan dan memunculkan konten */
.hidden { display: none !important; }
#main-content, footer { opacity: 0; visibility: hidden; transition: opacity 0.8s ease; }
#main-content.visible, footer.visible { opacity: 1; visibility: visible; }

/* Navbar */
.navbar { position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; padding: 20px 0; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.navbar.scrolled { background-color: rgba(18, 18, 18, 0.7); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.navbar-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text-color); text-decoration: none; text-shadow: 0 0 5px var(--primary-color); }
.menu-toggle { display: none; background: none; border: none; color: var(--text-color); font-size: 1.5rem; cursor: pointer; z-index: 1001; }
.desktop-nav { display: block; }
.mobile-menu { position: fixed; top: 0; right: 0; width: 70%; height: 100vh; background: rgba(18, 18, 18, 0.9); backdrop-filter: blur(15px); z-index: 999; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1); }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu a, .desktop-nav ul li a { color: var(--text-color); text-decoration: none; font-size: 1.2rem; font-weight: 600; transition: color 0.3s ease; }
.desktop-nav ul { list-style: none; display: flex; gap: 30px; }
.mobile-menu a:hover, .desktop-nav ul li a:hover { color: var(--primary-color); }
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px; background: linear-gradient(45deg, #25d366, #128c7e); color: #fff; border-radius: 50px; text-align: center; font-size: 30px; box-shadow: 0 0 20px #25d366; z-index: 100; display: flex; justify-content: center; align-items: center; text-decoration: none; animation: pulse 2s infinite; }

/* Hero Section */
.hero { min-height: 100vh; display: flex; align-items: center; }
.hero-container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-text h1 { font-family: var(--font-heading); font-size: 4rem; font-weight: 700; color: var(--text-color); text-shadow: 0 0 10px var(--primary-color), 0 0 30px var(--primary-color), 0 0 50px var(--secondary-color); min-height: 85px; }
.hero-text h2 { font-size: 1.5rem; color: var(--subtle-text-color); margin: 10px 0 20px; line-height: 1.4; min-height: 60px; }
.typing-cursor { display: inline-block; background-color: var(--primary-color); margin-left: .15em; width: 3px; height: 1em; animation: blink-caret .75s step-end infinite; }
.social-icons a { color: var(--subtle-text-color); font-size: 1.5rem; margin-right: 20px; transition: color 0.3s ease, transform 0.3s ease; }
.social-icons a:hover { color: var(--primary-color); transform: scale(1.2); }
.hero-image img { max-width: 400px; border-radius: 50%; border: 5px solid transparent; background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box, linear-gradient(45deg, var(--primary-color), var(--secondary-color)) border-box; }
.cta-btn { margin-top: 30px; padding: 18px 35px !important; font-size: 1.2rem !important; border-width: 2px; border-radius: 50px; background: transparent; width: auto !important; }
.cta-btn .fa-rocket { margin-left: 10px; transition: transform 0.3s ease; }
.cta-btn:hover .fa-rocket { transform: rotate(15deg) translateX(5px); }

/* PERBAIKAN: Skills Showcase Grid (Pengganti Scroller) */
.skills-showcase-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; perspective: 1000px; }
.skill-showcase-item { background: var(--surface-color); border: 1px solid #333; border-radius: 10px; padding: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: transform 0.3s ease, box-shadow 0.3s ease; opacity: 0; animation: tilt-in 0.5s ease-out forwards; }
.skill-showcase-item:hover { transform: translateY(-10px); box-shadow: 0 0 20px var(--primary-color); }
.skill-showcase-item i { font-size: 2.5rem; color: var(--primary-color); text-shadow: 0 0 10px var(--primary-color); }
.skill-showcase-item span { font-size: 0.9rem; font-weight: 600; color: var(--subtle-text-color); }
.animate-on-load.visible .skill-showcase-item:nth-child(1) { animation-delay: 0.1s; } .animate-on-load.visible .skill-showcase-item:nth-child(2) { animation-delay: 0.2s; } .animate-on-load.visible .skill-showcase-item:nth-child(3) { animation-delay: 0.3s; } .animate-on-load.visible .skill-showcase-item:nth-child(4) { animation-delay: 0.4s; } .animate-on-load.visible .skill-showcase-item:nth-child(5) { animation-delay: 0.5s; } .animate-on-load.visible .skill-showcase-item:nth-child(6) { animation-delay: 0.6s; } .animate-on-load.visible .skill-showcase-item:nth-child(7) { animation-delay: 0.7s; } .animate-on-load.visible .skill-showcase-item:nth-child(8) { animation-delay: 0.8s; } .animate-on-load.visible .skill-showcase-item:nth-child(9) { animation-delay: 0.9s; } .animate-on-load.visible .skill-showcase-item:nth-child(10) { animation-delay: 1.0s; } .animate-on-load.visible .skill-showcase-item:nth-child(11) { animation-delay: 1.1s; } .animate-on-load.visible .skill-showcase-item:nth-child(12) { animation-delay: 1.2s; } .animate-on-load.visible .skill-showcase-item:nth-child(13) { animation-delay: 1.3s; } .animate-on-load.visible .skill-showcase-item:nth-child(14) { animation-delay: 1.4s; } .animate-on-load.visible .skill-showcase-item:nth-child(15) { animation-delay: 1.5s; }


/* Tentang Saya */
.about-container { display: flex; align-items: center; gap: 50px; }
.about-image img { max-width: 350px; border-radius: 20px; box-shadow: 0 0 25px rgba(0, 242, 234, 0.3); }
.about-text h2 { text-align: left; }
.about-text p { color: var(--subtle-text-color); line-height: 1.7; margin-bottom: 30px; }
.about-details p { font-size: 1rem; margin-bottom: 10px; color: var(--text-color); }
.about-details strong { color: var(--primary-color); margin-right: 10px; }
.about-details .fas { margin-right: 15px; color: var(--secondary-color); width: 20px; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.skill-category { background: var(--surface-color); padding: 30px; border-radius: 15px; border: 1px solid #333; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.skill-category:hover { transform: translateY(-10px); box-shadow: 0 0 25px var(--primary-color); }
.skill-category h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--primary-color); margin-bottom: 20px; display: flex; align-items: center; gap: 15px; }
.skill-category ul { list-style: none; padding-left: 10px; }
.skill-category li { color: var(--subtle-text-color); margin-bottom: 10px; position: relative; }
.skill-category li::before { content: '\f105'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--secondary-color); position: absolute; left: -20px; }

/* Experience */
.experience-grid { display: grid; grid-template-columns: 1fr; gap: 40px; max-width: 900px; margin: 0 auto; }
.experience-item { background: var(--surface-color); padding: 30px; border-radius: 15px; border-left: 5px solid var(--primary-color); box-shadow: 0 10px 30px rgba(0,0,0,0.3); height: 100%; }
.experience-header { margin-bottom: 20px; }
.experience-header h3 { font-family: var(--font-heading); font-size: 1.8rem; color: var(--text-color); }
.experience-header h4 { font-size: 1.1rem; color: var(--primary-color); font-weight: 400; }
.experience-item p { color: var(--subtle-text-color); line-height: 1.8; }

/* Portofolio */
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 50px; }
.project-card { background-color: var(--surface-color); border: 1px solid #333; border-radius: 15px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 0 25px var(--primary-color); }
.iframe-container { width: 100%; aspect-ratio: 16 / 10; background-color: #333; border-bottom: 2px solid var(--primary-color); }
.iframe-container iframe { width: 100%; height: 100%; border: none; }
.card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column;}
.card-content h3 { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 10px; color: var(--primary-color); }
.card-content p { color: var(--subtle-text-color); font-size: 0.9rem; flex-grow: 1; }
.tags { margin-top: 15px; margin-bottom: 20px; }
.tags span { display: inline-block; background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); opacity: 0.9; color: var(--bg-color); padding: 5px 10px; border-radius: 5px; font-size: 0.8rem; font-weight: 600; margin-right: 5px; }

/* Perjalanan Saya (Timeline) */
.timeline-container { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline-container::after { content: ''; position: absolute; width: 4px; background: linear-gradient(var(--primary-color), var(--secondary-color)); top: 0; bottom: 0; left: 50%; margin-left: -2px; z-index: -1; transform-origin: top; animation: grow-line 5s ease-out forwards; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot { content: ''; position: absolute; width: 20px; height: 20px; background-color: var(--surface-color); border: 4px solid var(--primary-color); top: 30px; border-radius: 50%; z-index: 1; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.timeline-item:nth-child(odd) .timeline-dot { right: -10px; }
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }
.timeline-item.visible .timeline-dot { transform: scale(1.2); box-shadow: 0 0 25px var(--primary-color); }
.timeline-content { padding: 20px 30px; background: var(--surface-color); position: relative; border-radius: 8px; border: 1px solid #333; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s; }
.timeline-item.visible .timeline-content { opacity: 1; transform: translateY(0); }
.timeline-content h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--primary-color); margin-bottom: 10px; }
.timeline-content p { color: var(--subtle-text-color); }

/* Sertifikat & Modal */
.certificates { background-color: var(--surface-color); }
.cert-container { text-align: center; max-width: 600px; margin: 0 auto; }
.cert-container p { font-size: 1.1rem; color: var(--subtle-text-color); margin-bottom: 30px; }
.modal { position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.modal.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--surface-color); padding: 40px; border-radius: 15px; border: 1px solid var(--primary-color); box-shadow: 0 0 40px var(--primary-color); text-align: center; position: relative; max-width: 90%; width: 500px; transform: scale(0.9); transition: transform 0.4s ease; }
.modal.active .modal-content { transform: scale(1); }
.modal-content p { font-size: 1.2rem; color: var(--text-color); display: flex; align-items: center; justify-content: center; gap: 15px; }
.modal-content .fa-info-circle { color: var(--primary-color); font-size: 1.5rem; }
.close-btn { position: absolute; top: 15px; right: 20px; color: var(--subtle-text-color); font-size: 2rem; font-weight: bold; cursor: pointer; transition: color 0.3s ease; }
.close-btn:hover { color: var(--primary-color); }

/* Kontak */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 50px; }
.contact-form-container { background: var(--surface-color); padding: 30px; border-radius: 15px; border: 1px solid #333; }
.contact-form-container h3 { font-family: var(--font-heading); text-align: center; font-size: 1.5rem; margin-bottom: 30px; color: var(--primary-color); }
.input-group { position: relative; margin-bottom: 35px; }
.input-group input, .input-group textarea { width: 100%; padding: 10px; background: transparent; border: none; border-bottom: 2px solid var(--subtle-text-color); color: var(--text-color); font-size: 1rem; transition: border-color 0.3s ease; }
.input-group label { position: absolute; top: 10px; left: 10px; color: var(--subtle-text-color); pointer-events: none; transition: all 0.3s ease; }
.input-group input:focus, .input-group textarea:focus { outline: none; border-bottom-color: var(--primary-color); }
.input-group input:focus + label, .input-group input:valid + label, .input-group textarea:focus + label, .input-group textarea:valid + label { top: -20px; left: 0; font-size: 0.8rem; color: var(--primary-color); }
.btn { position: relative; display: inline-block; width: auto; padding: 15px 25px; border-radius: 8px; border: 1px solid var(--primary-color); background-color: transparent; color: var(--primary-color); font-size: 1.1rem; font-weight: 600; text-align: center; overflow: hidden; cursor: pointer; transition: color 0.4s ease-in-out; z-index: 1; text-decoration: none; }
.btn.visit-btn { width: 100%; }
.contact-form-container .btn { width: 100%; margin-top: 10px; }
.btn span { position: relative; z-index: 1; }
.btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); z-index: 0; transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease-in-out; }
.btn:hover::before { transform: scaleX(1); transform-origin: right; }
.btn:hover { color: var(--bg-color); border-color: transparent; box-shadow: 0 0 25px var(--primary-color); }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.comment-header h4 { font-size: 1.1rem; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
#commenter-count { font-size: 0.9rem; color: var(--subtle-text-color); background-color: rgba(0,0,0,0.3); padding: 5px 10px; border-radius: 20px; }
.messages-container { margin-top: 20px; max-height: 400px; overflow-y: auto; padding-right: 10px; display: flex; flex-direction: column; gap: 15px; }
.messages-container::-webkit-scrollbar { width: 6px; }
.messages-container::-webkit-scrollbar-track { background: transparent; }
.messages-container::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 10px; }
.message-card { display: flex; gap: 15px; padding: 15px; background: rgba(0, 0, 0, 0.2); border-left: 3px solid var(--secondary-color); border-radius: 8px; animation: fadeIn 0.5s ease; align-items: flex-start; }
.message-avatar { font-size: 1.8rem; color: var(--primary-color); flex-shrink: 0; }
.message-content { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.message-sender { font-weight: 700; color: var(--primary-color); }
.message-text { color: var(--text-color); line-height: 1.6; word-wrap: break-word; }
.message-timestamp { font-size: 0.8rem; color: var(--subtle-text-color); text-align: right; align-self: flex-end; }

/* Footer */
footer { padding: 40px 0; }
.tech-stack, .social-stack { text-align: center; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #333; }
.social-stack { border-bottom: none; padding-bottom: 0; }
.tech-stack p, .social-stack p { color: var(--subtle-text-color); margin-bottom: 20px; }
.tech-icons { display: flex; justify-content: center; align-items: center; gap: 40px; }
.tech-icons a { color: var(--subtle-text-color); font-size: 2.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.tech-icons a:hover { color: var(--primary-color); transform: translateY(-5px); }
.tech-icons svg { width: 35px; height: 35px; fill: currentColor; }
.copyright-text { text-align: center; font-size: 0.9rem; color: var(--subtle-text-color); margin-top: 30px;}
.copyright-text .fa-heart { color: var(--primary-color); }

/* Responsif */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .menu-toggle { display: block; }
    .hero-container, .about-container { flex-direction: column; text-align: center; }
    .about-text h2 { text-align: center; }
    .hero-image { order: -1; margin-bottom: 30px; }
    .hero-image img { max-width: 250px; }
    .hero-text h1 { font-size: 2.5rem !important; min-height: 55px;}
    .hero-text h2 { min-height: 50px; }
    .experience-grid { grid-template-columns: 1fr; }
    .skills-showcase-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .skill-showcase-item i { font-size: 2rem; }
    .skill-showcase-item span { font-size: 0.7rem; }
    .timeline-container::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; text-align: left; }
    .timeline-dot, .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 21px; }
}
@media (min-width: 992px) {
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .experience-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr 1fr; }
}
