/* Revival Diaries: minimal editorial. No web fonts, no scripts, no third-party requests. */
:root {
	--base: #faf8f3;
	--surface: #fffdf8;
	--ink: #1a1915;
	--muted: #6a655a;
	--accent: #9a4a1f;
	--rule: #e4dfd2;
	--tint: #f1ede2;
	--flame: linear-gradient(90deg, #ffb000 0%, #ef4a0f 55%, #c1121f 100%);

	--body: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
	--display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, Georgia, serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--measure: 40rem;
	--wide: 64rem;
	--ease: cubic-bezier(.2, .6, .2, 1);
}
@media (prefers-color-scheme: dark) {
	:root {
		--base: #14130f;
		--surface: #1a1813;
		--ink: #ece7dc;
		--muted: #a09a8b;
		--accent: #e8a964;
		--rule: #2b2923;
		--tint: #1f1d17;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--base);
	color: var(--ink);
	font: 1.125rem/1.72 var(--body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	hanging-punctuation: first;
}
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
a { color: var(--accent); text-underline-offset: .22em; text-decoration-thickness: 1px; transition: color .18s var(--ease); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--base); padding: .6rem 1rem; z-index: 30; }
.skip:focus { left: 0; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.wrap.wide { max-width: var(--wide); }
main.wrap { padding-top: 4rem; min-height: 60vh; }

/* ------------------------------------------------------------ header */
.site-header {
	font-family: var(--sans);
	border-bottom: 1px solid var(--rule);
	background: var(--flame) top / 100% 3px no-repeat, var(--base);
}
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.2rem/1 var(--display); letter-spacing: .005em; color: var(--ink); text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; transition: transform .35s var(--ease); }
.brand:hover img { transform: translateY(-1px) scale(1.06); }
.brand:hover { color: var(--ink); }
nav { display: flex; flex-wrap: wrap; gap: .25rem 0; }
nav a { position: relative; font-size: .8125rem; letter-spacing: .02em; color: var(--ink); text-decoration: none; margin-left: 1.5rem; padding: .35rem 0; }
nav a:first-child { margin-left: 0; }
nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--flame); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
nav a:hover { color: var(--ink); }
nav a:hover::after, nav a[aria-current]::after { transform: scaleX(1); }
nav a[aria-current] { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------ type */
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.18; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.2vw, 2.8rem); letter-spacing: -.015em; margin: .5rem 0 2.25rem; }
.page-title { margin-bottom: 2rem; }
.lede { font-size: 1.25rem; line-height: 1.6; color: var(--muted); margin: 0 0 1rem; max-width: 34rem; text-wrap: pretty; }

.hero { padding: 1rem 0 .5rem; }
.hero::before { content: ""; display: block; width: 3.25rem; height: 4px; border-radius: 2px; background: var(--flame); margin-bottom: 1.6rem; }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 3.6rem); line-height: 1.08; letter-spacing: -.022em; margin: 0 0 1.4rem; }

.label { display: flex; align-items: center; gap: 1rem; font: 600 .75rem/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 4.5rem 0 .5rem; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ------------------------------------------------------------ post list */
.post-row { border-top: 1px solid var(--rule); padding: 1.85rem 0; position: relative; }
.post-row:last-of-type { border-bottom: 1px solid var(--rule); }
.post-row h2 { font-size: 1.5rem; margin: .5rem 0 .55rem; letter-spacing: -.01em; }
.post-row h2 a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease), color .18s var(--ease); }
.post-row h2 a:hover { color: var(--accent); background-size: 100% 1px; }
.excerpt { margin: 0; color: var(--muted); text-wrap: pretty; }
.meta { font: .75rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap; align-items: center; }
.meta > :not(:last-child)::after { content: "·"; margin: 0 .6rem; opacity: .7; }
.meta a { color: var(--accent); font-weight: 600; text-decoration: none; }
.meta a:hover { color: var(--ink); }
.more { font: 600 .875rem var(--sans); margin-top: 1.75rem; }
.more a { text-decoration: none; }
.more a:hover { text-decoration: underline; }

/* topics as pills */
.topics { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.topics a { display: inline-flex; align-items: baseline; gap: .55rem; padding: .5rem 1rem; border: 1px solid var(--rule); border-radius: 99px; background: var(--surface); font: .95rem/1.2 var(--display); color: var(--ink); text-decoration: none; transition: border-color .18s var(--ease), transform .18s var(--ease); }
.topics a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.topics small { font: .7rem var(--sans); color: var(--muted); }

/* ------------------------------------------------------------ article */
.post h1 { margin: .75rem 0 0; font-size: clamp(2.1rem, 5.6vw, 3rem); line-height: 1.1; letter-spacing: -.02em; }
/* article header: title on the left, image on the right on wide screens */
.post-head { display: grid; gap: 1.5rem; margin-bottom: 2.25rem; }
.post-head h1 { margin: .75rem 0 0; }
.hero-img { margin: 0; max-width: 28rem; }
.hero-img img, .post-row.has-img .thumb, .prose img { border-radius: 6px; box-shadow: 0 0 0 1px var(--rule), 0 10px 24px -14px rgba(26, 25, 21, .45); }
.hero-img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--tint); }
@media (min-width: 56rem) {
	.post-head.has-img { grid-template-columns: minmax(0, 1fr) 15.5rem; gap: 2.25rem; align-items: center; margin-right: -6.5rem; }
	.post-head.has-img .hero-img { max-width: none; }
	.post-head.has-img h1 { font-size: clamp(2rem, 3.4vw, 2.5rem); }
}

