/* ==========================================================================
   Mock Personal — 个人主页 + 博客
   ========================================================================== */

:root {
	--paper: #fbfaf7;
	--surface: #ffffff;
	--ink: #15181c;
	--ink-soft: #2a2d31;
	--muted: #6a6e75;
	--line: #e6e0d6;
	--accent: #b4552d;
	--radius: 16px;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif SC", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	--max: 1120px;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; transition: color .18s ease, border-color .18s ease, background .18s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.012em; margin: 0; }

p { margin: 0 0 1em; }

::selection { background: rgba(180, 85, 45, .18); }

.screen-reader-text, .skip {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip:focus { width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--ink); color: #fff; z-index: 999; }

.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.shell-narrow { max-width: 780px; }

/* ---------- 顶部导航 ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(251, 250, 247, .88);
	backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(21, 24, 28, .04); }

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 76px;
	gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .02em; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.brand-name { font-size: 17px; }
.custom-logo { max-height: 40px; width: auto; }

.nav-list { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-list a { font-size: 15px; color: var(--ink-soft); position: relative; }
.nav-list a::after {
	content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
	background: var(--accent); transition: right .25s ease;
}
.nav-list a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
	display: none;
	width: 42px; height: 42px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	padding: 0;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .2s ease; }

/* ---------- 按钮 ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	font-size: 15px;
	font-weight: 500;
	border: 1px solid var(--ink);
	transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-small { padding: 9px 18px; font-size: 14px; }

/* ---------- 首屏 ---------- */
.hero { padding: clamp(56px, 9vh, 104px) 0 clamp(56px, 8vh, 88px); }
.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
	gap: clamp(32px, 6vw, 80px);
	align-items: center;
}

.eyebrow {
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 18px;
	font-weight: 600;
}

.hero-title {
	font-size: clamp(44px, 7.2vw, 92px);
	line-height: 1.02;
	letter-spacing: -.03em;
	margin: 0 0 24px;
	word-break: break-word;
}

.hero-desc { font-size: 18px; line-height: 1.85; color: var(--muted); max-width: 46ch; margin: 0 0 32px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.hero-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--muted); }
.hero-links a { position: relative; }
.hero-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--line); transition: background .2s ease; }
.hero-links a:hover::after { background: var(--accent); }

.hero-portrait { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.portrait-ring {
	width: min(340px, 72vw);
	aspect-ratio: 1;
	border-radius: 50%;
	padding: 14px;
	border: 1px solid var(--line);
	background: linear-gradient(160deg, #fff, #f4efe6);
}
.portrait-ring img, .portrait-fallback {
	width: 100%; height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.portrait-fallback {
	display: grid;
	place-items: center;
	background:
		radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, .85), transparent 60%),
		linear-gradient(150deg, #ecd8c8, #dcc3ae 55%, #c9a98f);
}
.portrait-fallback span { font-family: var(--serif); font-size: 104px; color: rgba(90, 48, 26, .55); line-height: 1; }
.portrait-caption { font-size: 13px; color: var(--muted); letter-spacing: .04em; margin: 0; text-align: center; }

/* ---------- 区块 ---------- */
.section { padding: clamp(56px, 8vh, 92px) 0; border-top: 1px solid var(--line); }

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); }
.section-note { color: var(--muted); font-size: 15px; margin: 0; max-width: 34ch; text-align: right; }
.text-link { font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 作品 ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }

.project-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(21, 24, 28, .08); border-color: #d9d1c3; }
.project-card:hover h3 { color: var(--accent); }

