/*
 * Resume document styles.
 *
 * One stylesheet serves preview, print, PDF and shared links, so what a candidate
 * sees on screen is what an employer receives. Design variables (--arb-*) are set
 * per document from the resume's design block.
 */

.arb-print-body {
	margin: 0;
	padding: 0;
	background: #f1f1f1;
}

.arb-page {
	width: var( --arb-page-w, 210mm );
	max-width: 100%;
	margin: 0 auto;
	padding: 14mm;
	background: #fff;
	box-sizing: border-box;
}

.arb-resume {
	font-family: var( --arb-font, Arial, Helvetica, sans-serif );
	font-size: var( --arb-size, 10.5pt );
	line-height: var( --arb-lh, 1.4 );
	color: #111;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.arb-resume * {
	box-sizing: border-box;
}

/* ---------- Header ---------- */

.arb-resume__header {
	margin-bottom: calc( var( --arb-gap, 12px ) * 1.2 );
}

.arb-resume__name {
	margin: 0 0 2px;
	font-size: 1.9em;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: 0.2px;
	color: var( --arb-accent, #1a1a1a );
	/* Long names must wrap rather than overflow the page. */
	overflow-wrap: anywhere;
}

.arb-resume__headline {
	margin: 0 0 4px;
	font-size: 1.05em;
	font-weight: 600;
	color: #333;
	overflow-wrap: anywhere;
}

.arb-resume__contact {
	margin: 0;
	font-size: 0.9em;
	color: #333;
	overflow-wrap: anywhere;
}

.arb-resume__contact a {
	color: inherit;
	text-decoration: none;
}

.arb-sep {
	margin: 0 6px;
	color: #999;
}

/* ---------- Sections ---------- */

.arb-section {
	margin: 0 0 var( --arb-gap, 12px );
	/* Never leave a heading stranded at the foot of a page. */
	break-inside: auto;
}

.arb-section__title {
	margin: 0 0 4px;
	font-size: 0.95em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.9px;
	color: var( --arb-accent, #1a1a1a );
	break-after: avoid;
	page-break-after: avoid;
}

.arb-section__body {
	margin: 0;
}

.arb-section__body > p {
	margin: 0 0 4px;
}

/* ---------- Entries ---------- */

.arb-entry {
	margin: 0 0 calc( var( --arb-gap, 12px ) * 0.6 );
	/* Keep a single job or qualification together where it fits on one page. */
	break-inside: avoid;
	page-break-inside: avoid;
}

.arb-entry:last-child {
	margin-bottom: 0;
}

.arb-entry__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.arb-entry__title {
	margin: 0;
	font-size: 1em;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.arb-entry__title a {
	color: inherit;
	text-decoration: none;
}

.arb-entry__dates {
	flex: 0 0 auto;
	font-size: 0.88em;
	color: #555;
	white-space: nowrap;
}

.arb-entry__meta {
	margin: 0 0 2px;
	font-size: 0.92em;
	font-style: italic;
	color: #444;
	overflow-wrap: anywhere;
}

.arb-entry__desc {
	margin: 0 0 3px;
}

/* ---------- Lists ---------- */

.arb-list {
	margin: 2px 0 0;
	padding-left: 1.1em;
	list-style: disc;
}

.arb-list li {
	margin: 0 0 2px;
	orphans: 2;
	widows: 2;
	overflow-wrap: anywhere;
}

.arb-skills {
	margin: 0;
	padding: 0;
	list-style: none;
}

.arb-skills__group {
	margin: 0 0 2px;
	overflow-wrap: anywhere;
}

.arb-skills__label {
	font-weight: 700;
}

/* ---------- Two column ---------- */

.arb-resume__cols {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.arb-resume__main {
	flex: 1 1 auto;
	min-width: 0;
}

.arb-resume__side {
	flex: 0 0 32%;
	min-width: 0;
}

/* ---------- Template: Classic ATS ---------- */

.arb-tpl-classic-ats .arb-section__title {
	border-bottom: 1px solid #444;
	padding-bottom: 2px;
}

/* ---------- Template: Modern ATS ---------- */

.arb-tpl-modern-ats .arb-section__title {
	border-bottom: 2px solid var( --arb-accent, #1f4e79 );
	padding-bottom: 3px;
}

.arb-tpl-modern-ats .arb-resume__header {
	border-bottom: 2px solid var( --arb-accent, #1f4e79 );
	padding-bottom: 8px;
}

/* ---------- Template: Compact ---------- */

.arb-tpl-compact .arb-section__title {
	border-bottom: 1px solid #999;
	padding-bottom: 1px;
	letter-spacing: 0.6px;
}

.arb-tpl-compact .arb-entry {
	margin-bottom: 5px;
}

.arb-tpl-compact .arb-list {
	padding-left: 1em;
}

/* ---------- Template: Executive ---------- */

.arb-tpl-executive .arb-resume__name {
	font-size: 2.1em;
	letter-spacing: 1px;
	text-align: center;
}

.arb-tpl-executive .arb-resume__headline,
.arb-tpl-executive .arb-resume__contact {
	text-align: center;
}

.arb-tpl-executive .arb-resume__header {
	border-bottom: 1px solid var( --arb-accent, #243b53 );
	padding-bottom: 10px;
}

.arb-tpl-executive .arb-section__title {
	text-align: center;
	letter-spacing: 2px;
	border-bottom: 1px solid #ccc;
	padding-bottom: 3px;
}

/* ---------- Template: Fresher ---------- */

.arb-tpl-fresher .arb-section__title {
	border-left: 3px solid var( --arb-accent, #0b6b3a );
	padding-left: 6px;
}

.arb-tpl-fresher .arb-resume__name {
	font-size: 1.8em;
}

/* ---------- Template: Creative ---------- */

.arb-tpl-creative .arb-resume__header {
	background: var( --arb-accent, #6d28d9 );
	color: #fff;
	padding: 12px 14px;
	margin: -4px -4px 14px;
	border-radius: 3px;
}

.arb-tpl-creative .arb-resume__name,
.arb-tpl-creative .arb-resume__headline,
.arb-tpl-creative .arb-resume__contact,
.arb-tpl-creative .arb-resume__contact a {
	color: #fff;
}

.arb-tpl-creative .arb-resume__side {
	background: #f6f4fb;
	padding: 10px 12px;
	border-radius: 3px;
}

.arb-tpl-creative .arb-section__title {
	color: var( --arb-accent, #6d28d9 );
}

/* ---------- Print ---------- */

@media print {
	.arb-print-body {
		background: #fff;
	}

	.arb-page {
		width: auto;
		margin: 0;
		padding: 0;
		box-shadow: none;
	}

	.arb-resume a {
		/* Links stay clickable in PDF; underline is noise on paper. */
		text-decoration: none;
		color: inherit;
	}

	.arb-section {
		break-inside: auto;
	}

	.arb-entry {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.arb-section__title {
		break-after: avoid;
		page-break-after: avoid;
	}

	.arb-tpl-creative .arb-resume__header,
	.arb-tpl-creative .arb-resume__side {
		/* Backgrounds are part of this template's identity, so force them. */
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* ---------- Small screens (preview only) ---------- */

@media screen and ( max-width: 820px ) {
	.arb-page {
		width: 100%;
		padding: 16px;
	}

	.arb-resume__cols {
		display: block;
	}

	.arb-resume__side {
		margin-top: 14px;
	}

	.arb-entry__head {
		display: block;
	}

	.arb-entry__dates {
		display: block;
		white-space: normal;
	}
}
