/* ==========================================================================
   Idle Mind
   Tokens / base / layout / header / cards / home / article / hubs / photos /
   projects / footer / utilities
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */
:root {
	--font: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;

	--paper: #fff;
	--ink: #000;
	--text: #1a1a1a;
	--muted: #5c5c5c;
	--line: #e4e4e4;
	--wash: #f5f5f5;
	--band: #000;
	--band-ink: #fff;
	--band-muted: #b3b3b3;
	--band-line: #333;
	--accent-base: #0b5fe0;
	--accent: var(--accent-base);

	--gutter: clamp(16px, 4vw, 40px);
	--page: 1280px;
	--measure: 720px;
	--gap: clamp(20px, 3vw, 36px);
	--bar-height: 60px;
	--admin-bar: 0px;

	color-scheme: light;
}

:root[data-theme="dark"] {
	--paper: #0a0a0a;
	--ink: #fff;
	--text: #e8e8e8;
	--muted: #a3a3a3;
	--line: #2a2a2a;
	--wash: #171717;
	--band: #171717;
	--band-line: #333;
	--accent: color-mix(in srgb, var(--accent-base) 55%, #fff);
	color-scheme: dark;
}

body.admin-bar {
	--admin-bar: 32px;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--bar-height) + var(--admin-bar) + 16px);
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--ink);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

p {
	margin: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

img,
video,
iframe {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

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

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

input,
textarea,
button {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	width: 100%;
	padding: 0.7em 0.8em 0.55em;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: var(--paper);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 0.6em 1em 0.45em;
	background: var(--ink);
	color: var(--paper);
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
	color: var(--paper);
}

/* Layout ------------------------------------------------------------------ */
.wrap {
	width: min(100%, var(--page));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wrap--narrow {
	--page: 960px;
}

.wrap--prose {
	--page: calc(var(--measure) + 2 * var(--gutter));
}

.section {
	padding-block: clamp(32px, 5vw, 64px);
}

.section--flush-top {
	padding-top: 0;
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--ink);
}

.section-head h2 {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.section-head__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	font-size: 0.95rem;
	font-weight: 500;
}

.section-head__more .icon {
	width: 16px;
	height: 16px;
	margin-top: -3px;
}

/* Shared small parts ------------------------------------------------------ */
.icon {
	display: block;
}

.icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

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

.only-dark {
	display: none;
}

:root[data-theme="dark"] .only-dark {
	display: block;
}

:root[data-theme="dark"] .only-light {
	display: none;
}

.eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 500;
}

.eyebrow > span:first-child:not(:only-child) {
	color: var(--ink);
	font-weight: 700;
}

.kicker {
	display: inline-block;
	color: var(--ink);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	color: var(--muted);
	font-size: 0.9rem;
}

.meta > * + *::before {
	content: "·";
	margin-right: 14px;
}

.meta a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.meta--on-dark {
	color: var(--band-muted);
}

.meta--on-dark a {
	color: var(--band-ink);
}

.pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pill {
	display: inline-block;
	padding: 0.45em 0.8em 0.25em;
	border: 1px solid var(--ink);
	color: var(--ink);
	font-size: 0.85rem;
	font-weight: 600;
	transition: background-color 0.15s, color 0.15s;
}

.pill:hover {
	background: var(--ink);
	color: var(--paper);
}

.pills--on-dark {
	margin-top: 20px;
}

.pills--on-dark .pill {
	border-color: var(--band-ink);
	color: var(--band-ink);
}

.pills--on-dark .pill:hover {
	background: var(--band-ink);
	color: var(--band);
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0.8em 1.15em 0.6em;
	background: var(--ink);
	color: var(--paper);
	font-weight: 600;
	transition: background-color 0.15s;
}

.button .icon {
	width: 18px;
	height: 18px;
	margin-top: -4px;
}

.button:hover {
	background: var(--accent);
	color: var(--paper);
}

/* Header ------------------------------------------------------------------ */
.masthead {
	padding: clamp(20px, 2.5vw, 32px) var(--gutter) clamp(10px, 1.2vw, 16px);
	text-align: center;
}

.masthead__title {
	font-size: clamp(2.3rem, 7vw, 6.5rem);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1;
	text-wrap: balance;
}

.masthead__title a:hover {
	color: inherit;
}

.masthead__tagline {
	margin-top: 8px;
	color: var(--muted);
}

.site-bar {
	position: sticky;
	top: var(--admin-bar);
	z-index: 20;
	border-block: 1px solid var(--ink);
	background: var(--paper);
}

.site-bar:not(.site-bar--cover) {
	border-top: 0;
}

.site-bar__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	width: min(100%, var(--page));
	min-height: var(--bar-height);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.site-bar__brand {
	flex: none;
	color: var(--ink);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
	transition: opacity 0.2s;
}

.site-bar--cover:not(.is-past-masthead) .site-bar__brand {
	display: none;
}

.site-nav {
	flex: 1;
}

.nav-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
}

