/* --- Global Styles --- */
:root {
    --primary-color: #007bff; /* Biru cerah untuk aksen */
    --secondary-color:rgb(9, 48, 59); /* Biru tua/gelap untuk gradien dan background dark mode */
    --text-dark: #333; /* Teks gelap utama */
    --text-medium: #555; /* Teks abu-abu sedang */
    --text-light: #777; /* Teks abu-abu terang */
    --bg-light: #f0f2f5; /* Latar belakang terang utama */
    --glass-bg-light: rgba(255, 255, 255, 0.6); /* Background kaca terang */
    --glass-border-light: rgba(255, 255, 255, 0.9); /* Border kaca terang */
    --shadow-light: rgba(0, 0, 0, 0.15); /* Bayangan terang */
    --transition-speed: 0.3s;
    --transition-reveal: 0.8s;

    /* Tema Adaptasi */
    --theme-primary: var(--primary-color);
    --theme-secondary: var(--secondary-color);
    --theme-text: var(--text-dark);
    --theme-bg-glass: var(--glass-bg-light);
    --theme-border-glass: var(--glass-border-light);
    --theme-shadow-glass: var(--shadow-light);
    --theme-bg-body: var(--bg-light); /* Latar belakang body utama */
    --theme-heading-color: #2c3e50; /* Warna heading default */

    /* Warna untuk Chat FAB & Overlay (disesuaikan dengan tema kaca) */
    --chat-fab-bg-glass: rgba(0, 123, 255, 0.7); /* Primary color dengan transparansi */
    --chat-fab-border-glass: rgba(255, 255, 255, 0.9);
    --chat-overlay-bg-glass: rgba(255, 255, 255, 0.9); /* Lebih solid agar teks lebih jelas */
    --chat-header-bg-glass: rgba(0, 123, 255, 0.8); /* Primary color dengan transparansi untuk header */
    --chat-option-bg-glass: rgba(240, 242, 245, 0.7); /* bg-light dengan transparansi */
    --chat-option-border-glass: rgba(221, 221, 221, 0.9);
    --chat-option-bg-hover-glass: rgba(255, 255, 255, 0.9); /* Hover yang lebih terang */

    /* Dark Mode Variables */
    --dark-primary-color: #4CAF50; /* Hijau atau warna lain yang kontras di dark mode */
    --dark-secondary-color: #1a5e20;
    --dark-text: #e0e0e0;
    --dark-text-medium: #b0b0b0;
    --dark-bg-body: #1a1a2e; /* Latar belakang gelap utama */
    --dark-glass-bg: rgba(26, 26, 46, 0.7); /* Dark background with transparency */
    --dark-glass-border: rgba(60, 60, 80, 0.9);
    --dark-shadow: rgba(0, 0, 0, 0.4);
    --dark-heading-color: #f5f5f5;

    /* Dark Mode Chat FAB & Overlay */
    --dark-chat-fab-bg-glass: rgba(76, 175, 80, 0.7);
    --dark-chat-fab-border-glass: rgba(100, 100, 120, 0.9);
    --dark-chat-overlay-bg-glass: rgba(40, 40, 60, 0.9);
    --dark-chat-header-bg-glass: rgba(76, 175, 80, 0.8);
    --dark-chat-option-bg-glass: rgba(50, 50, 70, 0.7);
    --dark-chat-option-border-glass: rgba(80, 80, 100, 0.9);
    --dark-chat-option-bg-hover-glass: rgba(60, 60, 80, 0.9);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth; /* Smooth scroll for navigation */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--theme-text);
    background-color: transparent; /* Spline handles background */
    overflow-x: hidden;
    position: relative;
    /* Transition for theme change */
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Dark Mode specific styles */
body.dark-mode {
    --theme-primary: var(--dark-primary-color);
    --theme-secondary: var(--dark-secondary-color);
    --theme-text: var(--dark-text);
    --theme-bg-glass: var(--dark-glass-bg);
    --theme-border-glass: var(--dark-glass-border);
    --theme-shadow-glass: var(--dark-shadow);
    --theme-bg-body: var(--dark-bg-body);
    --theme-heading-color: var(--dark-heading-color);

    /* Dark Mode Chat FAB & Overlay */
    --chat-fab-bg-glass: var(--dark-chat-fab-bg-glass);
    --chat-fab-border-glass: var(--dark-chat-fab-border-glass);
    --chat-overlay-bg-glass: var(--dark-chat-overlay-bg-glass);
    --chat-header-bg-glass: var(--dark-chat-header-bg-glass);
    --chat-option-bg-glass: var(--dark-chat-option-bg-glass);
    --chat-option-border-glass: var(--dark-chat-option-border-glass);
    --chat-option-bg-hover-glass: var(--dark-chat-option-bg-hover-glass);

    /* Override specific colors for Dark Mode if needed */
    .hero h1, .section h2, .skill-item h3, .project-card h3, .testimonial-card h4 {
        color: var(--dark-heading-color);
    }
    .hero p, .about-text p, .contact-info p, .contact-form input, .contact-form textarea,
    .testimonial-card p, .client-info span {
        color: var(--dark-text-medium);
    }
    .chat-body p {
        color: var(--dark-text-medium);
    }
    .chat-option.email-form {
        color: var(--dark-text);
    }
    .chat-option.email-form svg {
        stroke: var(--dark-text);
    }
    .contact-form input::placeholder,
    .contact-form textarea::placeholder {
        color: var(--dark-text-medium);
    }
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* --- Animated Background (Liquid Effect - White Theme) --- */
/* This is primarily for visual coherence, actual background is Spline */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: var(--theme-bg-body); /* Adapt to current theme */
    opacity: 0.95;
    transition: background-color 0.5s ease;
}

