/*
 * Stoop's default theme. A theme is this stylesheet plus theme.json, which
 * lists the custom properties people can change in the theme editor. The
 * editor's values are added after this file as :root { --stoop-…: … }, so
 * they win over both the light and dark defaults below.
 */
:root {
	--stoop-bg: #fbfaf7;
	--stoop-surface: #ffffff;
	--stoop-text: #1d1d1f;
	--stoop-muted: #6b6b70;
	--stoop-accent: #c2410c;
	--stoop-border: #e6e3dc;
	--stoop-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--stoop-font-heading: var(--stoop-font);
	--stoop-width: 42rem;
	--stoop-radius: 0.5rem;
}
@media (prefers-color-scheme: dark) {
	:root {
		--stoop-bg: #16161a;
		--stoop-surface: #1f1f24;
		--stoop-text: #ececef;
		--stoop-muted: #9a9aa3;
		--stoop-accent: #fb923c;
		--stoop-border: #2e2e35;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}
body {
	margin: 0;
	background:
		var(--stoop-bg) var(--stoop-background-image, none) center / cover fixed;
	color: var(--stoop-text);
	font-family: var(--stoop-font);
	line-height: 1.6;
}
main {
	max-width: var(--stoop-width);
	margin: 0 auto;
	padding: 1.5rem 1rem 4rem;
}
a {
	color: var(--stoop-accent);
}
h1,
h2,
h3 {
	font-family: var(--stoop-font-heading);
	line-height: 1.2;
}
img {
	max-width: 100%;
	height: auto;
}
time,
.byline,
.handle {
	color: var(--stoop-muted);
}
code,
pre {
	font-size: 0.9em;
}
pre {
	overflow-x: auto;
	padding: 1rem;
	background: var(--stoop-surface);
	border-radius: var(--stoop-radius);
}
blockquote {
	margin-left: 0;
	padding-left: 1rem;
	border-left: 3px solid var(--stoop-border);
	color: var(--stoop-muted);
}

/* Profile header: banner, avatar overlapping it, name and handle. */
.block-bio > header {
	margin-bottom: 2rem;
}
.profile-header {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 1;
	object-fit: cover;
	border-radius: var(--stoop-radius);
}
.avatar {
	display: block;
	width: 6rem;
	height: 6rem;
	object-fit: cover;
	border-radius: 50%;
	border: 4px solid var(--stoop-bg);
	background: var(--stoop-surface);
}
.profile-header + .avatar {
	margin-top: -3rem;
	margin-left: 1rem;
}
.block-bio > header h1 {
	margin: 0.5rem 0 0;
}
.handle {
	margin: 0;
}

/* Lists of posts. */
.post-list {
	list-style: none;
	padding: 0;
}
.post-item {
	padding: 1rem 0;
	border-bottom: 1px solid var(--stoop-border);
}
.post-item.post-article > a:first-child {
	font-size: 1.15rem;
	font-weight: 600;
}
.post-item .permalink {
	display: inline-block;
	font-size: 0.875rem;
	text-decoration: none;
}
.note-content > p:first-child {
	margin-top: 0;
}

/* A single post. */
.post article h1 {
	margin-bottom: 0.25rem;
}
.post footer {
	margin-top: 2rem;
	font-size: 0.9rem;
}
.tags {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Attached images: one wide, or a grid. */
.attachments {
	display: grid;
	gap: 0.5rem;
	margin: 1rem 0;
}
.attachments.count-2,
.attachments.count-4 {
	grid-template-columns: 1fr 1fr;
}
.attachments.count-3 {
	grid-template-columns: 1fr 1fr 1fr;
}
.attachments figure {
	margin: 0;
}
.attachments img {
	display: block;
	width: 100%;
	border-radius: var(--stoop-radius);
	background: var(--stoop-surface);
}
.attachments:not(.count-1) img {
	aspect-ratio: 1;
	object-fit: cover;
}

/* Site menu. */
.site-header {
	max-width: var(--stoop-width);
	margin: 0 auto;
	padding: 1rem 1rem 0;
}
.site-menu ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	padding: 0;
	margin: 0;
}
.site-menu a {
	text-decoration: none;
	font-weight: 600;
}

/* Blocks on a page. */
.block {
	margin: 0 0 2rem;
}
.block > h2:first-child {
	margin-top: 0;
}
.block-bio > header {
	margin-bottom: 1rem;
}
.block-image {
	margin-left: 0;
	margin-right: 0;
}
.block-image img {
	display: block;
	border-radius: var(--stoop-radius);
}
.block-image figcaption {
	color: var(--stoop-muted);
	font-size: 0.9rem;
	margin-top: 0.5rem;
}

.block-links ul {
	list-style: none;
	padding: 0;
}
.block-links.style-list li {
	margin: 0.35rem 0;
}
.block-links.style-buttons ul {
	display: grid;
	gap: 0.75rem;
}
.block-links.style-buttons a {
	display: block;
	padding: 0.9rem 1rem;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	color: var(--stoop-text);
	background: var(--stoop-surface);
	border: 1px solid var(--stoop-border);
	border-radius: var(--stoop-radius);
}
.block-links.style-buttons a:hover {
	border-color: var(--stoop-accent);
	color: var(--stoop-accent);
}

/* Bio, centred (the link-in-bio look): no banner, everything in the middle. */
.block-bio.style-centered {
	text-align: center;
}
.block-bio.style-centered .avatar {
	width: 7rem;
	height: 7rem;
	margin: 0 auto;
	border: 0;
}
.block-bio.style-centered .bio > p {
	margin-left: auto;
	margin-right: auto;
}
