/*
Theme Name: 极简博客
Theme URI: https://aizhanghao.cloud
Author: 小宝
Description: 极简个人博客主题 —— 单栏、无衬线、重排版轻装饰。页脚预留 ICP 备案号与公安网备号两处位置。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: minimal-blog
*/

/* ==========================================================
   变量
   ========================================================== */
:root {
	--bg: #ffffff;
	--fg: #1c1c1e;
	--fg-soft: #6b6b70;
	--fg-faint: #9a9aa0;
	--line: #ececee;
	--accent: #1c1c1e;
	--radius: 10px;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue",
		Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141416;
		--fg: #ececed;
		--fg-soft: #a0a0a6;
		--fg-faint: #6e6e75;
		--line: #2a2a2e;
	}
}

/* ==========================================================
   基础
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.85;
	letter-spacing: .01em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .18s ease; }
a:hover { border-bottom-color: var(--fg); }

img, svg, video { max-width: 100%; height: auto; display: block; }

code, pre, kbd {
	font-family: var(--font-mono);
	font-size: .88em;
}
code {
	background: #f5f5f7;
	padding: .12em .38em;
	border-radius: 4px;
}
@media (prefers-color-scheme: dark) { code { background: #232327; } }
pre {
	background: #f7f7f9;
	padding: 18px 20px;
	border-radius: var(--radius);
	overflow-x: auto;
	line-height: 1.7;
}
@media (prefers-color-scheme: dark) { pre { background: #1c1c20; } }
pre code { background: none; padding: 0; }

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

blockquote {
	margin: 1.6em 0;
	padding: 2px 0 2px 20px;
	border-left: 3px solid var(--line);
	color: var(--fg-soft);
}

/* ==========================================================
   布局
   ========================================================== */
.wrap {
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 0 24px;
}

.site-main { padding: 56px 0 72px; }

/* ==========================================================
   页头
   ========================================================== */
.site-header {
	padding: 40px 0 8px;
	border-bottom: 0;
}
.site-branding { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-title {
	font-size: 21px;
	font-weight: 650;
	letter-spacing: -.015em;
	margin: 0;
	line-height: 1.4;
}
.site-title a { border-bottom: none; }
.site-desc {
	margin: 10px 0 0;
	color: var(--fg-faint);
	font-size: 14.5px;
	letter-spacing: .01em;
}
.site-nav { font-size: 14.5px; }
.site-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--fg-soft); border-bottom: none; }
.site-nav a:hover { color: var(--fg); }
.site-header-inner { padding: 0 0 26px; }

/* ==========================================================
   文章列表
   ========================================================== */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li { padding: 30px 0; border-bottom: 1px solid var(--line); }
.post-list > li:first-child { padding-top: 4px; }
.post-list > li:last-child { border-bottom: none; }

.entry-title {
	margin: 0 0 10px;
	font-size: 23px;
	font-weight: 620;
	line-height: 1.45;
	letter-spacing: -.02em;
}
.entry-title a { border-bottom: none; }
.entry-title a:hover { opacity: .68; }

.entry-meta {
	font-size: 13.5px;
	color: var(--fg-faint);
	margin: 0 0 12px;
	letter-spacing: .02em;
}
.entry-meta span + span::before { content: "·"; margin: 0 8px; }

.entry-excerpt { margin: 0; color: var(--fg-soft); font-size: 16px; line-height: 1.8; }
.entry-excerpt p { margin: 0; }

/* ==========================================================
   单篇文章
   ========================================================== */
.entry-header { margin-bottom: 34px; }
.entry-header .entry-title { font-size: 30px; letter-spacing: -.025em; margin-bottom: 14px; }

.entry-content { font-size: 17px; }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 {
	font-size: 20px;
	font-weight: 640;
	letter-spacing: -.015em;
	margin-top: 2.1em;
	margin-bottom: .7em;
	line-height: 1.5;
}
.entry-content h3 { font-size: 17.5px; font-weight: 640; margin-top: 1.8em; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin: .35em 0; }
.entry-content img { border-radius: var(--radius); margin: 1.6em 0; }
.entry-content a { border-bottom: 1px solid var(--fg-faint); }
.entry-content a:hover { border-bottom-color: var(--fg); }
.entry-content strong { font-weight: 650; }

/* ==========================================================
   分页 / 返回
   ========================================================== */
.pager { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; }
.pager .nav-links { display: flex; justify-content: space-between; gap: 20px; }
.post-nav { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; }
.post-nav a { display: block; color: var(--fg-soft); border-bottom: none; }
.post-nav a:hover { color: var(--fg); }
.post-nav .nav-label { display: block; font-size: 12.5px; color: var(--fg-faint); margin-bottom: 4px; letter-spacing: .04em; }

/* ==========================================================
   页脚（含两处备案位置）
   ========================================================== */
.site-footer {
	margin-top: 40px;
	padding: 34px 0 44px;
	border-top: 1px solid var(--line);
	font-size: 13.5px;
	color: var(--fg-faint);
	line-height: 2;
}
.site-footer a { color: var(--fg-soft); border-bottom: none; }
.site-footer a:hover { color: var(--fg); border-bottom: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }

/* 备案信息两个位置 —— 未填写时保留占位，填入后自动显示为链接 */
.beian-slots { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 8px; }
.beian-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 130px;
}
.beian-item .beian-empty {
	display: inline-block;
	min-width: 120px;
	color: var(--fg-faint);
	opacity: .55;
	letter-spacing: .06em;
}
.beian-item a { color: var(--fg-soft); }

/* ==========================================================
   归档 / 搜索 / 404
   ========================================================== */
.page-header { margin-bottom: 36px; }
.page-header .page-title { font-size: 22px; font-weight: 640; margin: 0; letter-spacing: -.02em; }
.archive-desc { color: var(--fg-soft); font-size: 15px; margin-top: 8px; }

.notfound { text-align: center; padding: 60px 0; }
.notfound h1 { font-size: 60px; margin: 0 0 10px; font-weight: 680; letter-spacing: -.04em; }
.notfound p { color: var(--fg-soft); }

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 600px) {
	body { font-size: 16.5px; line-height: 1.8; }
	.wrap { padding: 0 18px; }
	.site-main { padding: 36px 0 56px; }
	.entry-title { font-size: 20.5px; }
	.entry-header .entry-title { font-size: 25px; }
	.site-header-inner { padding: 0 0 20px; }
}

/* 打印 */
@media print {
	.site-header, .site-footer, .post-nav, .pager { display: none; }
	body { font-size: 12pt; }
}
