/* 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; }
.essay-next { border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.essay-next h2 { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.65rem; }
.essay-next ul { list-style: none; margin: 0.75rem 0 1rem; padding: 0; }
.essay-next li { border-bottom: 1px solid var(--rule); }
.essay-next li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 1rem; padding: 0.7rem 0; text-decoration: none; line-height: 1.35; }
.essay-next li time { text-align: right; white-space: nowrap; font-size: 0.65rem; }
.essay-next li a:hover { text-decoration: underline; }
.essay-next a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.essay-next__all { display: inline-block; padding-block: 0.4rem; }

/* ── talks, reading, and scripture ───────────────────────────── */
.reading-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.6rem;
	margin-bottom: 1.1rem;
	border-bottom: 1px solid var(--rule);
}
.reading-heading h2 { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.65rem; }
.reading-controls { display: flex; gap: 0.4rem; }
.reading-controls[hidden] { display: none; }
.reading-controls button {
	display: grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	padding: 0;
	border: 1px solid var(--rule);
	border-radius: 50%;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}
.reading-controls button:hover:not(:disabled) { border-color: var(--muted); }
.reading-controls button:disabled { opacity: 0.3; cursor: default; }
.reading-controls button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.reading-controls svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.reading-carousel {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(12rem, 82%);
	gap: 0.8rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	list-style: none;
	margin: 0;
	padding: 0.25rem 0 0.6rem;
}
.reading-carousel::-webkit-scrollbar { display: none; }
.reading-carousel:focus-visible { outline: 1px solid var(--muted); outline-offset: 4px; border-radius: 1rem; }
.reading-carousel > li { min-width: 0; scroll-snap-align: start; }
.reading-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--rule);
	border-radius: 1rem;
	overflow: hidden;
	text-decoration: none;
	background: #080807;
	transition: border-color 150ms ease;
}
.reading-card:hover { border-color: var(--muted); }
.reading-card:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.reading-card__media {
	aspect-ratio: 16 / 9;
	position: relative;
	overflow: hidden;
	background: #171613;
}
.reading-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	inset: 0;
	object-fit: cover;
}
.reading-card__media--book { background: #dedbd3; }
.reading-card__media--book img { object-fit: contain; padding: 0.45rem; }
.reading-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	padding: 0.8rem;
}
.reading-card h3 { font-size: 0.94rem; line-height: 1.2; margin-bottom: 0.55rem; }
.reading-card:hover h3 { text-decoration: underline; text-underline-offset: 0.18em; }
.reading-card__author { margin: auto 0 0; font-size: 0.7rem; color: var(--muted); }
.reading-card__subtitle { font-size: 0.72rem; line-height: 1.3; color: var(--muted); margin: -0.15rem 0 0.7rem; }
.reading-back {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 0.8rem;
	margin-bottom: 2rem;
	border: 1px solid var(--rule);
	border-radius: 0.6rem;
	color: var(--muted);
	font-size: 0.8rem;
	text-decoration: none;
}
.reading-back:hover { border-color: var(--muted); }
.reading-back:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.scripture-reading sup {
	font-family: var(--mono);
	font-size: 0.55em;
	color: var(--muted);
	line-height: 0;
}

/* ── 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; }
