/* Import Font (Example: Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Orbitron:wght@400;500;700&display=swap');

:root {
    --primary-color: #00bcd4; /* Cyan/Bright Blue */
    --secondary-color: #673ab7; /* Purple */
    --dark-bg: #1a1a2e; /* Dark bluish-grey */
    --light-text: #e0e0e0;
    --dark-text: #333;
    --accent-glow: rgba(0, 188, 212, 0.5); /* Glow effect */
    --border-radius-futuristic: 8px;
    --transition-speed: 0.3s ease;
}

/* Basic CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-glow);
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif; /* Futuristic font for headings */
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center; /* Default center alignment for other sections */
}

h1 { font-size: 3em; }
h2 { font-size: 2.5em; }
h3 { font-size: 1.8em; }

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius-futuristic);
    text-transform: uppercase;
    font-weight: 600;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent-glow);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Header */
.main-header {
    background-color: rgba(26, 26, 46, 0.8); /* Slightly transparent */
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px); /* Blur effect for futuristic feel */
}

.main-header.scrolled {
    background-color: rgba(26, 26, 46, 0.95); /* Slightly less transparent */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.navbar {
    display: flex;
    justify-content: flex-end; /* Push nav-links and language-switcher to the right */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* Crucial for absolute positioning of logo and language switcher */
    min-height: 60px; /* Memberi tinggi minimum pada navbar agar ada ruang */
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--accent-glow);
    position: absolute; /* Tetap absolute untuk di kiri */
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002; /* Pastikan logo di atas elemen lain jika ada overlap */
}

.nav-links {
    list-style: none;
    display: flex;
    /* Memberikan ruang di kanan untuk language-switcher */
    padding-right: 120px; /* Sesuaikan jika perlu */
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--light-text);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    line-height: 1; /* Pastikan line-height tidak membuat tinggi link terlalu besar */
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width var(--transition-speed);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Language Switcher - Kembali ke absolute positioning, dengan penyesuaian */
.language-switcher {
    display: flex;
    gap: 5px;
    position: absolute; /* Tetap absolute */
    top: 50%; /* Posisikan vertikal di tengah navbar */
    transform: translateY(-50%); /* Geser ke atas setengah tinggi sendiri */
    right: 20px; /* Tetap di kanan, sejajar dengan padding container */
    z-index: 1001; /* Pastikan di atas nav-links */
}

.language-switcher button {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.language-switcher button:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.language-switcher button.active {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    box-shadow: 0 0 8px var(--accent-glow);
}

.language-switcher img {
    width: 16px;
    height: auto;
    border-radius: 1px;
    border: 0.5px solid rgba(255,255,255,0.2);
}


/* General Section Styling */
section {
    padding: 80px 0;
    text-align: center;
    position: relative; /* For parallax or animation effects */
    overflow: hidden;
}

/* Hero Section (Home) - New Layout */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #0c0c1a 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Offset for fixed header */
    text-align: left;
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    gap: 50px;
}

.hero-text-left {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.hero-text-left h1 {
    font-size: 4.5em;
    margin-bottom: 15px;
    text-shadow: 0 0 20px var(--accent-glow);
    animation: fadeIn 1.5s ease-out;
    text-align: left;
}

.hero-text-left p {
    font-size: 1.5em;
    margin-bottom: 40px;
    color: var(--light-text);
    animation: fadeIn 2s ease-out;
    text-align: left;
}

.hero-text-left .btn-primary {
    display: inline-block;
}

.hero-image-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 250px;
}

.profile-photo {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 188, 212, 0.7);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    animation: zoomIn 1.5s ease-out;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Rest of the sections keep their centered text alignment */
.about-section, .portfolio-section, .skills-section, .cta-section, .contact-section {
    text-align: center;
}
.about-section h2, .portfolio-section h2, .skills-section h2, .cta-section h2, .contact-section h2 {
    text-align: center;
}


/* Animation for Hero Section (already existing) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* About Section */
.about-section {
    background-color: #1f1f3a;
}

/* Portfolio Section */
.portfolio-section {
    background-color: var(--dark-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    background-color: #2a2a47;
    border-radius: var(--border-radius-futuristic);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--primary-color);
}

.portfolio-item h3 {
    margin: 20px 0 10px;
    color: var(--primary-color);
    font-size: 1.5em;
}

