/* --- 1. VARIABLES (TEMA HIJAU) --- */
:root {
    --primary-color: #0f291e; /* Hijau Gelap */
    --accent-color: #16a34a;  /* Hijau Emerald */
    --text-color: #374151;    
    --bg-light: #f0fdf4;      /* Background Hijau Pucat */
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, sans-serif; }
html { scroll-behavior: smooth; }
body { color: var(--text-color); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Typography */
h1, h2, h3, h4 { color: var(--primary-color); font-weight: 700; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 1rem; }
.section-subtitle { text-align: center; color: #64748b; margin-bottom: 3rem; max-width: 600px; margin: 0 auto 3rem auto; }
section { padding: 80px 0; }

/* --- 2. NAVBAR --- */
header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: fixed; width: 100%; top: 0; z-index: 1000; }
nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
a.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); }
a.logo span { color: var(--accent-color); }

.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 600; font-size: 0.95rem; transition: var(--transition); }
.nav-links a:hover { color: var(--accent-color); }
.btn-contact { padding: 10px 25px; background: var(--accent-color); color: var(--white) !important; border-radius: 50px; }
.btn-contact:hover { background: #15803d; }
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- 3. HERO --- */
#home {
    min-height: 100vh;
    background: linear-gradient(rgba(15, 41, 30, 0.9), rgba(15, 41, 30, 0.85)), url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover; background-position: center; background-attachment: fixed;
    display: flex; align-items: center; color: var(--white);
    padding-top: 80px;
}
.greeting { color: var(--accent-color); font-weight: 600; display: block; margin-bottom: 15px; }
.hero-content h1 { font-size: 3.2rem; color: var(--white); margin-bottom: 20px; max-width: 800px; }
.hero-content p { font-size: 1.15rem; color: #d1fae5; margin-bottom: 35px; max-width: 600px; }
.btn-hero { padding: 15px 35px; background: var(--accent-color); color: var(--white); border-radius: 50px; font-weight: bold; border: 2px solid var(--accent-color); transition: var(--transition); }
.btn-hero:hover { background: transparent; }

/* --- 4. ABOUT (UPDATE: FOTO SAMPING TEKS) --- */
#about { background: var(--white); }
.about-grid-personal { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 30px; }

/* Layout Header (Foto + Teks) */
.bio-header { display: flex; align-items: center; gap: 25px; margin-bottom: 30px; }
/* --- UPDATE: FOTO PROFIL KOTAK & LEBIH BESAR --- */

.bio-img img {
    /* 1. MENGUBAH UKURAN (Lebih Besar) */
    width: 230px;   /* Sebelumnya 130px, sekarang diperbesar */
    height: 280px;  /* Tinggi harus sama dengan lebar agar proporsional */
    
    /* 2. MENGUBAH BENTUK (Kotak) */
    border-radius: 15px; /* Ubah angka ini: 0 = Kotak Tajam, 15px = Kotak Sudut Tumpul (Elegan), 50% = Bulat */
    
    /* Agar foto tidak gepeng jika aslinya persegi panjang */
    object-fit: cover; 
    
    /* Bingkai Hijau */
    border: 4px solid var(--accent-color); 
    
    /* Jarak antara foto dan bingkai */
    padding: 5px;   
    background: var(--white);
    
    /* Efek Bayangan */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    
    transition: var(--transition);
}

/* Efek saat disentuh (Hover) */
.bio-img img:hover {
    transform: rotate(3deg) scale(1.05); /* Sedikit miring dan membesar agar keren */
    border-color: var(--primary-color);
}
.bio-text h3 { margin-bottom: 10px; font-size: 1.4rem; }
.bio-text p { font-size: 0.95rem; color: var(--text-color); }

/* Skills */
.skill-box { margin-bottom: 20px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 5px; font-weight: 600; color: var(--primary-color); }
.skill-bar { width: 100%; height: 8px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.skill-bar .fill { height: 100%; background: var(--accent-color); width: 0; animation: fillBar 1.5s ease forwards; }
@keyframes fillBar { from { width: 0; } }

/* Timeline */
.timeline { border-left: 3px solid #e2e8f0; padding-left: 30px; margin-left: 10px; }
.timeline-item { margin-bottom: 40px; position: relative; }
.timeline-dot { position: absolute; left: -41px; top: 5px; width: 18px; height: 18px; background: var(--accent-color); border-radius: 50%; border: 4px solid var(--white); box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2); }
.timeline-content h4 { font-size: 1.1rem; }
.timeline-content .time { display: inline-block; font-size: 0.8rem; background: var(--bg-light); color: var(--accent-color); padding: 3px 10px; border-radius: 20px; margin: 5px 0 10px 0; font-weight: 600; }

/* --- 5. SERVICES --- */
#services { background: var(--bg-light); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card { background: var(--white); padding: 40px 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: var(--transition); border: 1px solid transparent; }
.service-card:hover { transform: translateY(-10px); border-color: var(--accent-color); }
.service-icon { font-size: 3rem; color: var(--accent-color); margin-bottom: 25px; }

/* --- 6. PROJECT (2x2 Grid) --- */
#project { background: var(--white); }
.project-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }

.project-card { position: relative; overflow: hidden; border-radius: 15px; height: 300px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-overlay {
    position: absolute; bottom: -100%; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(15, 41, 30, 0.95), rgba(15, 41, 30, 0.6));
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    color: var(--white); transition: var(--transition); padding: 20px; text-align: center;
}
.project-card:hover .project-overlay { bottom: 0; }
.project-card:hover img { transform: scale(1.1); }

.project-buttons { display: flex; gap: 15px; margin-top: 15px; }
.project-buttons a { padding: 8px 15px; border-radius: 50px; font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 5px; transition: var(--transition); }
.btn-demo { background: var(--accent-color); color: var(--white); }
.btn-code { border: 2px solid var(--white); color: var(--white); }
.btn-demo:hover, .btn-code:hover { transform: translateY(-3px); background: var(--white); color: var(--primary-color); }

/* --- 7. CONTACT --- */
#contact { background: var(--primary-color); color: var(--white); }
#contact h2 { color: var(--white); }
#contact .section-subtitle { color: #d1fae5; }
.contact-container { display: flex; flex-wrap: wrap; gap: 50px; justify-content: center; margin-top: 40px; }
.contact-info, .contact-form { flex: 1; min-width: 300px; }
.contact-item { display: flex; gap: 20px; margin-bottom: 30px; }
.contact-icon { width: 50px; height: 50px; background: rgba(255,255,255,0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--accent-color); font-size: 1.4rem; }
.contact-item h4 { color: var(--white); margin-bottom: 5px; }
.contact-item p { color: #d1fae5; }

.contact-form input, .contact-form textarea {
    width: 100%; padding: 15px; margin-bottom: 15px; border-radius: 10px; border: none;
    background: rgba(255,255,255,0.05); color: var(--white); outline: none; font-size: 1rem;
}
.contact-form input:focus, .contact-form textarea:focus { background: rgba(255,255,255,0.1); border: 1px solid var(--accent-color); }
.contact-form button { width: 100%; padding: 15px; background: var(--accent-color); color: var(--white); border: none; border-radius: 10px; font-weight: bold; cursor: pointer; display: flex; justify-content: center; gap: 10px; transition: var(--transition); }
.contact-form button:hover { background: #15803d; }

/* --- 8. FOOTER --- */
footer { background: #0a1f16; color: #9ca3af; padding: 50px 0 20px 0; text-align: center; }
.social-media { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; }
.social-icon { width: 45px; height: 45px; background: rgba(255,255,255,0.05); border-radius: 12px; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.social-icon:hover { background: var(--accent-color); transform: translateY(-5px); color: var(--white); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; color: var(--primary-color); }
    .nav-links { position: absolute; top: 70px; left: 0; width: 100%; background: var(--white); flex-direction: column; padding: 30px; text-align: center; transform: translateY(-150%); transition: var(--transition); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .nav-links.active { transform: translateY(0); }
    
    .hero-content h1 { font-size: 2.5rem; }
    
    /* About jadi 1 kolom di HP, foto di atas teks */
    .about-grid-personal { grid-template-columns: 1fr; }
    .bio-header { flex-direction: column; text-align: center; }
}