/* arendhosman.nl. Plain modern CSS, no build step.
   No CSS nesting: it breaks the layout in Safari < 17.2 and Chrome < 120. */

@font-face {
	font-family: "Bricolage Grotesque";
	src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
	font-weight: 200 800;
	font-stretch: 75% 100%;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* Brand orange from the original site. White on it passes 3:1, so it is used for large type and graphics only. */
	--oranje: #ea6900;
	/* Shadow brown taken from the duotone portrait. 5.5:1 on oranje, used for all running text. */
	--espresso: #2a1300;
	--wit: #ffffff;
	--spine: rgb(255 255 255 / 0.55);

	--font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
	--gutter: clamp(1rem, 5vw, 4rem);
	--portrait-width: 42vw;

	color-scheme: light;
}

/* Reset */

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

body, h1, h2, h3, p, ol, ul, dl, dd, figure {
	margin: 0;
}

img, picture {
	display: block;
	max-inline-size: 100%;
	block-size: auto;
}

/* Base */

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

body {
	min-block-size: 100vh;
	min-block-size: 100dvh;
	padding: var(--gutter);
	background: var(--oranje);
	color: var(--espresso);
	font-family: var(--font);
	font-size: 1.0625rem;
	font-optical-sizing: auto;
	line-height: 1.5;
}

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

a:hover {
	text-decoration-thickness: 0.16em;
}

:focus-visible {
	outline: 3px solid var(--wit);
	outline-offset: 3px;
	border-radius: 2px;
}

abbr[title] {
	text-decoration: none;
}

h2 {
	margin-block-end: 1.25rem;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
}

.visually-hidden {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Masthead: logo, role and portrait */

.masthead {
	display: grid;
	gap: 0.5rem;
	margin-block-end: 3rem;
}

.masthead h1 img {
	inline-size: clamp(12rem, 22vw, 19rem);
}

.masthead .role {
	color: var(--wit);
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	font-weight: 600;
	font-stretch: 85%;
	line-height: 1.1;
}

.masthead .intro {
	max-inline-size: 36em;
	margin-block-start: 1rem;
	font-size: 1.125rem;
}

.portrait img {
	inline-size: calc(100% + 2 * var(--gutter));
	max-inline-size: none;
	aspect-ratio: 4 / 3;
	margin-block-start: 1.5rem;
	margin-inline: calc(-1 * var(--gutter));
	object-fit: cover;
	object-position: 50% 18%;
}

/* Main content: timeline beside the sidebar when there is room */

.sheet {
	container-type: inline-size;
}

@container (min-width: 46rem) {
	.sheet-inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 14rem;
		gap: 4rem;
	}
}

/* Timeline: a white spine with a year disc for each role */

.timeline {
	--disc: 4.5rem;
	position: relative;
	padding: 0;
	list-style: none;
}

.timeline::before {
	content: "";
	position: absolute;
	inset-block: calc(var(--disc) / 2) 0;
	inset-inline-start: calc(var(--disc) / 2 - 1.5px);
	border-inline-start: 3px solid var(--spine);
}

.timeline > li {
	position: relative;
	min-block-size: var(--disc);
	padding-inline-start: calc(var(--disc) + 1.25rem);
	padding-block-end: 2.75rem;
}

.timeline > li:last-child {
	padding-block-end: 0;
}

.timeline time {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	display: grid;
	place-items: center;
	inline-size: var(--disc);
	block-size: var(--disc);
	border-radius: 50%;
	background: var(--wit);
	color: var(--oranje);
	font-size: 1.5rem;
	font-weight: 800;
	font-stretch: 75%;
	font-variant-numeric: lining-nums tabular-nums;
	letter-spacing: -0.01em;
}

.timeline h3 {
	padding-block-start: 0.6rem;
	color: var(--wit);
	font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
	font-weight: 700;
	font-stretch: 85%;
	line-height: 1.1;
}

.timeline .org {
	margin-block: 0.25rem 0.5rem;
	font-weight: 650;
}

.timeline p, .timeline ul {
	max-inline-size: 36em;
}

.timeline-list {
	margin-block-start: 0.5rem;
	padding-inline-start: 1.1em;
}

.timeline-list > li + li {
	margin-block-start: 0.5rem;
}

/* Sidebar: skills and contact */

.sidebar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	align-content: start;
	gap: 3rem 4rem;
	margin-block-start: 3.5rem;
}

@container (min-width: 46rem) {
	.sidebar {
		margin-block-start: 0;
	}
}

.sidebar h3 {
	margin-block: 1.5rem 0.5rem;
	font-size: 1rem;
	font-weight: 700;
}

.sidebar h2 + h3 {
	margin-block-start: 0;
}

.skills {
	display: grid;
	gap: 0.2rem;
	padding: 0;
	list-style: none;
}

/* Wide screens: portrait pinned to the right edge, as on the original site */

@media (min-width: 64rem) {
	body {
		padding-inline-end: calc(var(--portrait-width) + var(--gutter));
	}

	.portrait img {
		position: fixed;
		inset-block-end: 0;
		inset-inline-end: 0;
		inline-size: var(--portrait-width);
		block-size: 100vh;
		block-size: 100dvh;
		margin: 0;
		aspect-ratio: auto;
		object-position: 50% 0;
	}
}

/* 404 page: no portrait, so it uses the full width */

body.not-found {
	padding-inline-end: var(--gutter);
}

.not-found .masthead img {
	inline-size: clamp(12rem, 22vw, 19rem);
}

.not-found h1 {
	margin-block-end: 1rem;
	color: var(--wit);
	font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
	font-weight: 800;
	font-stretch: 85%;
	line-height: 1.1;
}

.not-found p + p {
	margin-block-start: 0.5rem;
}

@media print {
	body {
		padding: 0;
		background: none;
		color: #000;
	}

	.portrait {
		display: none;
	}

	.masthead h1 img {
		filter: brightness(0);
	}

	.masthead .role, .timeline h3 {
		color: #000;
	}

	.timeline time {
		border: 2px solid #000;
	}
}
