* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--text-color: #333;
	--bg-color: #fff;
	--link-color: #0066cc;
	--link-hover: #004499;
	--border-color: #e0e0e0;
	--muted-color: #666;
}

html.dark {
	--text-color: #e0e0e0;
	--bg-color: #1a1a1a;
	--link-color: #4da6ff;
	--link-hover: #66b3ff;
	--border-color: #333;
	--muted-color: #999;
}

@media (prefers-color-scheme: dark) {
	html:not(.light) {
		--text-color: #e0e0e0;
		--bg-color: #1a1a1a;
		--link-color: #4da6ff;
		--link-hover: #66b3ff;
		--border-color: #333;
		--muted-color: #999;
	}
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	background-color: var(--bg-color);
	max-width: 800px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

header {
	margin-bottom: 3rem;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 1rem;
}

nav {
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}

.nav-links {
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.nav-controls {
	display: flex;
	gap: 1rem;
	align-items: center;
}

nav a {
	color: var(--text-color);
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.2s;
}

nav a:hover {
	color: var(--link-color);
}

main {
	min-height: 60vh;
}

h1 {
	font-size: 2rem;
	margin-bottom: 1rem;
	font-weight: 600;
}

h2 {
	font-size: 1.5rem;
	margin-top: 2rem;
	margin-bottom: 1rem;
	font-weight: 600;
}

h3 {
	font-size: 1.25rem;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	font-weight: 600;
}

a {
	color: var(--link-color);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	color: var(--link-hover);
}

ul, ol {
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

li {
	margin-bottom: 0.5rem;
}

.post-list, .note-list {
	list-style: none;
	margin-left: 0;
}

.post-list li, .note-list li {
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 1.5rem;
	align-items: baseline;
}

.post-list li:last-child, .note-list li:last-child {
	border-bottom: none;
}

.post-content {
	flex: 1;
	min-width: 0;
}

.post-header {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: 0.5rem;
}

.post-date, .note-date {
	color: var(--muted-color);
	font-size: 0.9rem;
	white-space: nowrap;
}

.post-title {
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--text-color);
	text-decoration: none;
	display: block;
	margin-bottom: 0.25rem;
}

.post-title:hover {
	color: var(--link-color);
	text-decoration: underline;
}

.post-description {
	color: var(--muted-color);
	font-size: 0.9rem;
	line-height: 1.5;
	margin: 0;
}

.post-tags-inline {
	color: var(--muted-color);
	font-size: 0.9rem;
	white-space: nowrap;
}

.tag-link {
	color: var(--link-color);
	text-decoration: none;
}

.tag-link:hover {
	text-decoration: underline;
}

.note-content {
	margin-top: 0.25rem;
}

footer {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-color);
	text-align: center;
	color: var(--muted-color);
	font-size: 0.9rem;
}

footer p {
	margin-bottom: 0.5rem;
}

.footer-nav {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.footer-nav a {
	color: var(--text-color);
	text-decoration: none;
}

.footer-nav a:hover {
	color: var(--link-color);
	text-decoration: underline;
}

.footer-nav .separator {
	color: var(--muted-color);
	margin: 0 0.25rem;
}

.footer-languages {
	margin-top: 1rem;
}

.footer-languages .lang-link {
	color: var(--link-color);
	text-decoration: none;
	margin: 0 0.25rem;
}

.footer-languages .lang-link:hover {
	text-decoration: underline;
}

article {
	margin-bottom: 2rem;
}

article h1 {
	margin-bottom: 0.5rem;
}

article .meta {
	color: var(--muted-color);
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
}

article .content {
	line-height: 1.8;
}

article .content p {
	margin-bottom: 1rem;
}

article .content h2 {
	margin-top: 2rem;
	margin-bottom: 1rem;
}

article .content h3 {
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
}

article .content code {
	background-color: var(--border-color);
	padding: 0.2em 0.4em;
	border-radius: 3px;
	font-size: 0.9em;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

article .content pre {
	background-color: var(--border-color);
	padding: 1rem;
	border-radius: 5px;
	overflow-x: auto;
	margin-bottom: 1rem;
}

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

article .content blockquote {
	border-left: 3px solid var(--border-color);
	padding-left: 1rem;
	margin-left: 0;
	color: var(--muted-color);
	font-style: italic;
}

article .content img {
	max-width: 100%;
	height: auto;
	border-radius: 5px;
	margin: 1rem 0;
}

@media (max-width: 600px) {
	body {
		padding: 1rem 0.75rem;
	}

	h1 {
		font-size: 1.5rem;
	}

	nav {
		gap: 1rem;
		font-size: 0.9rem;
	}

	.post-list li, .note-list li {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.post-date, .note-date {
		white-space: normal;
	}

	.post-tags-inline {
		white-space: normal;
	}
}

