:root {
	--site-bg: #F6F7F9;
	--content-bg: #fff;
	--text-color: #111827;
	--muted-color: #6b7280;
	--border-color: #e5e7eb;
	--link-color: #2563eb;
	--header-bg: rgba(255, 255, 255, 0.92);
	--footer-bg: #ffffff;
	--radius: 16px;
}

html {
	-webkit-text-size-adjust: 100%;
	color-scheme: light;
}

html.dark-mode {
	--site-bg: #0f172a;
	--content-bg: #111827;
	--text-color: #f9fafb;
	--muted-color: #9ca3af;
	--border-color: #1f2937;
	--link-color: #60a5fa;
	--header-bg: rgba(15, 23, 42, 0.92);
	--footer-bg: #0f172a;

	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--site-bg);
	color: var(--text-color);
	font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
	line-height: 1.65;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--header-bg);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-color);
}

.site-header-inner {
	width: min(700px, calc(100% - 32px));
	min-height: 68px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.site-header-left {
	display: flex;
	align-items: center;
	gap: 24px;
	min-width: 0;
}

.site-brand {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.site-title {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.04em;
	color: var(--text-color);
}

.site-tagline {
	margin-top: 2px;
	font-size: 12px;
	color: var(--muted-color);
}

.site-nav {
	display: flex;
	align-items: center;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu a {
	font-size: 14px;
	font-weight: 600;
	color: var(--muted-color);
}

.primary-menu a:hover {
	color: var(--link-color);
}

.site-header-right {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

/* Dark Mode Button */
.theme-toggle {
	width: 38px;
	height: 38px;
	border: 1px solid var(--border-color);
	border-radius: 999px;
	background: var(--content-bg);
	color: var(--text-color);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}

.theme-toggle:hover {
	border-color: var(--link-color);
	color: var(--link-color);
}

.theme-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.theme-icon svg {
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.theme-icon-moon {
	display: none;
}

html.dark-mode .theme-icon-sun {
	display: none;
}

html.dark-mode .theme-icon-moon {
	display: inline-flex;
}

/* Layout */
.site-main {
	padding: 32px 0 56px;
}

.content-area {
	width: min(650px, calc(100% - 32px));
	margin: 0 auto;
	background: var(--content-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	padding: 28px;
}

/* Post List */
.post-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.post-item {
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.post-item-link {
	display: block;
}

.post-item-title {
	margin: 0;
	font-size: 22px;
	line-height: 1.35;
	letter-spacing: -0.04em;
	color: var(--text-color);
}

.post-item-link:hover .post-item-title {
	color: var(--link-color);
}

.post-item-meta,
.single-meta {
	margin-top: 8px;
	font-size: 13px;
	color: var(--muted-color);
}

.post-item-excerpt {
	margin: 12px 0 0;
	color: var(--muted-color);
}

/* Single / Page */
.single-header,
.page-header {
	margin-bottom: 24px;
}

.single-title,
.page-title {
	margin: 0;
	font-size: 32px;
	line-height: 1.3;
	letter-spacing: -0.05em;
	color: var(--text-color);
}

.single-thumbnail {
	margin: 24px 0;
	border-radius: var(--radius);
	overflow: hidden;
}

.entry-content {
	font-size: 17px;
	color: var(--text-color);
}

.entry-content p {
	margin: 16px 0;
}

.entry-content a {
	color: var(--link-color);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content h2 {
	margin-top: 36px;
	font-size: 26px;
	line-height: 1.35;
	letter-spacing: -0.04em;
}

.entry-content h3 {
	margin-top: 28px;
	font-size: 22px;
	line-height: 1.4;
	letter-spacing: -0.03em;
}

.entry-content ul,
.entry-content ol {
	padding-left: 24px;
}

.entry-content blockquote {
	margin: 24px 0;
	padding: 16px 18px;
	border-left: 4px solid var(--link-color);
	background: var(--site-bg);
	color: var(--muted-color);
}

/* Footer */
.site-footer {
	border-top: 1px solid var(--border-color);
	background: var(--footer-bg);
}

.site-footer-inner {
	width: min(700px, calc(100% - 32px));
	margin: 0 auto;
	padding: 28px 0;
	color: var(--muted-color);
	font-size: 14px;
}

.footer-title {
	margin: 0;
	font-weight: 800;
	color: var(--text-color);
}

.footer-desc,
.footer-copy {
	margin: 6px 0 0;
}

.footer-menu {
	display: flex;
	gap: 12px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.footer-menu a {
	color: var(--muted-color);
}

.footer-menu a:hover {
	color: var(--link-color);
}

/* Pagination */
.pagination {
	margin-top: 24px;
}

.nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--border-color);
	border-radius: 999px;
	background: var(--site-bg);
	color: var(--muted-color);
	font-size: 14px;
	font-weight: 600;
}

.page-numbers.current {
	background: var(--link-color);
	border-color: var(--link-color);
	color: #ffffff;
}

/* Empty */
.empty-text {
	margin: 0;
	color: var(--muted-color);
}

/* Mobile */
@media (max-width: 640px) {
	.site-header-inner {
		width: min(100% - 24px, 700px);
		min-height: 62px;
	}

	.site-header-left {
		gap: 16px;
	}

	.site-tagline {
		display: none;
	}

	.site-nav {
		display: none;
	}

	.site-main {
		padding: 24px 0 48px;
	}

	.content-area {
		width: min(100% - 24px, 650px);
		padding: 22px;
	}

	.single-title,
	.page-title {
		font-size: 28px;
	}

	.post-item-title {
		font-size: 20px;
	}

	.entry-content {
		font-size: 16px;
	}

	.entry-content h2 {
		font-size: 24px;
	}

	.entry-content h3 {
		font-size: 21px;
	}
}