/* style.css */

/* Reset Dasar Browser */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif; /* Font clean untuk teks deskripsi */
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Bagian Atas (Biru Tua) --- */
.top-section {
    background-color: #0b1d47; /* Biru tua seperti di gambar */
    height: 15vh; /* Sedikit lebih kecil agar fokus ke halo */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 20px;
    z-index: 2;
}

.halo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    letter-spacing: 5px;
}

/* Potret Diri menabrak garis */
.portrait-container {
    position: absolute;
    top: 50%; /* Posisikan di tengah tinggi section biru */
    left: 50%;
    transform: translate(-50%, 0); /* Tengahkan */
    z-index: 10;
}

.portrait-pic {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #000000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* --- Bagian Hitam Bawah (Utama) --- */
.bottom-section {
    background-color: transparent;
    position: relative;
    padding-top: 90px; /* Ruang untuk potret yang menabrak */
    padding-bottom: 60px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

/* --- Kontainer Utama (Ubah layout dari baris ke kolom untuk mobile) --- */
.content-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column; /* Tata letak kolom default (mobile) */
    align-items: center;
    gap: 30px;
}

/* --- Section Styling (Umum) --- */
.section-content {
    width: 100%;
    max-width: 600px; /* Batasi lebar untuk kerapian mobile */
    text-align: center; /* Posisikan teks di tengah */
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #ffffff; /* Headline putih terang */
    position: relative;
    display: inline-block;
}

/* Aksen garis samping judul */
h2::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 2px;
    height: 70%;
    background-color: #18bc9c; /* Aksen hijau/biru cerah */
    transform: translateY(-50%);
}
h2::before { left: -10px; }

/* --- About Me Styling (Putih/Abu-abu, Rapat, Foto) --- */
.about-me {
    text-align: left; /* Teks deskripsi rata kiri agar formal */
}

.about-me h2 {
    display: block;
     /* Pas-in posisi */
    margin-right: -10px;
}

.about-me .text-content p {
    font-size: 0.8rem; /* Lebih kecil agar kalem */
    line-height: 1.3; /* Jarak baris rapat */
    color: #8c8c8c; /* Abu-abu redup (tidak mencolok) */
    margin-bottom: 4px;
    font-weight: 500;
}

.about-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Jarak pemisah ekstra (Asal: Meluas dan Enak dipandang) */
.separator-space {
    height: 125px; /* Jarak jauh ekstra */
}

/* --- My Skill Styling (Chip Tag, Putih, Padat) --- */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Membagi isi menjadi 2 kolom sejajar */
  gap: 20px;
  width: 100%;
  max-width: 850px; /* Wadahnya kita lebarkan biar muat 2 kartu */
  margin: 0 auto; /* Biar posisinya tetap rapi di tengah layar */
}

/* --- TAMBAHKAN INI --- 
   Biar judul "My Skill" nggak ikut masuk ke dalam kolom grid 
   dan tetap membentang penuh dari ujung ke ujung */
.portfolio-container h2 {
  grid-column: 1 / -1; 
  justify-self: left; /* Memastikan judulnya tetap di tengah */
}

/* Styling Utama Card */
.card {
  background-color: #16161a;
  border: 1px solid #26262c;
  border-radius: 4px;
  padding: 30px 24px;
  cursor: pointer;
  /* Ini untuk mengatur seberapa smooth animasinya */
  transition: all 0.2s ease-in-out; 
}

/* INI BAGIAN ANIMASI KLIK (ACTIVE) */
.card:active {
  background-color: #1e3a5f; /* Berubah jadi biru gelap */
  border-color: #3b82f6;     /* Border biru terang */
  transform: scale(0.98);    /* Efek agak mengecil pas ditekan */
}

/* Header Card (Icon dan Nomor) */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.icon {
  font-size: 24px;
  color: #fca311; /* Warna ikon disesuaikan */
}

.gambar-ikon {
  width: 32px; /* Kamu bisa ubah angkanya kalau mau lebih besar/kecil */
  height: 32px;
  object-fit: contain; /* Supaya proporsi gambarnya tidak gepeng */
}

.number {
  font-size: 14px;
  color: #6b6b76;
  letter-spacing: 1px;
}

/* Judul Card */
.title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* Tempat menampung tag skill */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Tag individual */
.tag {
  background-color: transparent;
  border: 1px solid #33333b;
  color: #9494a0;
  padding: 6px 12px;
  font-size: 12px;
  font-family: monospace;
  border-radius: 2px;
}

/* Prestasi & sertifikat */
.container { 
    max-width: 1100px; 
    margin: 0 auto; 
}

/* Bagian Header */
.header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 50px; 
}

.header-title { 
    font-size: 24px; 
    font-weight: 600; 
    line-height: 1.3; 
    letter-spacing: -0.5px; 
    margin-bottom: -30px;
}

.text-red { 
    color: #18bc9c; 
}

.header-description { 
    color: #a0a0a0; 
    font-size: 0.8rem; 
    line-height: 1.6; 
    max-width: 450px; 
}

