/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; 
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212; 
  color: #e0e0e0; 
  line-height: 1.6;
}

/* --- Header & Navigation --- */
header {
  background-color: #1f1f1f;
  position: sticky; 
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #00bcd4; 
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 1rem 0;
}

nav li {
  margin: 0 15px;
}

nav a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #00bcd4; 
}

/* --- Layout Sections --- */
section {
  padding: 80px 20px;
  max-width: 900px;
  margin: 0 auto;
}

h1, h2 {
  color: #00bcd4;
  margin-bottom: 20px;
}

h2 {
  border-left: 5px solid #00bcd4;
  padding-left: 15px;
}

/* --- Hero Section (Home) --- */
#home {
  height: 90vh; /* Hampir memenuhi layar */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at center, #1f1f1f 0%, #121212 100%);
}

#home h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}

#home p {
  font-family: 'Courier New', Courier, monospace; /* Font diganti monospace agar seperti terminal */
  font-size: 1.1rem; /* Ukuran sedikit disesuaikan agar muat satu baris */
  color: #00bcd4; /* Ubah warna jadi Cyan agar kontras */
  
  /* Setup Layout untuk Animasi */
  display: inline-block; /* Agar lebar mengikuti teks */
  overflow: hidden; /* Menyembunyikan teks sebelum "diketik" */
  border-right: 3px solid #00bcd4; /* Membuat kursor kedip */
  white-space: nowrap; /* Memaksa teks tetap satu baris */
  margin: 0 auto; /* Posisi tengah */
  width: 0; /* Mulai dari lebar 0 (tidak terlihat) */
  
  /* Jalankan Animasi */
  animation: 
    typing 4s steps(60, end) forwards, /* Efek mengetik selama 4 detik */
    blink-caret 0.75s step-end infinite; /* Efek kursor kedip */
}

/* --- Portfolio Section --- */
#portfolio ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

#portfolio li {
  background-color: #1f1f1f;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#portfolio li:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 188, 212, 0.2);
  border-color: #00bcd4;
}

/* --- Skills Section --- */
#skills p {
  font-family: 'Courier New', Courier, monospace; /* Font coding */
  background-color: #000;
  color: #0f0; /* Hijau terminal */
  padding: 20px;
  border-radius: 5px;
  border-left: 5px solid #0f0;
}

/* --- Blog Section --- */
#blog p {
  background-color: #1f1f1f;
  padding: 25px;
  border-radius: 8px;
  font-style: italic;
  border-left: 5px solid #ff9800; /* Aksen oranye untuk pembeda */
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 30px;
  background-color: #1f1f1f;
  color: #777;
  font-size: 0.9rem;
  border-top: 1px solid #333;
}

/* --- Responsiveness (HP) --- */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  nav li {
    margin: 10px 0;
  }

  #home h1 {
    font-size: 2rem;
  }

  #home p {
    white-space: normal; /* Izinkan teks turun ke bawah di HP */
    border-right: none; /* Hilangkan kursor di HP */
    animation: none; /* Matikan animasi di HP agar teks terbaca semua */
    width: auto; /* Lebar otomatis */
    font-size: 1rem;
    padding: 0 10px;
  }
}

/* --- Animasi Mengetik --- */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

/* --- Animasi Kursor Kedip --- */
@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #00bcd4; }
}