.nav-menu > li {
	position: relative;
}

.nav-menu a {
	display: block;
	padding-block: 0.35em 0.15em;
	color: var(--ink);
	font-weight: 500;
	border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
	color: var(--ink);
	border-bottom-color: var(--accent);
}

.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a,
.nav-menu .current-menu-ancestor > a {
	border-bottom-color: var(--ink);
}

.nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: -14px;
	display: none;
	min-width: 220px;
	padding: 10px 14px;
	border: 1px solid var(--ink);
	background: var(--paper);
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
	display: block;
}

.site-bar__tools,
.social-links {
	display: flex;
	align-items: center;
}

.site-bar__tools {
	flex: none;
	margin-left: auto;
	margin-right: -10px;
}

.site-bar__menu {
	display: none;
}

.site-bar__menu-label {
	display: none;
	font-weight: 500;
	line-height: 1;
	padding-top: 0.2em;
}

.reading-progress {
	position: absolute;
	inset: auto 0 -1px;
	height: 3px;
}

.reading-progress span {
	display: block;
	height: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
}

.search-dialog {
	width: min(calc(100% - 32px), 640px);
	margin-top: 12vh;
	padding: 0;
	border: 2px solid var(--ink);
	background: var(--paper);
	color: var(--text);
}

.search-dialog::backdrop {
	background: rgb(0 0 0 / 0.7);
}

.search-dialog form {
	display: flex;
	align-items: center;
	padding: 8px 12px;
}

.search-dialog input {
	padding: 0.5em 0.3em 0.3em;
	border: 0;
	font-size: 1.4rem;
	outline: none;
}

@media (max-width: 899px) {
	.site-bar .social-links {
		display: none;
	}

	.site-bar__inner {
		gap: 8px;
	}

	.site-bar__menu {
		display: inline-flex;
		flex: none;
		margin-left: -10px;
	}

	/* With the masthead on screen there's no site name here, so the button says what it is */
	.site-bar--cover:not(.is-past-masthead) .site-bar__menu {
		gap: 8px;
		width: auto;
		padding-inline: 10px;
	}

	.site-bar--cover:not(.is-past-masthead) .site-bar__menu-label {
		display: inline;
	}

	.site-bar__brand {
		flex: 0 1 auto;
		min-width: 0;
		overflow: hidden;
		font-size: 1.05rem;
		line-height: 1.3;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		padding: 16px var(--gutter);
		border-block: 1px solid var(--ink);
		background: var(--paper);
	}

	.site-nav.is-open {
		display: block;
	}

	.nav-menu {
		flex-direction: column;
	}

	.nav-menu .sub-menu {
		position: static;
		display: block;
		padding: 0 0 0 16px;
		border: 0;
	}
}

@media (max-width: 782px) {
	body.admin-bar {
		--admin-bar: 0px;
	}
}