.project-cover { aspect-ratio: 4 / 3; overflow: hidden; background: #efe9df; }
.project-cover .cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-fallback {
	width: 100%; height: 100%;
	display: grid; place-items: center;
	background: linear-gradient(140deg, hsl(var(--h, 30) 46% 88%), hsl(calc(var(--h, 30) + 26) 40% 76%));
}
.cover-fallback span { font-family: var(--serif); font-size: 64px; color: rgba(60, 40, 25, .32); line-height: 1; }

.project-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.project-body h3 { font-size: 21px; line-height: 1.35; }
.project-body p { font-size: 14.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.project-tech { margin-top: 6px; font-size: 12px; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }

/* ---------- 文章列表 ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }

.post-row {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr) 24px;
	gap: clamp(16px, 3vw, 36px);
	align-items: start;
	padding: 26px 0;
	border-top: 1px solid var(--line);
}
.post-list .post-row:first-child { border-top: 0; padding-top: 0; }

.post-date { font-size: 13px; color: var(--muted); letter-spacing: .05em; padding-top: 6px; font-variant-numeric: tabular-nums; }

.post-main h3 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.4; margin-bottom: 8px; }
.post-main h3 a:hover { color: var(--accent); }
.post-main p { font-size: 15px; color: var(--muted); margin: 0; }

.post-arrow { color: #b9b2a6; font-size: 18px; transition: transform .2s ease, color .2s ease; padding-top: 4px; }
.post-row:hover .post-arrow { color: var(--accent); transform: translate(3px, -3px); }

.post-tags { display: flex; gap: 8px; margin-top: 12px; }

.chip {
	display: inline-block;
	font-size: 12px;
	line-height: 1.6;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(180, 85, 45, .1);
	color: var(--accent);
	letter-spacing: .02em;
}
.chip-quiet { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ---------- 关于 ---------- */
.section-about .about-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr);
	gap: clamp(32px, 6vw, 72px);
	align-items: start;
}
.about-copy h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 18px; }
.about-copy p { font-size: 17px; line-height: 1.9; color: var(--ink-soft); max-width: 52ch; }

.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skills li {
	font-size: 14px;
	padding: 8px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink-soft);
}