/* --- Spline Viewer as Background --- */
spline-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: auto;
    --spline-viewer-background-color: transparent;
    --spline-viewer-progress-bar-color: var(--theme-primary);
    --spline-viewer-loading-spinner-color: var(--theme-primary);
}

/* --- Navbar (Transparent, No Padding, Liquid Glass Effect) --- */
nav {
    background: transparent;
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    pointer-events: auto;
}

nav .container {
    padding: 0;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center; /* Pusat di desktop */
    align-items: center;
    position: relative;
    pointer-events: auto;
}

nav ul.nav-links {
    list-style: none;
    margin: 0;
    padding: 10px 25px;
    display: flex;
    border-radius: 15px;
    background: var(--theme-bg-glass); /* Dynamic glass background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--theme-border-glass); /* Dynamic glass border */
    box-shadow: 0 6px 30px var(--theme-shadow-glass); /* Dynamic glass shadow */
    pointer-events: auto;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease; /* Transition for theme change */
}

nav ul.nav-links li {
    margin: 0 20px;
    pointer-events: auto;
}

nav ul.nav-links li a {
    color: var(--text-medium); /* Default for day mode */
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all var(--transition-speed) ease;
    pointer-events: auto;
}
body.dark-mode nav ul.nav-links li a {
    color: var(--dark-text-medium); /* Dark mode specific text color */
}

nav ul.nav-links li a:hover {
    color: var(--primary-color); /* Always primary color on hover */
    background-color: rgba(0, 123, 255, 0.1); /* Consistent hover effect */
}
body.dark-mode nav ul.nav-links li a:hover {
    color: var(--dark-primary-color);
    background-color: rgba(76, 175, 80, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute; /* Position them separately */
    right: 25px; /* Adjust as needed */
    z-index: 1001; /* Ensure they are above nav links in mobile */
}

#theme-switcher {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: var(--text-medium); /* Default for day mode */
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease, transform 0.2s ease;
}
body.dark-mode #theme-switcher {
    color: var(--dark-text-medium); /* Dark mode specific */
}
#theme-switcher:hover {
    transform: scale(1.1);
}


.hamburger-menu {
    display: none; /* Sembunyikan di desktop */
    font-size: 1.8rem;
    color: var(--theme-text); /* Dynamic color */
    cursor: pointer;
    pointer-events: auto;
}

/* --- Hero Section (Robot 3D, Liquid Glass Content) --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--theme-text);
    text-align: center;
    overflow: hidden;
    padding-top: 80px; /* Offset dari navbar */
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    border-radius: 20px;
    background: var(--theme-bg-glass); /* Dynamic glass background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--theme-border-glass); /* Dynamic glass border */
    box-shadow: 0 8px 32px 0 var(--theme-shadow-glass); /* Dynamic glass shadow */
    transform: translateY(0);
    opacity: 1;
    animation: fadeInSlideUp 1s ease-out forwards;
    pointer-events: auto;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease; /* Transition for theme change */
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 15px;
    color: var(--theme-heading-color); /* Dynamic color */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    pointer-events: auto;
    transition: color 0.5s ease; /* Transition for theme change */
}

