/* Newsprint — Financial-Times-inspired theme matching triwats.com.
   Palette + type ported from the portfolio's src/app.css. */

:root {
	--cream: #FFF1E5;
	--cream-dark: #F5E6D5;
	--paper: #FFF7EF;
	--body: #33302E;
	--brown-dark: #66605C;
	--brown-mid: #8A8480;
	--rule: #CCC1B7;
	--border: #E6DECF;
	--accent: #990F3D;
	--accent-dark: #660A29;
	--quote: #0F5499;

	--font-headline: 'Playfair Display', Georgia, serif;
	--font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'Courier New', Courier, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--cream);
	color: var(--body);
	font-family: var(--font-body);
	font-size: 1.05rem;
	line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* ---------- Masthead ---------- */
.masthead {
	background: var(--cream);
	border-bottom: 1px solid var(--rule);
	box-shadow: 0 2px 8px rgba(102, 96, 92, 0.08);
}
.masthead-inner {
	max-width: 820px;
	margin: 0 auto;
	padding: 1rem 1.25rem 1.5rem;
}
.masthead-nav {
	display: flex;
	justify-content: flex-end;
	gap: 1.75rem;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	padding-bottom: 0.9rem;
	border-bottom: 1px solid var(--rule);
}
.masthead-nav a { color: var(--brown-dark); }
.masthead-nav a:hover { color: var(--accent); }
.masthead-nav .masthead-back { margin-right: auto; }
.masthead-title {
	font-family: var(--font-headline);
	font-weight: 800;
	font-size: clamp(2.4rem, 6vw, 3.5rem);
	line-height: 1;
	letter-spacing: -0.01em;
	text-align: center;
	margin: 1.6rem 0 0;
}
.masthead-title a { color: #000; }
.masthead-date {
	text-align: center;
	font-size: 0.85rem;
	color: var(--brown-dark);
	padding-top: 0.6rem;
	margin-top: 0.9rem;
	border-top: 1px solid var(--rule);
}

/* ---------- Layout ---------- */
.wrap {
	max-width: 820px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 3rem;
}
.lead {
	font-family: var(--font-headline);
	font-style: italic;
	font-size: 1.25rem;
	color: var(--brown-dark);
	margin: 0 0 2.5rem;
}

/* ---------- Post list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row {
	display: flex;
	gap: 1.75rem;
	align-items: flex-start;
	padding: 2rem 0;
	border-bottom: 1px solid var(--rule);
}
.post-row:first-child { padding-top: 0; }
.post-row-body { flex: 1; min-width: 0; }
.post-row-body .tag { margin-bottom: 0.6rem; }
.post-row-thumb {
	flex: 0 0 210px;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border: 1px solid var(--border);
	box-shadow: 0 2px 6px rgba(102, 96, 92, 0.12);
}
.post-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.post-row-thumb:hover img { transform: scale(1.03); }
.post-title {
	font-family: var(--font-headline);
	font-weight: 700;
	font-size: 1.9rem;
	line-height: 1.15;
	margin: 0 0 0.5rem;
}
.post-title a {
	color: #000;
	background-image: linear-gradient(var(--accent), var(--accent));
	background-size: 0% 2px;
	background-position: left bottom;
	background-repeat: no-repeat;
	transition: background-size 0.3s ease, color 0.2s ease;
	padding-bottom: 2px;
}
.post-title a:hover { color: var(--accent); background-size: 100% 2px; }
.post-summary { margin: 0 0 1rem; color: var(--body); }
.read-more {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-left: auto;
	white-space: nowrap;
}

/* ---------- Byline ---------- */
.byline { display: flex; align-items: center; gap: 0.7rem; }
.byline-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.byline-text { display: flex; flex-direction: column; line-height: 1.25; }
.byline-name { font-weight: 600; color: #000; font-size: 0.9rem; }
.byline-text time, .byline-text .article-meta {
	font-size: 0.76rem;
	color: var(--brown-dark);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.byline-article { margin-top: 0.85rem; }

/* ---------- Image placeholder (ported from portfolio src/app.css) ---------- */
.img-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background-color: #F2DFCE;
	background-image:
		linear-gradient(135deg, rgba(102, 96, 92, 0.03) 25%, transparent 25%),
		linear-gradient(225deg, rgba(102, 96, 92, 0.03) 25%, transparent 25%),
		linear-gradient(315deg, rgba(102, 96, 92, 0.03) 25%, transparent 25%),
		linear-gradient(45deg, rgba(102, 96, 92, 0.03) 25%, transparent 25%);
	background-size: 20px 20px;
	background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

@media (max-width: 620px) {
	.post-row { flex-direction: column-reverse; gap: 1rem; }
	.post-row-thumb { flex-basis: auto; width: 100%; }
}

/* ---------- Article ---------- */
.article { max-width: 680px; margin: 0 auto; }
.article-header { margin-bottom: 2rem; }
.article-title {
	font-family: var(--font-headline);
	font-weight: 800;
	font-size: clamp(2rem, 5vw, 2.9rem);
	line-height: 1.1;
	color: #000;
	margin: 0 0 0.75rem;
}
.article-meta {
	font-size: 0.82rem;
	color: var(--brown-dark);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.standfirst {
	font-family: var(--font-headline);
	font-style: italic;
	font-size: 1.3rem;
	line-height: 1.45;
	color: var(--brown-dark);
	margin: 1.25rem 0 0;
	padding-left: 1rem;
	border-left: 3px solid var(--accent);
}
.article-hero {
	margin: 0 0 2rem;
}
.article-hero img {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var(--border);
}

/* ---------- Prose ---------- */
.prose { font-size: 1.08rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.3rem; }
.prose h1, .prose h2, .prose h3, .prose h4 {
	font-family: var(--font-headline);
	font-weight: 700;
	line-height: 1.2;
	color: #000;
	margin-top: 2.4rem;
}
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.1rem; }
.prose p { margin: 0; }
.prose a {
	text-decoration: underline;
	text-decoration-color: rgba(153, 15, 61, 0.35);
	text-underline-offset: 2px;
}
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4rem; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--border); }
.prose figure { margin: 2rem 0; }
.prose figcaption {
	font-family: var(--font-headline);
	font-style: italic;
	font-size: 0.85rem;
	color: var(--brown-dark);
	margin-top: 0.5rem;
}
.prose blockquote {
	position: relative;
	margin: 2rem 0;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 3px solid var(--quote);
	font-family: var(--font-headline);
	font-style: italic;
	font-size: 1.25rem;
	color: var(--body);
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: var(--cream-dark); }

/* Inline + block code (Chroma inline styles handle token colours) */
.prose code {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: var(--cream-dark);
	padding: 0.1rem 0.35rem;
	border-radius: 3px;
}
.prose pre {
	font-family: var(--font-mono);
	font-size: 0.88rem;
	line-height: 1.5;
	padding: 1rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow-x: auto;
	background: var(--paper);
}
.prose pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }

