/* --- Gaya Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #000;
    color: #fff;
}

/* --- Loading Screen --- */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader-text {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 30px;
    white-space: nowrap; /* Mencegah teks pecah baris */
}

.loader-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: letterAppear 0.5s forwards;
}

.white { color: #ffffff; }
.green { color: #4CAF50; }
.blue { color: #2196F3; }

/* Loader progress bar (scoped to loader only) */
.loader-progress-bar {
    width: 200px !important; /* Force loader width to stay small */
    height: 5px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto; /* center loader */
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    width: 0;
    animation: loader-fill 0.8s forwards 0.2s; /* Faster loader animation */
}

@keyframes letterAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loader-fill {
    to { width: 100%; }
}

/* --- Navigasi --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 15px 50px;
    background-color: rgba(0, 0, 0, 0.9);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo { font-size: 1.5rem; font-weight: bold; color: #4CAF50; }

.nav-links { display: flex; list-style: none; }
.nav-links li { margin-left: 30px; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.nav-links a:hover { color: #4CAF50; }

.menu-toggle { display: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://picsum.photos/seed/malikkun/1920/1080.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Flip Card */
.flip-card {
    background-color: transparent;
    width: 300px;
    height: 300px;
    perspective: 1000px;
    margin-bottom: 20px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.flip-card-back { transform: rotateY(180deg); }

#schoolLogo, #personalPhoto {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-title { font-size: 2.5rem; }
.hero-text { font-size: 1.8rem; min-height: 2.5rem; }
.orange-text { color: #FF9800; font-weight: bold; }

/* --- Skills Section (Dengan Efek Baru) --- */
.skills-section { padding: 100px 0; }
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 50px;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #4CAF50;
}

.skills-container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }

.skill-item { display: flex; flex-direction: column; gap: 10px; }
.skill-name { color: #fff; font-size: 1.1rem; font-weight: 600; }
.skill-percentage { color: #4CAF50; font-weight: bold; font-size: 0.95rem; text-align: right; }

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    /* Animated rainbow gradient */
    background: linear-gradient(90deg, #ff3f34, #ffb86b, #ffd26a, #93ff8a, #5bd8ff, #a49bff, #ff6fd8);
    border-radius: 5px;
    width: 0; /* PASTIKAN INI ADA, agar bar mulai dari 0 */
    transition: width 1.5s ease-out; /* Animasi perubahan lebar */
    background-size: 300% 100%;
    animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Bagian Lainnya (Certificates, About, Contact, Footer) --- */
/* Saya mempersingkat bagian ini agar fokus pada perbaikan dan skill. 
   Anda bisa menyalin sisanya dari kode asli Anda, tidak ada perubahan signifikan. */
.certificates { padding: 100px 0; background-color: #111; }
.certificates-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.certificates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 50px; }
.certificate-card { background-color: #000; border-radius: 10px; overflow: hidden; border: 1px solid #333; transition: all 0.3s ease; }
.certificate-card:hover { transform: translateY(-10px); border-color: #4CAF50; }
.certificate-image { width: 100%; height: 250px; overflow: hidden; }
.certificate-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.certificate-card:hover .certificate-image img { transform: scale(1.05); }
.certificate-info { padding: 25px; color: #fff; }
.certificate-info h3 { font-size: 1.3rem; margin-bottom: 15px; color: #4CAF50; }
.certificate-info p { color: #ccc; line-height: 1.6; font-size: 0.95rem; }

.about { padding: 100px 0; background-color: #111; }
.about-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 50px; }
.about-image { flex: 1; }
.about-image img { width: 100%; border-radius: 10px; }
.about-content { flex: 1; color: #fff; }
.about-title { font-size: 2rem; margin-bottom: 20px; color: #4CAF50; }
.about-text { line-height: 1.6; margin-bottom: 20px; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.skill { padding: 8px 15px; background-color: rgba(76, 175, 80, 0.2); border: 1px solid #4CAF50; border-radius: 20px; color: #4CAF50; font-size: 0.9rem; }

.contact { padding: 60px 0; background-color: #000; text-align: center; }
.contact-container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.contact-title { font-size: 2.5rem; color: #fff; margin-bottom: 30px; }
.contact-description { color: #ccc; margin-bottom: 18px; font-size: 1.1rem; }
.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    background-color: #25D366;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
        margin-top: 6px;
}
.whatsapp-button:hover { transform: translateY(-5px); background-color: #128C7E; }

footer { padding: 30px 0; background-color: #111; text-align: center; color: #ccc; }

/* --- My Dreams Section (logo sizing + card layout) --- */
.dreams { padding: 100px 0; background-color: #000; }
.dreams-container { max-width: 1000px; margin: 0 auto; padding: 0 20px; text-align: center; }
.dreams-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-top: 50px; align-items: center; }
.dream-item { background-color: #111; padding: 30px; border-radius: 10px; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #333; text-align: center; }
.dream-item:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); border-color: #4CAF50; }
.dream-logo { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 20px auto; display: block; }
.dream-item h3 { font-size: 1.5rem; color: #fff; margin-bottom: 10px; }
.dream-item p { color: #ccc; }
.dream-note { font-size: 0.9rem; color: #999; margin-top: 10px; font-style: italic; }


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 70px; left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .nav-links.active { transform: translateY(0); opacity: 1; visibility: visible; }
    .nav-links li { margin: 10px 0; }
    .flip-card { width: 250px; height: 250px; }
    .hero-title { font-size: 2rem; }
    .hero-text { font-size: 1.4rem; }
    .about-container { flex-direction: column; }
    /* My Dreams responsive tweaks */
    .dreams-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .dream-logo { width: 80px; height: 80px; }
    /* Contact spacing on mobile - reduce so button isn't too low on small screens */
    .contact { padding: 40px 0; }
    .whatsapp-button { margin-top: 8px; }
}
.tag-list {
    width: 100%;
    max-width: 90vw;
    margin: 0 auto;
    font-family: "Montserrat";
    position: relative;
    overflow: hidden;
}

.pindah {
    width: fit-content;
    display: flex;
    gap: 1rem;
    animation: loop 30s linear infinite;
    animation-play-state: running;
}

.pindah:hover {
    animation-play-state: paused;
}

.tag {
    display: flex;
    align-items: center;
    gap: 0 0.2rem;
    color: #e2e8f0;background-color: #334155;
    padding: 0.7rem 1rem;
    border-radius: 0.4rem;
    box-shadow: 
    0 0.1rem 0.2rem #00000033,
    0 0.1rem 0.5rem #0000004d,
    0 0.2rem 1.5rem #00000066;
}

.tag span {
    font-size: 1.2rem;
    color: #64748b;
}

.fade {
    position: absolute;
    background: linear-gradient(90deg, #1e293b, transparent 30%, transparent 70%, #1e293b);
    inset: 0;
    pointer-events: none;
}

@keyframes loop {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