/* Cards ------------------------------------------------------------------- */
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(32px, 4vw, 48px) var(--gap);
	margin-top: clamp(32px, 5vw, 56px);
	padding-top: clamp(32px, 5vw, 56px);
	border-top: 2px solid var(--ink);
}

.card-grid--flush {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
}

.card__media {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	margin-bottom: 8px;
	overflow: hidden;
	background: var(--wash);
}

.card__media img,
.lead__media img,
.timeline__thumb img,
.photo-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.card__media:hover img,
.lead__media:hover img {
	transform: scale(1.03);
}

.card__panel {
	display: flex;
	align-items: flex-end;
	height: 100%;
	padding: clamp(16px, 2vw, 24px);
	background: var(--band);
	color: var(--band-ink);
	font-size: clamp(1.5rem, 2.4vw, 2.1rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.card__title {
	font-size: 1.4rem;
	line-height: 1.18;
}

.card__title a:hover,
.lead__title a:hover,
.timeline__title a:hover {
	color: var(--accent);
}

.card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	color: var(--text);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

/* The panel already shows the title visually in type-only cards, so the real
   heading stays for screen readers only. */
.card--type .card__title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

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

@media (max-width: 600px) {
	.card-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Videos: widescreen frames with a play badge. */
.format-video .card__media,
.format-video .timeline__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
}

.format-video .card__media::after,
.format-video .timeline__thumb::after,
.photo-tile--reel::after {
	content: "";
	position: absolute;
	left: 12px;
	bottom: 12px;
	width: 40px;
	height: 40px;
	background: rgb(0 0 0 / 0.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 60% no-repeat;
}

.format-video .timeline__thumb::after {
	left: 6px;
	bottom: 6px;
	width: 28px;
	height: 28px;
}

/* A video may have no description, which leaves nothing to show. */
.card__excerpt:empty,
.timeline__body p:empty {
	display: none;
}

.prose .wp-embed-aspect-9-16 {
	max-width: 360px;
	margin-inline: auto;
}

/* Home -------------------------------------------------------------------- */
.lead {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	align-items: center;
	gap: clamp(24px, 4vw, 56px);
}

.lead__media {
	display: block;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: var(--wash);
}

.lead__media .card__panel {
	font-size: clamp(2rem, 5vw, 4rem);
}

.lead__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

.lead__title {
	font-size: clamp(2rem, 4vw, 3.4rem);
	line-height: 1.04;
	letter-spacing: -0.03em;
}

.lead__excerpt {
	font-size: 1.15rem;
	line-height: 1.5;
}

.lead .button {
	margin-top: 8px;
}

@media (max-width: 860px) {
	.lead {
		grid-template-columns: minmax(0, 1fr);
	}
}

.band {
	padding-block: clamp(32px, 5vw, 56px);
	background: var(--band);
	color: var(--band-ink);
}

.band .section-head {
	border-bottom-color: var(--band-ink);
}

.band h2 {
	color: var(--band-ink);
}

.band a:hover {
	color: var(--band-ink);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.photo-strip {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 8px;
}

@media (max-width: 900px) {
	.photo-strip {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.home-topics {
	display: grid;
	grid-template-columns: repeat(var(--topic-columns, 2), minmax(0, 1fr));
	gap: clamp(32px, 5vw, 64px);
}

@media (max-width: 760px) {
	.home-topics {
		grid-template-columns: minmax(0, 1fr);
	}
}

.post-list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding-block: 12px 9px;
	border-bottom: 1px solid var(--line);
}

.post-list a {
	color: var(--ink);
	font-size: 1.1rem;
	font-weight: 500;
	line-height: 1.25;
}

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

.post-list time {
	flex: none;
	color: var(--muted);
	font-size: 0.875rem;
}

/* Pagination -------------------------------------------------------------- */
.pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: clamp(32px, 5vw, 56px);
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 3px 8px 0;
	border: 1px solid var(--line);
	color: var(--ink);
	font-weight: 500;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
	padding-top: 0;
}

.pagination a.page-numbers:hover {
	border-color: var(--ink);
	color: var(--ink);
}

.pagination .current {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--paper);
}

.pagination .dots {
	border-color: transparent;
}

/* Article ----------------------------------------------------------------- */
.article__header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	width: min(100%, var(--page));
	margin-inline: auto;
	padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(24px, 4vw, 40px);
}

.article__title {
	max-width: 18ch;
	font-size: clamp(2.4rem, 6.5vw, 5.25rem);
	line-height: 1.02;
	letter-spacing: -0.035em;
}

.article__layout {
	display: grid;
	grid-template-columns: minmax(0, var(--measure));
	justify-content: center;
	gap: 56px;
	width: min(100%, var(--page));
	margin-inline: auto;
	padding-inline: var(--gutter);
	border-top: 2px solid var(--ink);
	padding-top: clamp(24px, 4vw, 40px);
	background-clip: content-box;
}

.article--toc .article__layout {
	grid-template-columns: 260px minmax(0, var(--measure));
	justify-content: start;
}

.article__feature {
	margin: 0 0 1.5em;
}

.toc {
	align-self: start;
	position: sticky;
	top: calc(var(--bar-height) + var(--admin-bar) + 24px);
	max-height: calc(100vh - var(--bar-height) - var(--admin-bar) - 48px);
	overflow-y: auto;
}

.toc summary {
	margin-bottom: 12px;
	color: var(--ink);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

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

.toc__item a {
	display: block;
	padding: 7px 0 4px 12px;
	border-left: 2px solid var(--line);
	color: var(--muted);
	font-size: 0.95rem;
	line-height: 1.25;
}

.toc__item--depth-1 a {
	padding-left: 24px;
}

.toc__item--depth-2 a {
	padding-left: 36px;
}

.toc__item a:hover {
	color: var(--ink);
}

.toc__item a[aria-current] {
	border-left-color: var(--accent);
	color: var(--ink);
	font-weight: 600;
}

@media (max-width: 1099px) {
	.article--toc .article__layout {
		grid-template-columns: minmax(0, var(--measure));
		justify-content: center;
		gap: 24px;
	}

	.toc {
		position: static;
		max-height: none;
		padding: 12px 16px 6px;
		background: var(--wash);
	}

	.toc summary {
		margin-bottom: 6px;
		list-style: revert;
	}

	.toc summary::-webkit-details-marker {
		display: revert;
	}

	.article--toc .prose {
		order: 2;
	}
}

/* Long-form content */
.prose {
	min-width: 0;
	font-size: 1.1875rem;
	line-height: 1.62;
}

.prose > * {
	margin-block: 0 1.15em;
}

.prose h2,
.prose h3,
.prose h4,
.prose h5 {
	margin-block: 1.7em 0.55em;
	font-weight: 600;
}

.prose h2 {
	font-size: 2rem;
}

.prose h3 {
	font-size: 1.6rem;
}

.prose h4 {
	font-size: 1.35rem;
}

.prose > :first-child {
	margin-top: 0;
}

.prose a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

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

.prose strong {
	color: var(--ink);
}

.prose ul,
.prose ol {
	padding-left: 1.3em;
	list-style: revert;
}

.prose li + li {
	margin-top: 0.35em;
}

.prose blockquote {
	margin-inline: 0;
	padding-left: 1em;
	border-left: 3px solid var(--ink);
	color: var(--ink);
	font-size: 1.3em;
	line-height: 1.35;
}

.prose hr {
	margin-block: 2.5em;
	border: 0;
	border-top: 1px solid var(--line);
}

.prose code {
	padding: 0.15em 0.3em 0.05em;
	background: var(--wash);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85em;
}

.prose pre {
	padding: 1.1em 1.25em;
	overflow-x: auto;
	background: var(--wash);
	border-left: 3px solid var(--ink);
	font-size: 0.82em;
	line-height: 1.5;
}

.prose pre code {
	padding: 0;
	background: none;
	font-size: inherit;
}

.prose figure {
	margin-inline: 0;
}

.prose figcaption {
	margin-top: 8px;
	color: var(--muted);
	font-size: 0.875rem;
	text-align: left;
}

.prose .wp-block-gallery {
	margin-bottom: 1.5em;
}

.prose .alignwide,
.prose .alignfull {
	max-width: 100%;
}

.prose .alignleft {
	float: left;
	max-width: 50%;
	margin: 0.3em 1.25em 0.75em 0;
}

.prose .alignright {
	float: right;
	max-width: 50%;
	margin: 0.3em 0 0.75em 1.25em;
}

.prose::after {
	content: "";
	display: block;
	clear: both;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.prose th,
.prose td {
	padding: 0.5em 0.6em 0.3em;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.prose .wp-block-embed iframe {
	width: 100%;
}

.article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	font-size: 0.95rem;
}

.article__tags a::before {
	content: "#";
}

/* Previous / next */
.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gap);
	margin-top: clamp(40px, 6vw, 72px);
}

.post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 16px;
	border-top: 2px solid var(--ink);
}

.post-nav__link--next {
	grid-column: 2;
	align-items: flex-end;
	text-align: right;
}

.post-nav__link strong {
	color: var(--ink);
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.2;
}

.post-nav__link:hover strong {
	color: var(--accent);
}

.post-nav .eyebrow .icon {
	width: 16px;
	height: 16px;
	margin-top: -3px;
}

.post-nav .eyebrow {
	gap: 4px;
}

@media (max-width: 600px) {
	.post-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.post-nav__link--next {
		grid-column: auto;
	}
}

.related {
	padding-bottom: clamp(16px, 3vw, 32px);
}

/* Comments */
.comments {
	padding-block: 16px clamp(40px, 6vw, 72px);
}

.comments__title,
.comment-reply-title {
	margin-bottom: 16px;
	font-size: 1.6rem;
}

.comment-list {
	margin-bottom: 40px;
}

.comment-list .children {
	margin-left: 24px;
}

.comment-item article {
	padding-block: 16px;
	border-top: 1px solid var(--line);
}

.comment-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 12px;
}