/* Kursor Animasi (handled by Typed.js, but fallback CSS is good) */
.hero h1 #typed-name::after {
    content: '|';
    display: inline-block;
    animation: blink-caret 0.75s step-end infinite;
    margin-left: 2px;
}
@keyframes blink-caret {
    from, to { opacity: 0 }
    50% { opacity: 1 }
}

.hero p {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--text-medium); /* Default text medium */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    pointer-events: auto;
    transition: color 0.5s ease; /* Transition for theme change */
}

.btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary)); /* Dynamic gradient */
    color: #fff;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3); /* Base shadow */
    font-weight: bold;
    letter-spacing: 1px;
    pointer-events: auto;
}
body.dark-mode .btn {
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn:hover {
    background: linear-gradient(45deg, var(--theme-secondary), var(--theme-primary));
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.5); /* Stronger shadow on hover */
}
body.dark-mode .btn:hover {
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.5);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* --- General Section Styles (Liquid Glass & Motion) --- */
.section {
    padding: 100px 0;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity var(--transition-reveal) ease-out, transform var(--transition-reveal) ease-out;
    pointer-events: none;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    font-size: 3rem;
    margin-bottom: 50px;
    color: var(--theme-heading-color); /* Dynamic color */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    pointer-events: auto;
    transition: color 0.5s ease; /* Transition for theme change */
}

.section.bg-light {
    background-color: transparent;
}

/* --- Particles Background Style --- */
.particles-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; /* Pastikan di bawah konten section */
}

/* About Section */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 60px;
    text-align: left;
    background: var(--theme-bg-glass); /* Dynamic glass background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--theme-border-glass); /* Dynamic glass border */
    box-shadow: 0 6px 25px var(--theme-shadow-glass); /* Dynamic glass shadow */
    border-radius: 25px;
    padding: 40px;
    pointer-events: auto;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease; /* Transition for theme change */
    position: relative; /* Penting agar z-index partikel bekerja dengan benar */
    z-index: 1; /* Pastikan konten di atas partikel */
}

.about-image {
    flex: 1;
    min-width: 300px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.about-image img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    pointer-events: auto;
}

.about-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 2;
    min-width: 300px;
    color: var(--theme-text); /* Dynamic text color */
    pointer-events: auto;
    transition: color 0.5s ease; /* Transition for theme change */
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.2rem;
    transition: color 0.5s ease; /* Transition for theme change */
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    margin-top: 50px;
    pointer-events: auto;
    position: relative; /* Penting agar z-index partikel bekerja dengan benar */
    z-index: 1; /* Pastikan konten di atas partikel */
}

.skill-item {
    background: var(--theme-bg-glass); /* Dynamic glass background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--theme-border-glass); /* Dynamic glass border */
    box-shadow: 0 5px 20px var(--theme-shadow-glass); /* Dynamic glass shadow */
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    pointer-events: auto;
}

.skill-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 10px 25px var(--theme-shadow-glass);
    background: rgba(255, 255, 255, 0.85); /* Slightly more opaque on hover */
}
body.dark-mode .skill-item:hover {
    background: rgba(26, 26, 46, 0.95);
}


.skill-item i {
    font-size: 4rem;
    color: var(--theme-primary); /* Dynamic primary color */
    margin-bottom: 20px;
    transition: transform 0.3s ease, color 0.5s ease; /* Transition for theme change */
    pointer-events: auto;
}

.skill-item:hover i {
    transform: rotateY(360deg);
}

.skill-item h3 {
    font-size: 1.4rem;
    color: var(--theme-heading-color); /* Dynamic color */
    transition: color 0.5s ease; /* Transition for theme change */
}

/* Skill Progress Bar (New Feature) */
.skill-progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.1); /* Background of the bar */
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.skill-progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary)); /* Dynamic gradient */
    border-radius: 5px;
    transition: width 1s ease-out; /* Animate on load */
}

