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

/* Variabel Warna: Tema "Emas Menyala" */
:root {
    --bg-color: #0A0A0A;
    --surface-color: rgba(20, 20, 20, 0.6); 
    --primary-color: #FFD700; /* Emas */
    --secondary-color: #B8860B; /* Emas Gelap */
    --glow-primary: rgba(255, 215, 0, 0.6);
    --glow-secondary: rgba(184, 134, 11, 0.7);
    --text-color: #f0f0f0;
    --subtle-text-color: #c0c0c0;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* Animasi */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink-caret { from, to { background-color: transparent; } 50% { background-color: var(--primary-color); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes aurora-bg { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes skill-enter { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes skill-exit { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-15px); } }

/* Dasar */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
html { scrollbar-width: thin; scrollbar-color: var(--primary-color) transparent; }
body { font-family: var(--font-body); background-color: var(--bg-color); color: var(--text-color); overflow-x: hidden; }
.container { width: 90%; max-width: 1100px; margin: 0 auto; position: relative; z-index: 2;}
section { padding: 120px 0; border-bottom: 1px solid rgba(255, 215, 0, 0.1); }
section:last-of-type { border-bottom: none; }
h2 { font-family: var(--font-heading); font-size: 2.8rem; text-align: center; margin-bottom: 60px; font-weight: 800; text-shadow: 0 0 8px var(--glow-primary), 0 0 25px var(--glow-secondary); }

/* Latar Belakang Animasi */
.background-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.blob { position: absolute; left: 50%; top: 50%; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(100px); opacity: 0.2; animation: aurora-bg 30s linear infinite; }
.blob1 { background: radial-gradient(circle, var(--primary-color), transparent 60%); margin-left: -40vw; margin-top: -40vh; }
.blob2 { background: radial-gradient(circle, var(--secondary-color), transparent 60%); margin-left: 40vw; margin-top: 40vh; animation-duration: 40s; animation-delay: -10s; }

/* 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; }
#progress-container { width: 80%; max-width: 400px; text-align: center; position: relative; transition: opacity 0.5s ease; }
#progress-bar-container { width: 100%; height: 10px; background: var(--surface-color); border-radius: 5px; overflow: hidden; border: 1px solid rgba(255, 215, 0, 0.2); }
#progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--secondary-color), var(--primary-color)); box-shadow: 0 0 15px var(--glow-primary); }
#progress-counter { margin-bottom: 15px; font-family: var(--font-heading); font-size: 1.5rem; color: var(--text-color); text-shadow: 0 0 10px var(--primary-color); }
.preloader-subtext { margin-top: 15px; font-size: 1rem; color: var(--subtle-text-color); letter-spacing: 2px; text-transform: uppercase; opacity: 0.7; }
#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; }
.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; }
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Navbar */
.navbar { position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; padding: 15px 0; transition: background-color 0.3s ease, padding 0.3s ease; }
.navbar.scrolled { background-color: rgba(10, 10, 10, 0.7); backdrop-filter: blur(10px); padding: 12px 0; border-bottom: 1px solid rgba(255, 215, 0, 0.2); }
.logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--primary-color); text-decoration: none; text-shadow: 0 0 8px var(--glow-primary); }
.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(10, 10, 10, 0.95); 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); }
.desktop-nav ul { list-style: none; display: flex; gap: 40px; }
.mobile-menu a, .desktop-nav ul li a { color: var(--subtle-text-color); text-decoration: none; font-size: 1rem; font-weight: 600; position: relative; padding: 5px 0; transition: color 0.3s ease; }
.desktop-nav ul li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--primary-color); transform: scaleX(0); transform-origin: right; transition: transform 0.4s ease-in-out; }
.desktop-nav ul li a:hover::after { transform: scaleX(1); transform-origin: left; }
.mobile-menu a:hover, .desktop-nav ul li a:hover { color: var(--primary-color); text-shadow: 0 0 8px var(--glow-primary); }
.whatsapp-float { position: fixed; width: 50px; height: 50px; bottom: 30px; right: 30px; background-color: #25D366; color: #fff; border-radius: 50px; text-align: center; font-size: 25px; box-shadow: 0 0 15px #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; flex-direction: column; justify-content: center; align-items: center; padding-top: 80px;}
.hero-container { display: flex; align-items: center; justify-content: center; gap: 50px; width: 100%; }
.hero-text { flex: 1; display: flex; flex-direction: column; align-items: flex-start; text-align: left;}
.hero-text p { color: var(--subtle-text-color); font-weight: 600; }
.hero-text h1 { font-family: var(--font-heading); font-size: 4.5rem; font-weight: 800; color: var(--primary-color); text-shadow: 0 0 10px var(--glow-primary), 0 0 30px var(--glow-primary); min-height: 100px; transition: text-shadow 0.3s ease, filter 0.3s ease; }
.hero-text h2 { font-size: 1.5rem; color: var(--subtle-text-color); margin: 10px 0 20px; line-height: 1.4; min-height: 60px; transition: text-shadow 0.3s ease, filter 0.3s ease; }
.is-typing { text-shadow: 0 0 5px #fff, 0 0 10px var(--glow-primary), 0 0 25px var(--glow-secondary); filter: blur(1px); }
.typing-cursor { display: inline-block; background-color: var(--primary-color); margin-left: .15em; width: 4px; height: 1em; animation: blink-caret .75s step-end infinite; }
.hero-cta-group { display: flex; align-items: center; gap: 30px; margin-top: 20px;}
.social-icons { display: flex; gap: 25px; }
.social-icons a { color: var(--subtle-text-color); font-size: 1.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.social-icons a:hover { color: var(--primary-color); transform: scale(1.2); }
.hero-image { display: block; }
.hero-image img { max-width: 350px; border-radius: 50%; border: 3px solid var(--primary-color); box-shadow: 0 0 50px var(--glow-primary); }
.rotating-skills-container { margin-top: auto; padding-top: 40px; height: 60px; position: relative; width: 100%; display: flex; justify-content: center; align-items: center; }
.skill-group { display: flex; justify-content: center; gap: 40px; position: absolute; opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; pointer-events: none; }
.skill-group.active { opacity: 1; transform: translateY(0); pointer-events: all; }
.skill-group.exit { opacity: 0; transform: translateY(-20px); }
.skill-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.skill-item i { font-size: 2rem; color: var(--subtle-text-color); transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease; }
.skill-item span { font-size: 0.8rem; font-weight: 600; }
.skill-item:hover i { color: var(--primary-color); text-shadow: 0 0 10px var(--glow-primary); transform: scale(1.1); }

/* Sections Umum (Glassmorphism Cards) */
.skill-category, .experience-item, .project-card, .timeline-content, .cert-container, .contact-form-container { background: var(--surface-color); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 15px; border: 1px solid rgba(255, 215, 0, 0.2); transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.skill-category:hover, .experience-item:hover, .project-card:hover, .timeline-item.visible .timeline-content:hover, .cert-container:hover, .contact-form-container:hover { transform: translateY(-10px); border-color: var(--primary-color); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* Tentang Saya */
.about-container { display: flex; align-items: center; gap: 50px; }
.about-image img { max-width: 350px; border-radius: 20px; border: 1px solid rgba(255,215,0,0.2); }
.about-text h2 { text-align: left; }
.about-text p { color: var(--subtle-text-color); line-height: 1.8; margin-bottom: 30px; }
.about-details { display: flex; flex-direction: column; gap: 10px; }
.about-details p { font-size: 1rem; color: var(--text-color); }
.about-details strong { color: var(--primary-color); margin-right: 10px; }
.about-details .fas { margin-right: 15px; color: var(--primary-color); width: 20px; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.skill-category { padding: 30px; }
.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; text-shadow: 0 0 8px var(--glow-primary); }
.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: '\f0da'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--primary-color); position: absolute; left: -20px; }

/* Experience */
.experience-grid { display: grid; grid-template-columns: 1fr; gap: 30px; max-width: 1000px; margin: 0 auto; }
.experience-item { padding: 30px; }
.experience-header h3 { font-family: var(--font-heading); font-size: 1.8rem; color: var(--text-color); }
.experience-header h4 { font-size: 1rem; color: var(--subtle-text-color); margin-bottom: 20px; }
.experience-item p { color: var(--subtle-text-color); line-height: 1.8; }

/* Portofolio */
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.project-card { overflow: hidden; display: flex; flex-direction: column; }
.iframe-container { width: 100%; aspect-ratio: 16 / 10; background-color: #000; }
.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); text-shadow: 0 0 8px var(--glow-primary); }
.card-content p { color: var(--subtle-text-color); font-size: 0.9rem; flex-grow: 1; margin-bottom: 20px;}
.tags span { display: inline-block; background-color: rgba(255, 215, 0, 0.15); border: 1px solid var(--primary-color); color: var(--primary-color); padding: 5px 10px; border-radius: 20px; 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: 3px; background: var(--surface-color); top: 0; bottom: 0; left: 50%; margin-left: -1.5px; z-index: -1; }
.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 { position: absolute; width: 20px; height: 20px; background-color: var(--bg-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(--glow-primary); }
.timeline-content { padding: 20px 30px; position: relative; }
.timeline-content h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--primary-color); margin-bottom: 10px; text-shadow: 0 0 8px var(--glow-primary); }
.timeline-content p { color: var(--subtle-text-color); }

/* Sertifikat & Modal */
.certificates { background-color: transparent; border-bottom: none; }
.cert-container { text-align: center; max-width: 600px; margin: 0 auto; padding: 40px; }
.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(--glow-primary); 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: 30px; }
.contact-form-container { padding: 30px; }
.contact-form-container h3 { font-family: var(--font-heading); text-align: center; font-size: 1.5rem; margin-bottom: 30px; color: var(--primary-color); text-shadow: 0 0 8px var(--glow-primary); }
.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, box-shadow 0.3s ease; border-radius: 0; }
.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); box-shadow: 0 5px 15px -10px var(--glow-primary); }
.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 30px; border: none; background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); color: #0A0A0A; font-size: 1.1rem; font-weight: 800; border-radius: 50px; text-align: center; overflow: hidden; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; text-decoration: none; }
.btn:hover { transform: translateY(-5px); box-shadow: 0 10px 20px var(--glow-primary), 0 10px 20px var(--glow-secondary); }
.btn.visit-btn { width: 100%; }
.contact-form-container .btn { width: 100%; margin-top: 10px; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; margin-bottom: 15px; border-bottom: 1px solid rgba(255,215,0,0.2); 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(--primary-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; border-top: 1px solid rgba(255, 215, 0, 0.2); }
.tech-stack, .social-stack { text-align: center; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,215,0,0.2); }
.social-stack { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.tech-stack p, .social-stack p { color: var(--subtle-text-color); margin-bottom: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.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: 40px;}
.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; }
    .hero-text { align-items: center; }
    .about-text h2 { text-align: center; }
    .hero-image { display: block; order: -1; margin-bottom: 30px; }
    .hero-image img { max-width: 250px; }
    .hero-text h1 { font-size: 2.8rem !important; min-height: 60px;}
    .hero-text h2 { min-height: 50px; }
    .experience-grid, .portfolio-grid, .contact-grid { grid-template-columns: 1fr; }
    .timeline-container::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 15px; }
    .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: 10px; }
}
@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; }
}
