:root {
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --line: #d8d8d8;
  --accent: #1f3a5f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #eceff3;
  color: var(--ink);
  font-family: "Segoe UI", Calibri, Arial, sans-serif;
  font-size: 10.5pt;
  line-height: 1.45;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.page {
  width: 210mm;
  min-height: 297mm;
  margin: 24px auto;
  padding: 14mm 16mm;
  background: #fff;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .14);
}

/* ------------------------------------------------------------ header */

header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.header-inner {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.header-text { flex: 1; min-width: 0; }

h1 {
  margin: 0 0 2px;
  font-size: 25pt;
  font-weight: 700;
  letter-spacing: .4px;
  line-height: 1.1;
  color: var(--accent);
}

.role {
  margin: 0 0 8px;
  font-size: 11.5pt;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .3px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 9.5pt;
  color: var(--muted);
}

.contact a { color: var(--muted); text-decoration: none; }

.contact span {
  display: inline-flex;
  align-items: center;
  gap: .45em;
}

.contact .dot {
  display: inline-block;
  width: .42em;
  height: .42em;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.photo { flex: 0 0 auto; }

.photo img {
  display: block;
  width: 30mm;
  height: 40mm;
  object-fit: cover;
  object-position: center top;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
  background: #eef1f6;
}

/* ------------------------------------------------------------ section */

section {
  margin-bottom: 13px;
  break-inside: avoid;
}

h2 {
  margin: 0 0 7px;
  padding-bottom: 3px;
  font-size: 10pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

p { margin: 0 0 6px; }

/* ------------------------------------------------------------ entry */

.entry {
  margin-bottom: 10px;
  break-inside: avoid;
}

.entry:last-child { margin-bottom: 0; }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.entry-title { font-weight: 700; font-size: 10.5pt; }

.entry-sub {
  font-size: 9.8pt;
  color: var(--muted);
  font-style: italic;
}

.entry-date {
  font-size: 9.3pt;
  color: var(--muted);
  white-space: nowrap;
}

ul { margin: 4px 0 0; padding-left: 16px; }
li { margin-bottom: 2.5px; }
li::marker { color: var(--accent); }

/* ------------------------------------------------------------ skill */

.skill-grid {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 3px 10px;
}

.skill-label { font-weight: 600; }

.empty-cv {
  color: var(--muted);
  font-style: italic;
  padding: 24px 0;
}

/* ------------------------------------------------------------ print */

.print-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99;
  display: flex;
  gap: 8px;
  align-items: center;
}

.back-btn {
  padding: 9px 14px;
  border: 1px solid rgba(31, 58, 95, .22);
  border-radius: 6px;
  background: rgba(255, 255, 255, .94);
  color: #1f3a5f;
  font: 600 13px "Segoe UI", Arial, sans-serif;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.back-btn:hover { background: #fff; }

.print-bar button {
  padding: 9px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: 600 13px "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.print-bar button:hover { filter: brightness(1.15); }

/* tampilan di dalam iframe editor */
.embedded .print-bar { display: none; }

.embedded .page {
  margin: 0;
  box-shadow: none;
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  html, body { background: #fff; }
  .page {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 13mm 15mm;
    box-shadow: none;
  }
  .print-bar { display: none; }
}

@media screen and (max-width: 820px) {
  .page { width: 100%; padding: 18px; }
  h1 { font-size: 21pt; }
}

@media screen and (max-width: 560px) {
  .print-bar {
    position: static;
    top: auto;
    right: auto;
    padding: 10px 12px;
    background: #f7f9fc;
    border-bottom: 1px solid var(--line);
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .back-btn, .print-bar button {
    font-size: 12px;
    padding: 8px 10px;
  }
}
