:root {
  --kertas: #eef2f4;
  --putih: #ffffff;
  --tinta: #14212b;
  --tinta-lembut: #4b5b67;
  --garis: #d3dce1;
  --laut: #1d4e6b;
  --kuning: #f4c430;

  --judul: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --isi: "Newsreader", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --kertas: #0f1920;
    --putih: #172530;
    --tinta: #e8eef1;
    --tinta-lembut: #9db0bc;
    --garis: #2a3b47;
    --laut: #7fb8d6;
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--kertas);
  color: var(--tinta);
  font-family: var(--isi);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: var(--laut); }
a:focus-visible, .tombol:focus-visible {
  outline: 3px solid var(--kuning);
  outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--judul); line-height: 1.1; }

/* ---------- Tata letak ---------- */
.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---------- Kartu profil ---------- */
.profil {
  position: sticky;
  top: 2rem;
  background: var(--putih);
  border: 1px solid var(--garis);
  border-top: 10px solid var(--kuning);
  border-radius: 6px;
  padding: 1.5rem;
}

.foto-profil {
  aspect-ratio: 4 / 5;
  background: var(--garis);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.foto-profil img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profil h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--tinta-lembut);
  margin: 0.6rem 0 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
}

.data {
  border-top: 1px solid var(--garis);
  margin-bottom: 1.5rem;
}
.data div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--garis);
  font-size: 1rem;
}
.data dt { color: var(--tinta-lembut); }
.data dd { font-weight: 500; text-align: right; }

.tombol {
  display: block;
  text-align: center;
  background: var(--tinta);
  color: var(--kertas);
  font-family: var(--judul);
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.tombol:hover { background: var(--kuning); color: #14212b; }

/* ---------- Konten ---------- */
main section { margin-bottom: 3.5rem; scroll-margin-top: 2rem; }

main h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--tinta);
}

#tentang p { max-width: 62ch; }

/* Keahlian */
.chip { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip li {
  background: var(--putih);
  border: 1px solid var(--garis);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-family: var(--judul);
  font-weight: 500;
  font-size: 0.95rem;
}

/* Garis waktu */
.garis-waktu { list-style: none; border-left: 3px solid var(--laut); padding-left: 1.5rem; }
.garis-waktu li { position: relative; margin-bottom: 1.75rem; }
.garis-waktu li::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 9px);
  top: 0.4rem;
  width: 15px;
  height: 15px;
  background: var(--kuning);
  border: 3px solid var(--kertas);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--laut);
}
.garis-waktu .tahun { font-family: var(--judul); font-size: 0.9rem; color: var(--tinta-lembut); }
.garis-waktu h3 { font-size: 1.3rem; margin: 0.15rem 0 0.3rem; }
.garis-waktu p { font-size: 1rem; color: var(--tinta-lembut); }

/* Galeri */
.galeri {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.galeri figure {
  position: relative;
  aspect-ratio: 1;
  background: var(--garis);
  overflow: hidden;
  border-radius: 4px;
}
.galeri .besar { grid-column: span 2; aspect-ratio: 2 / 1; }
.galeri img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.galeri figure:hover img { transform: scale(1.05); }
.galeri figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 0.8rem 0.6rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-family: var(--judul);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.25s;
}
.galeri figure:hover figcaption,
.galeri figure:focus-within figcaption { opacity: 1; }

/* Kontak */
.kontak { list-style: none; }
.kontak li {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--garis);
}
.kontak span {
  width: 7rem;
  flex-shrink: 0;
  font-family: var(--judul);
  font-weight: 500;
  color: var(--tinta-lembut);
}
.kontak a { overflow-wrap: anywhere; }

footer { color: var(--tinta-lembut); font-size: 0.95rem; }

/* ---------- Layar kecil ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 2rem; }
  .profil { position: static; }
  .foto-profil { aspect-ratio: 1; max-width: 320px; }
}

@media (max-width: 520px) {
  .galeri { grid-template-columns: repeat(2, 1fr); }
  .galeri .besar { grid-column: span 2; }
  .profil h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
