/* =========================================================
   灯下书页 · 编辑风暗色样式 v3
   暖黑底 #1B1917 · 纸白 #ECE5D8 · 铜金 #C6A87C
   ========================================================= */

/* 本地字体（已从 Google Fonts 迁移，去除外部依赖） */
@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("../fonts/cormorant-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400 500;
	font-display: swap;
	src: url("../fonts/jetbrains-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--lx-base: #1B1917;
	--lx-base-2: #221F1C;
	--lx-base-3: #2A2622;
	--lx-paper: #ECE5D8;
	--lx-muted: #B8AE9E;
	--lx-faint: #6E665A;
	--lx-gold: #C6A87C;
	--lx-gold-deep: #8A7A5C;
	--lx-line: rgba(236, 229, 216, 0.10);
	--lx-line-soft: rgba(236, 229, 216, 0.06);
	--lx-radius: 4px;
}

/* 基础排版 --------------------------------------------------- */
html {
	scroll-behavior: smooth;
}

body {
	background-color: var(--lx-base);
	color: var(--lx-paper);
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 17px;
	line-height: 1.9;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--lx-gold);
	color: var(--lx-base);
}

a {
	color: var(--lx-gold);
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
	transition: color 0.25s ease, border-color 0.25s ease;
}

a:hover {
	color: var(--lx-paper);
}

h1, h2, h3, h4, h5, h6 {
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	color: var(--lx-paper);
	font-weight: 500;
	line-height: 1.35;
}

/* 通用区块标签 ----------------------------------------------- */
.section-label {
	margin: 0 0 1.2rem;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--lx-gold);
}

.section-more {
	margin: 0;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.82rem;
	letter-spacing: 0.1em;
}

.section-more a {
	color: var(--lx-muted);
	text-decoration: none;
	border-bottom: 1px solid var(--lx-line-soft);
	padding-bottom: 0.15em;
}

.section-more a:hover {
	color: var(--lx-gold);
	border-color: var(--lx-gold);
}

/* 分隔线 ----------------------------------------------------- */
.wp-block-separator {
	border: none;
	border-top: 1px solid var(--lx-line);
	opacity: 1 !important;
}

.wp-block-separator.is-style-wide {
	width: 100%;
	border-top-color: var(--lx-line);
}

.wp-block-separator.has-accent-color,
.wp-block-separator.has-accent-background-color {
	border-top-color: var(--lx-gold) !important;
}

/* =========================================================
   页眉 header
   ========================================================= */
.site-header {
	border-bottom: 1px solid var(--lx-line-soft);
}

.wp-block-site-title a {
	font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 1.35rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	color: var(--lx-paper);
	text-decoration: none;
}

.wp-block-site-title a:hover {
	color: var(--lx-gold);
}

.wp-block-site-logo img {
	border-radius: 2px;
	filter: saturate(0.9);
}

/* 导航 */
.site-nav {
	gap: 2rem;
}

.site-nav .nav-item {
	margin: 0;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.9rem;
	letter-spacing: 0.12em;
}

.site-nav .nav-item a {
	color: var(--lx-muted);
	text-decoration: none;
	position: relative;
	padding-bottom: 0.2em;
}

.site-nav .nav-item a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 1px;
	background: var(--lx-gold);
	transition: width 0.25s ease;
}

/* 基于 body class 的当前项高亮（优先） */
body.home .site-nav .nav-item a[href="/"],
body.category-5aytoyou .site-nav .nav-item a[href="/category/5aytoyou/"],
body.category-allin .site-nav .nav-item a[href="/category/allin/"] {
	color: var(--lx-gold);
}

body.home .site-nav .nav-item a[href="/"]::after,
body.category-5aytoyou .site-nav .nav-item a[href="/category/5aytoyou/"]::after,
body.category-allin .site-nav .nav-item a[href="/category/allin/"]::after {
	width: 100%;
}

/* JS 动态高亮兜底 */
.site-nav .nav-item a:hover,
.site-nav .nav-item a[aria-current="page"],
.site-nav .nav-item a.current {
	color: var(--lx-gold);
}

.site-nav .nav-item a:hover::after,
.site-nav .nav-item a[aria-current="page"]::after,
.site-nav .nav-item a.current::after {
	width: 100%;
}

/* =========================================================
   首页关于区 about-hero
   ========================================================= */
.about-hero {
	text-align: center;
	padding-top: clamp(4rem, 12vh, 8rem);
	padding-bottom: clamp(2rem, 6vh, 4rem);
}

.about-hero .about-avatar {
	margin-bottom: 1.6rem;
}

.about-hero .about-avatar img {
	width: 120px;
	height: auto;
	border-radius: 50%;
	border: 1px solid var(--lx-line);
	padding: 5px;
	background: var(--lx-base-2);
	box-shadow: 0 0 0 1px var(--lx-line-soft);
}

