/* UPMED CV Maker: the CV itself (preview and PDF). A4, sizes in pt/mm so screen and paper match. */
.cv-sheet {
	--acc: #0077a8;
	--acc-soft: #e8f7fd;
	--ink: #1f2a33;
	--mut: #4b5560;
	--rule: #cfd8de;
	position: relative;
	box-sizing: border-box;
	width: 210mm;
	min-height: 297mm;
	padding: 16mm 16mm 14mm;
	background: #fff;
	color: var(--ink);
	font-family: Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 10.5pt;
	line-height: 1.38;
	text-align: left;
	overflow: hidden;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}
.cv-sheet *, .cv-sheet *::before, .cv-sheet *::after { box-sizing: border-box; }
.cv-sheet h1, .cv-sheet h2, .cv-sheet p, .cv-sheet ul, .cv-sheet ol { margin: 0; padding: 0; }
.cv-sheet ul, .cv-sheet ol { list-style: none; }

/* Header */
.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 8mm; margin-bottom: 5mm; }
.cv-head-main { min-width: 0; flex: 1; }
.cv-sheet .cv-name { font-size: 2.095em; line-height: 1.15; font-weight: 700; color: var(--acc); letter-spacing: .2pt; }
.cv-headline { margin-top: 1.2mm !important; font-size: 1.095em; color: var(--ink); }
.cv-contact { margin-top: .8mm !important; display: flex; flex-wrap: wrap; gap: .6mm 0; font-size: 0.905em; color: var(--mut); }
.cv-headline + .cv-contact, .cv-name + .cv-contact { margin-top: 2.4mm !important; }
.cv-contact span + span::before { content: "|"; margin: 0 2.4mm; color: var(--rule); }
.cv-photo { flex: none; width: 30mm; height: 37mm; object-fit: cover; border-radius: 2mm; border: .3mm solid var(--rule); }

/* Sections */
.cv-sec { margin-top: 4.6mm; }
.cv-sheet .cv-sec h2 {
	font-size: 1em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .9pt;
	color: var(--acc);
	padding-bottom: 1mm;
	border-bottom: .35mm solid var(--acc);
	margin-bottom: 2mm;
	break-after: avoid;
	page-break-after: avoid;
}
.cv-sec > p + p { margin-top: 1.4mm; }
.cv-sec-summary p { text-align: justify; }
.cv-ent { margin-top: 2.2mm; break-inside: avoid; page-break-inside: avoid; }
.cv-ent:first-of-type { margin-top: 0; }
.cv-ent-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; }
.cv-ent-top strong { font-weight: 700; }
.cv-date { flex: none; color: var(--mut); font-size: 0.905em; white-space: nowrap; }
.cv-ent-sub { font-style: italic; color: var(--mut); }
.cv-ent-con { font-size: 0.905em; color: var(--mut); }
.cv-ent ul { margin-top: .8mm; }
.cv-ent li, .cv-tags li { position: relative; padding-left: 4mm; }
.cv-ent li::before, .cv-tags li::before { content: ""; position: absolute; left: .8mm; top: .62em; width: 1.3mm; height: 1.3mm; border-radius: 50%; background: var(--acc); }
.cv-tags { columns: 2; column-gap: 8mm; }
.cv-tags li { break-inside: avoid; }
.cv-pubs { counter-reset: pub; }
.cv-pubs li { position: relative; padding-left: 7mm; margin-top: 1.4mm; counter-increment: pub; break-inside: avoid; overflow-wrap: anywhere; }
.cv-pubs li:first-child { margin-top: 0; }
.cv-pubs li::before { content: counter(pub) "."; position: absolute; left: 0; font-weight: 700; color: var(--acc); }
.cv-sec-references .cv-ent { display: inline-block; vertical-align: top; width: 48%; margin-right: 3%; margin-top: 0; margin-bottom: 2mm; }
.cv-sec-references .cv-ent:nth-of-type(2n) { margin-right: 0; }

/* Watermark (free accounts) */
.cv-wm {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	font: 700 26pt/1 Arial, sans-serif;
	color: rgba(0, 119, 168, .07);
	transform: rotate(-32deg);
	white-space: nowrap;
	z-index: 0;
}
.cv-sheet > *:not(.cv-wm) { position: relative; z-index: 1; }
.cv-foot { margin-top: 8mm !important; padding-top: 2mm; border-top: .3mm solid var(--rule); font-size: 0.81em; color: var(--mut); text-align: center; }