.comment-item__meta strong {
	color: var(--ink);
}

.comment-item__meta time {
	color: var(--muted);
	font-size: 0.9rem;
}

.comment-item__body p {
	margin-top: 8px;
}

.comment-item__pending {
	margin-top: 8px;
	color: var(--muted);
	font-style: italic;
}

.comment-reply-link {
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.comment-form p {
	margin-bottom: 14px;
}

.comment-form label {
	display: block;
	margin-bottom: 4px;
	font-weight: 500;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

.comment-form .submit,
.search-form .search-submit {
	padding: 0.8em 1.15em 0.6em;
	border: 0;
	background: var(--ink);
	color: var(--paper);
	font-weight: 600;
	cursor: pointer;
}

.comment-form .submit:hover,
.search-form .search-submit:hover {
	background: var(--accent);
}

.search-form {
	display: flex;
	gap: 8px;
	max-width: 520px;
}

.search-form label {
	flex: 1;
}

/* Page headers ------------------------------------------------------------ */
.page-header {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-block: clamp(32px, 6vw, 72px) clamp(24px, 4vw, 40px);
}

.page-header__title {
	font-size: clamp(2.6rem, 8vw, 6rem);
	line-height: 1;
	letter-spacing: -0.035em;
}

.page-header__intro {
	max-width: 60ch;
	font-size: 1.2rem;
}

.page-header__intro > * + * {
	margin-top: 0.8em;
}

/* Topic hubs -------------------------------------------------------------- */
.hub-header {
	padding-block: clamp(40px, 7vw, 88px);
	background: var(--band);
	color: var(--band-ink);
}

.hub-header .eyebrow {
	color: var(--band-muted);
}

.hub-header__title {
	margin-block: 10px 16px;
	color: var(--band-ink);
	font-size: clamp(2.8rem, 9vw, 7rem);
	line-height: 1;
	letter-spacing: -0.035em;
}

.hub-header__intro {
	max-width: 60ch;
	margin-bottom: 18px;
	font-size: 1.25rem;
}

.timeline {
	position: relative;
	padding-left: 24px;
	border-left: 2px solid var(--ink);
}

.timeline__year {
	position: relative;
	margin-block: 40px 8px;
	font-size: 2.25rem;
}

.timeline__year:first-child {
	margin-top: 0;
}

.timeline__year::before {
	content: "";
	position: absolute;
	top: 0.3em;
	left: -32px;
	width: 14px;
	height: 14px;
	background: var(--ink);
}

.timeline__item {
	position: relative;
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) 150px;
	gap: 8px 20px;
	padding-block: 20px;
	border-bottom: 1px solid var(--line);
}

.timeline__item::before {
	content: "";
	position: absolute;
	top: 28px;
	left: -29px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--paper);
	box-shadow: 0 0 0 2px var(--ink);
}

