/* Reset and base styles */
* {
	box-sizing: border-box;
}

html {
	background-color: #fff;
	font-size: 18px;
}

body {
	font-family: charter, 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, Georgia, serif;
	font-size: 1.167rem; /* 21px */
	line-height: 1.58;
	color: #1a1a1a;
	max-width: 680px;
	margin: 0 auto;
	padding: 3rem 1.5rem;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Typography scale */
h1, h2, h3 {
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	line-height: 1.15;
}

h1 {
	font-size: 2.889rem; /* 52px */
	margin-top: 0;
	margin-bottom: 0.5rem;
	letter-spacing: -0.03em;
}

h2 {
	font-size: 1.778rem; /* 32px */
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: 400;
	color: #666;
}

h2.subtitle {
	margin-top: 0.5rem;
	margin-bottom: 2.5rem;
}

h3 {
	font-size: 1.333rem; /* 24px */
	margin-top: 2rem;
	margin-bottom: 1rem;
}

p {
	margin: 0 0 1.75rem 0;
	line-height: 1.68;
}

/* Links */
a {
	color: #0066cc;
	text-decoration: none;
	border-bottom: 1px solid rgba(0, 102, 204, 0.3);
	transition: all 0.15s ease;
}

a:hover {
	color: #004499;
	border-bottom-color: rgba(0, 68, 153, 0.6);
}

/* Lists */
ul {
	line-height: 1.68;
	list-style-type: disc;
	margin: 0 0 1.75rem 0;
	padding-left: 1.5rem;
}

li {
	margin-bottom: 0.5rem;
}

/* Images */
img {
	max-width: 100%;
	height: auto;
	display: inline-block;
	vertical-align: middle;
	margin-right: 1rem;
}

/* Blog post images */
article img,
.e-content img,
.blog-post-preview img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 2rem 0;
	margin-right: 0;
}

/* Blog post list */
.blog-posts {
	margin-top: 3rem;
}

.blog-post-preview {
	margin-bottom: 3rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-post-preview:last-child {
	border-bottom: none;
}

.blog-post-preview h3 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-size: 1.556rem; /* 28px */
	font-weight: 600;
}

.blog-post-preview h3 a {
	color: #1a1a1a;
	border-bottom: none;
	transition: color 0.15s ease;
}

.blog-post-preview h3 a:hover {
	color: #0066cc;
}

.blog-post-preview time {
	display: block;
	font-size: 0.889rem; /* 16px */
	color: #666;
	margin-bottom: 0.75rem;
}

.blog-post-preview .excerpt {
	color: #4a4a4a;
	margin-bottom: 1rem;
	line-height: 1.6;
}

.blog-post-preview p:last-child {
	margin-bottom: 0;
}

/* Code styling */
code {
	font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
	font-size: 0.889em;
	background-color: rgba(0, 0, 0, 0.05);
	padding: 0.2em 0.4em;
	border-radius: 3px;
}

pre {
	background-color: rgba(0, 0, 0, 0.05);
	padding: 1rem 1.25rem;
	border-radius: 6px;
	overflow-x: auto;
	margin: 1.75rem 0;
	line-height: 1.5;
}

pre code {
	background-color: transparent;
	padding: 0;
	font-size: 0.889rem;
}

/* Blockquotes */
blockquote {
	margin: 2rem 0;
	padding-left: 1.5rem;
	border-left: 3px solid rgba(0, 0, 0, 0.15);
	color: #4a4a4a;
	font-style: italic;
}

blockquote p {
	margin-bottom: 1rem;
}

blockquote p:last-child {
	margin-bottom: 0;
}

/* Footer */
footer {
	margin-top: 5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

footer p {
	font-size: 0.889rem; /* 16px */
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}

footer a {
	border-bottom: none;
	opacity: 0.7;
	transition: opacity 0.15s ease;
}

footer a:hover {
	opacity: 1;
	border-bottom: none;
}

/* Navigation */
ul.navigation {
	padding: 0;
	margin: 0;
}

ul.navigation li {
	display: inline;
	list-style-type: none;
	margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
	html {
		font-size: 16px;
	}

	body {
		padding: 2rem 1.25rem;
	}

	h1 {
		font-size: 2.222rem; /* 40px */
	}

	h2 {
		font-size: 1.556rem; /* 28px */
	}

	h3 {
		font-size: 1.222rem; /* 22px */
	}

	img {
		margin-right: 0.5rem;
		margin-bottom: 0.5rem;
	}
}

@media (min-width: 769px) {
	body {
		padding: 4rem 2rem;
	}
}

/* Accessibility improvements */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* External link indicator */
a[target="_blank"]:after {
	content: " ↗";
	font-size: 0.75em;
	opacity: 0.5;
	margin-left: 0.15em;
}

/* Dark mode - elegant monochrome */
@media (prefers-color-scheme: dark) {
	html {
		background-color: #0a0a0a;
	}

	body {
		background-color: #0a0a0a;
		color: #e6e6e6;
	}

	h1 {
		color: #fff;
	}

	h2 {
		color: #999;
	}

	a {
		color: #66b3ff;
		border-bottom-color: rgba(102, 179, 255, 0.3);
	}

	a:hover {
		color: #99ccff;
		border-bottom-color: rgba(153, 204, 255, 0.6);
	}

	footer {
		border-top-color: rgba(255, 255, 255, 0.1);
	}

	footer a {
		opacity: 0.6;
	}

	footer a:hover {
		opacity: 1;
	}

	/* Blog post list - dark mode */
	.blog-post-preview {
		border-bottom-color: rgba(255, 255, 255, 0.08);
	}

	.blog-post-preview h3 a {
		color: #e6e6e6;
	}

	.blog-post-preview h3 a:hover {
		color: #66b3ff;
	}

	.blog-post-preview time {
		color: #999;
	}

	.blog-post-preview .excerpt {
		color: #b3b3b3;
	}

	/* Code - dark mode */
	code {
		background-color: rgba(255, 255, 255, 0.08);
	}

	pre {
		background-color: rgba(255, 255, 255, 0.05);
	}

	/* Blockquotes - dark mode */
	blockquote {
		border-left-color: rgba(255, 255, 255, 0.15);
		color: #b3b3b3;
	}
}
