:root {
	--bg: #faf8f4;
	--surface: #ffffff;
	--text: #1f2321;
	--muted: #5d6460;
	--border: #e3dfd6;
	--accent: #2f6b4f;
	--accent-ink: #ffffff;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #151816;
		--surface: #1c201e;
		--text: #e6e8e4;
		--muted: #a2a9a4;
		--border: #2e3431;
		--accent: #7cc3a0;
		--accent-ink: #10231a;
	}
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 1.0625rem/1.65 var(--sans);
	-webkit-text-size-adjust: 100%;
}

.wrap {
	max-width: 46rem;
	margin: 0 auto;
	padding: 0 1rem;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; }

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}
.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 1.25rem;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}
.site-header .name {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 1.125rem;
	color: var(--text);
	text-decoration: none;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.site-header nav a:hover { color: var(--text); }

/* Sections */
section { padding: 3rem 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }
h2 { font-size: 1.75rem; margin: 0 0 1rem; }

.intro { padding-top: 4rem; }
.eyebrow {
	margin: 0 0 0.75rem;
	color: var(--muted);
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.intro h1 { font-size: clamp(2.25rem, 7vw, 3.25rem); margin: 0 0 1rem; }
.lead { font-size: 1.1875rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.button {
	display: inline-block;
	padding: 0.55rem 1.1rem;
	border: 1px solid var(--accent);
	border-radius: 999px;
	font-size: 0.9375rem;
	text-decoration: none;
}
.button.primary { background: var(--accent); color: var(--accent-ink); }

/* Toolbox */
.toolbox {
	display: grid;
	gap: 0.75rem;
	margin: 1.75rem 0 0;
	padding: 1.25rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 0.75rem;
}
.toolbox div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; }
.toolbox dt { color: var(--muted); font-size: 0.9375rem; }
.toolbox dd { margin: 0; }

/* Projects */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.cards li {
	padding: 1.1rem 1.25rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 0.75rem;
}
.cards h3 { font-size: 1.1875rem; margin: 0 0 0.35rem; }
.cards h3 a { color: var(--text); text-decoration: none; }
.cards h3 a:hover { color: var(--accent); }
.cards p { margin: 0; color: var(--muted); }

details { margin-top: 1.5rem; }
summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.plain { padding-left: 1.25rem; }

/* Publications */
.sub {
	font-family: var(--sans);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 2rem 0 0.75rem;
}
#publications > .sub:first-of-type { margin-top: 0; }
.pubs { padding-left: 1.5rem; margin: 0; }
.pubs li { margin-bottom: 0.85rem; font-size: 0.9688rem; overflow-wrap: anywhere; }
ul.pubs { list-style: none; padding-left: 0; }
.note { color: var(--muted); font-size: 0.9375rem; font-style: italic; }

/* Contact */
.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.site-footer { padding-top: 1.5rem; padding-bottom: 2.5rem; color: var(--muted); font-size: 0.875rem; }