.about-hero .about-name {
	margin: 0 0 1.2rem;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	color: var(--lx-paper);
}

.about-hero .about-rule {
	max-width: 80px;
	margin: 0 auto 1.6rem;
}

.about-hero .about-rule .wp-block-separator {
	border-top-color: var(--lx-gold-deep);
}

.about-hero .about-bio {
	max-width: 520px;
	margin: 0 auto 1.8rem;
	font-size: 1.05rem;
	line-height: 2;
	color: var(--lx-muted);
}

.about-hero .about-more {
	margin: 0;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.85rem;
	letter-spacing: 0.1em;
}

.about-hero .about-more a {
	color: var(--lx-faint);
	text-decoration: none;
	border-bottom: 1px solid var(--lx-line-soft);
	padding-bottom: 0.15em;
}

.about-hero .about-more a:hover {
	color: var(--lx-gold);
	border-color: var(--lx-gold);
}

/* 关于页个人链接 */
.about-links {
	margin-top: 2.4rem;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 1.02rem;
	letter-spacing: 0.14em;
	color: var(--lx-faint);
}

.about-links a {
	color: var(--lx-gold);
	text-decoration: none;
	border-bottom: 1px solid var(--lx-line-soft);
	padding-bottom: 0.14em;
	margin: 0 0.9rem;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.about-links a:hover {
	color: var(--lx-paper);
	border-color: var(--lx-gold);
}

/* 关于页末尾签名（右对齐、小号、斜体、与正文同色） */
.about-signature {
	margin-top: 2.2rem;
	font-size: 0.9rem;
	line-height: 1.8;
	color: var(--lx-paper);
	font-style: italic;
}

/* =========================================================
   近期文章区 section-recent
   ========================================================= */
.section-recent {
	padding-top: clamp(2rem, 5vh, 3.5rem);
	padding-bottom: clamp(2rem, 5vh, 3.5rem);
}

.section-recent .section-header {
	max-width: 760px;
	margin: 0 auto 1.2rem;
	padding-bottom: 0.8rem;
	border-bottom: 1px solid var(--lx-line);
	align-items: baseline;
}

.section-recent .section-header .section-label {
	margin: 0;
}

/* =========================================================
   文章索引 — 编号式目录
   ========================================================= */
.post-index {
	margin-top: 0.5rem;
}

.post-list {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 760px;
	counter-reset: lxpost;
}

.post-list > li.wp-block-post {
	counter-increment: lxpost;
	display: grid;
	grid-template-columns: 3.2rem 8.5rem 1fr;
	align-items: baseline;
	column-gap: 1.4rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--lx-line);
	transition: background 0.2s ease;
}

.post-list > li.wp-block-post::before {
	content: counter(lxpost, decimal-leading-zero);
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.05rem;
	letter-spacing: 0.06em;
	color: var(--lx-gold);
}

.post-list .post-item-date {
	color: var(--lx-faint);
	font-size: 0.85rem;
	letter-spacing: 0.05em;
	white-space: nowrap;
}

.post-list .post-item-title {
	margin: 0;
}

.post-list .post-item-title a {
	font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 1.24rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--lx-paper);
	text-decoration: none;
	transition: color 0.25s ease;
}

.post-list .post-item-title a:hover {
	color: var(--lx-gold);
}

/* 分页 */
.post-index .wp-block-query-pagination {
	margin-top: 2.5rem;
	color: var(--lx-muted);
}

.wp-block-query-pagination a {
	color: var(--lx-muted);
	text-decoration: none;
	letter-spacing: 0.08em;
}

.wp-block-query-pagination a:hover {
	color: var(--lx-gold);
}

.wp-block-query-pagination .page-numbers.current {
	color: var(--lx-gold);
}

/* =========================================================
   归档页 archive-header
   ========================================================= */
.archive-header {
	text-align: center;
	padding-top: clamp(3rem, 8vh, 5rem);
	padding-bottom: 1rem;
}

.archive-title {
	margin: 0 0 0.8rem;
}

.archive-desc {
	max-width: 600px;
	margin: 0 auto;
	color: var(--lx-muted);
	font-size: 0.95rem;
}

/* =========================================================
   文章阅读页 single-post
   ========================================================= */
.single-post {
	padding-bottom: clamp(3rem, 8vh, 5rem);
}

.post-header {
	padding-top: clamp(2.5rem, 7vh, 4.5rem);
	padding-bottom: 2rem;
	text-align: center;
}

.post-header-inner {
	align-items: center;
}

.post-single-title {
	margin: 0 0 1rem;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	color: var(--lx-paper);
}

.post-single-meta {
	justify-content: center;
	gap: 1rem;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	color: var(--lx-faint);
}

