/* ============================================================
   极简博客主题 —— 风格参考 citrusice.github.io
   深色纹理页头 + 白底正文 + 文章列表首页
   ============================================================ */

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: "Nunito Sans", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	font-size: 16px;
	line-height: 1.7;
	color: #333;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

a { color: #2563b0; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- 页头（深色 + 斜纹 texture） ---------- */
.site-header {
	background-color: #1c1e24;
	background-image: repeating-linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.03) 0,
		rgba(255, 255, 255, 0.03) 1px,
		transparent 1px,
		transparent 6px
	);
	color: #fff;
	padding: 20px 0 52px;
	text-align: center;
}

.navbar ul {
	list-style: none;
	margin: 0 0 36px;
	padding: 0;
}
.navbar li { display: inline-block; margin: 0 14px; }
.navbar a { color: rgba(255, 255, 255, 0.85); font-size: 15px; }
.navbar a:hover { color: #fff; text-decoration: none; }

.site-title {
	margin: 0 0 10px;
	font-size: 42px;
	font-weight: 700;
	letter-spacing: 1px;
}
.site-title a { color: #fff; }
.site-title a:hover { text-decoration: none; }

.site-subtitle {
	margin: 0 0 20px;
	font-size: 17px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.72);
}

.social { list-style: none; margin: 0; padding: 0; }
.social li { display: inline-block; margin: 0 8px; }
.social a { color: rgba(255, 255, 255, 0.75); display: inline-block; }
.social a:hover { color: #fff; }
.social svg { width: 22px; height: 22px; fill: currentColor; display: block; }

/* ---------- 布局容器 ---------- */
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

main { padding: 52px 0 20px; }

/* ---------- 首页文章列表 ---------- */
ul.posts { list-style: none; margin: 0; padding: 0; }
ul.posts > li { margin-bottom: 46px; }

.post-meta .post-title {
	margin: 0;
	font-size: 22px;
	line-height: 1.4;
}
a.post-link { color: #111; }
a.post-link:hover { color: #2563b0; text-decoration: none; }

.post-date { color: #98a1ad; font-size: 13.5px; margin-top: 4px; }

.post-excerpt { color: #555; margin-top: 10px; word-break: break-word; }

/* ---------- 文章页 ---------- */
.post-header { margin-bottom: 30px; }

h1.post-title {
	margin: 0;
	font-size: 30px;
	line-height: 1.35;
	color: #111;
}

article.post .post-meta { margin-top: 10px; }
article.post .post-date { font-size: 14px; }

.tag {
	background: #f0f2f5;
	border-radius: 999px;
	padding: 1px 10px;
	font-size: 12px;
	color: #666;
	margin-left: 8px;
}
a.tag { text-decoration: none; }
a.tag:hover { background: #e4ecf7; color: #2563b0; }

/* 首页置顶标记 */
.pin-badge {
	display: inline-block;
	vertical-align: 3px;
	background: #e9f1fc;
	color: #2563b0;
	border: 1px solid #c9dbf3;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	padding: 0 7px;
	margin-right: 8px;
}

.post-content h2 { margin-top: 1.6em; padding-bottom: 0.3em; border-bottom: 1px solid #eee; }
.post-content h3 { margin-top: 1.4em; }

blockquote {
	margin: 1em 0;
	padding: 2px 16px;
	border-left: 4px solid #dfe2e5;
	color: #666;
}

hr { border: none; border-top: 1px solid #eee; margin: 2em 0; }

table { border-collapse: collapse; margin: 1em 0; }
th, td { border: 1px solid #dfe2e5; padding: 6px 13px; }

/* 行内代码 */
code {
	font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
	font-size: 0.88em;
	background: #f6f8fa;
	padding: 2px 6px;
	border-radius: 4px;
}

/* 代码块 */
pre.highlight, .post-content pre {
	background: #f6f8fa;
	padding: 14px;
	border-radius: 6px;
	overflow-x: auto;
	line-height: 1.5;
}
pre code, .highlight code { background: none; padding: 0; font-size: 0.85em; }

/* Rouge 语法高亮配色（GitHub 风格） */
.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { color: #6a737d; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kc,
.highlight .o, .highlight .cp { color: #d73a49; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb,
.highlight .sc, .highlight .si { color: #032f62; }
.highlight .na { color: #005cc5; }
.highlight .nf, .highlight .nb, .highlight .nc, .highlight .nn { color: #6f42c1; }
.highlight .nt { color: #22863a; }
.highlight .mi, .highlight .mf, .highlight .m { color: #005cc5; }

/* 上一篇 / 下一篇 */
.post-nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 52px;
	padding-top: 16px;
	border-top: 1px solid #eee;
	font-size: 14px;
}
.post-nav a { color: #666; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-nav a:hover { color: #2563b0; text-decoration: none; }

/* ---------- 普通页面（About 等） ---------- */
.page-title { font-size: 28px; color: #111; }

/* ---------- Tags 归档页 ---------- */
.tag-cloud { line-height: 2.4; }
.tag-cloud .tag { margin-left: 0; margin-right: 8px; display: inline-block; }

.tag-heading {
	margin-top: 42px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
	font-size: 20px;
}

ul.posts-by-tag { list-style: none; margin: 12px 0 0; padding: 0; }
ul.posts-by-tag li { margin: 8px 0; }
ul.posts-by-tag .post-date { display: inline-block; width: 110px; margin: 0; }

/* ---------- 页脚 ---------- */
.site-footer {
	margin-top: 64px;
	padding: 26px 0 42px;
	border-top: 1px solid #eee;
	color: #999;
	font-size: 13px;
	text-align: center;
}
.site-footer .license {
	margin-top: 8px;
	font-size: 12px;
	color: #aaa;
}
.site-footer .license a { color: #8fa8c9; }
.site-footer .license a:hover { color: #2563b0; }

/* ---------- 回到顶部按钮 ---------- */
.back-to-top {
	position: fixed;
	right: 26px;
	bottom: 34px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(28, 30, 36, 0.82);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
	z-index: 99;
}
.back-to-top.visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.back-to-top:hover { background: #2563b0; }
.back-to-top svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	display: block;
	margin: 12px auto 0;
}

/* ---------- 手机适配 ---------- */
@media (max-width: 600px) {
	.site-title { font-size: 32px; }
	main { padding-top: 36px; }
	h1.post-title { font-size: 24px; }
	.back-to-top { right: 16px; bottom: 24px; width: 40px; height: 40px; }
	.back-to-top svg { margin: 10px auto 0; }
}
