/* ===== 1. Variabel warna dan font ===== */
:root {
  --latar: #092328;
  --kartu: #12544f;
  --teks: #8bbb92;
  --teks-redup: #8bbb92;
  --hijau: #8bbb92;
  --garis: #12544f;
  --font-judul: "Bricolage Grotesque", Georgia, serif;
  --font-isi: "Figtree", Arial, sans-serif;
}

/* ===== 2. Reset dan dasar ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-isi);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--teks);
  background: var(--latar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: var(--font-judul);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 800;
}
h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 5% 2rem;
}

section {
  margin-bottom: 4rem;
  scroll-margin-top: 5rem;
}

/* ===== 3. Header dan navigasi ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--latar);
  border-bottom: 2px solid var(--garis);
}

.logo {
  font-family: var(--font-judul);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--teks);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 0.5rem;
}

.nav a {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: var(--teks);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover {
  background: var(--kartu);
}

.nav a.aktif {
  background: var(--hijau);
  color: var(--latar);
}

.menu-tombol {
  display: none;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--teks);
  background: var(--kartu);
  border: 2px solid var(--garis);
  border-radius: 999px;
  cursor: pointer;
}

/* ===== 4. Hero, tombol, dan chip keahlian ===== */
.hero {
  padding: 2rem 0 1rem;
}

.label {
  font-weight: 600;
  color: var(--hijau);
  margin-bottom: 0.5rem;
}

.foto-profil {
  display: block;
  width: 9rem;
  height: 9rem;
  margin: 1rem 0 1.5rem;
  border: 3px solid var(--hijau);
  border-radius: 50%;
  object-fit: cover;
}

.hero-teks {
  max-width: 560px;
  margin: 1rem 0 1.75rem;
  color: var(--teks-redup);
}

.tombol {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-weight: 600;
  color: var(--latar);
  background: var(--hijau);
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.tombol:hover {
  color: var(--teks);
  background: var(--kartu);
}

.chip-daftar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
}

.chip-daftar li {
  padding: 0.5rem 1.1rem;
  background: var(--kartu);
  border: 2px solid var(--garis);
  border-radius: 999px;
  font-weight: 500;
}

/* ===== 5. Proyek dan filter ===== */
.filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-tombol {
  padding: 0.5rem 1.1rem;
  font: inherit;
  font-weight: 500;
  color: var(--teks);
  background: var(--kartu);
  border: 2px solid var(--garis);
  border-radius: 999px;
  cursor: pointer;
}

.filter-tombol.aktif {
  background: var(--teks);
  color: var(--latar);
  border-color: var(--teks);
}

.proyek-daftar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.proyek-kartu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--kartu);
  border: none;
  border-radius: 20px;
  transition: transform 0.2s ease;
}

.proyek-kartu:hover {
  transform: translateY(-6px);
}

.proyek-kartu p {
  color: var(--teks-redup);
}

.proyek-kartu.sembunyi {
  display: none;
}

.proyek-gambar {
  height: 140px;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.warna-1 {
  background: var(--teks);
}
.warna-2 {
  background: var(--latar);
}
.warna-3 {
  background: var(--teks);
}

/* ===== 6. Form kontak dan footer ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 520px;
}

label {
  font-weight: 600;
}

input,
textarea {
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--teks);
  background: var(--kartu);
  border: 2px solid var(--garis);
  border-radius: 10px;
}

input.error,
textarea.error {
  border-color: #c4302b;
}

form .tombol {
  align-self: flex-start;
  margin-top: 0.75rem;
}

.pesan-form {
  min-height: 1.5rem;
  font-weight: 500;
}
.pesan-form.salah {
  color: #c4302b;
}
.pesan-form.benar {
  color: #1a7f4b;
}

.footer {
  padding: 1.5rem 5%;
  text-align: center;
  color: var(--teks-redup);
  border-top: 2px solid var(--garis);
}

/* ===== 7. Aksesibilitas ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--hijau);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .proyek-kartu {
    transition: none;
  }
}

/* ===== 8. Responsif (HP, lebar 720px ke bawah) ===== */
@media (max-width: 720px) {
  .menu-tombol {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem 5%;
    background: var(--kartu);
    border-bottom: 2px solid var(--garis);
  }

  .nav.buka {
    display: flex;
  }

  .proyek-daftar {
    grid-template-columns: 1fr;
  }
}
