/* 박성주 포트폴리오 스타일. 밝은 테마 고정, 강조색 하나(초록), 읽기 쉬운 문서형 배치 */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --tint: #f3f4f3;
  --ink: #18181b;
  --body: #3f3f46;
  --sub: #52525b;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --box: #a1a1aa;
  --accent: #0b7a55;
  --accent-ink: #075c40;
  --accent-soft: #e6f2ed;
  --r: 12px;
  --wrap: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --lift: 0 1px 2px rgba(24, 24, 27, 0.04), 0 14px 34px -20px rgba(11, 122, 85, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* 아이콘: Phosphor SVG를 HTML에 직접 넣어 글자색(currentColor)을 따름 */
.ico { display: inline-block; flex: none; vertical-align: middle; }

/* 상단 메뉴 */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(250, 250, 250, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 18px; text-decoration: none; }
.nav nav { display: flex; gap: 26px; font-size: 15px; color: var(--sub); }
.nav nav a { text-decoration: none; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--accent); }

/* 버튼과 링크 */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--r); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .2s var(--ease), border-color .2s var(--ease), transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-solid:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-line { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.ext { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; }
.ext:hover { text-decoration: underline; }
.chip { display: inline-block; font-size: 13px; font-weight: 600; color: var(--sub); padding: 2px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); white-space: nowrap; }
.chip-accent { color: var(--accent-ink); border-color: transparent; background: var(--accent-soft); }

/* 첫 화면: 한 줄 소개, 세 줄 요약, 프로필 */
.hero { padding: 72px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 56px; align-items: start; }
.hero-role { font-size: 16px; font-weight: 700; color: var(--accent); }
.hero h1 { margin-top: 10px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.35; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.summary { margin-top: 26px; display: grid; gap: 12px; }
.summary li { position: relative; padding-left: 20px; font-size: 17px; color: var(--body); line-height: 1.65; }
.summary li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.summary b { color: var(--ink); }
.profile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 26px; box-shadow: var(--lift); }
.profile dl > div { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 15px 0; }
.profile dl > div + div { border-top: 1px solid var(--line); }
.profile dt { font-size: 14px; color: var(--muted); font-weight: 600; padding-top: 1px; }
.profile dd { font-size: 15px; line-height: 1.55; }
.profile dd a { color: var(--accent); text-decoration: none; word-break: break-all; }
.profile dd a:hover { text-decoration: underline; }

/* 섹션 공통 */
.section { padding: 88px 0; }
.section.tint { background: var(--tint); }
.section h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.lead { margin-top: 8px; color: var(--sub); max-width: 46em; }
.group-title { margin-top: 48px; display: flex; align-items: baseline; gap: 12px; font-size: 19px; }
.group-title span { font-size: 15px; font-weight: 500; color: var(--muted); }

/* 경력: 회사 한 곳, 만든 것과 그 밖의 일 */
.exp { margin-top: 28px; display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 28px 0; border-top: 2px solid var(--ink); }
.exp-date { font-size: 14px; font-weight: 700; color: var(--accent); }
.exp-head h3 { margin-top: 4px; font-size: 20px; line-height: 1.4; }
.exp-head p { font-size: 15px; color: var(--sub); }
.exp-body h4 { font-size: 14px; color: var(--muted); font-weight: 700; }
.exp-body h4 + ul { margin-top: 8px; }
.exp-body ul + h4 { margin-top: 20px; }
.exp-body li { position: relative; padding-left: 16px; font-size: 16px; color: var(--body); }
.exp-body li + li { margin-top: 6px; }
.exp-body li::before { content: ""; position: absolute; left: 2px; top: 0.78em; width: 6px; height: 2px; background: var(--accent); }
.exp-body li a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.exp-body li a:hover { color: var(--accent); border-color: var(--accent); }