/* ---------- Tags ---------- */
.article-tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #fff;
	background: var(--accent);
	padding: 0.25rem 0.55rem;
}
.tag:hover { color: #fff; background: var(--accent-dark); }
.tag-count { font-weight: 400; opacity: 0.8; }
.tag-cloud { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }

.article-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.back-link, .read-more, .article-foot a { font-weight: 700; }

.list-header { margin-bottom: 1.5rem; }
.list-title { font-family: var(--font-headline); font-weight: 800; font-size: 2.2rem; color: #000; margin: 0; }

/* ---------- Pagination (Hugo internal) ---------- */
.pagination {
	list-style: none;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	margin: 2.5rem 0 0;
}
.pagination .page-item a, .pagination .page-item span {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--border);
	color: var(--brown-dark);
	font-size: 0.9rem;
}
.pagination .page-item.active span { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .page-item.disabled span { opacity: 0.4; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--cream-dark);
	border-top: 2px solid var(--rule);
	margin-top: 3rem;
	box-shadow: inset 0 4px 8px rgba(102, 96, 92, 0.06);
}
.site-footer-inner {
	max-width: 820px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: space-between;
	align-items: flex-start;
}
.site-footer-title { font-family: var(--font-headline); font-weight: 700; font-size: 1.25rem; }
.site-footer-desc { color: var(--brown-dark); font-size: 0.9rem; margin: 0.4rem 0 0; max-width: 30ch; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.site-footer-links a { color: var(--brown-dark); }
.site-footer-links a:hover { color: var(--accent); }
.site-footer-legal {
	max-width: 820px;
	margin: 0 auto;
	padding: 1rem 1.25rem 2rem;
	font-size: 0.8rem;
	color: var(--brown-mid);
}