.post-single-meta .wp-block-post-date {
	color: var(--lx-faint);
}

.post-single-meta .wp-block-post-terms a {
	color: var(--lx-gold);
	text-decoration: none;
}

.post-single-meta .wp-block-post-terms a:hover {
	color: var(--lx-paper);
}

.post-body {
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	font-size: 1.05rem;
	line-height: 2;
}

.post-body p,
.wp-block-post-content p,
.entry-content p {
	margin: 0 0 1.6rem;
}

.post-footer {
	max-width: 700px;
	margin: 2.5rem auto 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--lx-line);
}

/* 引用块 */
.wp-block-quote {
	border-left: 3px solid var(--lx-gold) !important;
	padding-left: 1.5rem;
	color: var(--lx-muted);
	font-style: italic;
}

.wp-block-quote cite {
	color: var(--lx-faint);
	font-style: normal;
	letter-spacing: 0.05em;
}

/* 代码块 */
.wp-block-code {
	background: #14120F !important;
	border: 1px solid var(--lx-gold-deep) !important;
	border-radius: var(--lx-radius);
	padding: 1.1rem 1.3rem !important;
	color: var(--lx-paper);
	font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
	font-size: 0.92rem;
	line-height: 1.7;
	overflow: auto;
}

.wp-block-code code {
	background: none !important;
	color: inherit;
	font-family: inherit;
	padding: 0;
}

/* 标签 pill */
.wp-block-post-terms.is-style-pill a {
	border: 1px solid var(--lx-line);
	border-radius: 999px;
	padding: 0.25em 0.9em;
	color: var(--lx-muted);
	text-decoration: none;
	font-size: 0.82rem;
	letter-spacing: 0.04em;
}

.wp-block-post-terms.is-style-pill a:hover {
	border-color: var(--lx-gold);
	color: var(--lx-gold);
}

/* 上下篇导航 */
.wp-block-post-navigation-link a {
	color: var(--lx-muted);
	text-decoration: none;
	letter-spacing: 0.04em;
}

.wp-block-post-navigation-link a:hover {
	color: var(--lx-gold);
}

/* =========================================================
   评论区 comments-area
   ========================================================= */
.comments-area {
	max-width: 700px;
	margin: 3rem auto 0;
	padding-top: 2rem;
	border-top: 1px solid var(--lx-line);
}

.comments-title {
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 1.4rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	margin-bottom: 1.5rem;
	color: var(--lx-paper);
}

/* 单条评论 */
.comment-item {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--lx-line-soft);
}

.comment-meta {
	gap: 0.9rem;
	margin-bottom: 0.8rem;
	align-items: center;
}

.comment-avatar img {
	border-radius: 50%;
	border: 1px solid var(--lx-line);
}

.comment-author {
	font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--lx-paper);
	margin: 0;
}

.comment-time {
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	color: var(--lx-faint);
	margin: 0;
}

.comment-text {
	color: var(--lx-muted);
	font-size: 0.98rem;
	line-height: 1.85;
	padding-left: calc(40px + 0.9rem);
}

.comment-text p {
	margin: 0 0 0.8rem;
}

.comment-reply {
	padding-left: calc(40px + 0.9rem);
	margin-top: 0.6rem;
}

.comment-reply a {
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	color: var(--lx-faint);
	text-decoration: none;
	border-bottom: 1px solid var(--lx-line-soft);
	padding-bottom: 0.1em;
}

.comment-reply a:hover {
	color: var(--lx-gold);
	border-color: var(--lx-gold);
}

/* 评论表单 */
.comment-form-dark,
.comment-respond,
#respond {
	margin-top: 2rem;
}

.comment-reply-title,
.comment-form-dark .comment-reply-title,
#respond .comment-reply-title {
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 1.25rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--lx-paper);
	margin-bottom: 1rem;
}

.comment-form-dark .comment-notes,
.comment-form-dark .logged-in-as,
.comment-respond .comment-notes,
.comment-respond .logged-in-as,
#respond .comment-notes,
#respond .logged-in-as {
	font-size: 0.85rem;
	color: var(--lx-faint);
	margin-bottom: 1.2rem;
}

.comment-login-notice {
	font-size: 0.9rem;
	color: var(--lx-muted);
	margin-bottom: 1.2rem;
}

.comment-login-notice a {
	color: var(--lx-gold);
	text-decoration: none;
	border-bottom: 1px solid var(--lx-line-soft);
	padding-bottom: 0.1em;
}

.comment-login-notice a:hover {
	color: var(--lx-paper);
	border-color: var(--lx-gold);
}

.comment-form-dark .logged-in-as a,
.comment-respond .logged-in-as a,
#respond .logged-in-as a {
	color: var(--lx-gold);
}

