/* ═══════════════════════════════════════════════════
   이력서 (Resume) — Production CSS v2
   폰트  : Pretendard
   팔레트: 화이트 베이스 + 차분한 네이비 포인트
═══════════════════════════════════════════════════ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

/* ── 토큰 ──────────────────────────────────── */
:root {
  --rv-bg:          #f2f1ed;
  --rv-surface:     #ffffff;
  --rv-border:      #dddbd4;
  --rv-border-sub:  #ebebeb;
  --rv-ink:         #18181a;
  --rv-ink-soft:    #4b4a50;
  --rv-ink-muted:   #9b9aa0;
  --rv-accent:      #1c3d6e;
  --rv-accent-mid:  #2a5599;
  --rv-accent-pale: #eaf0f8;
  --rv-sans: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --rv-left-w: 136px;
}

/* ── 페이지 래퍼 ────────────────────────────── */
.rv-page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 0 64px;
  font-family: var(--rv-sans);
  font-size: 0.94rem;
  color: var(--rv-ink);
  background: var(--rv-bg);
}

/* ═══════════════════════════════════════════
   헤더
═══════════════════════════════════════════ */
.rv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 44px 44px 36px;
  background: var(--rv-surface);
  border-bottom: 2px solid var(--rv-ink);
}

.rv-header-left { flex: 1; }
.rv-header-right { flex-shrink: 0; padding-bottom: 3px; }

.rv-header-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--rv-ink-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.rv-name {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--rv-ink);
  margin: 0 0 6px;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.rv-name-en {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--rv-ink-muted);
}

.rv-headline {
  font-size: 0.87rem;
  color: var(--rv-ink-soft);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

.rv-contacts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.8rem;
  color: var(--rv-ink-soft);
}

.rv-contact-item a { color: var(--rv-accent-mid); text-decoration: none; }
.rv-contact-item a:hover { text-decoration: underline; }

.rv-contact-dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--rv-border);
  margin: 0 10px;
  vertical-align: middle;
}

/* ── 다운로드 버튼 ──────────────────────────── */
.rv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: var(--rv-ink);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--rv-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.rv-download-btn:hover  { background: #2e2e38; }
.rv-download-btn:active { transform: scale(0.98); }
.rv-download-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@keyframes rv-spin { to { transform: rotate(360deg); } }
.rv-spin { animation: rv-spin 0.9s linear infinite; }

/* ═══════════════════════════════════════════
   메인 영역
═══════════════════════════════════════════ */
.rv-main {
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-top: none;
}

/* ─── 섹션 공통 ─────────────────────────────── */
.rv-section {
  padding: 22px 44px;
  border-bottom: 1px solid var(--rv-border-sub);
  break-inside: avoid;
  page-break-inside: avoid;
}
.rv-section:last-child { border-bottom: none; }

/* ─── 섹션 제목 ─────────────────────────────── */
.rv-sec-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.rv-sec-title span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--rv-ink-muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.rv-sec-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rv-border);
}

/* ─── 인적사항 그리드 ───────────────────────── */
.rv-personal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 32px;
}

/* ─── detail row (인적사항용) ──────────────── */
.rv-detail-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  padding: 6px 0;
  border-top: 1px solid var(--rv-border-sub);
  font-size: 0.93rem;
}
.rv-detail-row:nth-child(-n+2) { border-top: none; }

@media (max-width: 560px) {
  .rv-personal-grid { grid-template-columns: 1fr; }
  .rv-detail-row:nth-child(-n+2) { border-top: 1px solid var(--rv-border-sub); }
  .rv-detail-row:first-child { border-top: none; }
}

.rv-detail-label {
  flex: 0 0 var(--rv-left-w);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rv-ink-muted);
  letter-spacing: 0.02em;
}
.rv-detail-val {
  flex: 1;
  color: var(--rv-ink);
  line-height: 1.65;
}
.rv-detail-val strong { font-weight: 700; }
.rv-detail-val a { color: var(--rv-accent-mid); text-decoration: none; }
.rv-detail-val a:hover { text-decoration: underline; }

.rv-sub {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--rv-ink-muted);
}

/* ─── 항목 entry (학력·경력·교육 공통) ────────── */
.rv-entry {
  display: flex;
  gap: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--rv-border-sub);
  break-inside: avoid;
  page-break-inside: avoid;
}
.rv-entry:first-of-type { padding-top: 0; }
.rv-entry:last-child     { border-bottom: none; padding-bottom: 0; }

