/* ============================================================
   print.css · 打印 / 导出 PDF 专用
   ------------------------------------------------------------
   @page A4 · margin 0（页边距由纸张内 padding 提供）
   关闭动画 · 隐藏屏幕元素 · 强制颜色精确渲染 · 防分页截断
   ============================================================ */

@media print {

  /* —— 页面尺寸：A4，无外边距 —— */
  @page {
    size: A4;
    margin: 0;
  }

  /* —— 强制精确颜色与背景渲染（灰阶、装饰、分割线不丢） —— */
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* —— 视口归零，纸张贴边 —— */
  html, body {
    margin: 0;
    padding: 0;
    background: #ffffff;
  }

  /* —— 隐藏屏幕专用元素 —— */
  .print-btn { display: none !important; }

  /* —— 纸张：精确 A4 宽，高度由内容决定 —— */
  .paper {
    width: var(--a4-w);
    min-height: auto;
    height: auto;
    margin: 0;
    box-shadow: none;
    overflow: visible;
  }

  /* —— 关闭入场动画，内容立即可见 —— */
  [data-anim] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  /* —— 防止英雄区 / 章节 / 经历 / 项目在分页时被截断 —— */
  .hero,
  .sec,
  .job,
  .proj,
  .extras {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* —— 链接在打印稿中保持灰阶，避免默认蓝色 —— */
  a { color: inherit; }
}
