/* =========================================================================
   The Mirrorless Moon — ink on washi, hand-built
   One column. Space and hairline rules, not boxes. Serif for prose,
   sans for wayfinding, monospace for dates. Nothing floats, nothing lifts.
   ========================================================================= */

/* === Design tokens ====================================================== */
:root {
	color-scheme: light dark;
	--font-family: "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
	--font-family-monospace: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
	--font-family-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
	--font-prose: var(--font-family-serif);
	--font-ui: var(--font-family);
	--font-verse: var(--font-family-serif);
	--line-height: 1.7;
	--line-height-tight: 1.3;

	/* Spacing scale */
	--space-1: 0.5rem;
	--space-1-5: 0.75rem;
	--space-2: 1rem;
	--space-2-5: 1.5rem;
	--space-3: 2rem;
	--space-4: 3rem;
	--measure: 62ch;
	--measure-wide: 82ch;

	/* Ink on Washi palette */
	--wash: #f8f4ea;
	--ink: #1f1a16;
	--muted: #6f6358;
	--muted-strong: #5f5448;
	--accent: #a34431;
	--rule: #d9cfc1;
	--surface: #f3ede2;
	--surface-border: #e4d9cb;
	--code-bg: #efe7db;
	--code-ink: #2b241d;
	--selection-bg: #ecd7a8;
	--selection-ink: #1f1a16;

	/* Compatibility aliases */
	--color-gray-20: var(--rule);
	--color-gray-50: var(--muted);
	--color-gray-90: var(--ink);
	--background-color: var(--wash);
	--text-color: var(--ink);
	--text-color-link: var(--accent);
	--text-color-link-active: var(--accent);
	--text-color-link-visited: var(--accent);

	--syntax-tab-size: 2;
}

@media (prefers-color-scheme: dark) {
	:root {
		--wash: #12100d;
		--ink: #f5efe6;
		--muted: #b4a89c;
		--muted-strong: #c8bdb1;
		--accent: #e08b6b;
		--rule: #3a3028;
		--surface: #1a1410;
		--surface-border: #2f2720;
		--code-bg: #1b1612;
		--code-ink: #f5efe6;
		--selection-bg: #3b2b1c;
		--selection-ink: #f5efe6;
	}
}


/* === Base =============================================================== */
* {
	box-sizing: border-box;
}

@view-transition {
	navigation: auto;
}

html,
body {
	padding: 0;
	margin: 0;
	font-family: var(--font-prose);
	color: var(--ink);
	background-color: var(--wash);
	line-height: var(--line-height);
	font-size: 17px;
}
html {
	overflow-y: scroll;
}

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

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* https://www.a11yproject.com/posts/how-to-hide-content/ */
.visually-hidden:not(:focus):not(:active) {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* Fluid images via https://www.zachleat.com/web/fluid-images/ */
img {
	max-width: 100%;
}
img[width][height] {
	height: auto;
}
img[src$=".svg"] {
	width: 100%;
	height: auto;
	max-width: none;
}
/* …but SVGs with declared dimensions (e.g. 88×31 badges) keep them. */
img[src$=".svg"][width][height] {
	width: auto;
	height: auto;
	max-width: 100%;
}
video,
iframe {
	width: 100%;
	height: auto;
}
iframe {
	aspect-ratio: 16/9;
}

p:last-child {
	margin-bottom: 0;
}
p {
	margin: 0 0 var(--space-2);
}

li {
	line-height: var(--line-height);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-family-serif);
	font-weight: 600;
	line-height: var(--line-height-tight);
	margin: var(--space-3) 0 var(--space-1);
	text-wrap: balance;
}
h1 {
	font-size: 1.7rem;
}
h2 {
	font-size: 1.3rem;
}
h3 {
	font-size: 1.12rem;
}
h4,
h5,
h6 {
	font-size: 1rem;
}

blockquote {
	margin: var(--space-2) 0;
	padding-left: var(--space-2);
	border-left: 2px solid var(--rule);
	color: var(--muted-strong);
	font-style: italic;
}

