/*
	cv.css — CV page styling for goodrygubbels.com / goodry.name

	Deliberately standalone: it does NOT load main.css or custom.css.
	Those carry the nav, the hero photo, the wireframe globe and the
	off-canvas menu, none of which belong on a page whose main job is
	to print cleanly to A4. Instead this file re-declares the same
	tokens, so the CV is visually the site's sibling without inheriting
	its weight.

	Tokens copied verbatim from custom.css :root — keep them in sync if
	the site palette ever changes.

	Print notes: every structural mark (timeline rail, milestone dots,
	section rules) is drawn with BORDERS, not background-colour. Browsers
	drop background graphics from print output by default, so a rail built
	from a background gradient would vanish on paper. Borders always print.
*/

:root {
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--bg: #e9edf7;
	--bg-alt: #dbe3f4;
	--card: #ffffff;
	--fg: #161a2c;
	--fg-light: rgba(22, 26, 44, 0.62);
	--border: rgba(22, 26, 44, 0.14);

	--accent: #2454d6;
	/* Hover / secondary accent. Dutch orange rather than the site's purple —
	   a deliberate nod on the CV, and it reads clearly against both the
	   white bar and the accent-blue button. */
	--accent-2: #e97132;
	--accent-dark: #131a4a;
	--accent-tint: rgba(36, 84, 214, 0.1);

	--hero-1: #15204c;
}

/* ============================================================ Base */

*, *:before, *:after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 3em 1.5em 4em 1.5em;
	background-color: var(--bg);
	color: var(--fg);
	font-family: var(--font-body);
	font-size: 16.5px;
	line-height: 1.65;
}

p { margin: 0 0 1.15em 0; }
p:last-child { margin-bottom: 0; }

a {
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid rgba(36, 84, 214, 0.35);
}

a:hover { color: var(--accent-2); }

a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ================================================== The sheet */

.sheet {
	max-width: 52em;
	margin: 0 auto;
	background-color: var(--card);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(22, 26, 44, 0.14);
}

/* Title band — the site's page-title treatment (navy, cosmic glows,
   diagonal lower edge) with the photograph removed. The gradients are
   pure CSS, so this costs no image request and nothing to print. */
.sheet__head {
	position: relative;
	padding: 3.25em 2.75em 4.75em 2.75em;
	background-color: var(--hero-1);
	background-image:
		radial-gradient(circle at 15% 20%, rgba(124, 58, 237, 0.22), transparent 38%),
		radial-gradient(circle at 88% 76%, rgba(36, 84, 214, 0.55), transparent 52%),
		linear-gradient(135deg, rgba(21, 32, 76, 0.72) 0%, rgba(18, 26, 66, 0.8) 60%, rgba(12, 16, 44, 0.9) 100%);
	-webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.75em), 0 100%);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.75em), 0 100%);
	margin-bottom: -2.5em;
}

.sheet__head-inner {
	display: flex;
	align-items: flex-start;
	gap: 2.25em;
}

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

/* Portrait — the site's .avatar--hero treatment: circular, soft white ring. */
.avatar {
	flex: 0 0 auto;
	width: 8.25em;
	height: 8.25em;
	border-radius: 50%;
	object-fit: cover;
	object-position: center 6%;
	border: 4px solid rgba(255, 255, 255, 0.55);
}

.sheet__name {
	margin: 0 0 0.55em 0;
	font-family: var(--font-heading);
	font-size: 2.1em;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.3;
	text-transform: uppercase;
	color: #ffffff;
}

/* The two-tone title device from the site: surname in the pale accent. */
.accent-word--on-dark {
	color: #dbe7ff;
	font-weight: 200;
}

.sheet__role {
	margin: 0 0 1.4em 0;
	font-size: 1.02em;
	color: rgba(255, 255, 255, 0.92);
	letter-spacing: 0.02em;
}

.contact {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55em 1.6em;
	margin: 0;
	padding: 1.2em 0 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	font-size: 0.88em;
	color: rgba(255, 255, 255, 0.88);
}

