@page { size: A4; margin: 0; }
* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; background: #fff; color: #242321; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.pdf-action { position: fixed; top: 12px; right: 12px; z-index: 10; border: 1px solid #242321; border-radius: 999px; background: #f8f5ef; color: #242321; padding: 9px 14px; font: 600 12px/1 'Helvetica Neue', Arial, sans-serif; cursor: pointer; }
.page { --content-safe-right: 20mm; --profile-safe-height: 78mm; --experience-safe-height: 150mm; width: 210mm; min-height: 297mm; margin: 0 auto 12mm; padding: 12mm 0; background: linear-gradient(to bottom, #f8f5ef 0 12mm, #f8f5ef 12mm calc(100% - 12mm), #fff calc(100% - 12mm) 100%); display: grid; grid-template-columns: 29% 71%; grid-template-rows: 47mm 1fr 34mm; box-shadow: 0 2mm 8mm rgba(0,0,0,.18); }
.top-left { border-top: .35mm solid #171717; border-right: .35mm solid #171717; border-bottom: .35mm solid #171717; padding: 0 0 0 14mm; background: linear-gradient(to right, #fff 0 14mm, #f8f5ef 14mm); overflow: hidden; }
.top-right { border-top: .35mm solid #171717; border-bottom: .35mm solid #171717; padding: 6mm 10mm 5mm 28mm; display: flex; flex-direction: column; justify-content: center; }
.left { padding: 10mm 7mm 6mm 5.5mm; border-right: .35mm solid #171717; min-height: 0; }
.right { padding: 8mm 10mm 6mm 10mm; min-height: 0; overflow: hidden; }
.bottom-left { padding: 6mm 7mm; border-top: .35mm solid #171717; border-right: .35mm solid #171717; }
.bottom-right { padding: 6mm var(--content-safe-right) 3mm 28mm; border-top: .35mm solid #171717; }
.name { font-size: 45pt; line-height: .9; font-weight: 700; margin: 0 0 1mm; letter-spacing: -.04em; }
.role { font-size: 17.5pt; letter-spacing: .01em; margin-bottom: 0; }
.photo { width: 46.6mm; height: 47mm; border: 0; border-left: .35mm solid #171717; background: url('assets/img-000.png') center 55%/cover no-repeat; }
h2 { font-size: 9.5pt; letter-spacing: .08em; margin: 0 0 2.5mm; text-transform: uppercase; padding-bottom: 1mm; }
h3 { font-size: 9.8pt; margin: 0; }
p, li { font-size: 8.3pt; line-height: 1.28; }
p { margin: 0 0 4mm; }
ul { margin: 0 0 3.5mm 4mm; padding-left: 4mm; }
.block { margin-bottom: 7mm; }
.job { margin-bottom: 4mm; }
.job-head { display: grid; grid-template-columns: 1fr auto; gap: 3mm; align-items: baseline; margin-bottom: 1mm; }
.company, .date { font-size: 8pt; }
.date { white-space: nowrap; }
.muted { color: #6d665d; }
.profile-block { padding-bottom: 5mm; }
.profile-block, .education-block, .experience-block { overflow: hidden; }
.education-block { border-top: .35mm solid #171717; padding: 5mm 7mm 0 5.5mm; margin-left: -5.5mm; margin-right: -7mm; }
.contact-block { border-bottom: .35mm solid #171717; padding: 0 14mm 5mm 28mm; margin: 0 -10mm 6mm; }
.contact { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3mm; row-gap: 0; font-size: 8.1pt; line-height: 1.22; }
.contact { position: relative; top: -2mm; }
.contact > span:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.contact > strong:nth-child(2) { grid-column: 2; grid-row: 1; }
.contact > span:nth-child(3) { grid-column: 1; grid-row: 2; }
.contact > span:nth-child(4) { grid-column: 2; grid-row: 2; }
.contact span:nth-child(3) { font-weight: 700; }
.experience-block { padding-left: 18mm; padding-right: var(--content-safe-right); max-height: var(--experience-safe-height); }
.bottom-left h2 { border: 0; }
.small { font-size: 7.7pt; }
@media print { body { background: white; } .page { margin: 0; box-shadow: none; } }
@media print { h1, h2, h3, p, li, .job, .contact-block, .education-block { break-inside: avoid; } }
@media print { .pdf-action { display: none; } }
@media (max-width: 760px) { .page { width: 100%; min-height: 0; margin: 0; } .pdf-action { position: sticky; top: 8px; margin: 8px; } }

/* ATS mode: same source data, linear reading order, no hidden text tricks. */
.ats-mode { display: block; min-height: 0; padding: 16mm 18mm; background: #fff; box-shadow: none; }
.ats-mode .top-left { display: none; }
.ats-mode .top-right { border: 0; padding: 0 0 8mm; display: block; }
.ats-mode .name { font-size: 28pt; line-height: 1; margin-bottom: 2mm; }
.ats-mode .role { font-size: 13pt; }
.ats-mode .left, .ats-mode .right { padding: 0; border: 0; overflow: visible; }
.ats-mode .profile-block, .ats-mode .education-block, .ats-mode .experience-block, .ats-mode .contact-block { border: 0; margin: 0 0 7mm; padding: 0; max-height: none; overflow: visible; }
.ats-mode .contact { display: block; }
.ats-mode .contact > * { display: inline; margin-right: 5mm; }
.ats-mode .bottom-left { display: none; }
.ats-mode .bottom-right { padding: 0; border: 0; }