.timeline__date {
	padding-top: 4px;
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 500;
}

.timeline__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.timeline__title {
	font-size: 1.45rem;
}

.timeline__thumb {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--wash);
}

/* Without a thumbnail the text takes the free column. */
.timeline__item:not(:has(.timeline__thumb)) .timeline__body {
	grid-column: 2 / -1;
}

@media (max-width: 680px) {
	.timeline__item {
		grid-template-columns: minmax(0, 1fr);
	}

	.timeline__item:not(:has(.timeline__thumb)) .timeline__body {
		grid-column: auto;
	}

	.timeline__thumb {
		grid-row: 3;
	}
}

.topic-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 0 var(--gap);
	border-top: 2px solid var(--ink);
}

.topic-tile {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-block: 24px;
	border-bottom: 1px solid var(--line);
}

.topic-tile h2 {
	font-size: 1.75rem;
}

.topic-tile h2 a:hover {
	color: var(--accent);
}

/* Photos ------------------------------------------------------------------ */
.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(45%, 260px), 1fr));
	gap: 8px;
}

.photo-tile {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--wash);
}

.photo-tile--reel::after {
	left: 8px;
	top: 8px;
	bottom: auto;
	width: 32px;
	height: 32px;
}

.photo-tile:hover img {
	transform: scale(1.04);
}

