@page {
  size: A4;
  margin: 9mm 10mm 10mm;
}

@media print {
  :root {
    color-scheme: light;
    --paper: #ffffff;
    --ink: #15191f;
    --muted: #59616d;
    --line: #d7dce2;
    --accent: #a87312;
    --accent-soft: #f4ead2;
  }

  html {
    background: #fff;
    font-size: 9.15pt;
  }

  body {
    min-height: 0;
    margin: 0;
    background: #fff !important;
    color: var(--ink);
    font-family:
      "SF Pro Text",
      "PingFang SC",
      "Hiragino Sans GB",
      "Microsoft YaHei",
      "Segoe UI",
      sans-serif;
    line-height: 1.42;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body::before {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .resume-shell {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .resume-header {
    position: relative;
    display: grid;
    grid-template-columns: 27mm minmax(0, 1fr);
    gap: 5mm;
    align-items: center;
    margin: 0 0 4.2mm;
    padding: 0 0 3.6mm;
    border: 0;
    border-bottom: 1.2pt solid var(--ink);
    border-radius: 0;
    background: #fff !important;
    box-shadow: none;
    break-inside: avoid;
  }

  .resume-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1.2pt;
    width: 27mm;
    height: 2.4pt;
    background: var(--accent);
  }

  .headshot {
    grid-row: 1 / 3;
    width: 27mm;
    height: 27mm;
    border: 0;
    border-radius: 4mm;
    background: #fff;
    box-shadow: none;
  }

  .identity {
    min-width: 0;
    padding: 0;
  }

  .identity .eyebrow {
    margin: 0 0 1.5mm;
    color: var(--accent);
    font-size: 6.8pt;
    font-weight: 760;
    letter-spacing: 0.18em;
  }

  .identity h1 {
    margin: 0 0 1.5mm;
    color: var(--ink);
    font-size: 23pt;
    line-height: 1;
    letter-spacing: -0.055em;
    white-space: nowrap;
  }

  .identity .lede {
    margin: 0;
    color: var(--muted);
    font-size: 9.8pt;
    font-weight: 620;
  }

  .contact-block {
    grid-column: 2;
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1mm 1.6mm;
    min-width: 0;
    padding: 1.8mm 0 0;
    border: 0;
    color: var(--muted);
    font-size: 7.8pt;
    line-height: 1.25;
  }

  .contact-block a {
    color: var(--ink);
    font-weight: 690;
  }

  .contact-separator {
    color: #aeb4bc;
  }

  .language-switch,
  .resume-share-trigger,
  .resume-share-modal,
  .pdf-download,
  .other-versions,
  footer {
    display: none !important;
  }

  .resume-grid {
    display: block;
  }

  .content-card {
    margin: 0 0 3.5mm;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff !important;
    box-shadow: none;
  }

  .section-heading {
    display: flex;
    align-items: baseline;
    gap: 3mm;
    margin: 0 0 2.5mm;
    padding: 0 0 1.5mm;
    border-bottom: 0.7pt solid var(--line);
  }

  .section-heading::before {
    content: "";
    width: 4mm;
    height: 2.2pt;
    background: var(--accent);
  }

  .section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 11.2pt;
    line-height: 1;
    letter-spacing: 0.01em;
  }

  .period,
  .module-period,
  .project-period {
    color: var(--muted);
    font-size: 6.8pt;
    font-weight: 720;
    letter-spacing: 0.1em;
  }

  .timeline {
    padding-left: 5.5mm;
    border-left: 1.3pt solid var(--accent-soft);
  }

  .timeline-item::before {
    left: -7mm;
    top: 1.5mm;
    width: 2.4mm;
    height: 2.4mm;
    background: var(--accent);
    box-shadow: 0 0 0 1.6mm var(--accent-soft);
  }

  .timeline h3 {
    margin: 1mm 0 1.4mm;
    font-size: 13.2pt;
    line-height: 1.25;
    letter-spacing: -0.025em;
  }

  .timeline-summary {
    margin: 0 0 1.8mm !important;
    font-size: 9pt;
  }

  .employer-logos {
    gap: 3.2mm;
    margin: 1.5mm 0 2mm;
  }

  .employer-logos img:first-child {
    height: 5.6mm;
  }

  .employer-logos img:last-child {
    height: 5.4mm;
    filter: grayscale(1) brightness(0.15) contrast(1.25);
  }

  .employer-logos > span {
    height: 4.5mm;
    background: var(--line);
  }

  .experience-metric-label,
  .module .module-metric-label {
    margin: 0;
    font-size: 7.1pt;
    letter-spacing: 0.07em;
  }

  .module-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4mm 5mm;
    margin: 1.6mm 0 0;
    padding-left: 4mm;
    font-size: 8pt;
    line-height: 1.42;
  }

  .experience-metrics {
    margin-bottom: 2.2mm;
  }

  html[lang="en"] .experience-metrics {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  }

  .module-list {
    margin-top: 2mm;
  }

  .module {
    padding: 3mm 0;
    border-top: 0.7pt solid var(--line);
    break-inside: avoid;
  }

  .module-heading {
    gap: 4mm;
  }

  .module-title {
    gap: 2.2mm;
  }

  .module-index {
    color: var(--accent);
    font-size: 6.4pt;
  }

  .module h4 {
    margin: 0 0 0.6mm;
    font-size: 9.8pt;
    line-height: 1.25;
  }

  .module p {
    margin: 0;
    color: var(--muted);
    font-size: 8.25pt;
    line-height: 1.42;
  }

  .education {
    margin-top: 0;
  }

  .education h3 {
    margin: 1mm 0 1mm;
    font-size: 10.5pt;
    line-height: 1.25;
  }

  .education > p:not(.period) {
    margin: 1mm 0;
    font-size: 7.8pt;
    line-height: 1.42;
  }

  .education-next {
    margin-top: 3mm !important;
    padding-top: 2.5mm;
  }

  .research-focus,
  .education-gpa,
  .education-award {
    gap: 1.2mm 2mm;
  }

  .research-focus strong,
  .education-gpa strong,
  .education-award strong {
    font-size: 7.4pt;
  }

  .research-focus span,
  .education-gpa span,
  .education-award span {
    font-size: 7.5pt;
  }

  .career-focus--structured {
    margin-top: 2.3mm;
  }

  .focus-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5mm;
  }

  .focus-grid section {
    min-width: 0;
    padding: 2.2mm;
    border: 0.7pt solid var(--line);
    border-radius: 2.5mm;
    background: #faf8f2 !important;
    break-inside: avoid;
  }

  .focus-grid span {
    margin-bottom: 1mm;
    color: var(--accent);
    font-size: 6.2pt;
  }

  .focus-grid strong {
    font-size: 8pt;
    line-height: 1.4;
  }

  .strengths--structured {
    margin-top: 2.8mm;
    break-before: page;
  }

  .strength-groups {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2mm;
  }

  .strength-group {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 2.5mm;
    border: 0.7pt solid var(--line);
    border-radius: 2.6mm;
    background: #fff !important;
    break-inside: avoid;
  }

  .strength-index {
    color: var(--accent);
    font-size: 6.1pt;
  }

  .strength-group h3 {
    margin: 1mm 0 1.8mm;
    font-size: 8.5pt;
  }

  .strength-list {
    gap: 1mm;
    padding-left: 3.5mm;
    color: var(--muted);
    font-size: 7.1pt;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .strength-list--credentials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5mm;
    padding: 0;
  }

  .strength-list--credentials li {
    padding: 0;
    border: 0;
  }

  .project-list {
    display: grid;
  }

  .project-row {
    grid-template-columns: 29mm minmax(0, 1fr);
    gap: 5mm;
    padding: 3mm 0;
    border-bottom: 0.7pt solid var(--line);
    break-inside: avoid;
  }

  .project-row h3 {
    margin: 0 0 0.8mm;
    font-size: 9.7pt;
  }

  .project-row p:not(.project-period) {
    margin: 0;
    color: var(--muted);
    font-size: 7.9pt;
    line-height: 1.42;
  }

  .project-role {
    margin-bottom: 0.8mm !important;
  }

  .additional-info {
    margin-top: 3.5mm;
    break-inside: avoid;
  }

  .additional-info ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8mm 6mm;
    margin: 0;
    padding-left: 4mm;
    color: var(--muted);
    font-size: 7.8pt;
    line-height: 1.48;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  li {
    orphans: 2;
    widows: 2;
  }

  .section-heading,
  .education h3,
  .education .period {
    break-after: avoid;
  }

  html[lang="en"] .education {
    column-count: 2;
    column-gap: 6mm;
    column-rule: 0.7pt solid var(--line);
  }

  html[lang="en"] .education .section-heading {
    column-span: all;
  }

  html[lang="en"] .education .education-next {
    margin-top: 0 !important;
    padding-top: 0;
    border-top: 0;
    break-before: column;
  }

  html[lang="en"] .project-list {
    display: block;
    column-count: 2;
    column-gap: 6mm;
    column-rule: 0.7pt solid var(--line);
  }

  html[lang="en"] .strengths--structured {
    break-before: auto;
  }

  html[lang="en"] .project-row {
    display: block;
    padding: 2.4mm 0;
    break-inside: avoid-column;
  }

  html[lang="en"] .project-period {
    display: block;
    margin: 0 0 1mm;
  }

  html[lang="zh-CN"] .strength-groups {
    gap: 2.4mm;
  }

  html[lang="zh-CN"] .strength-group {
    padding: 2.8mm;
  }

  html[lang="zh-CN"] .project-row {
    padding: 3.5mm 0;
  }

  html[lang="zh-CN"] .additional-info {
    margin-top: 4.2mm;
  }
}