/* 문제 해결: 같은 순서(제목, 그림, 문제, 해결, 결과)로 반복 */
.chunks { margin-top: 32px; display: grid; gap: 28px; }
.chunk { display: grid; grid-template-columns: 64px 1fr; gap: 8px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 32px 36px 30px 28px; }
.c-num { font-size: 15px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 4px; }
.c-main { min-width: 0; }
.c-proj { font-size: 13px; font-weight: 700; color: var(--muted); }
.chunk h3 { margin-top: 2px; font-size: 21px; line-height: 1.45; letter-spacing: -0.01em; }
.c-fig { margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: #fcfcfc; }
.c-text { margin-top: 18px; display: grid; grid-template-columns: 48px 1fr; gap: 10px 16px; font-size: 15.5px; }
.c-text dt { font-weight: 800; color: var(--accent); }
.c-text dd { color: var(--body); }
.c-text dd small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.c-link { grid-column: 2; margin-top: 8px; }

/* 그림: 직접 그린 느낌의 단순한 상자와 화살표 */
.fig-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.flow + .fig-label { margin-top: 16px; }
.node { background: var(--surface); border: 1px solid var(--box); border-radius: 6px; padding: 7px 12px; font-size: 14px; line-height: 1.4; }
.node small { display: block; font-size: 12.5px; color: var(--muted); }
.node.me { border: 2px solid var(--accent); }
.node.dim { color: var(--muted); border-style: dashed; }
.arr { color: var(--muted); font-size: 15px; }
.fig-note { margin-top: 12px; font-size: 13px; color: var(--sub); }
.fig-note b { color: var(--accent); }
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr; gap: 6px 14px; align-items: center; font-size: 14px; }
.bar-row > span { color: var(--sub); font-weight: 600; grid-row: span 2; }
.bar { position: relative; height: 22px; border-radius: 4px; background: #d4d4d8; }
.bar.after { background: var(--accent); }
.bar i { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.bar-wrap { padding-right: 84px; }

/* 프로젝트: 클릭하지 않아도 기간, 인원, 역할이 보이는 목록 */
.plist { margin-top: 16px; display: grid; gap: 14px; }
.prow { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; text-decoration: none; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.prow:hover { border-color: var(--line-strong); box-shadow: var(--lift); }
.prow:hover h3 { color: var(--accent); }
.p-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--tint); border: 1px solid var(--line); display: grid; place-items: center; }
.p-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.p-thumb.contain img { object-fit: contain; padding: 10px; }
.p-thumb .flow { flex-direction: column; flex-wrap: nowrap; justify-content: center; padding: 10px; margin: 0; gap: 2px; }
.p-thumb .node { font-size: 12.5px; padding: 4px 10px; text-align: center; min-width: 150px; }
.p-thumb .node small { display: inline; margin-left: 4px; font-size: 11.5px; }
.p-thumb .arr { font-size: 12px; line-height: 1; transform: rotate(90deg); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--muted); }
.prow h3 { margin-top: 6px; font-size: 19px; line-height: 1.4; transition: color .2s; }
.card-sum { margin-top: 4px; font-size: 15px; color: var(--body); }
.card-facts { margin-top: 10px; display: grid; grid-template-columns: 40px 1fr; gap: 3px 10px; font-size: 14px; }
.card-facts dt { color: var(--muted); font-weight: 700; }
.card-facts dd { color: var(--sub); }

/* 기술: 실무에서 계속 쓰는 것과 써 본 것을 나눔 */
.tiers { margin-top: 28px; border-top: 2px solid var(--ink); }
.tiers > li { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.tier-name b { display: block; font-size: 17px; }
.tier-name span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.55; }
.tier-items { display: flex; flex-wrap: wrap; gap: 8px 10px; align-content: start; }
.tier-items li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 600; }
.tier-items li.text { padding-left: 13px; }
.tier-items img { width: 20px; height: 20px; }
.tier-items .sep { flex-basis: 100%; height: 0; padding: 0; border: 0; background: none; }

/* 학력, 수상, 활동 */
.career { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.timeline { margin-top: 24px; display: grid; gap: 28px; }
.timeline > li { padding-left: 22px; border-left: 2px solid var(--accent); }
.t-date { font-size: 14px; font-weight: 700; color: var(--accent); }
.timeline h3 { margin-top: 2px; font-size: 19px; }
.t-role { font-size: 15px; color: var(--sub); }
.timeline ul { margin-top: 8px; display: grid; gap: 4px; }
.timeline ul li { font-size: 15px; color: var(--body); }
.awards .alist { margin-top: 24px; border-top: 2px solid var(--ink); }
.alist li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 13px 0; }
.alist li + li { border-top: 1px solid var(--line); }
.a-year { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.a-name { font-size: 15px; font-weight: 600; line-height: 1.55; }
.a-name small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--sub); }

/* 연락 */
.contact { text-align: center; }
.mail { display: inline-block; margin-top: 16px; font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; color: var(--accent); text-decoration: none; letter-spacing: -0.02em; word-break: break-all; }
.mail:hover { text-decoration: underline; }
.contact .actions { justify-content: center; }

