:root {
  color-scheme: light;
  --ink: #191919;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --strong-line: #191919;
  --link: #0b57d0;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: var(--link); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---------- 포트폴리오 ---------- */
.page { width: min(880px, 100%); margin-inline: auto; padding: 56px 32px 96px; }

/* 머리말 */
.profile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
h1 { font-size: 30px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.role { font-size: 17px; font-weight: 600; margin-top: 2px; }
.scope { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.scope li { padding: 2px 10px; background: #f1f4fa; color: #1f3b6e; font-size: 13.5px; font-weight: 600; }
.pdf { flex: none; min-height: 36px; padding: 6px 14px; border: 1px solid var(--strong-line); font-size: 14px; font-weight: 600; }
.pdf:hover { background: var(--ink); color: #fff; }
.headline { margin-top: 20px; font-size: 21px; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; max-width: 34em; }

.contact { display: flex; flex-wrap: wrap; gap: 6px 32px; margin-top: 14px; font-size: 15px; }
.contact div { display: flex; align-items: baseline; gap: 10px; }
.contact dt { color: var(--muted); font-size: 14px; }
.contact dd { min-width: 150px; min-height: 1.6em; font-weight: 600; }
.contact dd:empty { border-bottom: 1px solid var(--line); }
.contact a { color: inherit; text-decoration: none; }

.unlock { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; padding: 12px; background: #f7f7f7; font-size: 14px; }
.unlock[hidden] { display: none; }
.unlock input { width: 160px; min-height: 34px; padding: 4px 8px; border: 1px solid #b5b5b5; font: inherit; }
.unlock button { min-height: 34px; padding: 4px 12px; background: var(--ink); color: #fff; font-size: 14px; }
.unlock button.quiet { background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding-inline: 4px; }
.unlock-msg { flex-basis: 100%; color: #b3261e; font-size: 13.5px; }
.unlock-msg:empty { display: none; }

.summary { margin-top: 16px; max-width: 46em; color: #333; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 24px; margin-top: 28px; padding-block: 14px; border-block: 1px solid var(--strong-line); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { font-weight: 700; font-size: 15px; }

/* 섹션: 왼쪽 제목, 오른쪽 내용 */
.sec { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 24px; padding-top: 40px; }
h2 { font-size: 16px; font-weight: 700; line-height: 1.6; }
h2 small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin-top: 8px; }

.highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--strong-line); }
.highlights li { padding: 12px 14px 12px 0; }
.highlights li + li { padding-left: 14px; border-left: 1px solid var(--line); }
.highlights b { display: block; font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.highlights span { display: block; font-size: 13.5px; color: #444; margin-top: 4px; line-height: 1.5; }

.strengths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.strengths dt { font-weight: 700; }
.strengths dd { font-size: 14.5px; color: #444; margin-top: 2px; }

.career { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--strong-line); }
.career > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.career .when { font-size: 14px; color: var(--muted); line-height: 1.6; }
.career .when b { display: block; color: var(--ink); font-weight: 600; }
.career h3 { margin: 0; font-size: 17px; font-weight: 700; }
.career h3 span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.career ul { margin-top: 6px; font-size: 14.5px; }
.career li li { position: relative; padding-left: 12px; }
.career li li::before { content: ""; position: absolute; left: 0; top: .75em; width: 4px; height: 4px; background: var(--muted); }
.career .results li { font-weight: 600; }
.career .results li::before { background: var(--link); }

/* 프로젝트 */
.filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filter button { min-height: 34px; padding: 4px 14px; border: 1px solid var(--line); font-size: 14.5px; color: #444; }
.filter button:hover { border-color: var(--ink); color: var(--ink); }
.filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.filter button span { margin-left: 4px; font-size: 13px; opacity: .7; }
.filter-note { font-size: 14px; color: #444; margin-top: 10px; }
.filter-note:empty { display: none; }

.projects { margin-top: 12px; border-top: 2px solid var(--strong-line); }
.project { border-bottom: 1px solid var(--line); }
.project summary { display: grid; grid-template-columns: 76px minmax(0, 1fr) 72px 14px; gap: 0 12px; padding-block: 12px; cursor: pointer; list-style: none; }
.project summary::-webkit-details-marker { display: none; }
.project summary:hover .project-title { text-decoration: underline; text-underline-offset: 3px; }
.period { font-size: 14px; color: var(--muted); line-height: 1.7; }
.area { font-size: 13px; color: var(--muted); line-height: 1.85; text-align: right; white-space: nowrap; }
.area.ai { color: var(--link); font-weight: 600; }
.project-title { font-weight: 700; }
.sample-tag { margin-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--link); white-space: nowrap; }
.project-result { font-size: 14.5px; color: #444; margin-top: 1px; }
.toggle { color: var(--muted); line-height: 1.5; text-align: right; }
.toggle::before { content: "+"; }
.project[open] .toggle::before { content: "–"; }
.project-body { padding: 0 26px 16px 88px; font-size: 14.5px; }
.project-body > p { color: var(--muted); margin-bottom: 6px; }
.pairs { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 12px; }
.pairs dt { font-weight: 600; }
.sample-link { display: inline-block; margin-top: 10px; font-weight: 600; text-decoration: none; }
.sample-link:hover { text-decoration: underline; }
.sample-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.sample-link.ai { color: var(--ink); }
.empty { padding-block: 14px; color: var(--muted); font-size: 14px; }

.plain li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; }
.plain b { font-weight: 700; }
.plain span { color: var(--muted); font-size: 14.5px; }
.skills { display: grid; gap: 10px; }
.skills div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 12px; align-items: baseline; }
.skills dt { font-weight: 600; font-size: 14.5px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools li { padding: 2px 10px; border: 1px solid var(--line); font-size: 14px; }

@media (max-width: 720px) {
  .page { padding: 32px 16px 64px; }
  h1 { font-size: 26px; }
  .headline { font-size: 18px; }
  .contact dd { min-width: 120px; }
  .skills div { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .sec { grid-template-columns: 1fr; padding-top: 32px; }
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .highlights li:nth-child(3) { padding-left: 0; border-left: 0; }
  .highlights li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .strengths { grid-template-columns: 1fr; }
  .career > li { grid-template-columns: 1fr; }
  .project summary { grid-template-columns: minmax(0, 1fr) auto 14px; }
  .period { grid-column: 1; grid-row: 1; }
  .area { grid-column: 2; grid-row: 1; }
  .toggle { grid-column: 3; grid-row: 1; }
  .project-main { grid-column: 1 / -1; grid-row: 2; }
  .project-body { padding: 0 0 14px; }
}

@media print {
  @page { margin: 14mm 12mm; }
  body { font-size: 10.5pt; }
  .page { width: 100%; padding: 0; }
  .scope li { background: none; border: 1px solid #ccc; }
  .pdf, .unlock, .filter, .filter-note, .toggle, .sample-tag, .sample-link, .note { display: none !important; }
  a { color: inherit; text-decoration: none; }
  .contact dd:empty { border: 0; }
  .sec { padding-top: 22px; }
  .project, .career > li, .highlights, .strengths div { break-inside: avoid; }
  .project-body { padding-left: 88px; }
}
