:root {
	--bg:        #f8f6f1;
	--surface:   #efece4;
	--fg:        #23292b;
	--muted:     #6b7476;
	--border:    #dcd8cd;
	--accent:    #1f6f6f; /* deep teal */
	--accent-hi: #2b8a87;
	--accent-bg: #dcebe8;

	--font-display: "Fraunces", Georgia, serif;
	--font-body:    "Literata", Georgia, serif;
	--font-mono:    "JetBrains Mono", ui-monospace, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg:        #141a1b;
		--surface:   #1c2426;
		--fg:        #e2e4df;
		--muted:     #8e9a9a;
		--border:    #2c3739;
		--accent:    #5fb5ad;
		--accent-hi: #85cdc5;
		--accent-bg: #1d3533;
	}
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
	margin: 0 auto;
	max-width: 44rem;
	padding: 0 1.25rem 3rem;
	font: 400 1.125rem/1.75 var(--font-body);
	color: var(--fg);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body::before {
	content: "";
	position: fixed;
	inset: 0 0 auto 0;
	height: 4px;
	background: linear-gradient(90deg, var(--accent), var(--accent-hi));
}

::selection { background: var(--accent-bg); color: var(--fg); }

a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
	transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--accent-hi); text-decoration-color: currentColor; }

/* Header */
.site-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .75rem 1.5rem;
	padding: 2.5rem 0 1.25rem;
	margin-bottom: 3rem;
	border-bottom: 1px solid var(--border);
}
.site-title {
	font: 700 1.6rem/1 var(--font-display);
	letter-spacing: -.01em;
	color: var(--fg);
	text-decoration: none;
}
.site-title:hover { color: var(--accent); }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a {
	font: 600 .8rem/1 var(--font-mono);
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
	text-decoration: none;
}
.site-header nav a:hover { color: var(--accent); }

/* Type */
h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.015em;
	margin: 2.5rem 0 1rem;
}
h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 700; margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h2::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 3px;
	margin-bottom: .75rem;
	background: var(--accent);
	border-radius: 2px;
}

p, ul, ol { margin: 0 0 1.25rem; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }
img { max-width: 100%; border-radius: 6px; }

blockquote {
	margin: 2rem 0;
	padding: .25rem 0 .25rem 1.25rem;
	border-left: 3px solid var(--accent);
	font-style: italic;
	color: var(--muted);
}

/* Home */
.intro {
	font: 400 1.5rem/1.4 var(--font-display);
	font-style: italic;
	color: var(--muted);
	margin-bottom: 3rem;
}

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
	display: flex;
	gap: 1.5rem;
	align-items: baseline;
	padding: .9rem 0;
	border-bottom: 1px solid var(--border);
}
.post-list li:first-child { border-top: 1px solid var(--border); }
.post-list time {
	flex: 0 0 6.5rem;
	font: 400 .8rem/1 var(--font-mono);
	color: var(--muted);
}
.post-list a {
	font: 600 1.2rem/1.35 var(--font-display);
	color: var(--fg);
	text-decoration: none;
}
.post-list a:hover { color: var(--accent); }

/* Articles */
article header { margin-bottom: 2.5rem; }
.meta {
	font: 400 .85rem/1.6 var(--font-mono);
	color: var(--muted);
}
.meta a {
	display: inline-block;
	padding: .1rem .55rem;
	margin: 0 .15rem;
	border-radius: 999px;
	background: var(--accent-bg);
	color: var(--accent);
	text-decoration: none;
	font-size: .75rem;
}
.meta a:hover { background: var(--accent); color: var(--bg); }

/* Code */
code, pre { font-family: var(--font-mono); font-size: .85em; }
code {
	padding: .15em .4em;
	border-radius: 4px;
	background: var(--surface);
}
pre {
	padding: 1.1rem 1.25rem;
	overflow-x: auto;
	line-height: 1.6;
	border-radius: 8px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
}
pre code { padding: 0; background: none; font-size: inherit; }

footer {
	margin-top: 5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	font: 400 .8rem/1 var(--font-mono);
	color: var(--muted);
}

@media (max-width: 540px) {
	body { font-size: 1.05rem; }
	.post-list li { flex-direction: column; gap: .35rem; }
	.post-list time { flex-basis: auto; }
}
