:root {
	--fg: #1c2128;
	--muted: #6b7680;
	--faint: #a3adb5;
	--line: #e9edf0;
	--bg: #fff;
	--accent: #2f7fd6;
}

html {
	scroll-behavior: smooth;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--fg: #e6e9ec;
		--muted: #9aa4ad;
		--faint: #6b7680;
		--line: #2a3038;
		--bg: #121417;
		--accent: #7db7ee;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--fg);
	background: var(--bg);
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--faint);
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--accent);
	text-decoration-color: var(--accent);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

p {
	margin: 0 0 1em;
	text-wrap: pretty;
}

.wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	box-sizing: border-box;
	max-width: 38em;
	margin: 0 auto;
	padding: 2rem 1.5rem 2rem;
}

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

/* Nav */
.nav {
	display: flex;
	gap: 1.25rem;
	font-size: 0.875rem;
	color: var(--muted);
	margin-bottom: 3rem;
}

.nav a {
	text-decoration: none;
}

/* Header */
.banner {
	display: block;
	width: 100%;
	height: 12rem;
	background: url('/assets/deyoung3.jpeg') center / cover no-repeat;
}

.hero {
	margin-bottom: 1.5rem;
}

.headshot {
	flex: none;
	border-radius: 50%;
}

.name {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
}

.tagline {
	margin: 0;
	color: var(--muted);
}

/* Sections */
.section {
	scroll-margin-top: 2rem;
	margin-bottom: 2.5rem;
}

.sectionTitle {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
}

/* Rows and disclosure */
.row,
summary {
	display: grid;
	grid-template-columns: 3rem 1fr;
	column-gap: 0.75rem;
	padding: 0.6rem 0;
	border-top: 1px solid var(--line);
}

.section > .row:last-child,
.section > details:last-child {
	border-bottom: 1px solid var(--line);
}

details {
	border-top: 0;
}

details > summary {
	list-style: none;
	cursor: pointer;
	position: relative;
}

summary::-webkit-details-marker {
	display: none;
}

summary::after {
	content: '+';
	position: absolute;
	right: 0.25rem;
	top: 0.55rem;
	color: var(--faint);
	font-weight: 400;
}

details[open] > summary::after {
	content: '−';
}

summary:hover .title,
summary:focus-visible .title {
	color: var(--accent);
}

summary:focus-visible {
	outline: none;
}

.year {
	grid-row: 1 / span 2;
	color: var(--faint);
	font-variant-numeric: tabular-nums;
	font-size: 0.875rem;
	padding-top: 0.1em;
}

.title {
	font-weight: 600;
}

.meta {
	grid-column: 2;
	color: var(--muted);
	font-size: 0.9375rem;
}

.body {
	padding: 0.25rem 0 1.25rem 3.75rem;
	color: var(--fg);
}

.body > :last-child {
	margin-bottom: 0;
}

.body img {
	margin: 0.75rem 0 0;
	max-height: 24rem;
	width: auto;
}

.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.gallery img {
	flex: 1 1 8rem;
	max-height: 18rem;
	object-fit: contain;
	margin: 0;
}

/* Footer */
.footer {
	margin-top: auto;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	font-size: 0.875rem;
	color: var(--muted);
}

.footnote {
	scroll-margin-top: 2rem;
}

.colophon {
	color: var(--faint);
	margin-bottom: 0.25rem;
}

.colophon a {
	color: var(--muted);
	text-decoration: none;
}

.colophon a:hover {
	color: var(--accent);
}

@media (max-width: 30em) {
	.banner {
		height: 8rem;
	}
	.wrapper {
		padding: 1.5rem 1rem 2rem;
	}
	.nav {
		flex-wrap: wrap;
		gap: 0.75rem 1rem;
		margin-bottom: 2rem;
	}
	.row,
	summary {
		grid-template-columns: 2.5rem 1fr;
	}
	.body {
		padding-left: 0;
	}
}

/* Portfolio gate */
.gate {
	margin: 2rem 0 3rem;
}

.gate label {
	display: block;
	margin-bottom: 0.75rem;
}

.gateRow {
	display: flex;
	gap: 0.5rem;
	max-width: 22rem;
}

.gate input {
	flex: 1;
	font: inherit;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	color: var(--fg);
	background: var(--bg);
}

.gate input:focus {
	outline: none;
	border-color: var(--faint);
}

.gate button {
	font: inherit;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--bg);
	color: var(--muted);
	cursor: pointer;
}

.gate button:hover {
	color: var(--accent);
	border-color: var(--accent);
}

.gateErr {
	margin-top: 0.75rem;
	font-size: 0.875rem;
}

.nav .home {
	color: var(--fg);
}

/* Portfolio entries */
h3.title {
	margin: 1.5rem 0 0.25rem;
	font-size: 1rem;
}

.section > img {
	margin: 0.75rem 0 1.5rem;
	max-height: 28rem;
	width: auto;
}
