/* ============================================================
   Resume 简历页（v1.9.0 · 正式版式 · 分页）
   ------------------------------------------------------------
   - 每个简历模板拆分为多张独立的 A4 页面：每页固定
     210mm × 297mm（overflow:hidden 锁定，不随窗口尺寸/浏览器
     缩放决定大小 —— 屏幕小则整页不变、以横向滚动兜底）。
   - 每页顶部 / 底部均留有真实简历般的页边距（底部留白更充分），
     两页交接处自然留白，不做生硬的裁切。
   - 仅使用系统标准字体（宋体 SimSun / 黑体 SimHei /
     Times New Roman），不使用艺术字或网页字体。
   - 表格网格线排版，符合正式求职简历规范；单元格内文字自动
     换行，杜绝溢出框外。
   所有类名以 r- / resume- 前缀避免冲突。
   ============================================================ */

/* ---- 页面外壳（浅灰背景衬托白色纸张） ---- */
body.page-resume {
  margin: 0;
  background: #e9ebee;
  color: #000;
  font-family: "SimSun", "宋体", "NSimSun", "Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: auto;
}
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }

/* ---- 顶栏（页面外壳 UI，非简历文档内容） ---- */
.r-top {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #d5d8dc;
}
.r-back {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #4a4a4a;
  white-space: nowrap; transition: color .2s ease;
}
.r-back:hover { color: #000; }
.r-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.r-switch button {
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid #c9cdd3; background: #fff; color: #4a4a4a;
  font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "Arial", sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .22s ease;
}
.r-switch button:hover { color: #000; border-color: #8a8f96; }
.r-switch button.is-active { background: #2b3a55; border-color: #2b3a55; color: #fff; }

/* ---- 舞台：纸张宽度固定不变形，窄屏时横向滚动 ---- */
.r-stage { padding: 28px 20px 72px; overflow-x: auto; }

/* ---- 版本切换显隐 ---- */
.resume-version { display: none; }
.resume-version.is-active { display: block; animation: r-fade .45s ease; }
@keyframes r-fade { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   简历页面（每张固定 A4 纸）
   ============================================================ */
.resume-page {
  width: 210mm;
  height: 297mm;
  overflow: hidden;
  margin: 0 auto;
  background: #fff;
  color: #000;
  /* 顶部 / 底部页边距：底部留白更充分，让两页交接处自然留白 */
  padding: 14mm 16mm 20mm;
  font-family: "SimSun", "宋体", "NSimSun", "Times New Roman", serif;
  font-size: 10.5pt;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
  border: 1px solid #cfd2d6;
  box-shadow: 0 3px 24px rgba(0, 0, 0, 0.16);
}
/* 页与页之间的分隔间距（模拟两张独立纸张） */
.resume-page + .resume-page { margin-top: 44px; }

/* ---- 基本信息 + 照片 表头 ---- */
.resume-head { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 4mm; }
.resume-head td { border: 1px solid #000; padding: 4mm 4mm; vertical-align: top; }
.resume-head .hd-photo { width: 34mm; text-align: center; vertical-align: middle; }
.resume-photo {
  width: 24mm; height: 32mm;
  margin: 0 auto;
  border: 1px solid #000;
  display: flex; align-items: center; justify-content: center;
  font-family: "SimHei", "黑体", "Arial", sans-serif;
  font-size: 11pt; color: #9a9a9a;
}
.info-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.info-grid td { padding: 1.8mm 2.5mm; font-size: 10.5pt; overflow-wrap: break-word; word-break: break-word; }
.info-grid .ik { width: 22mm; font-family: "SimHei", "黑体", "Arial", sans-serif; font-weight: 700; }
.info-grid .iv.name {
  font-family: "SimHei", "黑体", "Arial", sans-serif;
  font-size: 13pt; font-weight: 700;
}

/* ---- 分区主表 ---- */
.resume-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.resume-table th, .resume-table td { border: 1px solid #000; padding: 2.5mm 3mm; vertical-align: top; overflow-wrap: break-word; word-break: break-word; }
.resume-table .resume-label {
  width: 28mm;
  text-align: center;
  font-family: "SimHei", "黑体", "Arial", sans-serif;
  font-size: 11pt; font-weight: 700;
}
.resume-table .resume-cell { font-size: 10.5pt; }

/* ---- 子表格（教育 / 经历 / 项目） ---- */
.sub-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sub-table th, .sub-table td { border: 1px solid #000; padding: 2mm 2.5mm; font-size: 10pt; vertical-align: top; overflow-wrap: break-word; word-break: break-word; }
.sub-table thead th {
  background: #f2f2f2;
  font-family: "SimHei", "黑体", "Arial", sans-serif;
  font-weight: 700; text-align: center;
  padding: 2mm 2.5mm;
}
/* 各列宽（合计 100%，配合 table-layout: fixed） */
.sub-table .c-time   { width: 24%; }
.sub-table .c-school { width: 40%; }
.sub-table .c-major  { width: 22%; }
.sub-table .c-edu    { width: 14%; }
.sub-table .c-org    { width: 26%; }
.sub-table .c-role   { width: 16%; }
.sub-table .c-desc   { width: 34%; }
.sub-table .c-name   { width: 26%; }
.sub-table .c-tag    { width: 12%; }
.sub-table .c-date   { width: 18%; }
.sub-table .c-work   { width: 44%; }

/* ---- 技能 / 其它信息（标签 + 内容行） ---- */
.skill-row { display: flex; gap: 10px; padding: 1mm 0; font-size: 10.5pt; }
.skill-row .skill-name { font-family: "SimHei", "黑体", "Arial", sans-serif; font-weight: 700; min-width: 26mm; flex-shrink: 0; }
.skill-row .skill-tools { min-width: 0; overflow-wrap: break-word; word-break: break-word; }

/* ---- 列表与段落 ---- */
.award-list { margin: 0; padding-left: 7mm; font-size: 10.5pt; line-height: 1.6; }
.para { margin: 0; font-size: 10.5pt; line-height: 1.6; text-indent: 2em; }

/* ---- 商务型能力网格 ---- */
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 10mm; }
.cap-item { padding: 1.5mm 0; min-width: 0; }
.cap-item .cap-name { font-family: "SimHei", "黑体", "Arial", sans-serif; font-weight: 700; font-size: 10.5pt; }
.cap-item .cap-desc { font-size: 10pt; overflow-wrap: break-word; word-break: break-word; }

/* ---- 站外链接 ---- */
.resume-links a { color: #2b3a55; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: break-word; }

/* ---- 自定义光标：小圆圈 + 细环（无放大圈） ---- */
.cursor-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #000;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 10000;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
}
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}
/* 精确指针设备：隐藏系统光标，仅显示自定义小圆圈 */
@media (pointer: fine) {
  body.page-resume,
  body.page-resume a,
  body.page-resume button { cursor: none !important; }
}

/* ---- 移动端提示遮罩（本页不引入 styles.css，单独兜底） ---- */
.mobile-notice { display: none; }
@media (max-width: 768px) {
  .mobile-notice {
    display: grid; place-items: center; position: fixed; inset: 0; z-index: 9999;
    background: #fff; color: #1a1a1a; text-align: center; padding: 24px;
  }
  .mobile-notice__title { margin: 0 0 8px; font-size: 1.3rem; }
  .mobile-notice__sub { color: #555; font-size: 0.9rem; }
  .mobile-notice__inner > * { max-width: 320px; margin-inline: auto; }
  .mobile-notice__mark { font-size: 2rem; margin-bottom: 14px; }
  .mobile-notice__kicker { letter-spacing: .2em; text-transform: uppercase; font-size: .7rem; color: #555; margin-bottom: 10px; }
  .mobile-notice__line { height: 1px; background: #ccd0d6; width: 44px; margin: 0 auto 16px; }
  .page-resume .r-top, .page-resume .r-stage { display: none; }
}

/* ---- 打印：每页输出一张真正的 A4（仅当前激活版本） ---- */
@page { size: A4; margin: 0; }
@media print {
  body.page-resume { background: #fff; }
  .r-top, .mobile-notice, .cursor-dot, .cursor-ring { display: none !important; }
  .r-stage { padding: 0; overflow: visible; }
  .resume-page { box-shadow: none; border: none; margin: 0; padding: 14mm 16mm 20mm; break-after: page; }
  .resume-page:last-child { break-after: auto; }
  .resume-version { display: none !important; }
  .resume-version.is-active { display: block !important; }
}
