/* ==========================================================================
   个人简历 · 左灰栏 + 右侧品牌色条目标题（参考简历版式，配色取站点令牌）
   仅作用于 .resume-page；打印时输出 A4 双栏简历。
   ========================================================================== */
.rs-sheet {
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius);
}
.rs-sheet > .card { border: 0; }

/* ---------- 左栏顶部：头像 / 姓名 / 身份 ---------- */
.rs-hero-id {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 0 0 24px; text-align: center;
}
.rs-hero-id .rs-avatar { width: 96px; height: 96px; line-height: 0; }
.rs-hero-id .rs-avatar img,
.rs-hero-id .rs-avatar .avatar-img,
.rs-hero-id .rs-avatar svg { width: 100% !important; height: 100% !important; display: block; object-fit: cover; }
.rs-name { margin: 0; font-size: 22px; font-weight: 700; color: var(--brand); letter-spacing: .01em; }
.rs-title-line { margin: 0; font-size: 13px; color: var(--text-2); }
.rs-empty { padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rs-empty .rs-avatar { width: 96px; height: 96px; }
.rs-empty .rs-avatar img, .rs-empty .rs-avatar .avatar-img, .rs-empty .rs-avatar svg { width: 100% !important; height: 100% !important; display: block; object-fit: cover; }

/* 操作按钮放在右栏首行，避免独占整行造成大片留白 */
.rs-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 0 18px; }

/* ---------- 双栏骨架 ---------- */
.rs-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.rs-col { min-width: 0; }
.rs-col-side { padding: 28px 22px 36px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.rs-col-main { padding: 24px 34px 38px; }
.rs-block + .rs-block { margin-top: 28px; }
.rs-side-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 13px; padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.rs-side-title svg { color: var(--brand); flex: 0 0 auto; }

/* ---------- 左栏：联系方式 / 技能 / 数据 ---------- */
.rs-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.rs-contact-list li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; line-height: 1.5; min-width: 0; }
.rs-contact-list svg { color: var(--brand); flex: 0 0 auto; }
.rs-contact-list a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.rs-contact-list a:hover { color: var(--brand); }
.rs-skill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rs-skill-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 12px; }
.rs-skill-level { color: var(--muted); font-variant-numeric: tabular-nums; }
.rs-skill-bar { height: 7px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); overflow: hidden; }
.rs-skill-bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.rs-metrics { margin: 0; font-size: 12px; line-height: 1.85; color: var(--text-2); }

/* ---------- 右栏：品牌色条目标题 ---------- */
.rs-sec + .rs-sec { margin-top: 30px; }
.rs-sec-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.rs-sec-ico {
  flex: 0 0 26px; width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
}
.rs-sec-title > span:not(.rs-sec-ico) { font-size: 14px; font-weight: 700; white-space: nowrap; }
.rs-sec-title::after { content: ""; flex: 1 1 auto; height: 8px; background: var(--brand); }

.rs-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0; column-gap: 26px; row-gap: 12px;
}
.rs-facts > div { min-width: 0; }
.rs-facts dt { margin-bottom: 3px; font-size: 11px; color: var(--muted); }
.rs-facts dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.rs-bio { font-size: 13.5px; line-height: 1.95; color: var(--text-2); }

/* ---------- 右栏：日期右置的经历条目 ---------- */
.rs-timeline { display: grid; }
.rs-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 0 0 5px; }
.rs-item:last-child { padding-bottom: 0; }
.rs-item-time { grid-column: 2; grid-row: 1; font-size: 11.5px; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs-item-body { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
.rs-item-title { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.rs-item-details { margin: 5px 0 0; padding-left: 16px; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }

/* ---------- 右栏：荣誉奖项 ---------- */
.rs-honor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 20px; }
.rs-honor { display: grid; gap: 2px; min-width: 0; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.rs-honor-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rs-video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.rs-video iframe, .rs-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .rs-grid { grid-template-columns: 240px minmax(0, 1fr); }
  .rs-hero-id { padding-bottom: 20px; }
  .rs-col-side { padding: 24px 18px 30px; }
  .rs-col-main { padding: 20px 26px 32px; }
}
@media (max-width: 768px) {
  .rs-hero-id { padding-bottom: 18px; }
  .rs-actions { justify-content: center; }
  .rs-grid { grid-template-columns: minmax(0, 1fr); }
  .rs-col-side { padding: 26px 24px 30px; }
  .rs-col-main { padding: 24px 24px 10px; }
}
@media (max-width: 560px) {
  .resume-page { padding-top: var(--ak-sp-15); }
  .rs-hero-id .rs-avatar, .rs-empty .rs-avatar { width: 80px; height: 80px; }
  .rs-col-side, .rs-col-main { padding-left: 20px; padding-right: 20px; }
  .rs-facts, .rs-honor-grid { grid-template-columns: minmax(0, 1fr); }
  .rs-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rs-item-time { grid-column: 1; grid-row: 1; white-space: normal; }
  .rs-item-body { grid-column: 1; grid-row: 2; }
}

/* ---------- 打印：A4 双栏 ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  /* 暗色主题打印时强制回到浅色令牌，避免白纸浅字 + 深色块 */
  html[data-theme="dark"] .rs-sheet {
    --surface: #fff;
    --surface-2: #f5f6f8;
    --surface-3: #eceef2;
    --text: #16181d;
    --text-2: #41454f;
    --muted: #666b78;
    --line: #d5d8de;
    --brand: #3d4ed8;
    --brand-soft: #eef0ff;
    color: var(--text);
    background: var(--surface);
    print-color-adjust: economy;
    -webkit-print-color-adjust: economy;
  }
  html[data-theme="dark"] .rs-hero-id,
  html[data-theme="dark"] .rs-col-side,
  html[data-theme="dark"] .rs-sec-ico,
  html[data-theme="dark"] .rs-sec-title::after,
  html[data-theme="dark"] .rs-skill-bar i { print-color-adjust: economy; -webkit-print-color-adjust: economy; }
  .page-head--resume { display: none !important; }
  .resume-page { padding: 0; }
  .rs-sheet { max-width: none; border: 0; border-radius: 0; }
  .rs-grid { grid-template-columns: 32% minmax(0, 1fr); }
  .rs-hero-id { padding-bottom: 10pt; }
  .rs-hero-id .rs-avatar { width: 66pt; height: 66pt; }
  .rs-name { font-size: 19pt; }
  .rs-title-line { font-size: 10pt; }
  .rs-actions { display: none !important; }
  .rs-col-side { padding: 0 12pt 0 0; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
  .rs-col-main { padding: 0 0 0 12pt; }
  .rs-hero-id, .rs-col-side, .rs-sec-ico, .rs-sec-title::after, .rs-skill-bar i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .rs-sec-title { break-after: avoid; }
  .rs-sec + .rs-sec { margin-top: 14pt; }
  .rs-item, .rs-honor { break-inside: avoid; }
}