/* Daftar Pencapaian */
.achievement-list { 
    border-top: 1px solid #2a2a2a; 
}

.achievement-item { 
    display: flex; 
    align-items: center; 
    padding: 35px 0; 
    border-bottom: 1px solid #2a2a2a; 
    transition: background-color 0.3s ease; 
}

.achievement-item:hover { 
    background-color: #161616; 
    cursor: pointer; 
}

/* Bagian Kiri, Tengah, Kanan */
.item-left { 
    display: flex; 
    align-items: center; 
    gap: 40px; 
    width: 220px; 
    flex-shrink: 0; 
}

.year { 
    color: #18bc9c; 
    font-size: 14px; 
    font-family: "Courier New", Courier, monospace; 
}

.icon-box { 
    width: 45px; 
    height: 45px; 
    border: 1px solid #333; 
    border-radius: 4px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: #888; 
}

.item-content { 
    flex-grow: 1; 
}

.item-title { 
    font-size: 18px; 
    font-weight: 500; 
    margin-bottom: 6px; 
}

.item-subtitle { 
    font-size: 14px; 
    color: #888; 
}

.item-right { 
    color: #666; 
    padding-left: 20px; 
}

svg { 
    stroke-width: 1.5; 
    stroke: currentColor; 
    fill: none; 
    stroke-linecap: round; 
    stroke-linejoin: round; 
}

/* Styling Modal */
.modal-overlay {
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0; /* Lebih stabil dari width/height 100% */
    background-color: rgba(0, 0, 0, 0.85);
    display: flex; 
    justify-content: center; 
    align-items: center; /* Posisi pas di tengah */
    padding: 20px; /* Jarak aman layar HP */
    opacity: 0; 
    visibility: hidden;
    transition: all 0.3s ease-in-out; 
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.modal-box {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    width: 100%; 
    max-width: 600px;
    max-height: 85vh; /* Batas tinggi aman dari address bar */
    display: flex; 
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
    overflow: hidden; 
}

.modal-overlay.active .modal-box { 
    transform: scale(1); 
}

.modal-image-container {
    width: 100%;
    height: 200px;
    flex-shrink: 0; /* Biar gambar gak ikut mengecil */
    border-bottom: 1px solid #333;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.modal-content-area {
    padding: 25px;
    overflow-y: auto; /* Munculkan scroll jika teks panjang */
    flex-grow: 1;
}

.modal-year { 
    color: #18bc9c; 
    font-size: 13px; 
    font-family: "Courier New", Courier, monospace; 
    margin-bottom: 8px; 
    display: block; 
}

.modal-title { 
    font-size: 20px; 
    font-weight: 600; 
    margin-bottom: 15px; 
    color: #fff; 
}

.modal-desc { 
    color: #d0d0d0; 
    font-size: 14px; 
    line-height: 1.6; 
    margin-bottom: 25px; 
}

.modal-close {
    background-color: #18bc9c; 
    color: #fff;
    border: none; 
    padding: 12px 25px;
    border-radius: 6px; 
    cursor: pointer;
    font-size: 16px; 
    font-weight: 500;
    width: 100%;
}

.modal-close:hover { 
    background-color: #18bc9c; 
}

/* Responsivitas */
@media (max-width: 768px) {
    .header { 
        flex-direction: column; 
        gap: 20px; 
    }
    .item-left { 
        width: 150px; 
        gap: 20px; 
    }
    .portfolio-container {
        grid-template-columns: 1fr; /* Paksa kembali jadi 1 kolom */
        max-width: 400px; /* Kembalikan ukurannya agar pas di HP */
    }
}

@media (max-width: 576px) {
    .achievement-item { 
        flex-wrap: wrap; 
        position: relative; 
    }
    .item-left { 
        width: 100%; 
        margin-bottom: 15px; 
    }
    .item-right { 
        position: absolute; 
        top: 35px; 
        right: 0; 
    }
    .modal-image-container { 
        height: 150px; 
    }
    .modal-box { 
        max-height: 80vh; 
    }
}

/*project*/
.gallery-container {
    text-align: left;
    max-width: 800px;
    width: 100%;
}

/* --- Pengaturan Carousel Geser --- */
.carousel {
    position: relative;
    overflow: hidden; /* Menyembunyikan foto yang antri di samping */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #000;
}

.carousel-track {
    display: flex; /* Jejerkan foto ke samping */
    transition: transform 0.5s ease-in-out; /* Bikin animasi geser mulus */
    width: 100%;
}

.slide {
    min-width: 100%; /* Tiap foto lebarnya pas 1 layar */
    position: relative;
    cursor: pointer;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    opacity: 0.8;
    background-color: #444; /* Warna ganti kalo foto loading */
    display: block;
}

.overlay {
    position: absolute;
    bottom: 0; /* Nempel mentok ke bawah foto */
    left: 0; /* Nempel mentok ke kiri foto */
    right: 0; /* Nempel mentok ke kanan foto */
    width: 100%; /* Lebar penuh memenuhi gambar */
    box-sizing: border-box; /* Penting: biar jarak padding nggak merusak ukuran 100% */
    
    background: rgba(0, 0, 0, 0.6); /* Kotak hitam transparan */
    color: white; /* Teks putih */
    text-align: left;
    padding: 20px; /* Jarak teks ke pinggir kotak biar nggak terlalu mepet */
}


/* --- Tombol Navigasi Kiri Kanan --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 5px;
}

.prev { left: 10px; }
.next { right: 10px; }
.nav-btn:hover { background: white; }

/* --- Pengaturan Kotak Deskripsi (Modal) Anti-Mengecil --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 100;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    animation: munculPudar 0.3s ease-out; /* Animasi buka kotak */
}

