/* ============================================================================
   이력서 · 자기소개서 공통 스타일 — site.css 토큰만 사용
   (자기소개서는 이 파일의 제목 영역·따라다니는 목차·.cl-* 규칙을 함께 쓴다)
   첫 화면(PC) : 내비 → 제목·버튼 → 인적사항 → 주요 프로젝트 첫 줄(2개)까지 한 화면에.
   그 아래(보유 기술·다음 문서)는 스크롤해서 본다.
   ============================================================================ */

/* 인적사항 항목명(학력·경력·교육경험·자격증 등)은 세로 가운데가 아니라 첫 줄에 맞춰 위쪽 정렬 */
.profile .infolist dt{align-self:start;padding-top:2px;line-height:1.5;}

/* ══════════════ 주요 프로젝트 — 2열 가로 카드 ══════════════ */
.rproj-section__title{margin-bottom:18px;}

.rproj{
  display:grid;grid-template-columns:minmax(0,1fr);gap:14px;
}
@media (min-width:860px){
  .rproj{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
}

.rproj__card{
  --thumb:132px;
  display:grid;grid-template-columns:var(--thumb) minmax(0,1fr);
  border:1px solid var(--cloud);border-radius:var(--r-card);overflow:hidden;
  background:var(--white);color:inherit;
  transition:border-color .15s ease,box-shadow .15s ease;
}
@media (min-width:600px){ .rproj__card{--thumb:160px;} }
.rproj__card:hover{border-color:var(--accent-line);box-shadow:0 6px 18px rgba(8,9,10,.07);}

/* 썸네일 — 카드 높이에 맞춰 늘어나는 정사각 영역 */
.rproj__thumb{
  position:relative;width:var(--thumb);min-height:var(--thumb);height:100%;
  background:var(--mist);overflow:hidden;
}
.rproj__thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.rproj__thumb--contain{background:var(--white);border-right:1px solid var(--mist);}
.rproj__thumb--contain img{object-fit:contain;padding:12%;}

.rproj__body{display:flex;flex-direction:column;justify-content:center;padding:14px 18px;min-width:0;}

.rproj__tags{display:flex;flex-wrap:wrap;gap:6px;}
.rproj__tag{
  padding:3px 9px;border-radius:var(--r-tag);
  background:var(--accent-wash);color:var(--accent);
  font-size:12px;font-weight:600;letter-spacing:-.1px;
}
.rproj__tag--lead{background:var(--accent);color:var(--white);}
.rproj__tag--todo{background:#fffbeb;color:#b45309;border:1px dashed #fcd34d;}

.rproj__title{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin-top:9px;}
.rproj__title b{font-size:18px;font-weight:700;letter-spacing:-.4px;color:var(--ink);}
.rproj__period{font-size:12.5px;font-weight:500;color:#9e9e9e;font-variant-numeric:tabular-nums;}
.rproj__card:hover .rproj__title b{color:var(--accent);}

.rproj__list{display:flex;flex-direction:column;gap:3px;margin-top:8px;}
.rproj__list > span{
  position:relative;padding-left:12px;
  font-size:13.5px;line-height:1.5;color:#3d4146;
}
.rproj__list > span::before{
  content:"";position:absolute;left:0;top:9px;width:4px;height:4px;border-radius:50%;background:var(--cloud);
}

/* ══════════════ PC 첫 화면 압축 ══════════════
   여백·제목·썸네일을 화면 높이(vh) 기준으로 줄여, 작은 노트북 화면에서도
   주요 프로젝트 첫 줄(2개)까지 스크롤 없이 보이게 한다 */
@media (min-width:960px){
  .pagehead{padding-top:clamp(12px,2.4vh,36px);padding-bottom:clamp(8px,1.6vh,24px);border-bottom:0;}
  .pagehead .h1{margin-top:0;font-size:clamp(30px,5vh,44px);}

  main > .section:first-child{padding-top:0;padding-bottom:clamp(14px,2.6vh,36px);}
  .profile{padding:clamp(12px,1.8vh,22px) 26px;row-gap:clamp(6px,1.2vh,20px);}
  .profile__photo{max-height:clamp(150px,22vh,200px);width:auto;justify-self:start;}
  .profile .infolist div{padding:clamp(3px,.6vh,8px) 0;}
  .profile .infolist dd{line-height:1.55 !important;}
  .profile .split-entry{margin-bottom:clamp(2px,.4vh,6px);}

  .rproj-section{padding-bottom:clamp(40px,6vh,72px);}
  .rproj-section__title{font-size:clamp(24px,3.8vh,38px);margin-bottom:clamp(8px,1.4vh,18px);}

  .rproj__card{--thumb:clamp(120px,19vh,160px);}
  .rproj__body{padding:clamp(8px,1.3vh,14px) 18px;}
  .rproj__title{margin-top:clamp(5px,.9vh,9px);}
  .rproj__list{margin-top:clamp(4px,.8vh,8px);gap:1px;}
  .rproj__list > span{line-height:1.45;}
}

/* 높이가 낮은 노트북 화면(1366×768 등) — 경력·교육 항목을 한 줄로 접어 인적사항 높이를 줄인다 */
@media (min-width:960px) and (max-height:720px){
  .profile .split-entry__break{display:none;}
  .profile .split-entry__role::before{content:"· ";color:var(--cloud);}
  .profile .infolist dd{font-size:12.5px !important;}
  .profile__header p:last-child{margin-top:4px !important;}
  .rproj__card{--thumb:118px;}
  .pagehead{padding-top:8px;padding-bottom:6px;}
  main > .section:first-child{padding-bottom:10px;}
  .rproj__list > span{font-size:13px;line-height:1.4;}
}

/* ══════════════ 따라다니는 목차 (PC 전용) ══════════════
   본문(최대 --page 폭) 왼쪽 여백에 고정. 여백이 부족한 1440px 미만·모바일에서는 숨긴다 */
.rtoc{display:none;}
@media (min-width:1440px){
  .rtoc{
    display:block;position:fixed;z-index:20;
    top:calc(var(--nav-h) + 96px);
    /* 폭은 남는 여백에 맞춰 112~176px, 본문 시작점에서 28px 떨어지게 */
    --tw:clamp(112px,calc((100vw - var(--page)) / 2 - 24px),176px);
    width:var(--tw);
    left:max(12px,calc((100vw - var(--page)) / 2 + 4px - var(--tw)));
  }
}
.rtoc__title{font-size:18px;font-weight:700;letter-spacing:-.4px;color:var(--ink);margin-bottom:12px;}
.rtoc__list{border-left:2px solid var(--accent-line);}
.rtoc__list a{
  position:relative;display:flex;align-items:baseline;gap:6px;
  margin-left:-2px;padding:7px 0 7px 12px;border-left:2px solid transparent;
  font-size:13.5px;font-weight:500;line-height:1.35;color:rgba(53,104,172,.62);
  transition:color .15s ease,border-color .15s ease,background-color .15s ease;
}
.rtoc__no{font-size:11.5px;font-weight:700;font-variant-numeric:tabular-nums;color:inherit;opacity:.8;}
.rtoc__list a:hover{color:var(--accent);}
.rtoc__list a.is-active{
  color:var(--accent);font-weight:700;border-left-color:var(--accent);
  background:var(--accent-wash);
}

/* ══════════════ 자기소개서 섹션 ══════════════ */
.cl-section{padding-top:clamp(28px,5vh,56px);padding-bottom:0;scroll-margin-top:calc(var(--nav-h) + 16px);}
.cl-section:first-child{padding-top:clamp(8px,2vh,24px);}
.cl-title{display:flex;align-items:baseline;gap:12px;}
.cl-no{font-size:.62em;font-weight:700;color:var(--accent);font-variant-numeric:tabular-nums;}
.cl-body{margin-top:16px;max-width:var(--prose);}
.cl-empty{
  margin:0;padding:28px 22px;border:1.5px dashed var(--cloud);border-radius:var(--r-card);
  background:#fafafa;text-align:center;font-size:14px !important;color:var(--muted) !important;
}
.cl + .footer,.cl > .section:last-child{margin-top:clamp(40px,7vh,80px);}

/* 인쇄 — 카드 테두리만 남기고 링크 효과 제거 */
@media print{
  .rproj{grid-template-columns:repeat(2,minmax(0,1fr));gap:8pt;}
  .rproj__card{break-inside:avoid;box-shadow:none !important;}
  .rproj__tag--todo{display:none;}
}