.comment-form-dark label,
.comment-respond label,
#respond label {
	display: block;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.82rem;
	letter-spacing: 0.1em;
	color: var(--lx-muted);
	margin-bottom: 0.5rem;
}

.comment-form-dark .required,
.comment-respond .required,
#respond .required {
	color: var(--lx-gold);
}

.comment-form-dark input[type="text"],
.comment-form-dark input[type="email"],
.comment-form-dark input[type="url"],
.comment-form-dark textarea,
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea {
	width: 100%;
	background: var(--lx-base-2);
	border: 1px solid var(--lx-line);
	border-radius: var(--lx-radius);
	padding: 0.85rem 1rem;
	color: var(--lx-paper);
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.7;
	outline: none;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.comment-form-dark input[type="text"]:focus,
.comment-form-dark input[type="email"]:focus,
.comment-form-dark input[type="url"]:focus,
.comment-form-dark textarea:focus,
.comment-respond input:focus,
.comment-respond textarea:focus,
#respond input:focus,
#respond textarea:focus {
	border-color: var(--lx-gold);
	box-shadow: 0 0 0 2px rgba(198, 168, 124, 0.12);
}

.comment-form-dark textarea,
.comment-respond textarea,
#respond textarea {
	min-height: 140px;
	resize: vertical;
}

.comment-form-dark .comment-form-author,
.comment-form-dark .comment-form-email,
.comment-form-dark .comment-form-url,
.comment-respond .comment-form-author,
.comment-respond .comment-form-email,
.comment-respond .comment-form-url,
#respond .comment-form-author,
#respond .comment-form-email,
#respond .comment-form-url {
	margin-bottom: 1.2rem;
}

.comment-form-dark .comment-form-comment,
.comment-respond .comment-form-comment,
#respond .comment-form-comment {
	margin-bottom: 1.2rem;
}

.comment-form-dark input[type="submit"],
.comment-respond input[type="submit"],
#respond input[type="submit"],
.wp-block-post-comments-form input[type="submit"] {
	background: transparent;
	color: var(--lx-gold);
	border: 1px solid var(--lx-gold);
	border-radius: var(--lx-radius);
	padding: 0.7rem 1.8rem;
	font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
	font-size: 0.88rem;
	letter-spacing: 0.1em;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease;
}

.comment-form-dark input[type="submit"]:hover,
.comment-respond input[type="submit"]:hover,
#respond input[type="submit"]:hover,
.wp-block-post-comments-form input[type="submit"]:hover {
	background: var(--lx-gold);
	color: var(--lx-base);
}

/* Cookie 同意复选框 */
.comment-form-cookies-consent,
.wp-block-post-comments-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-bottom: 1.2rem;
}

.comment-form-cookies-consent input[type="checkbox"],
.wp-block-post-comments-form .comment-form-cookies-consent input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin-top: 0.35em;
	accent-color: var(--lx-gold);
	cursor: pointer;
}

.comment-form-cookies-consent label,
.wp-block-post-comments-form .comment-form-cookies-consent label {
	font-size: 0.8rem;
	color: var(--lx-faint);
	line-height: 1.7;
	cursor: pointer;
}

/* =========================================================
   页脚 footer
   ========================================================= */
.site-footer {
	position: relative;
	border-top: 1px solid var(--lx-line);
	margin-top: clamp(3.5rem, 9vw, 6rem);
}

.site-footer::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -3px;
	width: 5px;
	height: 5px;
	transform: translateX(-50%) rotate(45deg);
	background: var(--lx-gold);
	box-shadow: 0 0 0 4px var(--lx-base);
}

.footer-beian {
	margin: 0;
	font-family: "Cormorant Garamond", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	color: var(--lx-faint);
}

.footer-beian a {
	color: var(--lx-faint);
	text-decoration: none;
	border-bottom: 1px solid var(--lx-line-soft);
	padding-bottom: 0.18em;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-beian a:hover {
	color: var(--lx-gold);
	border-color: var(--lx-gold);
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 640px) {
	body {
		font-size: 16px;
	}

	.site-nav {
		gap: 1.2rem;
		width: 100%;
		justify-content: center;
		margin-top: 1rem;
	}

	.about-hero {
		padding-top: 3rem;
	}

	.about-hero .about-avatar img {
		width: 96px;
	}

	.post-list > li.wp-block-post {
		grid-template-columns: 2.4rem 1fr;
		column-gap: 1rem;
		row-gap: 0.3rem;
	}

	.post-list .post-item-date {
		grid-column: 2 / 3;
		font-size: 0.78rem;
	}

	.post-list .post-item-title {
		grid-column: 2 / 3;
	}

	.post-single-meta {
		gap: 0.6rem;
	}

	.comment-text,
	.comment-reply {
		padding-left: 0;
	}
}