/* Rules are visible structure here — let them be seen. */
hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: var(--space-3) 0;
}

/* A short centered rule: one breath between sections. */
hr.breath {
	width: 8ch;
	margin-inline: auto;
}

/* Links: ink with a quiet underline; vermilion when touched. */
a[href] {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
	text-decoration-color: var(--rule);
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a[href]:visited {
	color: inherit;
}
a[href]:hover,
a[href]:active {
	text-decoration-color: var(--accent);
}

main a:link,
main a:visited {
	color: var(--ink);
	text-decoration-color: var(--rule);
}
main a:hover,
main a:active,
main a:focus-visible {
	color: var(--accent);
	text-decoration-color: var(--accent);
}
main .post-meta__tag:link,
main .post-meta__tag:visited,
main .tag-link:link,
main .tag-link:visited {
	color: inherit;
}

main {
	padding: var(--space-2-5) var(--space-2);
	padding-bottom: var(--space-4);
	max-width: var(--measure);
	margin-inline: auto;
}
/* Pages that need elbow room (photo grid) opt in via bodyClass. */
body.page-wide main {
	max-width: var(--measure-wide);
}
main > :first-child {
	margin-top: 0;
}

.skip-link {
	text-decoration: none;
	background: var(--wash);
	color: var(--ink);
	padding: 0.5rem 1rem;
	border: 1px solid var(--accent);
}

/* Prevent visually-hidden skip link from pushing content around when focused */
.skip-link.visually-hidden:focus {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 999;
}

/* === Code =============================================================== */
table {
	margin: 1em 0;
}
table td,
table th {
	padding-right: 1em;
}

pre,
code {
	font-family: var(--font-family-monospace);
}
pre {
	background: var(--code-bg);
	color: var(--code-ink);
	padding: var(--space-2);
	border: 1px solid var(--rule);
	overflow-x: auto;
}
pre:not([class*="language-"]) {
	margin: var(--space-2) 0;
	line-height: 1.5;
	-moz-tab-size: var(--syntax-tab-size);
	-o-tab-size: var(--syntax-tab-size);
	tab-size: var(--syntax-tab-size);
	-webkit-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
	direction: ltr;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	overflow-x: auto;
}
code {
	background: var(--code-bg);
	color: var(--code-ink);
	padding: 0.15em 0.35em;
	font-size: 0.88em;
	word-break: break-word;
}
pre code {
	background: transparent;
	color: inherit;
	padding: 0;
}

/* === Shell / navigation ================================================= */
.site-header {
	display: flex;
	gap: var(--space-1) var(--space-2-5);
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	padding: var(--space-1-5) var(--space-2);
	border-bottom: 1px solid var(--rule);
	max-width: var(--measure-wide);
	margin-inline: auto;
}
.home-link {
	flex-grow: 1;
	font-size: 1.05rem;
	font-weight: 700;
	font-family: var(--font-family-serif);
	color: inherit;
	text-decoration: none;
}
.logo-mark {
	margin-right: 0.5rem;
	width: 1.3em;
	height: 1.3em;
	vertical-align: -0.2em;
	flex-shrink: 0;
}
.home-link:hover,
.home-link:active,
.home-link:visited {
	color: inherit;
}

/* Nav: small, lowercase, out of the way */
.site-nav {
	margin-left: auto;
}
.nav {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1) var(--space-2);
	padding: 0;
	margin: 0;
	list-style: none;
	align-items: center;
	font-family: var(--font-ui);
	font-size: 0.88rem;
	text-transform: lowercase;
	letter-spacing: 0.02em;
}
@media (max-width: 639px) {
	.site-header {
		justify-content: center;
		text-align: center;
	}
	.home-link {
		flex-basis: 100%;
		text-align: center;
	}
	.site-nav {
		margin-left: 0;
	}
	.nav {
		justify-content: center;
	}
}
.nav-item {
	display: inline-block;
}
.nav a[href] {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--rule);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.22em;
}
.nav a[href]:visited {
	color: inherit;
}
.nav a[href]:hover,
.nav a[href]:active,
.nav a[href]:focus-visible {
	text-decoration-color: var(--accent);
}
.nav a[href][aria-current="page"] {
	text-decoration-color: var(--accent);
	text-decoration-thickness: 0.11em;
	font-weight: 600;
}