/* Classic: serif, black and grey */
.cv-t-classic { --acc: #1f2a33; font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 11pt; }
.cv-t-classic .cv-head { border-bottom: .6mm double #1f2a33; padding-bottom: 4mm; }
.cv-t-classic .cv-name { font-size: 1.909em; letter-spacing: .5pt; }
.cv-t-classic .cv-sec h2 { font-size: 1em; border-bottom-width: .25mm; }
.cv-t-classic .cv-ent li::before, .cv-t-classic .cv-tags li::before { background: #1f2a33; width: 1.1mm; height: 1.1mm; }

/* NHS: Arial, plain, no photo */
.cv-t-nhs { --acc: #005eb8; font-family: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif; font-size: 10pt; }
.cv-t-nhs .cv-name { font-size: 2em; color: #1f2a33; }
.cv-t-nhs .cv-head { padding-bottom: 3mm; border-bottom: .8mm solid var(--acc); }
.cv-t-nhs .cv-sec h2 { border-bottom: 0; background: #eef4fb; padding: 1.2mm 2mm; letter-spacing: .5pt; }

/* Gulf: band at the top with the photo */
.cv-t-gulf .cv-head { margin: -16mm -16mm 5mm; padding: 10mm 16mm 7mm; background: var(--acc-soft); border-bottom: .8mm solid var(--acc); }
.cv-t-gulf .cv-photo { border: .8mm solid #fff; box-shadow: 0 .5mm 2mm rgba(0, 0, 0, .12); }

/* Modern: blue side column */
.cv-t-modern { padding: 0; }
.cv-t-modern .cv-cols { display: grid; grid-template-columns: 64mm 1fr; min-height: 297mm; }
.cv-t-modern .cv-side { background: #0f4c6e; color: #fff; padding: 14mm 7mm 10mm 8mm; font-size: 0.905em; }
.cv-t-modern .cv-side .cv-photo { display: block; width: 36mm; height: 44mm; margin: 0 auto 6mm; border: .8mm solid rgba(255, 255, 255, .85); }
.cv-t-modern .cv-side .cv-sec h2 { color: #fff; border-bottom-color: rgba(255, 255, 255, .45); }
.cv-t-modern .cv-side .cv-ent-sub, .cv-t-modern .cv-side .cv-date { color: rgba(255, 255, 255, .78); }
.cv-t-modern .cv-side .cv-tags { columns: 1; }
.cv-t-modern .cv-side li::before { background: #7fd4f5; }
.cv-t-modern .cv-contact-list li { margin-bottom: 1.4mm; overflow-wrap: anywhere; }
.cv-t-modern .cv-main { padding: 14mm 14mm 10mm 9mm; min-width: 0; }
.cv-t-modern .cv-head { display: block; margin-bottom: 4mm; }
.cv-t-modern .cv-name { font-size: 2.19em; }

/* Cover letter */
.cv-letter { font-size: 11pt; line-height: 1.5; padding: 20mm 22mm; }
.cv-letter .cv-lhead { padding-bottom: 3mm; margin-bottom: 8mm; border-bottom: .4mm solid var(--acc); }
.cv-letter .cv-name { font-size: 1.545em; }
.cv-letter .cv-lfrom { font-size: 0.864em; color: var(--mut); }
.cv-letter .cv-ldate { margin-bottom: 6mm !important; }
.cv-letter .cv-lto { margin-bottom: 6mm !important; }
.cv-letter .cv-lsubj { margin-bottom: 5mm !important; }
.cv-letter p { text-align: justify; }
.cv-letter > p + p { margin-top: 4mm; }
.cv-letter .cv-lempty { color: var(--mut); font-style: italic; }
.cv-letter.cv-t-classic { font-family: "Times New Roman", Times, serif; font-size: 12pt; }
.cv-letter.cv-t-nhs { font-family: Arial, Helvetica, sans-serif; }

/* Academic: centred, small capitals, maroon */
.cv-t-academic { --acc: #7a1f2b; font-family: Cambria, "Book Antiqua", Georgia, "Times New Roman", serif; font-size: 10.8pt; }
.cv-t-academic .cv-head { flex-direction: column-reverse; text-align: center; gap: 3mm; padding-bottom: 4mm; border-bottom: .3mm solid var(--acc); }
.cv-t-academic .cv-contact { justify-content: center; }
.cv-t-academic .cv-photo { width: 25mm; height: 31mm; }
.cv-t-academic .cv-name { font-size: 1.944em; letter-spacing: .4pt; }
.cv-t-academic .cv-sec h2 { text-transform: none; font-variant: small-caps; font-size: 1.204em; letter-spacing: .6pt; text-align: center; border-bottom: 0; padding-bottom: 0; }
.cv-t-academic .cv-sec h2::after { content: ""; display: block; width: 18mm; margin: 1.2mm auto 0; border-top: .35mm solid var(--acc); }
.cv-t-academic .cv-ent li::before, .cv-t-academic .cv-tags li::before { background: var(--acc); }

/* Timeline: headings in a left column, a rule down the content */
.cv-t-timeline { --acc: #1f4e79; }
.cv-t-timeline .cv-head { padding-bottom: 4mm; border-bottom: .7mm solid var(--acc); }
.cv-t-timeline .cv-sec { display: grid; grid-template-columns: 36mm 1fr; column-gap: 5mm; margin-top: 4.4mm; }
.cv-t-timeline .cv-sec h2 { grid-column: 1; grid-row: 1 / span 60; margin: 0; padding: .3mm 0 0; border-bottom: 0; font-size: 0.857em; text-align: right; line-height: 1.3; }
.cv-t-timeline .cv-sec > *:not(h2) { grid-column: 2; border-left: .35mm solid #d3dde7; padding-left: 5mm; margin-top: 0; padding-top: 1.1mm; padding-bottom: 1.1mm; }
.cv-t-timeline .cv-date { color: var(--acc); font-weight: 700; }
.cv-t-timeline .cv-sec-references .cv-ent { display: block; width: auto; margin: 0; }

/* Banner: navy band with the name */
.cv-t-banner { --acc: #0f2d4a; }
.cv-t-banner .cv-head { margin: -16mm -16mm 6mm; padding: 12mm 16mm 9mm; background: #0f2d4a; }
.cv-t-banner .cv-name { color: #fff; font-size: 2.381em; }
.cv-t-banner .cv-headline { color: #d6e6f3; }
.cv-t-banner .cv-contact { color: #b9d2e6; }
.cv-t-banner .cv-contact span + span::before { color: rgba(255, 255, 255, .35); }
.cv-t-banner .cv-photo { width: 31mm; height: 31mm; border-radius: 50%; border: .9mm solid #fff; }
.cv-t-banner .cv-sec h2 { border-bottom: 0; padding: .4mm 0 .4mm 3mm; border-left: 1.3mm solid #2fa4d8; }
.cv-t-banner .cv-ent li::before, .cv-t-banner .cv-tags li::before { background: #2fa4d8; }

/* Compact: small type, tight spacing */
.cv-t-compact { font-size: 9.2pt; line-height: 1.3; padding: 11mm 12mm 10mm; }
.cv-t-compact .cv-head { margin-bottom: 3mm; padding-bottom: 2.6mm; border-bottom: .3mm solid var(--rule); }
.cv-t-compact .cv-name { font-size: 1.848em; }
.cv-t-compact .cv-headline { font-size: 1.087em; }
.cv-t-compact .cv-contact { font-size: 0.935em; }
.cv-t-compact .cv-sec { margin-top: 3.2mm; }
.cv-t-compact .cv-sec h2 { font-size: 0.978em; margin-bottom: 1.2mm; padding-bottom: .6mm; }
.cv-t-compact .cv-ent { margin-top: 1.4mm; }
.cv-t-compact .cv-date { font-size: 0.935em; }
.cv-t-compact .cv-tags { columns: 3; column-gap: 5mm; }

/* USA / Australia: centred, Garamond, black rules */
.cv-t-international { --acc: #1f2a33; font-family: Garamond, "EB Garamond", "Times New Roman", Times, serif; font-size: 11pt; }
.cv-t-international .cv-head { display: block; text-align: center; padding-bottom: 3mm; border-bottom: .45mm solid #1f2a33; }
.cv-t-international .cv-contact { justify-content: center; }
.cv-t-international .cv-name { font-size: 2em; letter-spacing: 1pt; text-transform: uppercase; }
.cv-t-international .cv-sec h2 { letter-spacing: 1.4pt; border-bottom-width: .25mm; }
.cv-t-international .cv-ent li::before, .cv-t-international .cv-tags li::before { background: #1f2a33; width: 1.1mm; height: 1.1mm; }

/* Cover letter fonts */
.cv-letter.cv-t-academic { font-family: Cambria, Georgia, serif; }
.cv-letter.cv-t-international { font-family: Garamond, "EB Garamond", "Times New Roman", serif; font-size: 12pt; }
.cv-letter.cv-t-banner .cv-lhead { border-bottom-width: 1.2mm; }

/* Paper */
@page { size: A4; margin: 12mm 0; }
@page :first { margin-top: 0; }
@media print {
	.cv-print .cv-sheet { min-height: 0; width: 210mm; overflow: visible; padding-top: 14mm; padding-bottom: 0; }
	.cv-print .cv-letter { padding-top: 20mm; }
	.cv-print .cv-t-gulf .cv-head, .cv-print .cv-t-banner .cv-head { margin-top: -14mm; }
	.cv-print .cv-t-compact { padding-top: 11mm; }
	.cv-print .cv-t-modern { padding: 0; }
	.cv-print .cv-t-modern .cv-cols { min-height: 285mm; }
	.cv-print .cv-t-modern .cv-side, .cv-print .cv-t-modern .cv-main { padding-top: 14mm; }
	.cv-print .cv-wm { position: fixed; }
}