/* Projects Section */
.project-filters {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.project-filters .filter-btn {
    background: var(--theme-bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--theme-border-glass);
    box-shadow: 0 4px 15px var(--theme-shadow-glass);
    color: var(--theme-text);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-filters .filter-btn:hover {
    background: var(--primary-color); /* Atau gunakan warna yang kontras */
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}
body.dark-mode .project-filters .filter-btn:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.project-filters .filter-btn.active {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary));
    color: white;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}
body.dark-mode .project-filters .filter-btn.active {
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
    pointer-events: auto;
}

.project-card {
    background: var(--theme-bg-glass); /* Dynamic glass background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--theme-border-glass); /* Dynamic glass border */
    box-shadow: 0 5px 20px var(--theme-shadow-glass); /* Dynamic glass shadow */
    border-radius: 20px;
    overflow: hidden;
    text-align: left;
    transition: all 0.4s ease, opacity 0.5s ease, transform 0.5s ease; /* Tambah transisi untuk hidden */
    pointer-events: auto;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px var(--theme-shadow-glass);
    background: rgba(255, 255, 255, 0.85);
}
body.dark-mode .project-card:hover {
    background: rgba(26, 26, 46, 0.95);
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.9);
    height: 0; /* Untuk menyembunyikan secara visual dan tidak memakan ruang */
    margin: 0; /* Hilangkan margin saat disembunyikan */
    padding: 0; /* Hilangkan padding saat disembunyikan */
    overflow: hidden;
    pointer-events: none;
    transition: all 0.4s ease, opacity 0.5s ease, transform 0.5s ease;
}

.project-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    pointer-events: auto;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 1.7rem;
    margin: 20px 25px 10px;
    color: var(--theme-heading-color); /* Dynamic color */
    pointer-events: auto;
    transition: color 0.5s ease; /* Transition for theme change */
}

.project-card p {
    font-size: 1.1rem;
    margin: 0 25px 25px;
    color: var(--theme-text); /* Dynamic text color */
    pointer-events: auto;
    transition: color 0.5s ease; /* Transition for theme change */
}

.project-card .project-link {
    display: block;
    padding: 15px 25px;
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary));
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: background var(--transition-speed) ease;
    font-weight: bold;
    pointer-events: auto;
}

.project-card .project-link:hover {
    background: linear-gradient(45deg, var(--theme-secondary), var(--theme-primary));
    color: #fff;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: center;
}

.testimonial-card {
    background: var(--theme-bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--theme-border-glass);
    box-shadow: 0 5px 20px var(--theme-shadow-glass);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px var(--theme-shadow-glass);
    background: rgba(255, 255, 255, 0.85);
}
body.dark-mode .testimonial-card:hover {
    background: rgba(26, 26, 46, 0.95);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: var(--theme-text);
    line-height: 1.8;
}

.client-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto; /* Untuk mendorong ke bawah jika konten berbeda tinggi */
}

.client-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--theme-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.client-info h4 {
    font-size: 1.3rem;
    margin: 0 0 5px;
    color: var(--theme-heading-color);
}

.client-info span {
    font-size: 0.9rem;
    color: var(--text-medium);
}


/* Blog Section (New Feature) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.blog-post-card {
    background: var(--theme-bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--theme-border-glass);
    box-shadow: 0 5px 20px var(--theme-shadow-glass);
    border-radius: 20px;
    overflow: hidden;
    text-align: left;
    transition: all 0.4s ease;
    cursor: pointer;
}

.blog-post-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px var(--theme-shadow-glass);
    background: rgba(255, 255, 255, 0.85);
}
body.dark-mode .blog-post-card:hover {
    background: rgba(26, 26, 46, 0.95);
}

.blog-post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-post-card h3 {
    font-size: 1.5rem;
    margin: 20px 25px 5px;
    color: var(--theme-heading-color);
}

.blog-post-card .post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0 25px 15px;
    line-height: 1.4; /* Perbaikan untuk mengatasi pemotongan teks */
}
body.dark-mode .blog-post-card .post-meta {
    color: var(--dark-text-medium);
}

.blog-post-card p {
    font-size: 1rem;
    margin: 0 25px 25px;
    color: var(--theme-text);
}

.blog-post-card .btn {
    margin: 0 25px 25px;
    display: inline-flex; /* Use flex to align icon */
    align-items: center;
    gap: 8px;
}

/* Contact Section */
.contact-info {
    margin-top: 40px;
    font-size: 1.2rem;
    color: var(--theme-text);
    pointer-events: auto;
}

