:root {
  --accent: #2563eb;          /* diubah oleh app.js (?accent= / ?theme=) */
  --on-accent: #ffffff;       /* warna teks di atas aksen, dihitung otomatis */
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --accent-dark: color-mix(in srgb, var(--accent) 75%, black);
  --accent-ink: var(--accent-dark); /* teks berwarna aksen di atas putih, kontras >= 4.5 (app.js) */
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #f8fafc;
  --card: #ffffff;
  --line: #e5e7eb;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--accent-ink); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--on-accent);
  padding: 48px 0 40px;
}
.hero-inner { display: flex; gap: 28px; align-items: center; }
.avatar {
  flex: none; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.2) center / cover no-repeat;
  border: 4px solid rgba(255,255,255,.6);
  display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.hero h1 { margin: 0; font-size: 2.2rem; line-height: 1.2; }
.headline { margin: 6px 0 2px; font-size: 1.1rem; opacity: .95; }
.tagline { margin: 0 0 4px; font-style: italic; opacity: .85; }
.small { font-size: .85rem !important; }
.location { margin: 0 0 12px; opacity: .8; font-size: .95rem; }
.contact { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.contact a {
  color: inherit; text-decoration: none; font-size: .9rem;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid currentColor; opacity: .9;
}
.contact a:hover { opacity: 1; background: rgba(255,255,255,.15); }

.hero { position: relative; }
.lang-switch {
  position: absolute; top: 14px; right: 16px; display: flex; gap: 2px;
  background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px; font-size: .8rem; font-weight: 600;
}
.lang-switch a, .lang-switch span { padding: 3px 10px; border-radius: 999px; color: inherit; text-decoration: none; }
.lang-switch a:hover { background: rgba(255,255,255,.2); }
.lang-switch .active { background: var(--card); color: var(--accent-ink); }

/* ---------- Sections ---------- */
main.wrap { padding-top: 32px; padding-bottom: 16px; }
section {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px;
}
section h2 {
  margin: 0 0 16px; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-ink); display: flex; align-items: center; gap: 10px;
}
section h2::before {
  content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--accent);
}

.item { position: relative; padding-left: 20px; margin-bottom: 20px; }
.item:last-child { margin-bottom: 0; }
.item::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.item::after {
  content: ""; position: absolute; left: 4px; top: 20px; bottom: -16px;
  width: 1px; background: var(--line);
}
.item:last-child::after { display: none; }
.item-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.item-head > div { flex: 1 1 auto; min-width: 0; }
.item h3 { margin: 0; font-size: 1.05rem; }
.item .sub { color: var(--muted); font-size: .95rem; }
.date {
  font-size: .85rem; color: var(--accent-ink); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 999px; white-space: nowrap; height: fit-content;
}
.item ul { margin: 8px 0 0; padding-left: 18px; }
.lead { font-size: 1.05rem; font-weight: 500; color: var(--accent-ink); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 4px 12px; border-radius: 999px; font-size: .9rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h3 { margin: 0 0 4px; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Footer & tombol ---------- */
.footer { text-align: center; padding-bottom: 40px; }
.btn {
  background: var(--accent); color: var(--on-accent); border: 0; cursor: pointer;
  padding: 10px 22px; border-radius: 999px; font: inherit; font-weight: 600;
}
.btn:hover { background: var(--accent-dark); }
.btn-small { padding: 6px 14px; font-size: .85rem; }

/* ---------- Panel warna ---------- */
.theme-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  max-width: calc(100vw - 32px);
}
.theme-panel[hidden] { display: none; }
.theme-panel input[type=color] { width: 40px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.theme-panel select { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); }
.theme-panel small { color: var(--muted); }

/* ---------- Responsif ---------- */
@media (max-width: 640px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .contact { justify-content: center; }
  .hero h1 { font-size: 1.8rem; }
  section { padding: 20px; }
}

.print-only { display: none; }

/* ---------- Cetak / PDF: 1 halaman A4, ATS-friendly ----------
   Satu kolom, teks hitam di atas putih, tanpa kartu/ikon/latar warna.
   Aksen hanya pada nama & garis judul bagian. */
@media print {
  @page { size: A4; margin: 11mm 13mm; }
  html, body { background: #fff; }
  body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 1.4; color: #000; }
  .screen-only, .ico, .footer, .theme-panel { display: none !important; }
  .print-only { display: inline; }
  .wrap { max-width: none; padding: 0; }

  .hero { background: none; color: #000; padding: 0 0 6pt; border-bottom: 1.5pt solid var(--accent); }
  .hero-inner { gap: 12pt; align-items: center; }
  .avatar { width: 23mm; height: 23mm; border: 0; background: none; }
  body.no-photo .avatar { display: none; }
  .hero h1 { font-size: 19pt; color: var(--accent-ink); }
  .headline { font-size: 11pt; margin: 1pt 0 0; font-weight: 600; opacity: 1; }
  .tagline { display: none; }
  .location { margin: 1pt 0 0; opacity: 1; font-size: 10pt; }
  .contact { gap: 0; }
  .contact li + li::before { content: " | "; white-space: pre; }
  .contact a { border: 0; padding: 0; color: #000; font-size: 10pt; opacity: 1; }

  main.wrap { padding: 0; }
  section { border: 0; border-radius: 0; padding: 0; margin: 7pt 0 0; background: none; }
  section h2 {
    font-size: 10.5pt; margin: 0 0 3pt; padding-bottom: 1pt; letter-spacing: .04em;
    color: var(--accent-ink); border-bottom: .6pt solid #999; display: block;
  }
  section h2::before { display: none; }
  section p { margin: 0; }
  section p + p { margin-top: 3pt; }
  .lead { font-size: inherit; font-style: italic; color: #000; }

  .item { padding-left: 0; margin-bottom: 5pt; break-inside: avoid; }
  .item::before, .item::after { display: none; }
  .item h3 { font-size: 10pt; display: inline; }
  .item .sub { color: #000; font-size: 10pt; display: inline; }
  .item .sub::before { content: " — "; }
  .item .sub.small { display: none; }
  .item-head { flex-wrap: nowrap; }
  .small { font-size: inherit !important; }
  .date { background: none; color: #000; padding: 0; font-size: 10pt; font-weight: 600; }
  .item ul { margin: 1pt 0 0; padding-left: 13pt; }
  .item li { margin: 0; }

  .tags { display: block; }
  .tag { background: none; color: #000; padding: 0; border-radius: 0; font-size: 10pt; }
  .tag:not(:last-child)::after { content: ", "; }

  .grid { display: block; }
  .card { border: 0; padding: 0; margin: 0 0 1pt; }
  .card h3, .card p { display: inline; font-size: 10pt; color: #000; }
  .card h3 a { color: #000; text-decoration: none; }
  .card p::before { content: " — "; }
  .card p.small::before { content: " · "; }
}
