:root {
    --bg-color: #f5f5f5;          
    --second-bg-color: #ffffff; 
    --main-color: #3f9968;       
    --text-color: #333333;      
    --shadow-color: rgba(0, 0, 0, .1); 
    --white-color: #ffffff;      
    --accent-color: #201a96;     
    --transition-speed: 0.3s;   
}

.dark-mode {
    --bg-color: #0b061f;         
    --second-bg-color: #1a1532;  
    --text-color: #fdfdfd;   
    --shadow-color: rgba(0, 0, 0, .7); 
}

 .login-button {
            display: inline-block;
            background-color: #998d4b;
            color: white;
            padding: 1rem 2rem;
            border-radius: 0.8rem;
            text-decoration: none;
            font-weight: 600;
            font-size: 1.4rem;
            transition: 0.3s;
        }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
    overflow-x: hidden; 
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--second-bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%; /* Padding default */
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--main-color);
}

/* Navbar - Desktop */
.navbar {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar a {
    font-size: 1.6rem;
    color: var(--text-color);
    font-weight: 500;
    transition: color var(--transition-speed), background-color var(--transition-speed);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    background: rgba(63, 99, 153, 0.1); /* Background transparan saat hover/active */
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#menu-icon,
#darkMode-icon {
    font-size: 2.2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color var(--transition-speed) ease;
    padding: 0.5rem; /* Padding agar area klik lebih besar */
}

#darkMode-icon:hover,
#menu-icon:hover {
    color: var(--main-color);
}

#menu-icon {
    display: none; /* Sembunyi di desktop */
}

/* === HOME SECTION === */
.home {
    margin-top: 70px; /* Jarak dari header (tinggi header default) */
    min-height: calc(100vh - 70px);
    padding: 8rem 5% 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    background: var(--bg-color);
    transition: background-color var(--transition-speed) ease;
}

.home-content {
    flex: 1;
    max-width: 600px;
}

.home-content h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--main-color);
}

.home-content h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.2;
}

.home-content p {
    font-size: 1.6rem; /* Ukuran font paragraf sedikit dikecilkan */
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.8;
}

.social-media {
    display: flex;
    gap: 1.2rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.social-media a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background: var(--second-bg-color);
    border: 2px solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    transition: all var(--transition-speed) ease;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--white-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(63, 99, 153, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: var(--main-color);
    color: var(--white-color);
    border-radius: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 5px 20px rgba(212, 218, 228, 0.3);
    border: 2px solid transparent; /* Border transparan untuk hover */
}

.btn i { /* Style untuk ikon di dalam button */
    font-size: 1.6rem;
    transition: transform var(--transition-speed) ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(184, 200, 223, 0.4);
    border-color: var(--main-color); /* Tampilkan border saat hover */
    background: transparent;
    color: var(--main-color);
}

.btn:hover i {
    transform: translateX(3px); /* Efek ikon bergerak sedikit */
}

.home-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    width: 100%;
    max-width: 350px; /* Ukuran maks gambar */
    border-radius: 2rem;
    box-shadow: 0 20px 50px var(--shadow-color);
    transition: all var(--transition-speed) ease;
    border: 5px solid var(--second-bg-color); /* Border agar kontras */
}

.home-img img:hover {
    transform: scale(1.05); /* Sedikit membesar saat hover */
}

/* === SECTIONS === */
section {
    min-height: auto; /* Biarkan tinggi section sesuai konten */
    padding: 8rem 5% 5rem;
    background: var(--second-bg-color);
    transition: background-color var(--transition-speed) ease;
}

/* Section dengan background utama */
section.bg-main {
    background: var(--bg-color);
}

.heading {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    color: var(--text-color);
}

.heading::after {
    content: '';
    position: absolute;
    bottom: -1rem; /* Jarak garis bawah */
    left: 50%;
    transform: translateX(-50%);
    width: 80px; /* Panjang garis */
    height: 4px; /* Tebal garis */
    background: var(--main-color);
    border-radius: 2px;
}

.heading span {
    color: var(--main-color); /* Warna span di heading */
}

