* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7fc;
    color: #1e2a3e;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

h1 {
    color: #0f3b5c;
    font-size: 2rem;
    margin-bottom: 10px;
    border-left: 6px solid #f59e0b;
    padding-left: 20px;
}

.subtitle {
    color: #2c5a7a;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

p {
    margin-bottom: 15px;
}

.highlight {
    background-color: #fff3e0;
    padding: 15px;
    border-radius: 16px;
    margin: 20px 0;
    border-left: 4px solid #f59e0b;
}

.tombol {
    display: inline-block;
    background-color: #0f3b5c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 40px;
    font-weight: bold;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.tombol:hover {
    background-color: #f59e0b;
    color: #1e2a3e;
}

/* Tombol mode gelap */
.tombol-mode {
    background-color: #0f3b5c;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.tombol-mode:hover {
    background-color: #f59e0b;
    color: #1e2a3e;
}

.tombol-wrapper {
    display: flex;
    justify-content: flex-end;   /* tombol tetap di kanan */
    max-width: 800px;            /* batasi lebar, sama dengan navbar */
    margin: 0 auto;              /* pusatkan secara horizontal */
    margin-bottom: 20px;          /* kurangi jarak ke navbar (dulu mungkin 20-30px) */
    /* hapus margin-top jika ada, atau atur sesuai kebutuhan */
}

/* Navigasi */
.navbar {
    background-color: #0f3b5c;
    padding: 0.8rem 1rem;
    border-radius: 40px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-menu li a:hover {
    color: #f59e0b;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: white;
    margin: 4px 0;
    border-radius: 2px;
}

/* Profil */
.profil-section {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.foto-profil {
    flex: 1;
    text-align: center;
}

.foto-profil img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #f59e0b;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tentang {
    flex: 2;
}

.tentang h2 {
    color: #0f3b5c;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Pengalaman */
.pengalaman-section h2, .sosial-section h2, .kontak-section h2, .gallery-section h2 {
    color: #0f3b5c;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-left: 6px solid #f59e0b;
    padding-left: 15px;
}

.card {
    background-color: #f9f9fc;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    transition: 0.3s;
    border: 1px solid #e2e8f0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card h3 {
    color: #0f3b5c;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.periode {
    font-size: 0.8rem;
    color: #f59e0b;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Sosial media */
.sosial-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.sosial-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #0f3b5c;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.sosial-item:hover {
    background-color: #f59e0b;
    color: #1e2a3e;
    transform: translateY(-3px);
}

/* Form kontak */
.kontak-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.kontak-form label {
    font-weight: bold;
    color: #0f3b5c;
}

.kontak-form input, .kontak-form textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
}

/* Gallery */
.gallery-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.tab-btn.active, .tab-btn:hover {
    background: #0f3b5c;
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.card-achievement {
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.card-achievement:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px rgba(0,0,0,0.15);
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 12px;
    background-color: #f0f0f0;
}
.card-img {
    /* properti yang sudah ada */
    pointer-events: none;          /* mencegah interaksi sentuh/klik pada gambar */
    -webkit-touch-callout: none;   /* khusus Safari/Chrome mobile, hilangkan menu konteks */
    user-select: none;             /* mencegah teks/gambar terpilih */
}

.card-achievement h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #0f3b5c;
}

.card-achievement .year {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: bold;
}

.card-achievement .category {
    display: inline-block;
    background: #02020231;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.68rem;
    margin-top: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 20px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}

/* Responsive HP */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #0f3b5c;
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 0;
        gap: 1.2rem;
        z-index: 1000;
        border-radius: 0 0 20px 20px;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-container {
        position: relative;
    }
    .profil-section {
        flex-direction: column;
        text-align: center;
    }
}

/* Dark mode */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}
body.dark-mode .container, body.dark-mode .card, body.dark-mode .card-achievement {
    background-color: #16213e;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-color: #2c3e50;
}
body.dark-mode h1, body.dark-mode .tentang h2, body.dark-mode .pengalaman-section h2, 
body.dark-mode .sosial-section h2, body.dark-mode .kontak-section h2, body.dark-mode .gallery-section h2 {
    color: #f59e0b;
}
body.dark-mode .card h3, body.dark-mode .card-achievement h3 {
    color: #f59e0b;
}
body.dark-mode .highlight {
    background-color: #2c3e50;
}
body.dark-mode .tombol-mode, body.dark-mode .sosial-item {
    background-color: #f59e0b;
    color: #1e2a3e;
}
body.dark-mode .tombol-mode:hover, body.dark-mode .sosial-item:hover {
    background-color: #e0e0e0;
}
body.dark-mode .modal-content {
    background-color: #1e2a3e;
    color: white;
}
body.dark-mode .tab-btn {
    background-color: #2c3e50;
    color: white;
}
body.dark-mode .tab-btn.active {
    background-color: #f59e0b;
    color: #1e2a3e;
}
.modal-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}
#modalImageContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    margin-left: 8px;
    font-weight: bold;
}
.status-badge.juara {
    background-color: #f59e0b;
    color: #1e2a3e;
}
.status-badge.peserta {
    background-color: #3498db;
    color: white;
}
body.dark-mode .status-badge.juara {
    background-color: #f39c12;
    color: #1a1a2e;
}
body.dark-mode .status-badge.peserta {
    background-color: #2980b9;
}