/* === Page headers ======================================================= */
.page-header {
	margin: 0 0 var(--space-1-5);
}
.page-header > :first-child {
	margin-top: 0;
}
.page-header h1 {
	margin-bottom: 0.35rem;
}
.page-lede {
	margin: 0;
	color: var(--muted-strong);
	max-width: 58ch;
	font-style: italic;
	line-height: 1.55;
}
.page-divider {
	margin: var(--space-1-5) 0 var(--space-2-5);
}

/* === Lists of writing =================================================== */
.postlist {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: var(--space-1);
}
.postlist-item {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.2rem;
}
.postlist-date {
	font-family: var(--font-family-monospace);
	font-size: 0.78rem;
	color: var(--muted);
	display: block;
	white-space: nowrap;
	letter-spacing: 0.02em;
}
.postlist-link {
	font-size: 1.02rem;
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
	text-decoration-color: var(--rule);
}
.postlist-item-active .postlist-link {
	font-weight: 600;
	text-decoration-color: var(--accent);
}
.postlist-link:hover,
.postlist-link:focus-visible {
	color: var(--accent);
	text-decoration-color: var(--accent);
}

/* Small marker for poems in mixed lists */
.postlist-kind {
	font-family: var(--font-ui);
	font-size: 0.7rem;
	text-transform: lowercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}

@media (min-width: 640px) {
	.postlist-item {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: baseline;
		column-gap: var(--space-2-5);
		row-gap: 0;
	}
	.postlist-date {
		justify-self: end;
		text-align: right;
	}
}

/* Archives grouped by year */
.archive-year {
	margin-block: var(--space-2-5);
}
.archive-year > h2 {
	font-family: var(--font-ui);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	color: var(--muted);
	margin: 0 0 var(--space-1);
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.archive-year > h2::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--rule);
}

/* === Tags =============================================================== */
.post-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-transform: capitalize;
	font-style: italic;
}
.tags-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.8rem;
}
.tag-link {
	text-decoration-color: var(--rule);
}
.tag-link:hover,
.tag-link:active {
	color: var(--accent);
	text-decoration-color: var(--accent);
}

/* === Post meta ========================================================== */
.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.9rem;
	margin: 0 0 var(--space-2);
	font-family: var(--font-ui);
	font-size: 0.85rem;
	color: var(--muted-strong);
}
.post-meta__date {
	white-space: nowrap;
}
.post-meta__tags {
	display: inline-flex;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
	margin: 0;
}
.post-meta__tags li {
	display: inline-flex;
	align-items: center;
}
.post-meta__tags li + li::before {
	content: "·";
	color: var(--rule);
	margin: 0 0.5rem;
}
.post-meta__tag {
	color: inherit;
	text-decoration-color: var(--rule);
	font-style: italic;
}
.post-meta__tag:hover,
.post-meta__tag:active {
	color: var(--accent);
	text-decoration-color: var(--accent);
}