/* ---------- 联系 ---------- */
.contact { background: var(--ink); color: #f4efe7; padding: clamp(64px, 9vw, 104px) 0; }
.contact-inner { text-align: center; }
.contact .eyebrow { color: #d98b66; }
.contact h2 { font-size: clamp(30px, 4.4vw, 46px); margin-bottom: 26px; }
.contact-mail {
	display: inline-block;
	font-family: var(--serif);
	font-size: clamp(22px, 3.6vw, 38px);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, .3);
	padding-bottom: 4px;
	word-break: break-all;
}
.contact-mail:hover { color: #e9a683; border-color: #e9a683; }
.contact-links { margin-top: 32px; display: flex; justify-content: center; gap: 26px; font-size: 14px; color: #a9a299; }
.contact-links a:hover { color: #fff; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.footer-copy { margin: 0; }
.footer-copy .dot { margin: 0 6px; }
.footer-nav { display: flex; gap: 18px; }

/* ---------- 博客页头 ---------- */
.page-head { padding: clamp(48px, 7vh, 72px) 0 30px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.15; margin: 0.1em 0 0.3em; }
.page-desc { color: var(--muted); font-size: 16px; max-width: 62ch; }
.page-search { max-width: 420px; margin-top: 22px; }

/* ---------- 分页 ---------- */
.pagination { margin: 52px 0 24px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 9px;
	font-size: 14px;
	color: var(--ink-soft);
	background: var(--surface);
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .dots { border: 0; background: transparent; }

.empty { padding: 72px 0 40px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 18px; }

/* ---------- 文章详情 ---------- */
.article-head { padding: clamp(40px, 6vh, 64px) 0 26px; }
.article-kicker { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.article-title { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.2; letter-spacing: -.02em; }
.article-lead { margin-top: 18px; font-size: 18px; line-height: 1.8; color: var(--muted); }

.article-cover { margin: 28px 0 8px; }
.article-cover img { width: 100%; border-radius: 14px; display: block; }

.entry-content { padding: 26px 0 8px; font-size: 17px; line-height: 1.95; color: var(--ink-soft); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 27px; margin-top: 1.9em; line-height: 1.35; }
.entry-content h3 { font-size: 21px; margin-top: 1.6em; line-height: 1.4; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: #8f3f1f; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin: .5em 0; }
.entry-content blockquote {
	margin: 1.6em 0;
	padding: 6px 22px;
	border-left: 3px solid var(--accent);
	color: var(--muted);
	font-family: var(--serif);
	font-size: 18px;
}
.entry-content img { border-radius: 10px; }
.entry-content code { background: #f1ece3; padding: 2px 6px; border-radius: 4px; font-size: 14.5px; }
.entry-content pre { background: #1b1e23; color: #eae4da; padding: 18px 20px; border-radius: 10px; overflow: auto; font-size: 14px; line-height: 1.7; }
.entry-content pre code { background: transparent; padding: 0; color: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content th { font-weight: 600; background: #f7f3ec; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 0; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 48px 0 8px; }
.post-nav-item { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.post-nav-item:hover { border-color: var(--accent); }
.post-nav-next { text-align: right; }
.post-nav-label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.post-nav-title { font-family: var(--serif); font-size: 17px; line-height: 1.45; }

/* ---------- 评论 ---------- */
.comments { margin: 56px 0 40px; border-top: 1px solid var(--line); padding-top: 34px; }
.comments-title { font-size: 22px; margin-bottom: 10px; }
.comments-count { color: var(--accent); font-family: var(--sans); font-size: 15px; vertical-align: super; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-meta { font-size: 12.5px; color: var(--muted); margin: 6px 0 10px; }
.comment-content { font-size: 15px; line-height: 1.8; }
.reply a { font-size: 13px; color: var(--accent); }

.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface);
	padding: 11px 14px;
	font-family: inherit;
	font-size: 15px;
	color: var(--ink);
}
.comment-form textarea { resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid rgba(180, 85, 45, .25); border-color: var(--accent); }
.comment-form .submit {
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
	border-radius: 999px;
	padding: 11px 24px;
	font-size: 15px;
	cursor: pointer;
}
.comment-form .submit:hover { background: var(--accent); border-color: var(--accent); }
.comment-notes { font-size: 13px; color: var(--muted); }

/* ---------- 搜索 / 404 ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	padding: 10px 18px;
	font-family: inherit;
	font-size: 14px;
}
.search-form input[type="search"]:focus { outline: 2px solid rgba(180, 85, 45, .22); border-color: var(--accent); }
.search-form button {
	border: 0;
	background: var(--ink);
	color: var(--paper);
	border-radius: 999px;
	padding: 0 20px;
	font-size: 14px;
	cursor: pointer;
}
.search-form button:hover { background: var(--accent); }

.notfound { padding: clamp(72px, 12vh, 140px) 0; }
.notfound h1 { font-size: clamp(38px, 6vw, 64px); margin-bottom: 16px; }
.notfound-desc { color: var(--muted); font-size: 17px; }
.notfound-actions { display: flex; gap: 12px; margin: 28px 0 36px; flex-wrap: wrap; }
.notfound-search { max-width: 380px; }

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-portrait { order: -1; align-items: flex-start; }
	.portrait-ring { width: min(220px, 56vw); padding: 10px; }
	.portrait-fallback span { font-size: 68px; }
	.portrait-caption { text-align: left; }
	.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.section-about .about-grid { grid-template-columns: 1fr; }
	.section-note { display: none; }
}

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: absolute;
		left: 0; right: 0;
		top: 76px;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		box-shadow: 0 20px 30px rgba(21, 24, 28, .06);
		display: none;
		padding: 8px 28px 20px;
	}
	body.nav-open .site-nav { display: block; }
	.nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
	.nav-list li { width: 100%; border-bottom: 1px solid var(--line); }
	.nav-list li:last-child { border-bottom: 0; }
	.nav-list a { display: block; padding: 13px 0; font-size: 16px; }
	.nav-list a::after { display: none; }
	.header-actions .btn-small { display: none; }
}

@media (max-width: 640px) {
	.shell { padding: 0 20px; }
	.hero-desc { font-size: 16.5px; }
	.project-grid { grid-template-columns: 1fr; }
	.post-row { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
	.post-date { padding-top: 0; }
	.post-arrow { display: none; }
	.post-nav { grid-template-columns: 1fr; }
	.contact-links { flex-wrap: wrap; gap: 16px; }
	.article-kicker { gap: 8px; }
	.footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- WordPress 核心类 ---------- */
.alignleft { float: left; margin: 0 1.4em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }
.sticky, .bypostauthor { position: relative; }
.screen-reader-text:focus { background: var(--ink); color: #fff; }