.contact a {
	color: #dbe7ff;
	border-bottom-color: rgba(219, 231, 255, 0.4);
}

.contact a:hover { color: #ffffff; }

.sheet__body {
	position: relative;
	padding: 3.5em 2.75em 3.25em 2.75em;
}

/* ================================================== Sections */

.section { margin: 0 0 3em 0; }
.section:last-child { margin-bottom: 0; }

.section__title {
	margin: 0 0 1.6em 0;
	padding-bottom: 0.7em;
	border-bottom: 2px solid var(--border);
	font-family: var(--font-heading);
	font-size: 1.1em;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--fg);
}

/* Focus-area chips, lifted from the site's expertise tags. */
ul.tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	padding: 0;
	margin: 1.6em 0 0 0;
}

ul.tags li {
	border: 1px solid rgba(36, 84, 214, 0.3);
	border-radius: 999px;
	padding: 0.4em 0.95em;
	font-size: 0.8em;
	line-height: 1.35;
	color: var(--accent);
}

/* ================================================== Career timeline */

.career {
	list-style: none;
	margin: 0;
	padding: 0 0 0 2.4em;
	position: relative;
	border-left: 2px solid rgba(36, 84, 214, 0.28);
}

.career__item {
	position: relative;
	margin: 0 0 2.4em 0;
}

.career__item:last-child { margin-bottom: 0; }

/* Milestone dot — a ring rather than a filled disc, so it survives a
   print with background graphics switched off. */
.career__item:before {
	content: '';
	position: absolute;
	left: -2.76em;
	top: 0.35em;
	width: 0.72em;
	height: 0.72em;
	border-radius: 50%;
	border: 3px solid var(--accent);
	background-color: var(--card);
}

.career__years {
	display: block;
	font-size: 0.76em;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 0.35em 0;
}

.career__title {
	margin: 0 0 0.25em 0;
	font-family: var(--font-heading);
	font-size: 1.12em;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.35;
	color: var(--fg);
}

.career__org {
	display: block;
	margin: 0 0 0.9em 0;
	font-size: 0.88em;
	color: var(--fg-light);
}

.career__org strong {
	color: var(--fg);
	font-weight: 600;
}

/* ================================================== Education & certs */

.facts {
	margin: 0;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 0.55em 1.4em;
	align-items: baseline;
}

.facts dt {
	font-weight: 600;
	color: var(--fg);
}

.facts dd {
	margin: 0;
	color: var(--fg-light);
}

.facts .facts__when {
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
	white-space: nowrap;
	text-align: right;
}

.subhead {
	margin: 2em 0 1em 0;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fg-light);
}

.subhead:first-child { margin-top: 0; }

/* ================================================== Responsive */

@media screen and (max-width: 736px) {
	body {
		padding: 0;
		font-size: 15.5px;
	}

	.sheet {
		border-radius: 0;
		box-shadow: none;
	}

	.sheet__head {
		padding: 2.5em 1.5em 3.75em 1.5em;
	}

	/* Stack the portrait above the name rather than squeezing both onto a
	   narrow row. */
	.sheet__head-inner {
		flex-direction: column-reverse;
		align-items: flex-start;
		gap: 1.25em;
	}

	.avatar {
		width: 5.5em;
		height: 5.5em;
	}

	.sheet__name {
		font-size: 1.5em;
		letter-spacing: 0.16em;
	}

	.sheet__body {
		padding: 2.5em 1.5em 2.5em 1.5em;
	}

	.career {
		padding-left: 1.6em;
	}

	.career__item:before {
		left: -1.96em;
		width: 0.6em;
		height: 0.6em;
		border-width: 2px;
	}

	.facts {
		grid-template-columns: 1fr;
		gap: 0.15em;
	}

	.facts .facts__when { text-align: left; }
	.facts dd { margin-bottom: 0.7em; }
}


