:root {
  color-scheme: light;
  --ink: #26313d;
  --muted: #5f6b78;
  --accent: #315775;
  --line: #e3e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f6f8;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.85;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

main {
  max-width: 960px;
  margin: 40px auto;
  padding: 64px 72px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

h1, h2, h3, p, ul {
  margin: 0;
}

a {
  color: #124fba;
  text-decoration: none;
}

a:hover {
  color: #083580;
}

a:focus-visible,
.PDF-버튼:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.문서-도구 {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.PDF-버튼 {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.PDF-버튼:hover {
  border-color: var(--accent);
  background: #f5f6f8;
}

.이력서-헤더 {
  padding-bottom: 32px;
}

h1 {
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

h1 span {
  display: inline-block;
  margin-left: 10px;
  color: var(--muted);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.소개-문구 {
  max-width: 80%;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: -0.02em;
}

.프로필-요약 {
  max-width: 100%;
  margin-top: 15px;
  font-size: 14px;
  color: var(--muted);
}

.연락처 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 24px;
  font-size: 13px;
  font-style: normal;
}

.연락처 > span {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.연락처 > span > span {
  color: var(--muted);
}

section {
  padding-top: 0;
}

section + section {
  margin-top: 28px;
}

section:last-child {
  padding-bottom: 0;
}

h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 26px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

h2::before,
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.항목 + .항목 {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.항목-헤더 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.항목-표제 {
  min-width: 0;
}

h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.025em;
}

.소속 {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.항목-메타정보 {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.항목-메타정보 > span {
  display: block;
}

.위치 {
  margin-top: 2px;
}

.항목 > p {
  margin-top: 14px;
}

em {
  font-style: normal;
  font-weight: 500;
}

ul {
  padding-left: 18px;
}

.항목 > ul {
  margin-top: 10px;
}

li {
  padding-left: 3px;
}

li + li {
  margin-top: 6px;
}

li::marker {
  color: #8799aa;
  font-size: 0.8em;
}

ul ul {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 20px;
  color: var(--muted);
  font-size: calc(1em - 1px);
  list-style-type: circle;
}

section > ul {
  padding: 0;
  list-style: none;
}

section > ul > li {
  padding: 0;
}

section > ul > li + li {
  margin-top: 20px;
}

.항목-행 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(32%);
  align-items: baseline;
  gap: 6px 24px;
}

.항목-행 > .항목-메타정보 {
  grid-column: 2;
  grid-row: 1;
}

.항목-행 > ul {
  grid-column: 1;
  margin-top: 2px;
  color: var(--muted);
  font-size: calc(1em - 1px);
}

.항목-행 strong {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

@media screen and (max-width: 760px) {
  main {
    margin: 0;
    padding: 36px 24px;
    border: 0;
    border-radius: 0;
  }

  section + section {
    margin-top: 24px;
  }

  h2 {
    margin-bottom: 22px;
  }

  .항목 + .항목 {
    margin-top: 26px;
    padding-top: 26px;
  }

  .연락처 {
    flex-direction: column;
    gap: 8px;
  }

  .연락처 > span > span {
    min-width: 40px;
  }

  .항목-헤더 {
    flex-direction: column;
    gap: 6px;
  }

  .항목-행 {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .항목-행 > .항목-메타정보 {
    grid-column: 1;
    grid-row: 2;
  }

  .항목-메타정보 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    text-align: left;
  }

  .위치 {
    margin: 0;
  }
}

@media print {
  .문서-도구 {
    display: none;
  }

  @page {
    size: A4;
    margin: 16mm;
  }

  body {
    background: #fff;
    font-size: 9pt;
  }

  main {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .이력서-헤더 {
    padding-bottom: 20px;
  }

  h1 {
    font-size: 20pt;
  }

  .소개-문구 {
    font-size: 13pt;
  }

  .프로필-요약 {
    font-size: 11pt;
  }

  section + section {
    margin-top: 18px;
  }

  h2 {
    margin-bottom: 16px;
    font-size: 12pt;
  }

  h3 {
    font-size: 10pt;
  }

  .소속, .항목-메타정보 {
    font-size: 9pt;
  }

  .항목 + .항목 {
    margin-top: 18px;
    padding-top: 18px;
  }

  h2, h3, .항목-헤더 {
    break-after: avoid;
  }

  .항목-행, li {
    break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
