/* jacobalbertschmidt.com */

:root {
	--bg: #000000;
	--ink: #e6e1d6;        /* warm off-white; pure white on pure black is harsh */
	--muted: #8b877e;
	--rule: #1f1e1b;
	--hover: #ffffff;
	--serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--measure: 36rem;
}

* { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 20px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 5rem 1.25rem 6rem;
	max-width: calc(var(--measure) + 2.5rem);
	margin-inline: auto;
}

@media (max-width: 600px) {
	html { font-size: 18px; }
	body { padding-top: 3rem; }
}

::selection { background: var(--ink); color: var(--bg); }

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

h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.15; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }

p { margin: 0 0 1.2em; }

/* small tracked labels: dates, section markers, footer */
.label {
	font-family: var(--mono);
	font-size: 0.7rem;
	letter-spacing: 0.02em;
	color: var(--muted);
}

/* ── nav ─────────────────────────────────────────────────────── */
.nav {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 4rem;
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav__name { color: var(--ink); }
.nav__links { display: flex; gap: 1.5rem; }
.nav__links a { color: var(--muted); }
.nav__links a[aria-current="page"] { color: var(--ink); }

/* ── home ─────────────────────────────────────────────────────── */
.intro { margin-bottom: 4rem; }
.intro__row {
	display: flex;
	gap: 1.75rem;
	align-items: center;
	margin-bottom: 0.9em;
}
.intro h1 { margin-bottom: 0.75rem; }
.intro p { margin-bottom: 0; }
/* the portrait from thecaminoapp.com/about, scaled down: 25px on 200px is
   one eighth, so the radius stays one eighth of the side */
.intro__photo {
	flex: none;
	display: block;
	width: 8.5rem;
	height: 8.5rem;
	border-radius: 1.0625rem;
	object-fit: cover;
}
@media (max-width: 600px) {
	/* On a phone the portrait floats left, its top level with the title, and
	   the text wraps around it. */
	.intro__row { display: block; }
	.intro__row > div { display: contents; }
	.intro__photo { float: left; width: 6rem; height: 6rem; border-radius: 0.75rem; margin: 0.15rem 1rem 0.4rem 0; }
	.intro h1 { margin-bottom: 0.6rem; }
}

.section { margin-bottom: 4rem; }
.section > .label {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.65rem;
	display: block;
	padding-bottom: 0.6rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--rule);
}

.work { display: grid; gap: 2.25rem; }
.work__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 0.35rem;
}
.work__head h2 a { text-decoration: none; }
.work__head h2 a:hover { text-decoration: underline; }
.work__role {
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.65rem;
}
.work p { margin-bottom: 0.5em; }
.work p:last-child { margin-bottom: 0; }
.work__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.work__links a { color: var(--muted); font-size: 0.9rem; }
.work__links a:hover { color: var(--hover); }

/* ── essay list ──────────────────────────────────────────────── */
.essays { list-style: none; margin: 0; padding: 0; }
.essays li {
	display: grid;
	grid-template-columns: 5.5rem 1fr;
	gap: 1rem;
	align-items: baseline;
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--rule);
}
.essays li:first-child { padding-top: 0; }
.essays a { text-decoration: none; }
.essays a:hover { text-decoration: underline; }
@media (max-width: 480px) {
	.essays li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ── essay page ─────────────────────────────────────────────── */
.essay header { margin-bottom: 2.5rem; }
.essay header h1 { margin-bottom: 0.5rem; }
.essay .body p { margin-bottom: 1.3em; }
.essay .body p + p { text-indent: 0; }
.essay .body h2 { margin: 2.2em 0 0.6em; font-style: italic; }
.essay .body blockquote {
	margin: 1.5em 0;
	padding-left: 1.25rem;
	border-left: 1px solid var(--muted);
	color: var(--muted);
	font-style: italic;
}
.essay .body hr {
	border: 0;
	height: 1px;
	background: var(--rule);
	margin: 2.5em 0;
}
.essay .body code {
	font-family: var(--mono);
	font-size: 0.8em;
}
.essay .body pre {
	font-family: var(--mono);
	font-size: 0.75rem;
	line-height: 1.6;
	overflow-x: auto;
	padding: 1rem 1.1rem;
	border: 1px solid var(--rule);
	margin: 1.5em 0;
}
.essay .body pre code { font-size: inherit; }
.essay .body em { font-style: italic; }
.essay .body ul, .essay .body ol { padding-left: 1.4rem; margin: 0 0 1.3em; }
.essay footer { margin-top: 3.5rem; }

/* ── footer ─────────────────────────────────────────────────── */
.foot {
	margin-top: 5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--rule);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--hover); text-decoration: underline; }
