:root {
	color-scheme: light;
	--ink: #1f2937;
	--muted: #4b5563;
	--line: #d1d5db;
	--bg: #f8fafc;
	--paper: #ffffff;
	--text-line-height: 1.6;
}

* {
	box-sizing: border-box;
}
body {
	margin: 0;
	padding: 0;
	font-family: Arial, Helvetica, sans-serif;
	line-height: var(--text-line-height);
	color: var(--ink);
	background: var(--paper);
}
main {
	max-width: 900px;
	margin: 0 auto;
	background: var(--paper);
	padding: 24px 0 48px;
}
h1,
h2,
h3,
h4 {
	line-height: 1.25;
}
h1 {
	margin: 0 0 8px;
	font-size: 38px;
}
h1 + p {
	margin-bottom: 14px;
	line-height: 1.5;
}
h1 + p strong {
	display: inline-block;
}
h1 + p strong:first-of-type {
	font-size: 21px;
	font-weight: 650;
}
h1 + p strong:last-of-type {
	color: var(--muted);
	font-size: 16px;
	font-weight: 600;
}
h2 {
	margin: 28px 0 10px;
	font-size: 20px;
	border-bottom: 1px solid var(--line);
	padding-bottom: 6px;
}
h3,
h4 {
	margin: 18px 0 4px;
	font-size: 16px;
	color: var(--ink);
	font-weight: 650;
}
h3 + p:has(> strong:only-child),
h4 + p:has(> strong:only-child),
h3 + p:has(> em:only-child) + p:has(> strong:only-child) {
	margin-bottom: 10px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
}
h3 + p:has(> em:only-child),
h4 + p:has(> em:only-child) {
	margin-bottom: 4px;
	color: var(--muted);
	font-size: 13px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.5;
}
h3 + p:has(> em:only-child) em,
h4 + p:has(> em:only-child) em {
	font-style: normal;
}
h3 + p:has(> strong:only-child) strong,
h4 + p:has(> strong:only-child) strong,
h3 + p:has(> em:only-child) + p:has(> strong:only-child) strong {
	font-weight: 500;
}
p {
	margin: 0 0 12px;
}
ul {
	margin: 8px 0 10px 20px;
	padding: 0;
}
li {
	margin-bottom: 8px;
}
.meta {
	color: var(--muted);
	margin-bottom: 18px;
}
.contact {
	margin-bottom: 16px;
}
.contact a,
.project-card a,
.top-link a {
	color: #0f6cbd;
	text-decoration: none;
}
.contact a:hover,
.project-card a:hover,
.top-link a:hover {
	text-decoration: underline;
}
.skills {
	display: grid;
	gap: 6px;
}
.skills strong {
	color: var(--ink);
}
.job,
.project-card {
	margin-bottom: 20px;
}
.subtitle {
	margin: 0 0 6px;
	color: var(--muted);
	font-style: italic;
}
.job .dates,
.project-card .tag-list {
	color: var(--muted);
}
.project-grid {
	display: grid;
	gap: 16px;
}
.project-card {
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 18px;
	background: var(--bg);
}
.project-card h3 {
	margin-top: 0;
}
.project-card p {
	margin-bottom: 12px;
}
.project-card .tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 0.95em;
}
.project-card .tag {
	padding: 4px 8px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
}
.hero {
	padding: 24px 20px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fff;
	margin-bottom: 28px;
}
.hero p {
	margin: 0 0 14px;
}
.hero .intro-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
}
.hero .intro-links a {
	display: inline-block;
}
.project-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.top-link,
.page-nav {
	margin-top: 24px;
}
.page-nav {
	margin-bottom: 24px;
}
.page-nav a {
	color: #0f6cbd;
	text-decoration: none;
}
.page-nav a:hover {
	text-decoration: underline;
}

/* Case studies use an article hierarchy independent from the CV layout. */
.case-study-page {
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
		sans-serif;
	font-size: 16px;
	line-height: var(--text-line-height);
}
.case-study-page main {
	max-width: 780px;
}
.case-study-page h1 {
	margin: 0 0 12px;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.025em;
}
.case-study-page h1 + p {
	margin: 0 0 30px;
	color: var(--muted);
	font-size: 18px;
	line-height: var(--text-line-height);
}
.case-study-page h2 {
	margin: 34px 0 12px;
	padding-bottom: 7px;
	font-size: 22px;
	font-weight: 650;
	line-height: 1.25;
}
.case-study-page h3,
.case-study-page h4 {
	margin: 24px 0 8px;
	font-size: 17px;
	font-weight: 650;
	line-height: 1.5;
}
.case-study-page p {
	margin-bottom: 14px;
}
.case-study-page ul {
	margin: 10px 0 18px 22px;
}
.case-study-page li {
	margin-bottom: 8px;
}
.case-study-page .page-nav {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.5;
}
@media (max-width: 900px) {
	.project-grid {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 700px) {
	main {
		padding: 18px 16px 36px;
	}
	.case-study-page h1 {
		font-size: 30px;
	}
	.case-study-page h1 + p {
		font-size: 17px;
	}
}