/* ================================================== Action bar

   Fixed to the TOP, full width, and deliberately white: the page background
   is pale and the title band directly below is navy, so a light bar reads as
   a separate control strip against both. A tinted bar disappeared into one or
   the other. Never printed. */

.cv-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.7em 1.5em;
	background-color: #ffffff;
	border-bottom: 3px solid var(--accent);
	box-shadow: 0 2px 14px rgba(22, 26, 44, 0.16);
	font-size: 0.9em;
}

/* Clear the fixed bar. */
body { padding-top: 5.5em; }

.cv-bar a,
.cv-bar button {
	display: inline-flex;
	margin: 0;
	background: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	align-items: center;
	gap: 0.5em;
	padding: 0.55em 1.15em;
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--fg);
	font-family: var(--font-body);
	font-size: 1em;
	line-height: 1.3;
	white-space: nowrap;
	text-decoration: none;
}

.cv-bar a:hover,
.cv-bar button:hover {
	background-color: var(--accent-tint);
	color: var(--accent);
}

.cv-bar a:focus-visible,
.cv-bar button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* The download is the reason the bar exists — solid accent, and it stays
   solid on hover rather than fading into the white. */
.cv-bar .cv-bar__go {
	background-color: var(--accent);
	border-color: var(--accent);
	color: #ffffff;
	font-weight: 600;
}

.cv-bar .cv-bar__go:hover {
	background-color: var(--accent-2);
	border-color: var(--accent-2);
	color: #ffffff;
}

/* Down-arrow, drawn in CSS so it costs no icon font or image. */
.cv-bar__go:before {
	content: '';
	width: 0.5em;
	height: 0.5em;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg) translate(0.12em, -0.12em);
}

/* Icons. The flag needs a hairline: its white stripe would otherwise bleed
   into the white bar and the shape would read wrong. */
.cv-bar .flag {
	flex: 0 0 auto;
	width: 1.35em;
	height: 0.9em;
	border-radius: 2px;
	border: 1px solid var(--border);
	object-fit: cover;
}

.cv-bar .ico {
	flex: 0 0 auto;
	width: 1em;
	height: 1em;
}

.cv-bar__sep {
	width: 1px;
	height: 1.7em;
	background-color: var(--border);
}

@media screen and (max-width: 736px) {
	.cv-bar {
		gap: 0.25em;
		padding: 0.55em 0.75em;
		font-size: 0.8em;
	}

	.cv-bar a,
	.cv-bar button { padding: 0.5em 0.8em; }

	body { padding-top: 4.2em; }
}


/* ================================================== Download gate

   A modal, not an inline reveal: the trigger lives in a fixed bar at the top
   of the viewport, so expanding a form inside that bar would push the page
   around. Same arithmetic check as work-cv.html, self-contained here because
   this page deliberately does not load the site's custom.js. */

.gate {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5em;
	background-color: rgba(19, 26, 74, 0.55);
}

.gate[hidden] { display: none; }

.gate__panel {
	width: 100%;
	max-width: 25em;
	padding: 2em;
	background-color: var(--card);
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(22, 26, 44, 0.35);
}

.gate__title {
	margin: 0 0 0.5em 0;
	font-family: var(--font-heading);
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--fg);
}

.gate__why {
	margin: 0 0 1.4em 0;
	font-size: 0.86em;
	color: var(--fg-light);
}

.gate__label {
	display: block;
	margin: 0 0 0.6em 0;
	font-size: 0.95em;
	color: var(--fg);
}

.gate__sum {
	font-weight: 700;
	color: var(--accent);
}

.gate__row {
	display: flex;
	gap: 0.6em;
}

.gate__input {
	flex: 0 0 5em;
	padding: 0.6em 0.8em;
	border: 1px solid var(--border);
	border-radius: 6px;
	background-color: #ffffff;
	color: var(--fg);
	font-family: var(--font-body);
	font-size: 1em;
	text-align: center;
}

.gate__input:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
	border-color: var(--accent);
}