/* 왼쪽: 기간 + 태그 */
.rv-entry-left {
  flex: 0 0 var(--rv-left-w);
  padding-right: 20px;
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.rv-entry-period {
  font-size: 0.81rem;
  color: var(--rv-ink-muted);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 상태 태그 */
.rv-entry-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tag-grad { background: #e8f0e4; color: #30612a; }
.tag-now  { background: #e5edf8; color: #1c4680; }
.tag-stop { background: #fae8e8; color: #8f2020; }

/* 오른쪽: 내용 */
.rv-entry-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rv-entry-org {
  font-size: 0.99rem;
  font-weight: 700;
  color: var(--rv-ink);
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.rv-entry-degree {
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--rv-ink-soft);
  background: #f0ede6;
  padding: 1px 8px;
  border-radius: 3px;
}

.rv-entry-role {
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--rv-accent-mid);
}

/* entry 내부 세부 정보 (학점, 논문 등) */
.rv-entry-details {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rv-entry-details .rv-detail-row {
  padding: 2px 0;
  border-bottom: none;
}
.rv-entry-details .rv-detail-label {
  flex: 0 0 64px;
  font-size: 0.78rem;
  color: var(--rv-ink-muted);
}
.rv-entry-details .rv-detail-val {
  font-size: 0.86rem;
  color: var(--rv-ink-soft);
}

/* ─── 업무 목록 ─────────────────────────────── */
.rv-task-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rv-task-list li {
  display: flex;
  gap: 8px;
  font-size: 0.87rem;
  color: var(--rv-ink-soft);
  line-height: 1.65;
}
.rv-task-list li::before {
  content: '—';
  color: var(--rv-border);
  flex-shrink: 0;
  font-weight: 400;
}

/* ─── 논문 ──────────────────────────────────── */
.rv-paper-title { font-size: 0.96rem; font-weight: 600; }
.rv-paper-authors {
  font-size: 0.85rem;
  color: var(--rv-ink-muted);
  margin-top: 2px;
}
.rv-paper-authors a { color: var(--rv-accent-mid); text-decoration: none; }
.rv-paper-authors a:hover { text-decoration: underline; }

/* ─── 2열 (수상 + 자격증) ──────────────────── */
.rv-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rv-border-sub);
}
.rv-section-col {
  border-bottom: none !important;
}
.rv-section-col:first-child {
  border-right: 1px solid var(--rv-border-sub);
  padding-right: 32px;
}
.rv-section-col:last-child {
  padding-left: 32px;
}

.rv-compact-item {
  margin-bottom: 10px;
}
.rv-compact-item:last-child { margin-bottom: 0; }

.rv-compact-name {
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--rv-ink);
  line-height: 1.4;
}
.rv-compact-sub {
  font-size: 0.82rem;
  color: var(--rv-ink-muted);
  margin-top: 2px;
  line-height: 1.5;
}

.rv-empty-note {
  font-size: 0.8rem;
  color: var(--rv-ink-muted);
  line-height: 1.6;
  min-height: 1.6em;
}

/* ─── 푸터 ──────────────────────────────────── */
.rv-footer {
  margin-top: 28px;
  padding: 0 44px;
  text-align: right;
  font-size: 0.78rem;
  color: var(--rv-ink-muted);
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════
   PDF 내보내기
═══════════════════════════════════════════════ */
body.is-exporting-pdf { background: #ffffff !important; }
body.is-exporting-pdf .no-print,
body.is-exporting-pdf .topnav,
body.is-exporting-pdf .editor-panel { display: none !important; }
body.is-exporting-pdf .layout-shell,
body.is-exporting-pdf .layout-shell.is-editing { display: block !important; }

.pdf-export-root {
  position: absolute;
  left: 0;
  top: 0;
  width: 794px;
  background: #ffffff;
  opacity: 0.01;
  pointer-events: none;
  overflow: visible;
  z-index: -9999;
}

.pdf-a4-sheet {
  width: 794px;
  min-height: 1123px;
  box-sizing: border-box;
  padding: 28px 26px 30px;
  background: #ffffff;
  overflow: hidden;
}

.pdf-export-page {
  width: 100%;
  max-width: none;
  margin: 0;
  background: #ffffff;
}

.pdf-export-page .rv-page-wrap {
  width: 100%;
  max-width: none;
  padding: 0;
  background: #ffffff;
}

.pdf-export-page .rv-header       { padding: 30px 36px 26px; }
.pdf-export-page .rv-section      { padding: 18px 36px; }
.pdf-export-page .rv-section-col:first-child { padding-right: 24px; }
.pdf-export-page .rv-section-col:last-child  { padding-left:  24px; }
.pdf-export-page .rv-name         { font-size: 2rem; }

.pdf-export-page .rv-section,
.pdf-export-page .rv-entry,
.pdf-export-page .rv-compact-item {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.pdf-export-page .card,
.pdf-export-page .rv-main { box-shadow: none !important; }

/* ═══════════════════════════════════════════════
   반응형
═══════════════════════════════════════════════ */
@media (max-width: 760px) {
  .rv-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 28px 24px 22px;
  }
  .rv-header-right { width: 100%; }
  .rv-download-btn { width: 100%; justify-content: center; }
  .rv-name { font-size: 1.8rem; }
  .rv-section { padding: 18px 24px; }
  .rv-footer  { padding: 0 24px; }
  :root { --rv-left-w: 110px; }
}

@media (max-width: 560px) {
  .rv-two-col {
    grid-template-columns: 1fr;
  }
  .rv-section-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--rv-border-sub) !important;
    padding-right: 24px;
  }
  .rv-section-col:last-child { padding-left: 0; }
}

@media (max-width: 440px) {
  .rv-entry { flex-direction: column; gap: 6px; }
  .rv-entry-left { flex: none; flex-direction: row; align-items: center; gap: 8px; }
}
