/* Variabel Warna */
:root {
    --primary: #2563eb; 
    --dark: #1e293b;
    --light: #f8fafc;
    --accent: #10b981; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

/* --- NAVIGASI --- */
nav {
    background: white !important; /* Memastikan background solid putih */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Tinggi navbar dikunci */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10000;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    transition: 0.3s;
}

nav a:hover {
    color: var(--primary);
}

/* --- HEADER / HERO SECTION (BIRU RAMPING) --- */
header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* SOLUSI: Jarak atas besar agar tidak ketutup nav, bawah kecil agar ramping */
    padding-top: 140px;  
    padding-bottom: 40px; 
    min-height: auto;
}

/* --- FOTO PROFIL (UKURAN BESAR 200PX) --- */
.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

header h1 { 
    font-size: 2.2rem; 
    margin-bottom: 5px; 
}

header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* Styling Tombol Garis 3 (Default Sembunyi) */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: 0.3s;
}
/* 1. ZONA UMUM (TARUH DI SINI)               */
/* ========================================== */

.container-nav {
    display: flex;
    justify-content: space-between; /* Membuat Logo di kiri, Menu di kanan */
    align-items: center;
    width:100%;
    padding: 0 20px;
    height: 70px;
    box-sizing: border-box;
}

.nav-links {
    display: flex; /* Di PC: Menu berjejer ke samping */
    list-style: none;
    gap: 30px;
}

/* KHUSUS TAMPILAN HP (max-width: 768px) */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Munculkan tombol garis 3 */
    }

    .nav-links {
        display: none; /* Sembunyikan menu bawaan */
        flex-direction: column;
        position: absolute;
        top: 80px; /* Sesuaikan dengan tinggi nav kamu */
        right: 5%;
        width: 200px;
        /* Efek Blur & Transparan (Glassmorphism) */
        background: rgba(255, 255, 255, 0.8); /* Putih transparan */
        backdrop-filter: blur(10px);          /* Efek blur latar belakang */
        -webkit-backdrop-filter: blur(10px); /* Dukungan browser Safari */
        
        border-radius: 15px;      /* Sudut tumpul agar estetik */
        padding: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.3); /* Garis tepi tipis */
        z-index: 1000;
    }

    .nav-links.active {
        display: flex; /* Muncul saat tombol diklik */
        animation: slideIn 0.3s ease-out;
    }

    .nav-links li {
       margin: 10px 0;
        text-align: center;
    }
    
    .container-nav {
        justify-content: space-between; /* Jauhkan Logo dan Hamburger */
        padding: 0 20px;
    }
}
/* Animasi tambahan biar makin mulus */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SECTION GENERAL --- */
section {
    padding: 80px 10%;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    position: relative;
}

h2::after {
    content: '';
    width: 50px;
    height: 4px;
    background: var(--primary);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* --- PROJECT --- */
/* --- Penyesuaian Layout Section Proyek --- */
#projects {
    text-align: left; /* Membuat isi (grid kartu) merapat ke kiri */
    padding: 60px 10%; /* Memberi jarak atas-bawah dan samping */
}

#projects h2 {
    text-align: center; /* Menjaga judul tetap di tengah halaman */
    margin-bottom: 40px;
    width: 100%; /* Memastikan judul mengambil ruang penuh agar bisa center */
}
/* Label Kategori Kecil di Atas Judul */
.tag-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Container Spesifikasi Sensor */
.sensor-specs {
    background: #f1f5f9; /* Abu-abu sangat muda */
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.project-details {
    background: #f1f5f9; /* Abu-abu sangat muda */
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.spec-label {
    color: #64748b; /* Warna teks agak pudar */
    font-weight: 500;
}

.spec-value {
    color: var(--dark);
    font-weight: 700;
}

/* Tombol tetap seperti sebelumnya, tapi kita beri margin agar pas */
.btn-project {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    margin-top: auto;
}

.btn-project:hover {
    background: var(--dark);
}

/* --- GRID & CARDS --- */
.container {
    padding: 40px 5% 20px;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto; /* Ubah dari '0 auto' ke '0' agar mepet ke kiri */
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 350px;
    transition: transform 0.3s ease;
    display: flex;          /* Tambahkan ini */
    flex-direction: column; /* Tambahkan ini */
}

.card:hover { 
    transform: translateY(-10px); 
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e2e8f0;
}

.card-content { 
    padding: 20px;
    flex-grow: 1;           /* Membuat konten mengisi ruang agar tombol selalu di bawah */
    display: flex;
    flex-direction: column;
}

/* --- KONTAK --- */
.contact-container {
    text-align: center;
    background: var(--dark);
    color: white;
    padding: 50px;
    border-radius: 20px;
    margin-top: 20px;
}

.social-btn {
    display: inline-block;
    padding: 10px 25px;
    margin: 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: 0.3s;
}

.social-btn:hover {
    background: var(--accent);
}
