:root {
	--bg: #ffffff;
	--fg: #1a1a1a;
	--muted: #666666;
	--border: #e4e4e4;
	--accent: #2563eb;
	--code-bg: #f3f3f3;
	color-scheme: light;
}

:root[data-theme='dark'] {
	--bg: #14161a;
	--fg: #e8e8e8;
	--muted: #9a9a9a;
	--border: #2c2f36;
	--accent: #6ea8fe;
	--code-bg: #1e2126;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--bg: #14161a;
		--fg: #e8e8e8;
		--muted: #9a9a9a;
		--border: #2c2f36;
		--accent: #6ea8fe;
		--code-bg: #1e2126;
		color-scheme: dark;
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.6;
}

a {
	color: var(--accent);
}

.site-header,
main,
.site-footer {
	max-width: 680px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem;
}

.site-header {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--border);
}

.site-header .brand {
	font-weight: 700;
	text-decoration: none;
	color: var(--fg);
}

.site-header nav {
	display: flex;
	gap: 1rem;
	flex: 1;
}

.site-header nav a {
	text-decoration: none;
	color: var(--fg);
}

.site-header nav a[aria-current='page'] {
	color: var(--accent);
}

#theme-toggle {
	margin-left: auto;
	background: none;
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 0.35rem 0.6rem;
	cursor: pointer;
	font-size: 1rem;
	color: var(--fg);
}

main {
	min-height: 60vh;
}

h1,
h2 {
	line-height: 1.25;
}

.muted {
	color: var(--muted);
	font-size: 0.9rem;
}

.post-list,
.project-list {
	list-style: none;
	padding: 0;
}

.post-list li,
.project-item {
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--border);
}

.post-item h2,
.project-item h2 {
	margin-bottom: 0.25rem;
}

.tags {
	margin: 0.5rem 0;
}

.tag {
	display: inline-block;
	font-size: 0.8rem;
	color: var(--muted);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.1rem 0.6rem;
	margin-right: 0.35rem;
}

.post-content pre {
	background: var(--code-bg);
	padding: 1rem;
	border-radius: 6px;
	overflow-x: auto;
}

.post-content code {
	background: var(--code-bg);
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
	font-size: 0.9em;
}

.post-content pre code {
	background: none;
	padding: 0;
}

.post-content img {
	max-width: 100%;
}

.site-footer {
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.9rem;
}

.site-footer .social {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}

.site-footer .social a {
	text-decoration: none;
}
