@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
	--bg: #ffffff;
	--fg: #1a1a1a;
	--fg-muted: #666666;
	--border: #e0e0e0;
	--link: #1a1a1a;
	--link-hover: #e8a04a;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0e0e0e;
		--fg: #e0e0e0;
		--fg-muted: #888888;
		--border: #222222;
		--link: #e0e0e0;
		--link-hover: #e8a04a;
	}
}

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

html {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 15px;
	line-height: 1.6;
	color: var(--fg);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

body {
	max-width: 640px;
	margin: 0 auto;
	padding: 4rem 1.5rem;
}

a {
	color: var(--link);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

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

h1 {
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 0.25rem;
}

h2 {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}

h3 {
	font-size: 0.9rem;
	font-weight: 600;
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

p {
	margin-bottom: 1rem;
}

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

li {
	margin-bottom: 0.25rem;
}

blockquote {
	border-left: 2px solid var(--border);
	padding-left: 1rem;
	color: var(--fg-muted);
	margin-bottom: 1rem;
}

code {
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 0.9em;
	background: var(--border);
	padding: 0.1em 0.3em;
	border-radius: 2px;
}

pre {
	background: var(--border);
	padding: 1rem;
	overflow-x: auto;
	margin-bottom: 1rem;
	border-radius: 4px;
	line-height: 1.3;
}

pre code {
	background: none;
	padding: 0;
}

hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 2rem 0;
}

/* --- Footer (was scoped in Base.astro) --- */
.footer {
	margin-top: 4rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	font-size: 0.8rem;
	color: var(--fg-muted);
}
.footer nav {
	display: flex;
	gap: 1.5rem;
}
.footer a {
	color: var(--fg-muted);
	text-decoration: none;
}
.footer a:hover {
	color: var(--link-hover);
}

/* --- Home page (was scoped in index.astro) --- */
.page-header {
	margin-bottom: 3rem;
}
.subtitle {
	color: var(--fg-muted);
	font-size: 0.9rem;
	margin: 0;
}
.posts {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.post-link {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	text-decoration: none;
	color: var(--fg);
}
.post-link:hover .post-title {
	color: var(--fg-muted);
}
.posts .post-title {
	transition: color 0.15s;
}
.posts time {
	font-size: 0.8rem;
	color: var(--fg-muted);
	flex-shrink: 0;
}

/* --- Post page (was scoped in [id].astro) --- */
.post-page-header {
	margin-bottom: 2.5rem;
}
.home-link {
	text-decoration: none;
	color: var(--fg);
}
.home-link:hover {
	color: var(--fg-muted);
}
.post-meta {
	margin-top: 0.5rem;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
}
.post-meta .post-title {
	color: var(--fg-muted);
	font-size: 0.9rem;
}
.post-meta time {
	font-size: 0.8rem;
	color: var(--fg-muted);
	flex-shrink: 0;
}
.prose {
	line-height: 1.7;
}
