/* Palette: monochrome. Ink on paper in light mode, paper on near-black in dark mode. */
:root {
	--bg: #fafafa;
	--surface: #ffffff;
	--ink: #111111;
	--muted: #5c5c5c;
	--border: #e3e3e3;
	--accent: #111111;
	--on-accent: #fafafa;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0d0d0d;
		--surface: #171717;
		--ink: #f2f2f2;
		--muted: #a3a3a3;
		--border: #2a2a2a;
		--accent: #f2f2f2;
		--on-accent: #0d0d0d;
	}
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
}

main {
	max-width: 44rem;
	margin: 0 auto;
	padding: 0 1.25rem 2.5rem;
}

a {
	color: var(--accent);
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.1;
}

h2 {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin-bottom: 0.875rem;
}

h3 {
	font-size: 1.1875rem;
	font-weight: 750;
}

p {
	margin: 0 0 0.75rem;
}

section {
	padding: 2.25rem 0;
	border-top: 1px solid var(--border);
}

.muted {
	color: var(--muted);
}

/* Hero */

.hero {
	padding: 3rem 0 2.5rem;
}

.identity {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.photo {
	flex: none;
	width: 4.75rem;
	height: 4.75rem;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

h1 {
	font-size: clamp(2.5rem, 10vw, 4.75rem);
	font-weight: 850;
	letter-spacing: -0.04em;
	line-height: 0.92;
}

.headline {
	margin-top: 2rem;
	font-size: clamp(1.25rem, 4vw, 1.5rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.3;
	margin-bottom: 0.375rem;
}

.subline {
	color: var(--muted);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.5rem 0 1rem;
}

.button {
	display: inline-flex;
	flex: 0 1 auto;
	align-items: center;
	justify-content: center;
	min-height: 2.875rem;
	padding: 0.5rem 1.5rem;
	border: 2px solid var(--accent);
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

.button:hover {
	background: transparent;
	color: var(--accent);
}

.contact-inline {
	display: flex;
	flex-wrap: wrap;
	column-gap: 1.25rem;
	margin: 0;
}

.contact-inline a {
	padding: 0.5rem 0;
}

/* About */

.tools {
	color: var(--muted);
	font-size: 0.9375rem;
}

.label {
	color: var(--ink);
	font-weight: 700;
}

/* Checksum */

.role {
	margin-bottom: 0.25rem;
}

.stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	margin: 1.5rem 0;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: 1rem;
	overflow: hidden;
}

.stats div {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	padding: 1rem 1.125rem;
	background: var(--surface);
}

.stats dd {
	margin: 0;
	font-size: clamp(1.625rem, 6vw, 2.125rem);
	font-weight: 850;
	letter-spacing: -0.03em;
	line-height: 1.1;
	font-variant-numeric: lining-nums tabular-nums;
}

.stats dt {
	color: var(--muted);
	font-size: 0.875rem;
	line-height: 1.35;
	margin-top: 0.25rem;
}

.work {
	margin: 0;
	padding-left: 1.25rem;
}

.work li + li {
	margin-top: 0.625rem;
}

.work li::marker {
	color: var(--accent);
}

/* Projects */

.project {
	padding: 1.25rem 1.25rem 1.25rem 1.125rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: 0.5rem 1rem 1rem 0.5rem;
}

.project .muted {
	font-size: 0.9375rem;
	margin: 0.25rem 0 0.625rem;
}

.project p:last-child {
	margin-bottom: 0;
}

/* Wider screens */

@media (min-width: 40rem) {
	.hero {
		padding: 5rem 0 3rem;
	}

	.identity {
		gap: 1.5rem;
	}

	.photo {
		width: 6.5rem;
		height: 6.5rem;
	}

	.stats {
		grid-template-columns: repeat(4, 1fr);
	}
}