/* === ABOUT SECTION === */
.about {
    display: flex;
    align-items: center;
    gap: 4rem;
    background: var(--bg-color); /* Background utama */
}

.about-img {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-img img {
    width: 100%;
    max-width: 280px;
    border-radius: 2rem;
    box-shadow: 0 20px 50px var(--shadow-color);
    border: 5px solid var(--second-bg-color);
}

.about-content {
    flex: 1;
    max-width: 600px;
}

/* Atur heading di about agar rata kiri */
.about-content .heading {
    text-align: left;
    margin-bottom: 2rem;
}
.about-content .heading::after {
    left: 0; /* Garis bawah mulai dari kiri */
    transform: translateX(0);
}

.about-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.btn-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap; /* Tombol bisa wrap jika layar kecil */
}

/* === EDUCATION SECTION === */
.education {
    background: var(--bg-color); /* Background utama */
}

.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.education-box {
    background: var(--second-bg-color);
    padding: 2.5rem;
    border-radius: 2rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all var(--transition-speed) ease;
    border-left: 4px solid var(--main-color); /* Aksen garis kiri */
}

.education-box:hover {
    transform: translateY(-10px); /* Efek naik saat hover */
}

.education-box h3 {
    font-size: 1.8rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.year {
    display: inline-block;
    background: var(--main-color);
    color: var(--white-color);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.education-box p {
    font-size: 1.4rem;
    line-height: 1.7;
    opacity: 0.9;
}

/* === SERVICES / SKILL SET SECTION === */
.services {
    background: var(--bg-color); /* Background utama */
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.services-box {
    background: var(--second-bg-color);
    padding: 3rem 2rem;
    border-radius: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all var(--transition-speed) ease;
    border-top: 4px solid transparent; /* Aksen garis atas saat hover */
}

.services-box:hover {
    transform: translateY(-10px);
    border-top-color: var(--main-color);
}

.services-box i {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.services-box h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem; /* Kurangi margin */
    font-weight: 600;
}

.services-box p {
    font-size: 1.4rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 0.5rem; /* Jarak antar skill */
}

/* === PROJECT SECTION === */
.project {
    background: var(--bg-color); /* Background utama */
}

.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-box {
    background: var(--second-bg-color);
    border-radius: 2rem;
    overflow: hidden; /* Penting agar gambar tidak keluar */
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column; /* Agar konten bisa didorong ke bawah */
}

.project-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-color);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 220px; /* Tinggi gambar konsisten */
    background-color: var(--bg-color); /* Warna placeholder */
}

.project-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gambar mengisi area */
    transition: transform var(--transition-speed) ease; /* Transisi hanya transform */
}

.project-box:hover img {
    transform: scale(1.1); /* Efek zoom saat hover */
}

.project-content {
    padding: 2.5rem;
    flex-grow: 1; /* Biarkan konten mengisi ruang */
    display: flex;
    flex-direction: column;
}

.project-content h4 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    color: var(--main-color);
    font-weight: 600;
    line-height: 1.3;
}

.project-content p {
    font-size: 1.4rem;
    line-height: 1.7;
    margin-bottom: 1.8rem;
    opacity: 0.9;
    flex-grow: 1; /* Mendorong tombol ke bawah */
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--main-color);
    color: var(--white-color);
    border-radius: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    /* width: 100%; */ /* Hapus agar tombol tidak full width */
    justify-content: center;
    align-self: flex-start; /* Tombol rata kiri */
    margin-top: auto; /* Mendorong tombol ke bawah */
    border: 2px solid transparent;
}

.project-btn i {
    font-size: 1.5rem;
}

.project-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(63, 99, 153, 0.3);
    background: transparent;
    color: var(--main-color);
    border-color: var(--main-color);
}

/* === EXPERIENCE SECTION === */
.experience {
    background: var(--bg-color); /* Background utama */
}

.experience-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.experience-card {
    background: var(--second-bg-color);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.experience-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-color);
}

.experience-image {
    position: relative;
    overflow: hidden;
    height: 200px; /* Tinggi gambar konsisten */
    background-color: var(--bg-color);
}

.experience-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.experience-card:hover img {
    transform: scale(1.1);
}

