/* ============================================================
   resume.css — 简历页 · VibeResume 浅色纸感单页风（暖橙强调色）
   基底来自 VibeResume（Szya191628，MIT），改为呼应站点品牌的暖橙，
   去掉真实照片（隐私），保留返回博客与打印按钮。
   2026-08-18：引入 shadcn 风格设计刻度（4px 间距栅格 + 清晰字阶），
   统一竖向节奏与字号层级。
   ============================================================ */
:root {
  --print-width: 210mm;
  --print-height: 297mm;
  --screen-width: 1000px;
  --accent: #c2612b;        /* 暖橙，呼应站点品牌 */
  --accent-soft: #fbe9dd;
  --rust: #d97757;
  --ink: #1c1917;
  --muted: #78716c;
  --hairline: #e7ded3;
  --panel: #faf6f0;
  --screen-bg: #efe7db;

  /* —— shadcn 风格设计刻度 —— */
  /* 间距：4px 栅格（shadcn 的 0.25rem 基准），统一竖向节奏 */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 48px;
  /* 字阶：清晰层级，避免随意字号 */
  --fs-xs: 11px;  --fs-sm: 12.5px; --fs-base: 14px;
  --fs-md: 15px;  --fs-lg: 16px;  --fs-xl: 19px;
  --fs-2xl: 24px; --fs-name: 40px;
  /* 行高：标题紧、正文松 */
  --lh-tight: 1.1; --lh-snug: 1.3; --lh-base: 1.5; --lh-relaxed: 1.6;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    linear-gradient(180deg, #efe7db 0%, #f7f2ea 46%, #efe7db 100%);
  color: var(--ink);
  font-family: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Heiti SC", Arial, sans-serif;
  line-height: var(--lh-base);
}

.icon-sprite { display: none; }

.icon, .section-icon {
  display: inline-block;
  fill: none;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
.icon { height: 16px; width: 16px; }

/* 返回博客 */
.topbar {
  display: flex;
  justify-content: flex-start;
  padding: var(--sp-5) var(--sp-3) 0;
}
.topbar a {
  color: var(--muted);
  font-size: var(--fs-base);
  font-family: Consolas, "Courier New", ui-monospace, monospace;
  text-decoration: none;
}
.topbar a:hover { color: var(--accent); }

/* 工具栏：打印 + 站点链接 */
.toolbar {
  align-items: center;
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  padding: var(--sp-4) var(--sp-3) var(--sp-1);
}
.print-button, .source-link {
  align-items: center;
  background: #1c1917;
  border: 1px solid #1c1917;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  gap: var(--sp-2);
  font-size: var(--fs-base);
  font-weight: 700;
  height: 38px;
  justify-content: center;
  padding: 0 var(--sp-4);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.print-button:hover, .source-link:hover {
  box-shadow: 0 10px 22px rgba(28, 25, 23, 0.14);
  transform: translateY(-1px);
}
.source-link { background: #fff; border-color: var(--hairline); color: #1c1917; }

/* 纸感单页 */
.page {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 60px rgba(28, 25, 23, 0.14);
  margin: 0 auto var(--sp-7);
  min-height: 1120px;
  overflow: visible;
  padding: var(--sp-8) var(--sp-9) var(--sp-8);
  width: min(calc(100vw - 48px), var(--screen-width));
}

/* 头部（无照片，单列） */
.resume-header {
  background: #fff;
  border: 1px solid #e7ded3;
  border-radius: 4px;
  border-top: 4px solid var(--accent);
  margin-bottom: var(--sp-6);
  padding: var(--sp-6);
  text-align: left;
}
.profile-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.eyebrow {
  color: #57534e;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: var(--lh-snug);
  margin: 0 0 var(--sp-2);
  text-transform: uppercase;
}
.name-row {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-4);
}
.resume-header h1 {
  font-size: var(--fs-name);
  font-weight: 800;
  letter-spacing: 0;
  line-height: var(--lh-tight);
  margin: 0;
}
.identity-line {
  color: var(--muted);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 0 0 var(--sp-1);
}
.contact-line {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  font-size: var(--fs-md);
  gap: var(--sp-2);
  justify-content: flex-start;
  margin: 0;
}
.contact-line a, .contact-line span {
  align-items: center;
  background: #faf6f0;
  border: 1px solid #e7ded3;
  border-radius: 4px;
  color: #1c1917;
  display: inline-flex;
  gap: var(--sp-2);
  min-height: 32px;
  padding: var(--sp-1) var(--sp-3);
  text-decoration: none;
  width: auto;
}
.contact-line a:hover { border-color: rgba(194, 97, 43, 0.4); color: var(--accent); }

/* 分区标题 */
.section { margin-top: var(--sp-6); }
.section:first-of-type { margin-top: 0; }
.section h2 {
  align-items: center;
  color: #1c1917;
  display: flex;
  font-size: var(--fs-xl);
  font-weight: 800;
  gap: var(--sp-3);
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-4);
  position: relative;
}
.section h2::after {
  background: linear-gradient(90deg, var(--accent) 0%, rgba(194, 97, 43, 0.12) 100%);
  content: "";
  flex: 1;
  height: 2px;
  margin-left: var(--sp-1);
}
.section-icon {
  background: var(--accent-soft);
  border-radius: 8px;
  color: var(--accent);
  height: 28px;
  padding: var(--sp-2);
  width: 28px;
}

/* 能力（点阵熟练度） */
.cap-group { margin-bottom: var(--sp-5); }
.cap-label {
  color: var(--muted);
  font-family: Consolas, "Courier New", ui-monospace, monospace;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  margin: 0 0 var(--sp-2);
  text-transform: uppercase;
}
.cap-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: var(--sp-2) 0;
}
.cap-name { font-size: var(--fs-md); color: var(--ink); }
.cap-name small { color: var(--muted); font-size: var(--fs-sm); margin-left: var(--sp-2); }
.meter { display: flex; gap: var(--sp-2); flex: none; }
.meter i {
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--hairline); display: block;
}
.meter i.on { background: var(--accent); box-shadow: 0 0 6px rgba(194, 97, 43, 0.5); }

