/*
 * Print styles for the About page. Produces a clean A4 document of the
 * biography and CV (the selected press is part of the CV).
 */

@page {
	size: A4;
	margin: 12mm 12mm 12mm 36mm;
}

/*
 * Smaller base size for print. The bio and CV are sized in rem, so lowering the
 * root size scales the whole document down together.
 */
html {
	font-size: 9.5pt;
}

.t-about {
	background: #fff !important;
	color: #000 !important;
	/* Use the same site fonts in print: Suisse Intl for the body (the CV keeps
	   Suisse Works from site.css). */
	font-family: var(--font-main);
}

/* Hide interface chrome when printing. */
.t-about .site-header,
.t-about .site-footer {
	display: none !important;
}

.t-about .about {
	max-width: none;
	margin: 0;
	padding: 0;
}

.t-about .bio {
	margin-top: 0;
}

.t-about .cv {
	margin-top: 6mm;
}

/*
 * Browsers ignore break-inside on table rows and row groups (<tbody>/<tr>), so
 * for print the CV is re-laid-out as block sections with flex rows instead of a
 * table. With real block boxes the page-break rules below are actually honoured,
 * so a section is kept whole and pushed to the next page rather than splitting
 * mid-list. The flex rows preserve the year/text two-column alignment the table
 * gives on screen (a fixed year column keeps every entry's text aligned).
 */
.t-about .cv-table,
.t-about .cv-section-group {
	display: block;
}

.t-about .cv-row {
	display: flex;
	align-items: flex-start;
}

.t-about .cv-year {
	flex: 0 0 6.4rem;
}

.t-about .cv-text {
	flex: 1 1 auto;
}

/*
 * Keep each CV section (its heading and all its rows) together on one page. If a
 * section does not fit in the space left on the current page, it breaks BEFORE
 * the heading and starts on the next page, rather than splitting mid-section.
 */
.t-about .cv-section-group {
	page-break-inside: avoid;
	break-inside: avoid;
}

/* Never split a single entry across pages, and never strand a section heading
   at the very bottom of a page. */
.t-about .cv-row {
	page-break-inside: avoid;
	break-inside: avoid;
}

.t-about .cv-section {
	page-break-after: avoid;
	break-after: avoid;
}

.t-about a {
	color: #000;
	text-decoration: none;
}