.post-title {
	margin-top: 0;
	font-size: 1.7rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* === Post / poem pages ================================================== */
/* Poems keep the page rhythm of posts, but step in from the margin like verse. */
.poem {
	max-width: 55ch;
	padding: var(--space-1) 0 var(--space-2) 2.5ch;
}

.verse {
	font-family: var(--font-verse);
}

.stanza {
	margin: 0 0 var(--space-2);
}

.stanza:last-child {
	margin-bottom: 0;
}

/* Drop cap on blog posts (not poems) — an illuminated first breath */
.post-body > p:first-child::first-letter {
	font-family: var(--font-family-serif);
	font-size: 3.4em;
	float: left;
	line-height: 0.8;
	margin-right: 0.08em;
	margin-top: 0.05em;
	color: var(--ink);
}

/* End-of-piece mark: a small enso, then silence */
.end-mark {
	display: flex;
	justify-content: center;
	margin: var(--space-3) 0 var(--space-2);
	color: var(--muted);
}
.end-mark svg {
	width: 1.2em;
	height: 1.2em;
	opacity: 0.6;
}

/* Reply by email — the small-web answer to comments */
.reply-line {
	text-align: center;
	font-size: 0.92rem;
	font-style: italic;
	color: var(--muted-strong);
	margin-block: 0 var(--space-2);
}

/* Previous / next: two quiet signposts under a rule */
.links-nextprev {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-2);
	list-style: none;
	margin: var(--space-3) 0 0;
	padding: var(--space-1-5) 0 0;
	border-top: 1px solid var(--rule);
	font-family: var(--font-ui);
	font-size: 0.85rem;
	color: var(--muted);
}
.links-nextprev a {
	font-family: var(--font-prose);
	font-size: 0.98rem;
	color: var(--ink);
	text-decoration-color: var(--rule);
}
.links-nextprev a:hover,
.links-nextprev a:focus-visible {
	color: var(--accent);
	text-decoration-color: var(--accent);
}
.links-nextprev-next {
	text-align: right;
}
.links-nextprev-prev:only-child {
	grid-column: 1;
}
.links-nextprev-next:only-child {
	grid-column: 2;
}

/* === Home page ========================================================== */
.intro {
	margin-block: var(--space-2) var(--space-3);
}

.intro-quote {
	font-size: 1.15rem;
	font-style: italic;
	line-height: 1.55;
	margin: 0 0 var(--space-2);
	padding-left: var(--space-2);
	border-left: 2px solid var(--accent);
	color: inherit;
}

.intro-signoff {
	text-align: right;
	font-style: italic;
	margin-top: var(--space-2);
}

.home-section-title {
	font-family: var(--font-ui);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: lowercase;
	color: var(--muted);
	margin: 0 0 var(--space-1-5);
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.home-section-title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--rule);
}

.home-recent {
	margin-block: var(--space-2);
}

.more-link {
	margin-top: var(--space-2);
	font-size: 0.92rem;
	font-style: italic;
	color: var(--muted-strong);
}

/* The closing poem earns the site's one thin frame */
.closing-poem {
	margin-block: var(--space-4) var(--space-2);
}

.framed {
	border: 1px solid var(--rule);
	padding: var(--space-2-5) var(--space-2);
}

.poem-card {
	text-align: center;
}

.poem-body {
	font-family: var(--font-verse);
	font-size: 1.05rem;
	line-height: 1.7;
	margin: 0;
	text-wrap: balance;
}

.poem-sign {
	margin: var(--space-1-5) 0 0 0;
	font-style: italic;
	font-size: 0.92rem;
	color: var(--muted-strong);
}

/* === About page ========================================================= */
.about-wrap {
	display: grid;
	gap: var(--space-2-5);
	align-items: start;
	margin-block: var(--space-2-5);
}

@media (min-width: 640px) {
	.about-wrap {
		grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
	}
}

.about-photo {
	margin: 0;
	width: min(220px, 70vw);
	justify-self: center;
	align-self: start;
	overflow: hidden;
	position: relative;
	border: 1px solid var(--surface-border);
	background: var(--surface);
	padding: 4px;
}

@media (min-width: 640px) {
	.about-photo {
		width: 100%;
		justify-self: start;
	}
}

.about-photo picture {
	display: block;
	position: absolute;
	inset: 4px;
	width: calc(100% - 8px);
	height: calc(100% - 8px);
}

.about-photo img.about-photo__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.about-photo--oval {
	border-radius: 999px;
	aspect-ratio: 1 / 1;
	padding: 0;
}
.about-photo--oval picture {
	inset: 0;
	width: 100%;
	height: 100%;
}

