/* 두 사이트 공통 부품. 색과 글꼴은 각 사이트 styles.css의 :root 토큰에서 온다.
   토큰: --bg --surface --surface-2 --line --line-2 --fg --soft --dim --accent --accent-ink --accent-soft --on-accent --hi-bg --shelf-bg
         --f-display --f-body --f-mono --r-card --r-inner --tap --maxw --gutter */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.65; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; }
.mono { font-family: var(--f-mono); }
.accent { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.hi { font-weight: 700; color: var(--fg); background: linear-gradient(transparent 58%, var(--hi-bg) 58%); padding: 0 1px; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--soft); font-size: 13px; }
.methods, .mc-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* 상단 바 */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 18px; text-decoration: none; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { padding: 8px 10px; border-radius: var(--r-inner); font-size: 14px; color: var(--soft); text-decoration: none; }
.nav a:hover { color: var(--fg); background: var(--surface-2); }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 3px; }
.lang button { border: 0; background: none; color: var(--soft); min-width: 40px; min-height: 34px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* 타임라인 */
.tl-scroll { overflow-x: auto; padding-bottom: 6px; }
.tl-grid { position: relative; min-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.tl-axis { position: relative; height: 22px; margin-left: 64px; border-bottom: 1px solid var(--line); }
.tl-year { position: absolute; bottom: 4px; transform: translateX(-2px); font-size: 12px; color: var(--dim); }
.tl-lane { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
.tl-lane-k { font-size: 13px; font-weight: 700; color: var(--soft); padding-top: 5px; }
.tl-rows { display: flex; flex-direction: column; gap: 6px; }
.tl-row { position: relative; height: 30px; }
.tl-bar { position: absolute; top: 0; height: 30px; border-radius: var(--r-inner); background: var(--surface-2); border: 1px solid var(--line-2); display: flex; align-items: center; padding: 0 8px; overflow: hidden; min-width: 6px; }
.tl-label { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-work .tl-bar { background: var(--accent-soft); border-color: transparent; }
.tl-bar.now { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tl-edu .tl-bar { background: transparent; border-style: dashed; }

/* 경력 */
.jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 40px; }
.job { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 28px; scroll-margin-top: 80px; }
.job-period { font-size: 13px; color: var(--soft); display: flex; flex-direction: column; gap: 2px; }
.job-dur { color: var(--accent-ink); font-weight: 600; }
.job-org { margin: 0 0 4px; font-family: var(--f-display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.job-orgsub { font-family: var(--f-body); font-size: 14px; font-weight: 500; color: var(--soft); }
.role-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 8px; font-size: 16px; }
.role-head .mono { font-size: 12.5px; color: var(--dim); }
.exp-group { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.exp-group:target, .exp-group.flash { background: var(--accent-soft); border-radius: var(--r-inner); }
.exp-cat { font-size: 13.5px; font-weight: 700; color: var(--accent-ink); padding-top: 2px; }
.exp-items { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.6; color: var(--soft); }
.exp-items li::marker { color: var(--dim); }
.school { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 28px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.school-k { font-size: 13px; color: var(--soft); }
.school-b { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.school-p, .school-n { font-size: 13.5px; color: var(--soft); }

/* 대외활동과 교육 */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 28px; padding: 16px 0; border-top: 1px solid var(--line); }
.row-period { font-size: 13px; color: var(--soft); padding-top: 2px; }
.row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.row-title { font-size: 16px; }
.row-sub { font-size: 13.5px; color: var(--soft); }
.row-toggle { margin-left: auto; border: 0; background: none; color: var(--accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; min-height: 36px; }
.row-sum, .row-det { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--soft); }
.row-more { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.proof-k { font-size: 12px; color: var(--dim); }
.proof-img { width: 120px; height: 84px; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-inner); overflow: hidden; background: var(--surface); cursor: zoom-in; }
.proof-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.certs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.certs-k { font-size: 12.5px; color: var(--soft); }
.certs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.certs-list li { display: flex; gap: 8px; align-items: baseline; }
.certs-list .mono, .certs-n { font-size: 13px; color: var(--soft); }
.tl-bar.out-r, .tl-bar.out-l { overflow: visible; padding: 0; }
.tl-bar.out-r .tl-label, .tl-bar.out-l .tl-label { position: absolute; top: 50%; transform: translateY(-50%); color: var(--fg); overflow: visible; }
.tl-bar.out-r .tl-label { left: 100%; margin-left: 6px; }
.tl-bar.out-l .tl-label { right: 100%; margin-right: 6px; }
.tl-bar.now.out-l .tl-label { color: var(--accent-ink); font-weight: 700; }
.exp-proof { grid-column: 2; margin-top: 6px; }
@media (max-width: 820px) { .exp-proof { grid-column: 1; } }
.exp-proof .proof-img { width: 180px; height: 104px; }

/* 걸어온 길: 한 줄 타임라인(2026-11-23). 막대 하나에 경력, 교육, 활동을 잇고 재학은 아래 가는 선 */
.tl1-scroll { overflow-x: auto; padding: 4px 0 8px; }
.tl1 { position: relative; min-width: 760px; height: 190px; }
.tl1-year { position: absolute; top: 0; transform: translateX(-50%); font-size: 12px; color: var(--dim); }
.tl1-year::after { content: ""; position: absolute; left: 50%; top: 18px; height: 150px; border-left: 1px dashed var(--line); }
.tl1-track { position: absolute; left: 0; right: 0; top: 86px; height: 16px; background: var(--line); }
.tl1-seg { position: absolute; top: 0; height: 16px; background: var(--fg); }
.tl1-work { background: var(--accent); }
.tl1-train { background: var(--fg); }
.tl1-act { background: var(--dim); }
.tl1-seg.now::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: tlpulse 1.8s ease-out infinite; }
@keyframes tlpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.tl1-label { position: absolute; left: 0; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; font-size: 12.5px; line-height: 1.3; padding-left: 6px; border-left: 1px solid var(--line-2); }
.tl1-label b { font-weight: 700; color: var(--fg); }
.tl1-label .mono { font-size: 10.5px; color: var(--dim); }
.tl1-seg.up .tl1-label { bottom: 22px; padding-bottom: 2px; }
.tl1-seg.down .tl1-label { top: 22px; padding-top: 2px; }
.tl1-seg.now .tl1-label { left: auto; right: 0; padding-left: 0; padding-right: 6px; border-left: 0; border-right: 1px solid var(--accent); text-align: right; }
.tl1-edu { position: absolute; top: 150px; height: 0; border-top: 2px dashed var(--line-2); }
.tl1-edu-k { position: absolute; left: 0; top: 6px; font-size: 12px; color: var(--soft); white-space: nowrap; }
.tl1-legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--soft); }
.tl1-legend i { display: inline-block; width: 18px; height: 8px; margin-right: 6px; vertical-align: middle; background: var(--fg); }
.tl1-lg-work i { background: var(--accent); } .tl1-lg-act i { background: var(--dim); } .tl1-lg-edu i { height: 0; border-top: 2px dashed var(--line-2); background: none; }

/* 걸어온 길 C: 한 칸이 한 달, 겹치는 달은 위아래로 나눠 칠함 */
.tlm { display: flex; flex-direction: column; gap: 6px; }
.tlm-years { display: grid; font-size: 12px; color: var(--dim); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; }
.tlm-row { display: flex; gap: 2px; height: 72px; }
.tlm-cell { flex: 1 1 0; min-width: 0; padding: 0; border: 0; background: none; display: flex; flex-direction: column; gap: 1px; cursor: pointer; outline-offset: 1px; transition: transform .15s ease; }
.tlm-cell:hover, .tlm-cell.sel { transform: scaleY(1.12); }
.tlm-cell.sel { outline: 2px solid var(--fg); }
.tlm-cell span { flex: 1; }
.tlm-work { background: var(--accent); }
.tlm-train { background: var(--fg); }
.tlm-act { background: #D9A441; }
.tlm-edu { background: #7E9CC8; }
.tlm-none { background: var(--line); }
.tlm-cell.now { position: relative; }
.tlm-cell.now::after { content: ""; position: absolute; left: 50%; top: -12px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--accent); animation: tlpulse 1.8s ease-out infinite; }
.tlm-detail { display: flex; gap: 20px; align-items: flex-start; min-height: 64px; margin-top: 10px; padding-top: 12px; border-top: 2px solid var(--fg); }
.tlm-ym { flex: none; min-width: 96px; font-size: 22px; font-weight: 700; color: var(--accent-ink); }
.tlm-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tlm-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.tlm-items i { width: 10px; height: 10px; }
.tlm-items .mono { font-size: 12px; color: var(--dim); }
.tl1-legend li i { display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: middle; }
.tl1-hint { margin-left: auto; color: var(--dim); }
.tlm.rv .tlm-cell { opacity: 0; transition: opacity .3s ease, transform .15s ease; }
.tlm.rv.in .tlm-cell { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tlm.rv .tlm-cell { opacity: 1 !important; } .tlm-cell.now::after { animation: none; } }
.tl1-legend li i.tlm-work { background: var(--accent); } .tl1-legend li i.tlm-train { background: var(--fg); }
.tl1-legend li i.tlm-act { background: #D9A441; } .tl1-legend li i.tlm-edu { background: #7E9CC8; height: 10px; border: 0; }

/* 줄바꿈 정리: 마지막 줄에 한두 글자만 남지 않게 하고, 제목과 오른쪽 짧은 블록은 줄 길이를 고르게 */
p, li, dd, figcaption { text-wrap: pretty; }
h1, h2, h3, .mc-title, .mc-me b, .pd-title, .rfb-real, .rfb-first, .jr-changed, .jr-step b, .note-t, .viz-cap, .mc-desc { text-wrap: balance; }
.cv-dl-top { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 7px 12px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cv-dl-top:hover { filter: brightness(1.06); }
@media (max-width: 700px) { .cv-dl-top { padding: 6px 9px; font-size: 12px; } }


/* 구역 이름을 목차처럼 조금 더 드러나게(2026-11-24): 번호는 포인트색, 이름은 굵고 크게. 선은 바꾸지 않는다 */
.label .lb-no { margin-right: 10px; font-size: 15px; font-weight: 700; color: var(--accent-ink); }
.label .lb-name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--fg); }

/* 걸어온 길 앞 칸: 2018.03 입학부터 2019년까지를 좁게 줄여 보여 준다 */
.tlm-pre { position: relative; min-width: 0; padding: 0; border: 0; background: none; display: flex; flex-direction: column; gap: 1px; cursor: pointer; margin-right: 10px; outline-offset: 1px; }
.tlm-pre span { flex: 1; opacity: .8; }
.tlm-pre.sel { outline: 2px solid var(--fg); }
.tlm-break { position: absolute; right: -11px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 16px; font-weight: 700; color: var(--dim); background: var(--bg); line-height: 1; padding: 2px 0; }
.tlm-pre-y { color: var(--dim); }

/* 따라다니는 목차(2026-11-24). 위쪽 메뉴 링크는 숨기고 이름, 이력서, 언어 버튼만 남긴다 */
.topbar .nav { display: none; }
.topbar .cv-dl-top { margin-left: auto; }
.toc { position: fixed; z-index: 15; top: 50%; transform: translateY(-50%); left: max(8px, calc((100vw - var(--maxw)) / 2 - 140px)); width: 108px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-2); }
.toc a { display: flex; align-items: baseline; gap: 8px; padding: 5px 0 5px 12px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--dim); font-size: 12.5px; line-height: 1.3; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--fg); }
.toc a.on { color: var(--fg); font-weight: 800; border-left-color: var(--accent); }
.toc .toc-no { font-size: 11px; color: inherit; }
.toc a.on .toc-no { color: var(--accent-ink); }
/* 옆 여백이 좁은 화면: 번호만 보이고, 마우스를 올리면 이름이 옆에 나온다 */
@media (max-width: 1399px) and (min-width: 900px) {
  .toc { left: 6px; width: 44px; }
  .toc .toc-name { position: absolute; left: 46px; padding: 3px 8px; background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
  .toc a { position: relative; padding-left: 10px; }
  .toc a:hover .toc-name, .toc a:focus-visible .toc-name { opacity: 1; }
}
/* 휴대폰과 작은 태블릿: 위쪽 메뉴 아래 가로 줄 */
@media (max-width: 899px) {
  .toc { top: 60px; left: 0; right: 0; width: auto; transform: none; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .toc ol { flex-direction: row; gap: 0; border-left: 0; overflow-x: auto; scrollbar-width: none; padding: 0 8px; }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc a { white-space: nowrap; padding: 9px 10px; border-left: 0; border-bottom: 2px solid transparent; margin: 0; }
  .toc a.on { border-bottom-color: var(--accent); }
  .page { padding-top: 40px; }
}
main > section[id] { scroll-margin-top: 72px; }
@media (max-width: 899px) { main > section[id] { scroll-margin-top: 110px; } }
.tlm-years .tlm-pre-y { white-space: nowrap; }
.tlm-years { column-gap: 2px; }
