:root {
  --ink: #191f28;
  --ink-soft: #4e5968;
  --ink-faint: #8b95a1;
  --accent: #2952cc;
  --accent-soft: #eef2fc;
  --line: #e5e8eb;
  --bg: #f4f5f7;
  --paper: #ffffff;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.sheet {
  max-width: 820px;
  margin: 0 auto;
  background: var(--paper);
  padding: 40px 72px 64px;
}

@media (min-width: 900px) {
  .sheet {
    margin: 0 auto 40px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 1px 2px rgba(25, 31, 40, 0.04), 0 8px 32px rgba(25, 31, 40, 0.08);
  }
}

@media (max-width: 640px) {
  .sheet { padding: 28px 24px 40px; }
}

/* ---------- Top nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-nav .inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 72px;
  display: flex;
  gap: 28px;
}

@media (max-width: 640px) {
  .site-nav .inner { padding: 0 24px; gap: 20px; }
}

.site-nav a {
  padding: 14px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.site-nav a:hover { color: var(--ink-soft); text-decoration: none; }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}

/* ---------- Header ---------- */
header h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

header .role {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
}

header .tagline {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.contacts {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 14px;
  color: var(--ink-soft);
  list-style: none;
}

.contacts .label { color: var(--ink-faint); margin-right: 6px; }

/* 경력기술서 축약 헤더 */
.doc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.doc-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.doc-head .who { font-size: 14px; color: var(--ink-soft); }
.doc-head .who strong { color: var(--ink); font-weight: 700; margin-right: 10px; }

.doc-intro { margin-top: 18px; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- Sections ---------- */
section { margin-top: 44px; }

h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 24px;
}

.intro p + p { margin-top: 10px; }
.intro .lead { font-weight: 700; }

/* ---------- Experience (이력서) ---------- */
.company + .company { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }

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

.company-head h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }

/* 회사·팀과 직무는 다른 층위다. 직무는 한 단계 낮춰 표기한다 */
.job {
  margin-left: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0;
}

.period {
  font-size: 13.5px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.company-note { margin-top: 4px; font-size: 14px; color: var(--ink-soft); }

.position { margin-top: 18px; }
.position + .position { margin-top: 24px; }

.position h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.position > p { margin-top: 6px; color: var(--ink-soft); font-size: 14.5px; }

ul.items { margin-top: 10px; list-style: none; }

ul.items > li {
  position: relative;
  padding-left: 18px;
  margin-top: 7px;
  color: var(--ink);
}

ul.items > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}

ul.items ul { list-style: none; margin-top: 5px; }

ul.items ul li {
  position: relative;
  padding-left: 16px;
  margin-top: 4px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

ul.items ul li::before { content: "–"; position: absolute; left: 0; color: var(--ink-faint); }

.item-title { font-weight: 700; }

/* 성과 수치 강조 — 숫자·규모에만 사용한다 */
.metric {
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(transparent 56%, #cfdcf8 56%);
  padding: 0 2px;
}

/* ---------- Projects (경력기술서) ---------- */
.project + .project { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }

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

.project-head h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.project-head .where { font-size: 13.5px; color: var(--ink-faint); white-space: nowrap; }
.project-head .where b { color: var(--ink-soft); font-weight: 600; }

.meta {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 4px 14px;
  font-size: 14px;
  padding: 12px 16px;
  background: #fafbfc;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.meta dt { color: var(--ink-faint); font-weight: 600; }
.meta dd { color: var(--ink-soft); }

.block { margin-top: 16px; }

.block h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.block p { color: var(--ink); }
.block p + p { margin-top: 8px; }

.block.result p { font-weight: 500; }

/* ---------- Simple rows (학력/병역) ---------- */
.rows { list-style: none; }
.rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rows li + li { margin-top: 12px; }
.rows .what { font-weight: 700; }
.rows .sub { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.two-col > section { margin-top: 44px; }

@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Skills ---------- */
.skill-groups { list-style: none; }
.skill-groups > li { display: flex; gap: 16px; align-items: baseline; }
.skill-groups > li + li { margin-top: 10px; }
.skill-groups .group {
  flex: 0 0 110px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
}
.skill-groups .list { color: var(--ink); }

/* ---------- Print button ---------- */
.print-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(41, 82, 204, 0.35);
}
.print-btn:hover { filter: brightness(1.08); }

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- Print / PDF ---------- */
@page {
  size: A4;
  margin: 14mm 14mm 13mm;
}

@media print {
  body { background: #fff; font-size: 10.5pt; }

  .sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* 인쇄본에는 정보 가치가 없고, 한 줄 때문에 빈 페이지가 생긴다 */
  .print-btn, .site-nav, footer { display: none !important; }

  a { color: var(--accent); }

  section, .two-col > section { margin-top: 20px; }
  .two-col { break-inside: avoid; }
  .company + .company { margin-top: 16px; padding-top: 14px; }
  .project + .project { margin-top: 18px; padding-top: 16px; }

  h2 { margin-bottom: 16px; padding-bottom: 8px; }
  ul.items > li { margin-top: 5px; }
  .position { margin-top: 14px; }
  .position + .position { margin-top: 18px; }
  .block { margin-top: 12px; }

  /* 페이지를 통째로 비우지 않도록, 나뉘면 안 되는 최소 단위에만 건다 */
  .position, .rows li, .block, .meta { break-inside: avoid; }
  h2, h3, .block h4, .company-head, .project-head, .company-note { break-after: avoid; }
  p { orphans: 3; widows: 3; }

  .meta, ul.items > li::before, .metric {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