.modal-content {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    height: 480px; /* TINGGI DIKUNCI MATI */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.modal-content img {
    width: 100%;
    height: 250px; /* TINGGI FOTO DIKUNCI MATI */
    min-height: 250px; 
    object-fit: contain;
    background-color: #f0f0f0;
    margin-bottom: 15px;
    border-radius: 5px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5;
}

/* --- Animasi Modal --- */
@keyframes munculPudar {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.fade-out {
    animation: hilangPudar 0.3s forwards; /* Animasi nutup kotak */
}

@keyframes hilangPudar {
    from { opacity: 1; }
    to { opacity: 0; }
}

.overlay p {
    display: none; /* Menyembunyikan teks deskripsi di slider */
}

/* --- Contact Section --- */
.contact-container {
    width: 100%;
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-desc {
    color: #a0a0a0;
    font-size: 0.9rem;
    max-width: 500px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.contact-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Styling tombol kontak agar senada dengan card skill */
.contact-btn {
    background-color: #16161a;
    border: 1px solid #26262c;
    border-radius: 8px;
    padding: 12px 24px;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Efek menyala saat disorot kursor */
.contact-btn:hover {
    background-color: #1e3a5f;
    border-color: #18bc9c;
    color: #18bc9c;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(24, 188, 156, 0.15);
}

.contact-btn svg {
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Penanda Paling Bawah (Footer Hijau-Teal) --- */
.bottom-footer {
    width: 100%;
    background-color: #18bc9c;
    color: #000000; /* Warna font diubah hitam agar kontras dengan background terang */
    text-align: center;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    /* Reset padding bawaan body di bagian bawah (jika ada) */
    position: relative;
    bottom: 0;
}

/* =========================================
   ANIMASI HALAMAN SAAT PERTAMA KALI DIBUKA
   ========================================= */

/* 1. Membuat "rumus" animasinya */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px); /* Posisi awal bergeser 50px ke bawah */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Kembali ke posisi normal */
    }
}

/* 2. Menerapkan animasi ke bagian atas (Biru) */
.top-section {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* 3. Menerapkan animasi ke bagian bawah (Hitam) dengan efek jeda (delay) */
.bottom-section {
    opacity: 0; /* Sembunyikan dulu sebelum animasi dimulai */
    animation: fadeInUp 0.8s ease-out 0.3s forwards; /* Delay 0.3 detik biar munculnya gantian */
}

/* =========================================
   ANIMASI BACKGROUND PARTIKEL ELEKTRON
   ========================================= */

/* Lapisan background utama ditaruh paling belakang */
.tech-background {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1; /* Mengunci background di belakang teks dan gambar */
    overflow: hidden;
    background-color: #000000; /* Warna dasar hitam */
}

/* Membentuk bulatannya */
.tech-background span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(24, 188, 156, 0.15); /* Warna hijau-teal transparan */
    box-shadow: 0 0 15px rgba(24, 188, 156, 0.6); /* Efek glowing/menyala */
    bottom: -50px;
    animation: floatUp 15s linear infinite;
    border-radius: 50%;
}

/* Mengatur ukuran, posisi, dan kecepatan gerak yang acak biar natural */
.tech-background span:nth-child(1) { left: 10%; width: 40px; height: 40px; animation-delay: 0s; animation-duration: 18s; }
.tech-background span:nth-child(2) { left: 30%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.tech-background span:nth-child(3) { left: 50%; width: 35px; height: 35px; animation-delay: 4s; }
.tech-background span:nth-child(4) { left: 70%; width: 15px; height: 15px; animation-delay: 0s; animation-duration: 15s; }
.tech-background span:nth-child(5) { left: 85%; width: 50px; height: 50px; animation-delay: 3s; animation-duration: 20s; }
.tech-background span:nth-child(6) { left: 20%; width: 25px; height: 25px; animation-delay: 5s; }
.tech-background span:nth-child(7) { left: 60%; width: 30px; height: 30px; animation-delay: 7s; }
.tech-background span:nth-child(8) { left: 80%; width: 20px; height: 20px; animation-delay: 1s; animation-duration: 10s; }

/* Rumus pergerakan dari bawah ke atas */
@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1; /* Mulai menyala */
    }
    90% {
        opacity: 1; /* Masih menyala */
    }
    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0; /* Pudar saat sampai atas */
    }
}