.about-photo--oval .about-photo__image {
	object-position: 62% 45%;
}

.about-photo--rounded {
	aspect-ratio: 4 / 5;
}

.about-photo--rounded .about-photo__image {
	object-position: 78% 32%;
}

.about-content {
	display: grid;
	gap: var(--space-2);
}

.about-text {
	padding-right: 0.25rem;
}

.about-timeline {
	display: grid;
	gap: var(--space-1);
}

.about-timeline__title {
	margin: 0;
	font-family: var(--font-ui);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	font-weight: 600;
	text-transform: lowercase;
	color: var(--muted);
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.about-timeline__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--rule);
}

.about-timeline__title .direct-link,
.about-timeline__title > a[href^="#"],
.about-timeline__title + .ha,
.about-timeline__title + a[href^="#"] {
	display: none;
}

.timeline {
	--timeline-gutter: 1.75rem;
	--timeline-dot: 0.55rem;
	--timeline-rail-x: 0.65rem;
	list-style: none;
	margin: 0;
	padding: 0 0 0 var(--timeline-gutter);
	display: grid;
	gap: 0.9rem;
	position: relative;
}

.timeline::before {
	content: "";
	position: absolute;
	left: var(--timeline-rail-x);
	top: 0.3rem;
	bottom: 0.3rem;
	width: 1px;
	background: var(--rule);
}

.timeline__item {
	display: grid;
	grid-template-columns: minmax(4.8rem, auto) 1fr;
	gap: var(--space-1);
	position: relative;
}

.timeline__item::before {
	content: "";
	position: absolute;
	left: calc(-1 * var(--timeline-gutter) + var(--timeline-rail-x) - (var(--timeline-dot) * 0.5));
	top: 0.45rem;
	width: var(--timeline-dot);
	height: var(--timeline-dot);
	border-radius: 999px;
	background: var(--wash);
	border: 2px solid var(--rule);
}

.timeline__year {
	font-family: var(--font-family-monospace);
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	color: var(--muted);
	white-space: nowrap;
	text-align: right;
	padding-right: 0.25rem;
}

.timeline__label {
	line-height: 1.5;
}

.timeline__item--range {
	--timeline-dot: 0.45rem;
}

.timeline__item--range::before {
	border-style: dashed;
}

.timeline__item--range .timeline__label {
	color: var(--muted);
	font-style: italic;
}

/* === Reading: a bookshelf, not a card rack ============================== */
.reading-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: var(--space-2-5) var(--space-2);
	margin-block: var(--space-2-5);
}