.photo-tile__caption {
	position: absolute;
	inset: auto 0 0;
	padding: 28px 12px 8px;
	background: linear-gradient(transparent, rgb(0 0 0 / 0.75));
	color: #fff;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.2;
	opacity: 0;
	transition: opacity 0.2s;
}

.photo-tile:hover .photo-tile__caption,
.photo-tile:focus-visible .photo-tile__caption {
	opacity: 1;
}

@media (hover: none) {
	.photo-tile__caption {
		display: none;
	}
}

.photo-tile__count {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 7px 1px;
	background: rgb(0 0 0 / 0.75);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
}

.photo-tile__count .icon {
	width: 14px;
	height: 14px;
	margin-top: -2px;
}

.lightbox {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(0 0 0 / 0.95);
	color: #fff;
}

.lightbox[open] {
	display: grid;
	grid-template: 1fr auto / 64px minmax(0, 1fr) 64px;
	align-items: center;
	justify-items: center;
}

.lightbox::backdrop {
	background: #000;
}

.lightbox__image {
	grid-area: 1 / 2;
	max-width: 100%;
	max-height: calc(100dvh - 90px);
	object-fit: contain;
}

.lightbox .icon-button {
	color: #fff;
}

.lightbox .icon-button:hover {
	color: #fff;
	background: rgb(255 255 255 / 0.15);
}