.contact-info p {
    margin-bottom: 20px;
    transition: color 0.5s ease; /* Transition for theme change */
}

.contact-info i {
    margin-right: 15px;
    color: var(--theme-primary);
    transition: color 0.5s ease; /* Transition for theme change */
}

.contact-info a {
    color: var(--theme-primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    pointer-events: auto;
}

.contact-info a:hover {
    color: color-mix(in srgb, var(--theme-primary) 80%, black);
}

.contact-form {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    background: var(--theme-bg-glass); /* Dynamic glass background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--theme-border-glass); /* Dynamic glass border */
    box-shadow: 0 6px 25px var(--theme-shadow-glass); /* Dynamic glass shadow */
    padding: 40px;
    border-radius: 25px;
    pointer-events: auto;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease; /* Transition for theme change */
}

.contact-form input,
.contact-form textarea {
    padding: 18px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.5); /* Semi-transparent white */
    color: var(--text-dark); /* Default text dark */
    pointer-events: auto;
    transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease; /* Transition for theme change */
}
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: rgba(60, 60, 80, 0.5); /* Semi-transparent dark */
    color: var(--dark-text);
    border-color: rgba(255, 255, 255, 0.2);
}


.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-light); /* Default text light */
    transition: color 0.5s ease; /* Transition for theme change */
}
body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder {
    color: var(--dark-text-medium);
}


.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--theme-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}
body.dark-mode .contact-form input:focus,
body.dark-mode .contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.contact-form .btn {
    align-self: center;
    padding: 15px 40px;
    pointer-events: auto;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-medium); /* Default text medium */
    text-align: center;
    padding: 30px 0;
    margin-top: 80px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease; /* Transition for theme change */
}
body.dark-mode footer {
    background: rgba(26, 26, 46, 0.7);
    color: var(--dark-text-medium);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    margin-top: 10px;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.3s ease;
}
body.dark-mode .footer-links a {
    color: var(--dark-text-medium);
}

.footer-links a:hover {
    color: var(--theme-primary);
}


/* --- SPLINE WATERMARK HIDE (NON-OFFICIAL) --- */
spline-viewer::part(watermark) {
    display: none !important;
}