.prose { text-wrap: pretty; }
.prose h2 { font-size: 1.65rem; margin: 2.4em 0 .5em; letter-spacing: -.01em; }
.prose h3 { font-size: 1.25rem; margin: 1.9em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.35em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }
.prose a { text-decoration-thickness: 1px; }
.prose strong { font-weight: 700; }
.post .prose > p:first-of-type::first-letter { font: 700 3.6em/.85 var(--display); float: left; padding: .06em .12em 0 0; color: var(--accent); }
.prose img { display: block; max-width: min(100%, 26rem); height: auto; margin: 1.8em 0; }

.callout { position: relative; margin: 2em 0; border-left: 3px solid transparent; border-image: linear-gradient(#ffb000, #c1121f) 1; background: var(--tint); padding: 1.15em 1.5em 1.15em 1.6em; font: italic 1.15rem/1.6 var(--display); }
blockquote { margin: 1.8em 0; padding-left: 1.4rem; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink); }
hr { border: 0; text-align: center; margin: 3rem 0; }
hr::after { content: "· · ·"; letter-spacing: .6em; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; font: .9375rem/1.4 var(--display); }
.pager a { display: block; padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .18s var(--ease), transform .18s var(--ease); }
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.pager small { display: block; font: 600 .7rem var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: .35rem; }
.pager .next { text-align: right; grid-column: 2; }
.pager span:empty { display: none; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: auto; } }

/* reading progress bar (CSS only; hidden where scroll timelines are unsupported) */
@supports (animation-timeline: scroll()) {
	body.is-post::before { content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: var(--flame); transform: scaleX(0); transform-origin: 0 50%; animation: progress linear both; animation-timeline: scroll(root); z-index: 20; }
	@keyframes progress { to { transform: scaleX(1); } }
}

/* ------------------------------------------------------------ list images */
.post-row.has-img { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0 1.75rem; align-items: start; }
.post-row.has-img .thumb { grid-column: 1; grid-row: 1; display: block; overflow: hidden; }
.post-row.has-img .row-text { grid-column: 2; grid-row: 1; }
.post-row.has-img .thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--tint); transition: transform .5s var(--ease); }
.post-row.has-img:hover .thumb img { transform: scale(1.05); }
.post-row.has-img h2 { margin-top: .35rem; }
@media (max-width: 560px) { .post-row.has-img { grid-template-columns: 6.25rem minmax(0, 1fr); gap: 0 1rem; } .post-row.has-img .excerpt { display: none; } .post-row.has-img h2 { font-size: 1.25rem; } }

/* ------------------------------------------------------------ contact form */
.contact { display: grid; gap: 1.25rem; font-family: var(--sans); margin-top: 1.75rem; }
.contact label { display: grid; gap: .4rem; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.contact input, .contact textarea { font: 1rem/1.5 var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); padding: .8rem .95rem; border-radius: 4px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.contact input:focus, .contact textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.contact button { justify-self: start; font: 600 .875rem/1 var(--sans); letter-spacing: .03em; background: var(--ink); color: var(--base); border: 0; padding: .95rem 1.7rem; border-radius: 4px; cursor: pointer; transition: background .2s var(--ease), transform .15s var(--ease); }
.contact button:hover { background: var(--accent); }
.contact button:active { transform: translateY(1px); }
.hp { position: absolute; left: -9999px; }
.notice { background: var(--tint); border-left: 3px solid var(--accent); padding: 1rem 1.25rem; font: .9375rem var(--sans); border-radius: 0 4px 4px 0; }

/* ------------------------------------------------------------ footer */
.site-footer { margin-top: 6rem; background: var(--tint); border-top: 1px solid var(--rule); font: .875rem/1.65 var(--sans); color: var(--muted); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem 3rem; padding-top: 3rem; padding-bottom: 2.5rem; }
.foot-brand { display: flex; flex-direction: column; gap: .4rem; }
.foot-brand .brand { margin-bottom: .25rem; }
.foot-brand p { margin: 0; max-width: 26rem; }
.foot-nav { display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }
.foot-nav a { color: var(--ink); text-decoration: none; margin: 0; }
.foot-nav a:hover { color: var(--accent); }
.foot-copy { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--rule); margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.foot-copy a { color: inherit; }
.foot-copy a:hover { color: var(--accent); }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ responsive, motion, print */
@media (max-width: 600px) {
	body { font-size: 1.0625rem; }
	main.wrap { padding-top: 2.75rem; }
	.post .prose > p:first-of-type::first-letter { font-size: 3.2em; }
	nav a { margin-left: 1.1rem; }
	.label { margin-top: 3.5rem; }
}
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	body.is-post::before { display: none; }
	@view-transition { navigation: none; }
}
@media print {
	.site-header, .site-footer, .pager { display: none; }
	body { background: #fff; color: #000; }
	body.is-post::before { display: none; }
}