@media (max-width: 480px) {
	.reading-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.reading-card {
	display: grid;
	gap: 0.5rem;
	align-content: start;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.reading-card__cover {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 3;
	background: var(--surface);
	border: 1px solid var(--surface-border);
	padding: 4px;
}

.reading-card__cover picture {
	display: block;
	width: 100%;
	height: 100%;
}

.reading-card__cover img.reading-card__cover-image[width][height] {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.reading-card:hover .reading-card__cover,
.reading-card:focus-visible .reading-card__cover {
	border-color: var(--accent);
}

.reading-card__body {
	display: grid;
	gap: 0.1rem;
}

.reading-card__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25;
}

.reading-card:hover .reading-card__title {
	color: var(--accent);
}

.reading-card__author,
.reading-card__date {
	margin: 0;
	font-family: var(--font-ui);
	color: var(--muted-strong);
	font-size: 0.76rem;
	line-height: 1.35;
}

.reading-card:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* Book detail pages */
.book-detail {
	display: grid;
	gap: var(--space-2);
}

.book-backlink {
	margin: 0;
	font-family: var(--font-ui);
	font-size: 0.88rem;
}

.book-header {
	display: grid;
	gap: var(--space-2);
	align-items: start;
}

.book-cover {
	border: 1px solid var(--surface-border);
	background: var(--surface);
	padding: 4px;
	width: min(280px, 100%);
	aspect-ratio: 2 / 3;
	justify-self: start;
}

.book-cover picture {
	display: block;
	width: 100%;
	height: 100%;
}

.book-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.book-author {
	margin: 0;
	color: var(--muted-strong);
	font-style: italic;
	font-size: 1.02rem;
}

.book-title {
	margin-top: 0;
}

.book-meta {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(120px, auto) 1fr;
	gap: 0.35rem 1rem;
	font-size: 0.95rem;
}

.book-meta dt {
	font-weight: 600;
}

.book-meta dd {
	margin: 0;
	color: var(--muted-strong);
}

.book-meta dd a {
	word-break: break-word;
	overflow-wrap: anywhere;
}

@media (min-width: 640px) {
	.book-header {
		grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
	}
}

/* === Photography: prints laid on paper ================================= */
.photo-grid {
	columns: 2;
	column-gap: var(--space-2);
	margin-block: var(--space-2-5);
}
@media (min-width: 720px) {
	.photo-grid {
		columns: 3;
	}
}

.photo-card {
	margin: 0 0 var(--space-2);
	display: grid;
	gap: 0.5rem;
	break-inside: avoid;
}

.photo-link {
	display: block;
	background: var(--surface);
	border: 1px solid var(--surface-border);
	padding: 5px;
	width: 100%;
	transition: border-color 0.15s ease;
}
.photo-link:hover,
.photo-link:focus-visible {
	border-color: var(--accent);
}

.photo-card picture,
.photo-card picture img,
.photo-thumb {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	object-position: center center;
}

.photo-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.photo-caption {
	margin: 0;
	font-size: 0.88rem;
	font-style: italic;
	color: var(--muted-strong);
	line-height: 1.4;
}

.photo-lightbox {
	width: min(96vw, 960px);
	border: 1px solid var(--rule);
	padding: var(--space-1);
	display: none;
	flex-direction: column;
	gap: var(--space-1);
	background: var(--background-color);
	color: var(--text-color);
	text-align: center;
}

.photo-lightbox[open] {
	display: flex;
}

.photo-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.55);
}

.photo-lightbox img {
	width: 100%;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
}

.photo-lightbox__close {
	border: 1px solid var(--rule);
	background: var(--background-color);
	color: var(--text-color);
	font-family: var(--font-ui);
	font-size: 0.85rem;
	padding: 0.3rem 0.75rem;
	cursor: pointer;
	align-self: flex-end;
}
.photo-lightbox__close:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* === Footer: the small-web heart ======================================== */
.site-footer {
	max-width: var(--measure-wide);
	margin-inline: auto;
	padding: var(--space-3) var(--space-2) var(--space-2-5);
	border-top: 1px solid var(--rule);
	text-align: center;
	color: var(--muted);
	display: grid;
	gap: var(--space-1-5);
	justify-items: center;
}

.footer-nav {
	font-family: var(--font-ui);
	font-size: 0.85rem;
	text-transform: lowercase;
	letter-spacing: 0.03em;
}
.footer-nav a[href] {
	color: inherit;
	text-decoration-color: var(--rule);
}
.footer-nav a[href]:hover,
.footer-nav a[href]:focus-visible {
	color: var(--accent);
	text-decoration-color: var(--accent);
}
.footer-nav .sep {
	color: var(--rule);
	margin: 0 0.4rem;
	user-select: none;
}

.footer-badges {
	margin: 0;
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	align-items: center;
}
.footer-badges a {
	display: inline-flex;
	line-height: 0;
	text-decoration: none;
}
.footer-badges img {
	width: 88px;
	height: 31px;
	max-width: 88px;
}

.footer-line {
	margin: 0;
	font-family: var(--font-family-serif);
	font-size: 0.88rem;
	font-style: italic;
	letter-spacing: 0.02em;
}

.footer-tended {
	margin: 0;
	font-family: var(--font-family-monospace);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}