:root { --resume-accent:#285344; }
.resume-page {box-sizing:border-box; width:210mm; min-height:297mm; padding:14mm 16mm; background:#fff; color:#25312f; font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",Arial,sans-serif; font-size:10pt; line-height:1.65; overflow-wrap:anywhere; text-align:left;}
.resume-page * {box-sizing:border-box;}
.resume-header {padding-bottom:5mm; border-bottom:2px solid var(--resume-accent); margin-bottom:6mm;}
.resume-name {font-size:28pt; font-weight:700; letter-spacing:2px; margin:0 0 1.5mm; color:#182b26; line-height:1.3;}
.resume-role {font-size:11pt; font-weight:500; color:var(--resume-accent); margin:0 0 3mm;}
.resume-contacts {display:flex; gap:1.5mm 5mm; flex-wrap:wrap; font-size:9pt; color:#5d6965;}
.resume-contacts span {white-space:normal;}
.resume-section {margin:0 0 5mm;}
.resume-section h2 {font-size:11.5pt; margin:0 0 2.8mm; padding-bottom:1.5mm; border-bottom:1px solid #d9e1dd; color:var(--resume-accent); font-weight:700; letter-spacing:1px; break-after:avoid; page-break-after:avoid;}
.resume-entry {margin-bottom:3.5mm;}
.resume-entry:last-child {margin-bottom:0;}
.resume-entry-heading {display:flex; justify-content:space-between; align-items:baseline; gap:5mm; break-after:avoid; page-break-after:avoid;}
.resume-entry-title {font-weight:700; font-size:10pt; margin:0;}
.resume-date {font-size:8.7pt; color:#68746e; flex-shrink:0;}
.resume-subtitle {font-size:9.3pt; color:#5a6962; margin:.7mm 0 1.4mm; break-after:avoid; page-break-after:avoid;}
.resume-description {margin:1mm 0 1.5mm; color:#46554d;}
.resume-bullets {padding-left:4.5mm; margin:1mm 0;}
.resume-bullets li {margin:.8mm 0; padding-left:.6mm; break-inside:avoid; page-break-inside:avoid;}
.resume-text {white-space:pre-line; margin:0;}
.resume-skill-row {margin:1.7mm 0;}
.resume-skill-row strong {color:#2e4037;}
.theme-engineer {--resume-accent:#315b80;}
.theme-engineer .resume-header {border-bottom:0; border-left:4px solid var(--resume-accent); padding-left:5mm;}
.theme-engineer .resume-section h2 {background:#eff4f8; border:0; padding:1.5mm 3mm; letter-spacing:.8px;}
.theme-graduate {--resume-accent:#765645;}
.theme-graduate .resume-header {text-align:center; border-bottom:1px solid #b9aaa0; padding-bottom:6mm;}
.theme-graduate .resume-contacts {justify-content:center;}
.theme-graduate .resume-section h2 {border-bottom:1px solid #d5c7bb; letter-spacing:2px;}
.density-compact .resume-page {font-size:9.3pt; line-height:1.5;}
.density-compact .resume-section {margin-bottom:3.5mm;}
.density-compact .resume-entry {margin-bottom:2.5mm;}
.density-compact .resume-header {margin-bottom:4mm; padding-bottom:4mm;}
.density-compact .resume-bullets li {margin:.4mm 0;}
/* Reference layouts: neutral ink, centered masthead and chronological entries. */
.theme-centered,.theme-timeline {--resume-accent:#242b35;}
:is(.theme-centered,.theme-timeline) .resume-page {color:#242b35; font-size:9.5pt; line-height:1.7;}
:is(.theme-centered,.theme-timeline) .resume-name {font-size:22pt; color:#242b35; letter-spacing:1px; margin-bottom:1.8mm;}
:is(.theme-centered,.theme-timeline) .resume-role {font-size:9.5pt; color:#4a5464; margin-bottom:2mm; font-weight:400;}
:is(.theme-centered,.theme-timeline) .resume-contacts {font-size:8.7pt; color:#586475; gap:1.2mm 0;}
:is(.theme-centered,.theme-timeline) .resume-contacts span+span {border-left:1px solid #c9ced6; margin-left:3.5mm; padding-left:3.5mm;}
.resume-photo {width:18mm; height:18mm; object-fit:cover; border-radius:50%; border:1px solid #e2e5e9; display:block;}
:is(.theme-classic,.theme-engineer) .resume-header.has-photo {display:grid; grid-template-columns:minmax(0,1fr) 22mm; column-gap:5mm; align-items:start;}
:is(.theme-classic,.theme-engineer) .resume-photo {grid-column:2; grid-row:1/4; align-self:center; width:22mm; height:22mm; border-radius:2mm;}
:is(.theme-classic,.theme-engineer) .resume-header.has-photo :is(.resume-name,.resume-role,.resume-contacts) {grid-column:1;}
.theme-graduate .resume-photo {margin:0 auto 3mm;}
:is(.theme-centered,.theme-timeline) .resume-section h2 {color:#242b35; font-size:10.7pt; letter-spacing:0; border-bottom:1px solid #e4e8ed; padding-bottom:1mm; margin-bottom:2mm;}
:is(.theme-centered,.theme-timeline) .resume-section h2:before {content:""; display:inline-block; width:1.8mm; height:1.8mm; border-radius:50%; background:#242b35; margin-right:2mm; vertical-align:1px;}
:is(.theme-centered,.theme-timeline) .resume-subtitle {font-size:9.5pt; color:#242b35; font-weight:600;}
:is(.theme-centered,.theme-timeline) .resume-entry-title {font-size:9.5pt;}
:is(.theme-centered,.theme-timeline) .resume-description {color:#3b4350;}
:is(.theme-centered,.theme-timeline) .resume-skill-row strong {color:#242b35;}
.theme-centered .resume-header {text-align:center; border-bottom:1.3px solid #242b35; padding-bottom:4mm; margin-bottom:4mm;}
.theme-centered .resume-photo {margin:0 auto 2.5mm;}
.theme-centered .resume-contacts {justify-content:center;}
.theme-centered .resume-entry-heading {display:inline-flex; flex-direction:row-reverse; justify-content:flex-end; flex-wrap:wrap-reverse; gap:1mm 2mm; margin-right:2mm;}
.theme-centered .resume-date {color:#738195; font-size:8.7pt;}
.theme-centered .resume-subtitle {display:inline; margin:0;}
.theme-centered .resume-bullets {list-style-type:square;}
.theme-centered .resume-entry {margin-bottom:3mm;}
.theme-timeline .resume-header {border-bottom:1px solid #e2e6eb; padding-bottom:4mm; margin-bottom:6mm;}
.theme-timeline .resume-header.has-photo {display:grid; grid-template-columns:18mm minmax(0,1fr); column-gap:4mm; align-items:start;}
.theme-timeline .resume-photo {grid-column:1; grid-row:1/4; align-self:center;}
.theme-timeline .resume-header.has-photo :is(.resume-name,.resume-role,.resume-contacts) {grid-column:2;}
.theme-timeline .resume-contacts span+span {border:0; margin-left:0; padding-left:0;}
.theme-timeline .resume-contacts {gap:1mm 4mm;}
.theme-timeline .resume-section h2 {display:flex; align-items:center; gap:2mm; border:0; padding-bottom:0; margin-bottom:2.5mm;}
.theme-timeline .resume-section h2:before {margin:0; flex-shrink:0;}
.theme-timeline .resume-section h2:after {content:""; flex:1; height:1px; background:linear-gradient(90deg,#66717d,#e9ecf0);}
.theme-timeline .resume-entry {position:relative; margin-left:.8mm; padding-left:4mm; border-left:1px solid #e3e7ec; margin-bottom:0; padding-bottom:3.5mm;}
.theme-timeline .resume-entry:last-child {padding-bottom:.5mm;}
.theme-timeline .resume-entry:before {content:""; position:absolute; top:1.4mm; left:-1.6mm; width:2.7mm; height:2.7mm; border:1.3px solid #364151; background:#fff; border-radius:50%; box-sizing:border-box;}
.theme-timeline .resume-entry-heading {flex-direction:column-reverse; align-items:flex-start; gap:.3mm;}
.theme-timeline .resume-date {color:#263445; font-size:9.2pt; font-weight:700;}
.theme-timeline .resume-subtitle {margin:.4mm 0 1mm;}
.theme-timeline .resume-bullets {padding-left:3.5mm;}
.theme-timeline .resume-bullets li::marker {color:#a4adba; font-size:.8em;}
.theme-timeline .resume-skill-row {position:relative; margin-left:.8mm; padding-left:4mm; border-left:1px solid #e3e7ec; margin-top:0; margin-bottom:0; padding-bottom:1.8mm;}
.theme-timeline .resume-skill-row:before {content:""; position:absolute; left:-1mm; top:2mm; width:1.6mm; height:1.6mm; background:#a5afbd; border-radius:50%;}
.density-compact:is(.theme-centered,.theme-timeline) .resume-page {font-size:9pt; line-height:1.5;}
.density-compact.theme-timeline .resume-entry {padding-bottom:2.3mm;}
/* A chosen accent overrides template decoration, while body text stays dark. */
.has-custom-accent {--resume-accent:var(--selected-accent);}
.has-custom-accent :is(.resume-role,.resume-section h2) {color:var(--selected-accent);}
.has-custom-accent .resume-header {border-color:var(--selected-accent);}
.has-custom-accent .resume-section h2 {border-bottom-color:var(--selected-accent);}
.has-custom-accent .resume-section h2:before {background:var(--selected-accent);}
.has-custom-accent .resume-section h2:after {background:linear-gradient(90deg,var(--selected-accent),#e9ecf0);}
.has-custom-accent .resume-entry:before {border-color:var(--selected-accent);}
.has-custom-accent .resume-skill-row:before {background:var(--selected-accent);}
.has-custom-accent .resume-bullets li::marker {color:var(--selected-accent);}
.has-custom-accent.theme-engineer .resume-section h2 {background:color-mix(in srgb,var(--selected-accent) 8%,white);}
@media print {
  @page {size:A4; margin:14mm 16mm;}
  html,body {margin:0!important; padding:0!important; background:white!important;}
  .resume-page {padding:0!important; margin:0!important; min-height:0!important; width:auto!important; box-shadow:none!important;}
  * {-webkit-print-color-adjust:exact; print-color-adjust:exact;}
}