.experience-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.experience-content h4 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--main-color);
    font-weight: 600;
    line-height: 1.3;
}

.experience-content p {
    font-size: 1.4rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    flex-grow: 1; /* Mendorong periode ke bawah */
}

.experience-period {
    display: inline-block;
    background: var(--accent-color); /* Warna ungu */
    color: var(--white-color);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 500;
    align-self: flex-start; /* Rata kiri */
    margin-top: auto; /* Dorong ke bawah */
}

/* === ACTIVITY SECTION === */
.activity-section {
    background: var(--bg-color); /* Background utama */
    padding: 8rem 5% 5rem; /* Padding sama dengan section lain */
}

.activity-container { /* Wrapper opsional */
    max-width: 1200px; /* Batasi lebar jika perlu */
    margin: 0 auto;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.activity-card {
    background: var(--second-bg-color);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-color);
}

.activity-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-color);
}

.activity-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.activity-card:hover img {
    transform: scale(1.1);
}

.activity-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.activity-content h4 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--main-color);
    font-weight: 600;
    line-height: 1.3;
}

.activity-content p {
    font-size: 1.4rem;
    line-height: 1.7;
    /* margin-bottom: 1.5rem; */ /* Hapus margin bawah agar bisa didorong */
    opacity: 0.9;
    flex-grow: 1; /* Mendorong elemen bawah (jika ada) */
}

/* === ORGANIZATION SECTION === */
.organization {
    background: var(--bg-color); /* Background utama */
}

.organization-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.organization-box {
    background: var(--second-bg-color);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.organization-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-color);
}

.organization-image { /* Tambahkan class ini di HTML jika perlu */
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-color);
}

.organization-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.organization-box:hover img {
    transform: scale(1.1);
}

.organization-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.organization-content h4 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--main-color);
    font-weight: 600;
    line-height: 1.3;
}

.organization-content p {
    font-size: 1.4rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    flex-grow: 1; /* Mendorong tombol ke bawah */
}

.organization-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--main-color);
    color: var(--white-color);
    border-radius: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    /* width: 100%; */ /* Hapus */
    justify-content: center;
    align-self: flex-start; /* Rata kiri */
    margin-top: auto; /* Dorong ke bawah */
    border: 2px solid transparent;
}

.organization-btn i {
    font-size: 1.5rem;
}

.organization-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(63, 99, 153, 0.3);
    background: transparent;
    color: var(--main-color);
    border-color: var(--main-color);
}

/* === FOOTER === */
.footer {
    background: var(--main-color);
    color: var(--white-color);
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: auto; /* Mendorong footer ke bawah */
}

.footer-text {
    font-size: 1.4rem;
    color: var(--white-color);
}
.footer-text p { /* Pastikan teks footer juga putih */
    color: var(--white-color);
}


.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem;
    background: var(--white-color);
    border-radius: 0.8rem;
    border: 0.2rem solid var(--white-color);
    transition: all var(--transition-speed) ease;
    width: 4rem;
    height: 4rem;
}

.footer-iconTop a i {
    font-size: 2rem;
    color: var(--main-color);
}

.footer-iconTop a:hover {
    background: var(--main-color);
    box-shadow: 0 0 1rem var(--white-color); /* Efek glow */
}

.footer-iconTop a:hover i {
    color: var(--white-color);
}

/* Floating Back Button */
.floating-back-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--main-color);
    color: white;
    border-radius: 50%;
    display: none; /* Sembunyi by default */
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 6px 20px var(--shadow-color);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.floating-back-btn.show {
    color: whitesmoke;
    display: flex;
}

.floating-back-btn:hover {
    background: rgb(26, 156, 76); /* Warna hover bisa disesuaikan */
    transform: translateY(-3px);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.6rem;
    color: var(--main-color);
    grid-column: 1 / -1; /* Penuhi grid jika di dalam container */
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

/* Animasi titik-titik loading */
@keyframes dots {
    0%, 20% { color: rgba(0,0,0,0); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    40% { color: var(--main-color); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    60% { text-shadow: .25em 0 0 var(--main-color), .5em 0 0 rgba(0,0,0,0); }
    80%, 100% { text-shadow: .25em 0 0 var(--main-color), .5em 0 0 var(--main-color); }
}

/* === IMAGE POPUP STYLES (Jika Anda menggunakannya) === */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Latar belakang gelap transparan */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
    padding: 1rem;
}

.image-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    position: relative;
    max-width: 95%; /* Maks lebar */
    max-height: 95%; /* Maks tinggi */
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Gambar pas tanpa distorsi */
    border-radius: 1rem;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1); /* Shadow halus */
}