/* 教育 / 项目 共用时间线块 */
.experience {
  border-left: 3px solid var(--accent-soft);
  margin-top: var(--sp-5);
  padding-left: var(--sp-4);
  position: relative;
}
.experience::before {
  background: var(--accent);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(194, 97, 43, 0.25);
  content: "";
  height: 9px;
  left: -6px;
  position: absolute;
  top: 4px;
  width: 9px;
}
.experience:first-of-type { margin-top: 0; }
.entry-head {
  align-items: start;
  display: grid;
  font-size: var(--fs-lg);
  grid-template-columns: 1.4fr 1fr;
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-3);
  gap: var(--sp-2);
}
.entry-head strong { font-weight: 800; }
.entry-head span { color: var(--muted); font-weight: 700; text-align: right; }
.experience h3 {
  color: #292524;
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: var(--lh-snug);
  margin: 0 0 var(--sp-2);
}
.summary {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  margin: 0;
  text-align: justify;
}
.experience ul {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  list-style-position: outside;
  margin: var(--sp-2) 0 0;
  padding-left: 21px;
}
.experience li { margin: 6px 0 0; padding-left: 3px; }
.experience li::marker { color: var(--accent); font-size: 0.9em; }
.experience li strong { font-weight: 800; }

/* 联系：抖音 + 二维码 */
.contact-douyin {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  display: flex;
  gap: var(--sp-4);
  justify-content: space-between;
  margin-top: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
}
.dy-title { font-size: var(--fs-md); font-weight: 800; margin: 0; color: var(--ink); }
.dy-sub { font-size: var(--fs-sm); color: var(--muted); margin: var(--sp-1) 0 0; }
.qr {
  width: 104px; height: 104px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  flex: none;
}

footer {
  text-align: center;
  font-family: Consolas, "Courier New", ui-monospace, monospace;
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: var(--sp-2) 0 var(--sp-7);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

@page { margin: 0; size: A4; }

@media (max-width: 900px) {
  .toolbar { padding: var(--sp-3) var(--sp-3) var(--sp-1); }
  .page {
    border: 0; box-shadow: none; min-height: 0;
    padding: var(--sp-6) var(--sp-5) var(--sp-7); width: 100vw;
  }
  .resume-header { padding: var(--sp-5); border-top-width: 3px; }
  .resume-header h1 { font-size: 32px; }
  .entry-head { grid-template-columns: 1fr; }
  .entry-head span { text-align: left; }
  .contact-douyin { flex-direction: column; align-items: flex-start; }
  .cap-row { font-size: var(--fs-md); }
}

@media print {
  html, body {
    background: #fff;
    min-height: var(--print-height);
    width: var(--print-width);
  }
  .topbar, .toolbar { display: none; }
  .page {
    border: 0; box-shadow: none; min-height: var(--print-height);
    margin: 0; overflow: visible; padding: 8mm 9mm 8mm; width: var(--print-width);
  }
  .resume-header {
    background: #fff;
    border-color: #e7ded3;
    border-radius: 0;
    border-top: 2px solid var(--accent);
    margin-bottom: var(--sp-2);
    padding: 5mm 0 4mm;
  }
  .resume-header h1 { font-size: 23px; }
  .eyebrow { font-size: 9px; margin-bottom: var(--sp-1); }
  .identity-line { font-size: var(--fs-sm); margin-bottom: 1px; }
  .name-row { gap: var(--sp-2); margin-bottom: var(--sp-2); }
  .contact-line { font-size: var(--fs-sm); gap: var(--sp-1); }
  .contact-line a, .contact-line span { border: 0; min-height: 0; padding: 0; }
  .section h2 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
  .section-icon { height: 19px; padding: var(--sp-1); width: 19px; }
  .cap-label { font-size: 10px; }
  .cap-group { margin-bottom: var(--sp-3); }
  .cap-name, .entry-head, .summary, .experience ul { font-size: var(--fs-sm); }
  .summary, .experience ul { line-height: 1.5; }
  .experience h3 { font-size: var(--fs-base); }
  .experience { border-left-color: #fbe9dd; margin-top: var(--sp-2); padding-left: var(--sp-3); }
  .experience li { margin: 4px 0 0; }
  .experience::before { height: 6px; left: -5px; width: 6px; }
  .contact-douyin { background: #fff; border-color: #e7ded3; border-radius: 0; margin-top: var(--sp-2); padding: 10px 14px; }
  .dy-title { font-size: var(--fs-md); }
  .dy-sub { font-size: var(--fs-sm); }
  .section { margin-top: var(--sp-3); }
  footer { display: none; }
}