.gate__unlock,
.gate__cancel {
	padding: 0.6em 1.2em;
	border: 1px solid transparent;
	border-radius: 6px;
	font-family: var(--font-body);
	font-size: 0.95em;
	cursor: pointer;
}

.gate__unlock {
	flex: 1 1 auto;
	background-color: var(--accent);
	color: #ffffff;
	font-weight: 600;
}

.gate__unlock:hover { background-color: var(--accent-2); }

.gate__cancel {
	margin-top: 1em;
	padding: 0;
	background: none;
	border: 0;
	color: var(--fg-light);
	font-size: 0.85em;
	text-decoration: underline;
}

.gate__cancel:hover { color: var(--accent); }

.gate__error {
	margin: 0.9em 0 0 0;
	font-size: 0.86em;
	color: #b3261e;
}

.gate__error[hidden] { display: none; }

/* ================================================== Print / PDF */

@page {
	size: A4;
	margin: 14mm 15mm;
}

@media print {
	/* The bar is a screen control. It must never reach paper. */
	.cv-bar,
	.gate { display: none !important; }

	body {
		background: #ffffff;
		padding: 0;
		font-size: 10pt;
		line-height: 1.45;
		color: #000000;
	}

	.sheet {
		max-width: none;
		margin: 0;
		border-radius: 0;
		box-shadow: none;
		background: #ffffff;
	}

	/* The navy band becomes a white masthead on paper. Printing a large
	   dark block wastes toner, depends on the reader ticking "background
	   graphics", and reads as heavy on A4 — the accent rule carries the
	   same identity at a fraction of the ink. */
	.sheet__head {
		padding: 0 0 0.9em 0;
		margin: 0 0 1.6em 0;
		background: none;
		border-bottom: 3px solid var(--accent);
		-webkit-clip-path: none;
		clip-path: none;
	}

	/* The portrait shrinks on paper. Some recruiters and most applicant
	   tracking systems strip images entirely, so nothing here depends on it. */
	.avatar {
		width: 5.5em;
		height: 5.5em;
		border: 1px solid #999999;
	}

	.sheet__name {
		font-size: 1.7em;
		color: #000000;
		margin-bottom: 0.3em;
	}

	.accent-word--on-dark { color: var(--accent); }

	.sheet__role {
		color: #333333;
		margin-bottom: 0.7em;
		font-size: 1em;
	}

	.contact {
		border-top: 0;
		padding-top: 0;
		color: #333333;
		gap: 0.3em 1.2em;
		font-size: 0.85em;
	}

	.contact a { color: #333333; border-bottom: 0; }

	.sheet__body { padding: 0; }

	p { margin-bottom: 0.8em; }

	.section { margin-bottom: 1.35em; }

	.section__title {
		margin-bottom: 0.85em;
		padding-bottom: 0.4em;
		font-size: 1em;
		color: #000000;
	}

	/* Keep a heading with the block it introduces. */
	.section__title,
	.career__years,
	.career__title,
	.subhead {
		break-after: avoid;
		page-break-after: avoid;
	}

	/* A role is never split across a page break, and a section never starts
	   halfway down one: any entry that doesn't fit moves whole to the next
	   page. This trades trailing white space for clean page tops — the
	   deliberate choice here. */
	.career__item {
		margin-bottom: 1.15em;
		break-inside: avoid;
		page-break-inside: avoid;
		orphans: 3;
		widows: 3;
	}

	.section {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	/* Experience is far too long to keep whole — it is the one section
	   allowed to run across pages, role by role. */
	.section--experience {
		break-inside: auto;
		page-break-inside: auto;
	}

	.career__item:before { border-width: 2px; }

	/* Education / certifications / languages are short lists — never let
	   one straddle a page break. */
	.facts {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.career__org { margin-bottom: 0.5em; }

	ul.tags { margin-top: 1em; }
	ul.tags li { font-size: 0.78em; padding: 0.2em 0.7em; }

	a { color: #000000; border-bottom: 0; }
}