.popup-close {
    position: absolute;
    top: -35px; /* Lebih dekat */
    right: -15px; /* Lebih dekat */
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5); /* Background transparan */
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1; /* Pusatkan ikon 'x' */
    transition: all var(--transition-speed) ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2); /* Background lebih terang saat hover */
    transform: scale(1.1);
}

.popup-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-speed) ease;
    opacity: 0.7; /* Sedikit transparan */
}

.popup-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.popup-prev {
    left: 10px; /* Lebih dekat tepi */
}

.popup-next {
    right: 10px; /* Lebih dekat tepi */
}


/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet */
@media (max-width: 991px) {
    html { font-size: 55%; } /* Font sedikit lebih kecil di tablet */
    .header {
        padding: 1.5rem 4%;
    }
    .home {
        margin-top: 70px; /* Sesuaikan dengan tinggi header baru */
        padding: 6rem 4% 3rem;
    }
    .home-content h1 { font-size: 4rem; }
    .home-content p { font-size: 1.6rem; }
    section { padding: 6rem 4% 3rem; }
    .heading { font-size: 3.5rem; }
    /* Pastikan gambar di tablet tidak terlalu besar */
    .home-img img { max-width: 300px; }
    .about-img img { max-width: 250px; }
}

/* Mobile - INI BAGIAN YANG DIREVISI */
@media (max-width: 768px) {
    /* Pastikan tidak ada scroll horizontal */
    html, body {
        overflow-x: hidden;
    }

    #menu-icon {
        display: block; /* Tampilkan ikon hamburger */
    }

    /* Navbar Mobile - Menggunakan max-height untuk toggle */
    .navbar {
        position: absolute;
        top: 100%; /* Tepat di bawah header */
        left: 0;
        right: 0; /* Otomatis jadi full width */
        width: auto;
        background: var(--second-bg-color);
        padding: 0 4%; /* Hapus padding atas/bawah saat tertutup */
        box-shadow: 0 5px 15px var(--shadow-color);

        /* Logika transisi max-height */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-out, padding 0.35s ease-out; /* Transisi sedikit lebih lambat */

        /* Tetap flex column */
        display: flex; /* Ganti display:none menjadi display:flex */
        flex-direction: column;
        gap: 0.5rem;
    }

    .navbar.active {
        /* Saat aktif, beri max-height dan padding */
        max-height: 100vh; /* Tinggi maksimum yang cukup besar */
        padding: 1rem 4%; /* Kembalikan padding atas/bawah */
    }

    .navbar a {
        display: block;
        text-align: center;
        padding: 1.2rem;
        font-size: 1.6rem;
        border-radius: 0.5rem;
        transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
        background: rgba(63, 99, 153, 0.05); /* Beri sedikit background */
    }

    /* Style hover/active tetap sama */
    .navbar a:hover,
    .navbar a.active {
        background: var(--main-color);
        color: var(--white-color);
    }

    .header {
        padding: 1.2rem 4%; /* Header sedikit lebih kecil di mobile */
    }

    /* Penyesuaian layout mobile */
    .home {
        flex-direction: column;
        text-align: center;
        margin-top: 65px; /* Sesuaikan dengan tinggi header baru */
        padding: 4rem 4% 2rem;
        gap: 2rem;
    }
    .home-img {
        order: -1; /* Gambar di atas */
        margin-bottom: 2rem;
    }
    .home-img img { max-width: 280px; }
    .home-content h1 { font-size: 3.2rem; }
    .social-media { justify-content: center; } /* Ikon sosial rata tengah */
    .btn { justify-content: center; } /* Tombol rata tengah */

    .about {
        flex-direction: column;
        text-align: center;
        gap: 3rem; /* Sedikit lebih jauh */
    }
    .about-content .heading {
        text-align: center; /* Rata tengah juga */
    }
    .about-content .heading::after {
        left: 50%; /* Rata tengah garis bawah */
        transform: translateX(-50%);
    }
    .btn-group { justify-content: center; } /* Tombol about rata tengah */

    /* ===============================================================
      PERUBAHAN UTAMA DI SINI:
      Aturan 1 kolom dipindahkan dari 480px ke 768px
      agar semua data (project, experience, dll) tampil rapi di mobile.
      ===============================================================
    */
    .education-container,
    .services-container,
    .project-container,
    .experience-container,
    .activity-grid,
    .organization-container {
        grid-template-columns: 1fr;
    }

    /* Tambahan: Pastikan card tidak meluap */
    .project-box,
    .experience-card,
    .activity-card,
    .organization-box,
    .services-box,
    .education-box {
        width: 100%; /* Pastikan lebar card adalah 100% dari grid */
    }
    /* ===============================================================
      AKHIR DARI PERUBAHAN UTAMA
      ===============================================================
    */

    .footer {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 4%;
    }
    .footer-iconTop {
        margin-top: 1rem; /* Beri jarak ke atas */
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    html { font-size: 50%; } /* Font lebih kecil lagi */

    .header { padding: 1rem 4%; }
    .logo { font-size: 1.8rem; }
    .home {
        margin-top: 58px; /* Sesuaikan lagi */
        padding: 3rem 4% 1rem;
    }
    .home-content h1 { font-size: 2.8rem; }
    .home-content p { font-size: 1.4rem; }
    .home-img img { max-width: 220px; }
    section { padding: 4rem 4% 2rem; }
    .heading { font-size: 2.8rem; }
    
    .btn-group { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    
    /* Tombol di dalam card juga kita buat full-width agar konsisten */
    .project-btn, 
    .organization-btn { 
        width: 100%; 
        align-self: center; /* Rata tengah */
    }

    .footer { padding: 1.5rem 4%; }
    .footer-text { font-size: 1.3rem; }
    .floating-back-btn {
        bottom: 15px; right: 15px; width: 45px; height: 45px; font-size: 18px;
    }
    /* Sesuaikan popup di layar kecil */
    .popup-close { top: 10px; right: 10px; width: 30px; height: 30px; font-size: 2rem;}
    .popup-nav { display: none; } /* Sembunyikan navigasi */
    }

    /* Dark Mode Bintang*/

    .dark-mode body,
    .dark-mode .home,
    .dark-mode .about,
    .dark-mode .education,
    .dark-mode .services,
    .dark-mode .project,
    .dark-mode .experience,
    .dark-mode .activity-section,
    .dark-mode .organization 

    {

    background-color: var(--bg-color); /* Ini akan mengambil #0b061f */
    background-image: 
        radial-gradient(1px 1px at 10% 30%, white, transparent),
        radial-gradient(1px 1px at 80% 70%, white, transparent),
        radial-gradient(2px 2px at 30% 80%, white, transparent),
        radial-gradient(2px 2px at 50% 10%, white, transparent),
        radial-gradient(3px 3px at 70% 40%, white, transparent),
        radial-gradient(3px 3px at 20% 50%, white, transparent);


    background-size: 
        600px 600px, 
        600px 600px,
        400px 400px, 
        400px 400px,
        200px 200px, 
        200px 200px;
    background-repeat: repeat;
    animation: moveStars 120s linear infinite;

    }

    .dark-mode .header,
    .dark-mode .education-box,
    .dark-mode .services-box,
    .dark-mode .project-box,
    .dark-mode .experience-card,
    .dark-mode .activity-card,
    .dark-mode .organization-box,
    .dark-mode .navbar {
    background: var(--second-bg-color);
    animation: none;

    }


    @keyframes moveStars {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    to {

        background-position: 
            -10000px 2000px,  /* Lapisan 1 */
            -10000px 2000px,
            -15000px 3000px,  /* Lapisan 2 */
            -15000px 3000px,
            -25000px 5000px,  /* Lapisan 3 */
            -25000px 5000px;
         }
    }