/* --- Responsive Design Enhancements --- */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }

    nav .container {
        justify-content: space-between; /* Kembali ke justify-content: space-between */
        padding: 0 20px;
    }

    /* Navbar links hidden by default on mobile */
    nav ul.nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background: var(--theme-bg-glass);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid var(--theme-border-glass);
        box-shadow: 0 8px 32px 0 var(--theme-shadow-glass);
        border-radius: 0 0 15px 15px;
        padding: 20px 0;
        align-items: center;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease-out, transform 0.3s ease-out, background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease; /* Transition for theme change */
        pointer-events: none;
    }

    nav ul.nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    nav ul.nav-links li {
        margin: 10px 0;
    }
    
    .nav-actions {
        position: static; /* Let it flow normally */
        right: auto;
        justify-content: flex-end;
    }

    #theme-switcher {
        font-size: 1.2rem;
    }

    .hamburger-menu {
        display: block;
        margin-left: 15px; /* Jarak dari theme switcher */
    }

    .hero h1 {
        font-size: 3rem;
        flex-direction: column;
        gap: 0px;
    }

    .hero h1 #typed-name {
        text-align: center;
    }

    .hero p {
        font-size: 1.5rem;
    }

    .section h2 {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
        gap: 30px;
        padding: 30px;
    }

    .about-image {
        min-width: unset;
        width: 100%;
    }

    .about-text {
        min-width: unset;
        width: 100%;
        font-size: 1.1rem;
    }

    /* Skills Grid for larger mobile/tablet */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 25px;
    }

    /* Projects Grid for larger mobile/tablet */
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    .skill-item {
        padding: 30px;
    }

    .skill-item i {
        font-size: 3.5rem;
    }

    .skill-item h3 {
        font-size: 1.3rem;
    }

    .project-card h3 {
        font-size: 1.5rem;
    }

    .project-card p {
        font-size: 1.0rem;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    .blog-post-card h3 {
        font-size: 1.3rem;
    }

    .blog-post-card p {
        font-size: 0.9rem;
    }

    .contact-info {
        font-size: 1.1rem;
    }

    .contact-form {
        padding: 30px;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 1rem;
        padding: 15px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0px;
    }

    .hero h1 #typed-name {
        text-align: center;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    /* Skills Grid for medium mobile */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr); /* Exactly 2 columns */
        gap: 20px;
    }
    
    /* Projects Grid for medium mobile */
    .projects-grid {
        grid-template-columns: 1fr; /* Go back to single column if 2 is too cramped */
        gap: 25px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }

    .hero-content {
        padding: 25px;
    }

    .hero h1 {
        font-size: 2rem;
        word-break: break-word;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .about-content {
        gap: 20px;
        padding: 20px;
    }

    .about-text p {
        font-size: 1rem;
    }

    /* Skills Grid for small mobile */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .skill-item {
        padding: 15px;
    }

    .skill-item i {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .skill-item h3 {
        font-size: 1rem;
    }

    /* Projects Grid for small mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card h3 {
        font-size: 1.3rem;
    }

    .project-card p {
        font-size: 0.95rem;
        margin: 0 20px 20px;
    }

    .contact-info {
        font-size: 1.1rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* --- Tambahan CSS untuk behavior Navbar di PC --- */
@media (min-width: 993px) {
    nav.hide-navbar {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }

    nav.show-navbar {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* --- Chat FAB & Overlay Styles --- */
#chat-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--chat-fab-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--chat-fab-border-glass);
    box-shadow: 0 6px 30px var(--shadow-light);
    
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    z-index: 900;
    transition: transform 0.2s ease-out, background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}
#chat-fab:hover {
    background-color: color-mix(in srgb, var(--chat-fab-bg-glass) 90%, black);
    transform: translateY(-5px);
    box-shadow: 0 8px 35px var(--shadow-light);
}
#chat-fab:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
#chat-fab svg {
    fill: none;
    stroke: white;
    width: 30px;
    height: 30px;
}

#chat-overlay {
    position: fixed;
    bottom: 0;
    right: 30px;
    width: 320px;
    background-color: var(--chat-overlay-bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border-light);
    box-shadow: 0 -8px 32px 0 var(--shadow-light);
    
    border-radius: 15px 15px 0 0;
    z-index: 950;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out, visibility 0.4s ease-out, background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
}
#chat-overlay.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background-color: var(--chat-header-bg-glass);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}
.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
}
#close-chat-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.chat-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.chat-body p {
    margin-top: 0;
    font-size: 0.95rem;
    color: var(--theme-text); /* Ensure text adapts to theme */
    transition: color 0.5s ease;
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    
    background-color: var(--chat-option-bg-glass);
    border: 1px solid var(--chat-option-border-glass);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--theme-text); /* Ensure text adapts to theme */
}
.chat-option:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.chat-option svg, .chat-option i {
    width: 20px;
    height: 20px;
    stroke-width: 2; /* For SVG */
    color: var(--theme-text); /* Ensure icon adapts to theme */
    transition: color 0.3s ease;
}
/* Specific overrides for brand colors */
.chat-option.whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.chat-option.whatsapp:hover { background-color: #1DA851; }
.chat-option.whatsapp svg, .chat-option.whatsapp i { stroke: white; color: white; }

.chat-option.telegram {
    background-color: #0088CC;
    color: white;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.chat-option.telegram:hover { background-color: #006699; }
.chat-option.telegram svg, .chat-option.telegram i { stroke: white; color: white; }

/* Email form option uses glass theme */
.chat-option.email-form {
    background-color: var(--chat-option-bg-glass);
    color: var(--theme-text);
    border: 1px solid var(--chat-option-border-glass);
}
.chat-option.email-form:hover {
    background-color: var(--chat-option-bg-hover-glass);
}
.chat-option.email-form svg, .chat-option.email-form i { stroke: var(--theme-text); color: var(--theme-text); }


/* Media Queries for Responsive Chat */
@media (max-width: 768px) {
    #chat-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    #chat-fab svg { width: 25px; height: 25px; }

    #chat-overlay {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        bottom: 20px;
        border-radius: 15px;
        transform: translateY(120%);
    }
    #chat-overlay.visible {
        transform: translateY(0);
    }
    .chat-header h3 { font-size: 1.1rem; }
    .chat-body { padding: 15px; }
    .chat-option { padding: 10px 12px; font-size: 0.9rem; }
}