.portfolio-item p {
    padding: 0 20px 20px;
    font-size: 0.95em;
    color: var(--light-text);
}

.portfolio-item .btn-secondary {
    margin-bottom: 20px;
}

/* Skills Section */
.skills-section {
    background-color: #1f1f3a;
}

.skills-grid {
    display: grid;
    /* Updated for 4 columns on larger screens */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Adjust for smaller screens where 4 columns might be too cramped */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }
}


.skill-item {
    background-color: #2a2a47;
    padding: 25px;
    border-radius: var(--border-radius-futuristic);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: left;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.skill-item h3 {
    text-align: left;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2em;
}

.progress-bar {
    width: 100%;
    background-color: #333;
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    animation: fillProgress 1.5s ease-out forwards;
}

@keyframes fillProgress {
    from { width: 0; }
    to { width: var(--progress-width); } /* Will be set by JS */
}


/* Call to Action Section */
.cta-section {
    background: linear-gradient(90deg, #1f1f3a, #2a2a47);
    padding: 60px 0;
}

.cta-section p {
    font-style: italic;
    margin-bottom: 30px;
    color: var(--light-text);
    font-size: 1.1em;
}

/* Contact Section */
.contact-section {
    background-color: var(--dark-bg);
}

.contact-form {
    max-width: 600px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #444;
    background-color: #2a2a47;
    color: var(--light-text);
    border-radius: var(--border-radius-futuristic);
    font-size: 1em;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--accent-glow);
    outline: none;
}

.contact-form button {
    align-self: center;
    width: auto;
    cursor: pointer;
}

.social-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-links img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.social-links img:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Footer */
.main-footer {
    background-color: #0c0c1a;
    color: #888;
    padding: 30px 0;
    font-size: 0.9em;
    text-align: center;
    border-top: 1px solid #333;
}

/* Gallery Section */
.gallery-section {
    background-color: #1f1f3a; /* Mirip dengan about atau skills section */
    padding: 80px 0;
    text-align: center;
}

.gallery-section h2 {
    margin-bottom: 20px;
}

.gallery-section p {
    margin-bottom: 40px;
    font-size: 1.1em;
    color: var(--light-text);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    background-color: #2a2a47; /* Background item */
    border-radius: var(--border-radius-futuristic);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.gallery-item img {
    width: 100%;
    height: 250px; /* Tinggi gambar bisa disesuaikan */
    object-fit: cover; /* Memastikan gambar memenuhi area tanpa terdistorsi */
    display: block;
    border-bottom: 2px solid var(--primary-color);
}

.gallery-info {
    padding: 20px;
    text-align: left;
}

.gallery-info h3 {
    margin: 0 0 10px;
    color: var(--primary-color);
    font-size: 1.4em;
    text-align: left;
}

.gallery-info p {
    font-size: 0.95em;
    color: var(--light-text);
    margin-bottom: 0;
    text-align: left;
}

/* Responsive untuk Galeri */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .logo {
        position: static; /* Kembali ke static di mobile */
        transform: none;
        margin-bottom: 10px;
        align-self: flex-start;
    }

    .nav-links {
        margin-top: 0;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        order: 2; /* Agar menu di bawah logo dan tombol bahasa */
        padding-right: 0; /* Pastikan tidak ada padding kanan yang mengganggu di mobile */
    }

    .nav-links li {
        margin: 0 15px 10px;
    }

    .language-switcher {
        position: static; /* Kembali ke static di mobile */
        transform: none; /* Hapus transform */
        margin-top: 10px; /* Beri jarak dari logo */
        align-self: flex-end; /* Dorong ke kanan di kolom */
        width: auto; /* Biarkan lebarnya sesuai konten */
        order: 1; /* Agar language switcher di atas menu nav di mobile */
    }

    /* Hero Section Responsive */
    .hero-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .hero-text-left, .hero-image-right {
        max-width: 100%;
        text-align: center;
        justify-content: center;
    }

    .hero-text-left h1, .hero-text-left p {
        text-align: center;
    }

    .hero-text-left .btn-primary {
        margin: 0 auto;
    }

    .profile-photo {
        max-width: 250px;
    }

    .hero-section h1 {
        font-size: 3em;
    }

    .hero-section p {
        font-size: 1.2em;
    }

    /* Skills grid for mobile */
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1em;
    }
}