.footer { padding: 28px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: center; }

/* ── 프로젝트 상세 페이지 ── */
.d-head { padding: 52px 0 36px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--sub); text-decoration: none; }
.back:hover { color: var(--accent); }
.d-head h1 { margin-top: 18px; font-size: clamp(27px, 3.4vw, 38px); line-height: 1.3; letter-spacing: -0.03em; }
.p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.d-head .p-meta { margin-top: 14px; }
.d-summary { margin-top: 14px; max-width: 46em; font-size: 17px; color: var(--sub); }
.facts { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.facts > div { padding: 14px 20px 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.facts dd { margin-top: 4px; font-size: 15px; line-height: 1.6; }
.facts dd a { color: var(--accent); text-decoration: none; word-break: break-all; }
.facts dd a:hover { text-decoration: underline; }
.frame { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--lift); }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #f4f4f5; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d4d4d8; }
.frame-bar span { margin-left: 8px; font-size: 12px; color: var(--muted); font-style: normal; }
.frame img { width: 100%; height: auto; }
.frame.narrow { max-width: 260px; }
.d-visual .shots-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.d-visual figure + figure, .d-visual .shots-2 + figure { margin-top: 20px; }
.d-visual .c-fig { margin-top: 0; }
.d-visual figure + .c-fig, .d-visual .shots-2 + .c-fig { margin-top: 20px; }
.d-body { padding: 52px 0 24px; }
.d-section { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 34px 0; border-top: 1px solid var(--line); }
.d-section:first-child { border-top: 0; padding-top: 0; }
.d-section > h2 { font-size: 19px; line-height: 1.4; }
.d-section > div { max-width: 760px; font-size: 16px; color: var(--body); min-width: 0; }
.d-section p + p, .d-section p + ul, .d-section ul + p { margin-top: 12px; }
.points { display: grid; gap: 8px; }
.points li { position: relative; padding-left: 18px; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.78em; width: 6px; height: 2px; background: var(--accent); }
.issue { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.issue + .issue { margin-top: 14px; }
.issue h3 { font-size: 17px; line-height: 1.45; color: var(--ink); }
.issue dl { margin-top: 10px; display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; font-size: 15px; }
.issue dt { font-weight: 700; color: var(--accent); }
.issue dd { color: var(--body); }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.nums div { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.nums b { display: block; font-size: 24px; letter-spacing: -0.02em; color: var(--ink); }
.nums span { font-size: 14px; color: var(--sub); }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable th, .ptable td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ptable th { font-size: 13px; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--ink); }
.ptable td:first-child { width: 44%; color: var(--sub); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 0 88px; }
.pager a { display: block; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.pager a:hover { border-color: var(--line-strong); box-shadow: var(--lift); }
.pager small { display: block; font-size: 13px; color: var(--muted); }
.pager b { display: block; margin-top: 2px; font-size: 16px; }
.pager .next { text-align: right; }

@media print {
  .nav { position: static; }
  .chunk, .prow { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 태블릿: 1024px 아래 */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .profile { max-width: 560px; }
  .exp { grid-template-columns: 1fr; gap: 16px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .d-section { grid-template-columns: 1fr; gap: 14px; }
}

/* 모바일: 768px 아래는 모두 한 열 */
@media (max-width: 768px) {
  .nav nav { gap: 14px; font-size: 13.5px; }
  .nav .hide-m { display: none; }
  .hero { padding: 48px 0 56px; }
  .summary li { font-size: 16px; }
  .profile { padding: 4px 20px; }
  .section { padding: 60px 0; }
  .section h2 { font-size: 25px; }
  .chunk { grid-template-columns: 1fr; padding: 22px 18px; }
  .c-num { padding-top: 0; }
  .chunk h3 { font-size: 18.5px; }
  .c-fig { padding: 16px; }
  .c-text { grid-template-columns: 1fr; gap: 2px; }
  .c-text dd + dt { margin-top: 10px; }
  .c-link { grid-column: 1; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-row > span { grid-row: auto; }
  .prow { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .tiers > li { grid-template-columns: 1fr; gap: 12px; }
  .career { grid-template-columns: 1fr; gap: 40px; }
  .contact { text-align: left; }
  .contact .actions { justify-content: flex-start; }
  .facts { grid-template-columns: 1fr; }
  .d-visual .shots-2 { grid-template-columns: 1fr; }
  .nums { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
}