.lightbox__nav--prev {
	grid-area: 1 / 1;
}

.lightbox__nav--next {
	grid-area: 1 / 3;
}

.lightbox__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
}

.lightbox__caption {
	grid-area: 2 / 1 / 2 / -1;
	padding: 14px 16px 18px;
	text-align: center;
}

.lightbox__caption a {
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.lightbox__caption a:hover {
	color: #fff;
}

.lightbox__caption span {
	margin-left: 12px;
	color: #bdbdbd;
	font-size: 0.9rem;
}

@media (max-width: 600px) {
	.lightbox[open] {
		grid-template-columns: 44px minmax(0, 1fr) 44px;
	}
}

/* Projects ---------------------------------------------------------------- */
.project-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
	gap: var(--gap);
}

.project-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 300px;
	padding: clamp(20px, 2.5vw, 32px);
	border: 2px solid var(--ink);
	transition: background-color 0.2s, color 0.2s;
}

.project-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.project-card__number {
	color: var(--muted);
	font-weight: 500;
}

.project-card__title {
	font-size: clamp(1.8rem, 3vw, 2.5rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.project-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.project-card {
	position: relative;
}

.project-card:hover {
	background: var(--ink);
	color: var(--paper);
}

.project-card:hover .project-card__title a,
.project-card:hover .project-card__number {
	color: var(--paper);
}

.project-card:hover .status {
	border-color: var(--paper);
	color: var(--paper);
}

.project-card:hover .status--active,
.project-card:hover .status--shipped {
	background: var(--paper);
	color: var(--ink);
}

.project-card__link {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.project-card:hover .project-card__link {
	color: var(--paper);
}

.project-card__link .icon {
	width: 16px;
	height: 16px;
	margin-top: -3px;
}

.status {
	display: inline-block;
	padding: 0.35em 0.65em 0.15em;
	border: 1px solid var(--ink);
	color: var(--ink);
	font-size: 0.8rem;
	font-weight: 700;
}

.status--active,
.status--shipped {
	background: var(--ink);
	color: var(--paper);
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
	margin-top: clamp(24px, 4vw, 48px);
	padding-block: clamp(40px, 6vw, 72px) 24px;
	background: var(--band);
	color: var(--band-ink);
}

.site-footer a:hover {
	color: var(--band-ink);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.band + .site-footer,
.home-topics + .site-footer {
	margin-top: 0;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 32px var(--gap);
}

.site-footer__brand > a {
	display: block;
	max-width: 12ch;
	margin-bottom: 16px;
	font-size: clamp(2rem, 4.5vw, 3.5rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
}

.site-footer__brand .social-links {
	margin-left: -10px;
}

.site-footer__brand .icon-button:hover {
	color: var(--band-ink);
	text-decoration: none;
	background: rgb(255 255 255 / 0.15);
}

.site-footer__heading {
	margin-bottom: 10px;
	color: var(--band-muted);
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0;
}

.site-footer .nav-menu {
	flex-direction: column;
	gap: 2px;
}

.site-footer .nav-menu a,
.site-footer__topics a {
	display: block;
	padding-block: 3px 1px;
	border: 0;
	color: var(--band-ink);
	font-weight: 400;
}

.site-footer .nav-menu .sub-menu {
	position: static;
	display: none;
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 40px;
	padding-top: 16px;
	color: var(--band-muted);
	font-size: 0.9rem;
}

.site-footer__legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.site-footer__legal::before {
	content: "";
	flex-basis: 100%;
	height: 1px;
	background: var(--band-line);
}

@media (max-width: 760px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}
}

/* Motion ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}

/* Print ------------------------------------------------------------------- */
@media print {
	.site-bar,
	.site-footer,
	.toc,
	.post-nav,
	.related,
	.comments {
		display: none;
	}
}
