:root {
  --ink: #1a1a1a;
  --sub: #8a8a8a;
  --rule: #d5d5d5;
  --hero-bg: #3d3d3d;
}

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

body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #efefef;
  color: var(--ink);
  line-height: 1.45;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ===== A4 Sheet ===== */
.sheet {
  position: relative;
  width: 210mm;
  height: 297mm;
  margin: 0 auto 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

#pages {
  padding: 24px 0;
}

.page-content {
  padding-bottom: 12mm;
}

.page-content.continued {
  padding-top: 14mm;
}

.page-num {
  position: absolute;
  right: 15mm;
  bottom: 7mm;
  font-size: 7pt;
  color: #b5b5b5;
}

/* ===== Hero ===== */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  height: 57mm;
  padding: 0 15mm 7mm;
  background: var(--hero-bg);
}

.hero-photo {
  width: 42mm;
  height: 47mm;
  margin-bottom: -0.5mm;
  object-fit: cover;
  object-position: center top;
  background: #fff;
}

.hero-text {
  text-align: right;
}

.hero-role {
  margin-top: 2mm;
  font-size: 8.5pt;
  letter-spacing: 0.02em;
  color: #c9c9c9;
}

.hero-name {
  font-size: 27pt;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #fff;
}

/* ===== Block ===== */
.block {
  display: flex;
  gap: 8.4mm;
  padding: 0 15mm;
}

.hero + .block,
.continued > .block:first-child {
  margin-top: 5mm;
}

.block-title {
  flex: 0 0 44mm;
  padding-top: 1.6mm;
  font-size: 11pt;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-top: 1.6px solid var(--ink);
}

.block-body {
  flex: 1;
  min-width: 0;
  border-top: 1.6px solid var(--ink);
}

/* ===== Key–Value line ===== */
.line {
  display: flex;
  gap: 4mm;
  align-items: baseline;
  padding: 1.7mm 0;
  line-height: 1.3;
  border-bottom: 1px solid var(--rule);
}

.key {
  flex: 0 0 30mm;
  font-size: 10pt;
  font-weight: 700;
}

.val {
  flex: 1;
  min-width: 0;
  font-size: 10pt;
}

.block.compact .key {
  flex: 0 0 22mm;
}

/* ===== Experience group ===== */
.group {
  position: relative;
}

.group-tag {
  position: absolute;
  right: 100%;
  top: 1.8mm;
  width: 34mm;
  margin-right: 8.4mm;
  font-size: 8.5pt;
  font-weight: 500;
  color: #555;
  text-align: right;
  line-height: 1.3;
}

.item {
  padding: 1.7mm 0 1.6mm;
  border-bottom: 1px solid var(--rule);
}

.item-title {
  font-size: 10pt;
  font-weight: 700;
  line-height: 1.35;
}

.item-title::before {
  content: "•";
  margin-right: 2mm;
}

.item-desc {
  padding-left: 4.6mm;
  font-size: 9pt;
  line-height: 1.35;
  color: var(--sub);
}

/* ===== Print button (screen only) ===== */
.print-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10;
  padding: 10px 20px;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.print-btn:hover {
  background: #f5f5f5;
}

/* ===== Print ===== */
@page {
  size: A4;
  margin: 0;
}

@media print {
  body {
    background: #fff;
  }

  .print-btn,
  .page-num {
    display: none;
  }

  #pages {
    padding: 0;
  }

  .sheet {
    margin: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }

  .sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}
