/* ==========================================================================
   顶部导航 Header — fixed / 毛玻璃
   ========================================================================== */

.header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--wb-z-header);
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--wb-dur) var(--wb-ease),
		box-shadow var(--wb-dur) var(--wb-ease);
}

.header.is-scrolled {
	border-bottom-color: var(--wb-border);
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.header-nav {
	width: 100%;
}

.nav-content {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: var(--wb-s-5);
	max-width: var(--wb-container-wide);
	margin: 0 auto;
	padding: 0 var(--wb-gutter);
	height: var(--wb-header-h);
}

/* ---- Logo ---- */
.nav-logo {
	display: inline-flex;
	align-items: center;
	gap: var(--wb-s-3);
	justify-self: start;
}

.nav-logo-img {
	height: 26px;
	width: auto;
}

/* ---- 桌面菜单 ---- */
.nav-menu {
	display: flex;
	align-items: center;
	gap: 28px;
}

.nav-item {
	position: relative;
}

.nav-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 15px;
	font-weight: 400;
	color: var(--wb-ink);
	padding: 4px 0;
}

.nav-link:hover,
.nav-link.active {
	color: var(--wb-brand);
}

/* 右侧操作区：仅放一个站内搜索入口 */
.nav-actions {
	display: flex;
	align-items: center;
	gap: var(--wb-s-4);
	justify-self: end;
}

.nav-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: var(--wb-r-lg);
	color: var(--wb-ink);
	transition: background var(--wb-dur) var(--wb-ease), color var(--wb-dur) var(--wb-ease);
}

.nav-search-btn:hover {
	background: var(--wb-brand-soft);
	color: var(--wb-brand);
}

/* ==========================================================================
   移动端菜单
   ========================================================================== */

.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	align-items: center;
}

.hamburger-line {
	display: block;
	width: 20px;
	height: 1.5px;
	background: var(--wb-ink);
	border-radius: 2px;
	transition: transform var(--wb-dur) var(--wb-ease), opacity var(--wb-dur) var(--wb-ease);
}

.mobile-menu-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 10, 10, 0.35);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--wb-dur) var(--wb-ease), visibility var(--wb-dur);
	z-index: var(--wb-z-overlay);
}

.mobile-menu-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.mobile-menu {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(400px, 88vw);
	background: var(--wb-white);
	z-index: var(--wb-z-mobile);
	transform: translateX(100%);
	transition: transform var(--wb-dur) var(--wb-ease);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.mobile-menu.is-open {
	transform: translateX(0);
}

.mobile-menu-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--wb-s-4) var(--wb-s-6);
	border-bottom: 1px solid var(--wb-border);
}

.mobile-logo {
	display: inline-flex;
	align-items: center;
	gap: var(--wb-s-3);
}

.mobile-menu-close {
	font-size: 28px;
	line-height: 1;
	color: var(--wb-ink);
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mobile-nav-menu {
	padding: var(--wb-s-4) var(--wb-s-6);
	flex: 1;
}

.mobile-nav-link {
	display: block;
	padding: 14px 0;
	font-size: 17px;
	color: var(--wb-ink);
	border-bottom: 1px solid var(--wb-border-2);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
	color: var(--wb-brand);
}

.mobile-actions {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-3);
	padding: var(--wb-s-6);
	border-top: 1px solid var(--wb-border);
}

.mobile-actions .btn {
	width: 100%;
	height: 44px;
}

/* 移动端搜索表单 */
.mobile-search {
	padding: var(--wb-s-4) var(--wb-s-6) var(--wb-s-6);
	border-top: 1px solid var(--wb-border);
}

/* ==========================================================================
   首页 Hero（站点标题 + 标语）
   ========================================================================== */

.site-hero {
	padding-top: calc(var(--wb-header-h) + 72px);
	padding-bottom: 56px;
	text-align: center;
}

.site-hero__inner {
	max-width: 720px;
	margin: 0 auto;
}

.site-hero__title {
	font-family: var(--wb-font-display);
	font-size: 48px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--wb-black);
	letter-spacing: -0.01em;
}

.site-hero__desc {
	margin-top: 16px;
	font-size: 17px;
	line-height: 1.8;
	color: var(--wb-text);
}

.site-hero__actions {
	margin-top: 28px;
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ==========================================================================
   博客两栏布局
   ========================================================================== */

.blog-layout {
	padding-top: 48px;
	padding-bottom: var(--wb-s-24);
}

.blog-layout--sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 48px;
	align-items: start;
}

.blog-layout__main {
	min-width: 0;
}

/* 文章列表（卡片） */
.post-list {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-8);
}

.post-card {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-3);
	padding-bottom: var(--wb-s-8);
	border-bottom: 1px solid var(--wb-border);
}

.post-card__thumb {
	border-radius: var(--wb-r-xl);
	overflow: hidden;
	margin-bottom: var(--wb-s-2);
}

.post-card__thumb img {
	width: 100%;
	height: auto;
	transition: transform 0.5s var(--wb-ease);
}

.post-card:hover .post-card__thumb img {
	transform: scale(1.03);
}

.post-card__title {
	font-size: 24px;
	font-weight: 700;
	color: var(--wb-black);
	line-height: 1.4;
}

.post-card__title:hover {
	color: var(--wb-brand);
}

.post-card__meta {
	display: flex;
	gap: var(--wb-s-4);
	font-size: 13px;
	color: var(--wb-text-2);
	flex-wrap: wrap;
}

.post-card__meta a {
	color: var(--wb-text-2);
}

.post-card__meta a:hover {
	color: var(--wb-brand);
}

.post-card__excerpt {
	font-size: 15px;
	line-height: 1.75;
	color: var(--wb-text);
}

.post-card__more {
	align-self: flex-start;
	font-size: 14px;
	font-weight: 500;
	color: var(--wb-brand);
}

.post-card__more:hover {
	text-decoration: underline;
}

/* ==========================================================================
   通用文章 / 页面 / 归档样式
   ========================================================================== */

.wb-page {
	padding-top: calc(var(--wb-header-h) + 64px);
	padding-bottom: var(--wb-s-24);
}

.wb-page__title {
	font-family: var(--wb-font-display);
	font-size: 40px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wb-black);
	margin-bottom: var(--wb-s-8);
}

.wb-page__content {
	font-size: 16px;
	line-height: 1.85;
	color: var(--wb-ink);
	max-width: 780px;
}

.wb-page__content h2 {
	font-size: 26px;
	font-weight: 700;
	color: var(--wb-black);
	margin: var(--wb-s-10) 0 var(--wb-s-4);
	line-height: 1.4;
}

.wb-page__content h3 {
	font-size: 20px;
	font-weight: 600;
	color: var(--wb-black);
	margin: var(--wb-s-8) 0 var(--wb-s-3);
}

.wb-page__content p {
	margin-bottom: var(--wb-s-4);
}

.wb-page__content ul,
.wb-page__content ol {
	margin: 0 0 var(--wb-s-4) var(--wb-s-5);
	list-style: disc;
}

.wb-page__content ol {
	list-style: decimal;
}

.wb-page__content li {
	margin-bottom: var(--wb-s-2);
}

.wb-page__content a {
	color: var(--wb-brand);
}

.wb-page__content img {
	border-radius: var(--wb-r-lg);
	margin: var(--wb-s-6) 0;
}

.wb-page__content .wp-caption-text,
.wb-page__content figcaption {
	font-size: 13px;
	color: var(--wb-text-2);
	text-align: center;
	margin-top: var(--wb-s-2);
}

/* 归档 / 搜索页头 */
.page-header {
	margin-bottom: 40px;
}

.page-header__title {
	font-family: var(--wb-font-display);
	font-size: 36px;
	font-weight: 700;
	color: var(--wb-black);
	line-height: 1.3;
}

.page-header__desc {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.75;
	color: var(--wb-text);
	max-width: 640px;
}

/* 文章详情元信息 */
.entry-meta {
	display: flex;
	gap: var(--wb-s-4);
	font-size: 13px;
	color: var(--wb-text-2);
	flex-wrap: wrap;
	margin-top: 16px;
}

.entry-meta a {
	color: var(--wb-text-2);
}

.entry-meta a:hover {
	color: var(--wb-brand);
}

.entry-footer {
	margin-top: 56px;
	padding-top: 32px;
	border-top: 1px solid var(--wb-border);
	font-size: 14px;
	color: var(--wb-text);
}

.entry-footer__tags {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.entry-footer__nav {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-top: 32px;
}

/* 分页 */
.wb-pagination {
	display: flex;
	gap: var(--wb-s-2);
	margin-top: var(--wb-s-12);
	flex-wrap: wrap;
}

.wb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--wb-r-lg);
	border: 1px solid var(--wb-border);
	font-size: 14px;
	color: var(--wb-ink);
}

.wb-pagination .page-numbers:hover,
.wb-pagination .page-numbers.current {
	background: var(--wb-black);
	border-color: var(--wb-black);
	color: var(--wb-white);
}

/* 搜索 */
.wb-search-form {
	display: flex;
	gap: var(--wb-s-2);
	max-width: 520px;
}

.wb-search-form input[type="search"] {
	flex: 1;
	height: 46px;
	border-radius: var(--wb-r-lg);
	padding: 0 var(--wb-s-4);
}

.wb-search-form button {
	height: 46px;
	padding: 0 24px;
	border-radius: var(--wb-r-lg);
	background: var(--wb-black);
	color: var(--wb-white);
	font-size: 15px;
}

.wb-search-form button:hover {
	background: var(--wb-brand);
}

/* 顶部搜索面板 */
.wb-search-panel {
	border-top: 1px solid var(--wb-border);
	background: var(--wb-white);
	padding: 16px 0;
}

.wb-search-panel[hidden] {
	display: none;
}

.wb-search-panel .wb-search-form {
	margin: 0 auto;
}

/* 侧边栏 / 小工具 */
.wb-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-8);
	position: sticky;
	top: calc(var(--wb-header-h) + 24px);
}

.wb-widget {
	padding: var(--wb-s-6);
	border: 1px solid var(--wb-border);
	border-radius: var(--wb-r-xl);
}

.wb-widget__title {
	font-size: 16px;
	font-weight: 600;
	color: var(--wb-black);
	margin-bottom: var(--wb-s-4);
}

.wb-widget ul {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-2);
	font-size: 14px;
}

.wb-widget a {
	color: var(--wb-text);
}

.wb-widget a:hover {
	color: var(--wb-brand);
}

.wb-widget__search .wb-search-form {
	max-width: 100%;
}

.wb-widget__search button {
	height: 40px;
	padding: 0 16px;
}

.wb-widget__search input[type="search"] {
	height: 40px;
}

/* 评论区 */
.wb-comments {
	margin-top: 64px;
}

.wb-comment-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-top: 32px;
}

.wb-comment-list .comment {
	font-size: 15px;
	line-height: 1.75;
}

.wb-comment-list .comment-meta {
	font-size: 13px;
	color: var(--wb-text-2);
	margin-bottom: 8px;
}

.wb-comment-list .comment-content {
	color: var(--wb-ink);
}

.wb-comment-list .reply {
	font-size: 13px;
}

.wb-comment-form label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	color: var(--wb-ink);
}

.wb-comment-form textarea,
.wb-comment-form input[type="text"],
.wb-comment-form input[type="email"],
.wb-comment-form input[type="url"] {
	width: 100%;
}

/* 面包屑 */
.wb-breadcrumb {
	font-size: 13px;
	color: var(--wb-text-2);
	margin-bottom: var(--wb-s-4);
}

.wb-breadcrumb a:hover {
	color: var(--wb-brand);
}

/* 404 */
.wb-404 {
	padding-top: calc(var(--wb-header-h) + 120px);
	padding-bottom: var(--wb-s-24);
	text-align: center;
}

.wb-404__code {
	font-family: var(--wb-font-display);
	font-size: 120px;
	font-weight: 900;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px var(--wb-border);
	margin-bottom: var(--wb-s-6);
}

.wb-404__title {
	font-size: 28px;
	font-weight: 700;
	color: var(--wb-black);
	margin-bottom: var(--wb-s-3);
}

.wb-404__desc {
	font-size: 15px;
	color: var(--wb-text);
	margin-bottom: var(--wb-s-8);
}

.wb-404__actions {
	display: flex;
	gap: var(--wb-s-3);
	justify-content: center;
	flex-wrap: wrap;
}

/* 无内容提示 */
.wb-none {
	text-align: center;
	padding: 40px 0;
}

.wb-none__title {
	font-size: 24px;
	font-weight: 700;
	color: var(--wb-black);
	margin-bottom: 12px;
}

.wb-none__desc {
	font-size: 15px;
	color: var(--wb-text);
	margin-bottom: 24px;
}

/* ==========================================================================
   页脚 — 纯黑底 + 简洁两栏
   ========================================================================== */

.wb2-footer {
	background: var(--wb-black);
	color: rgba(255, 255, 255, 0.6);
	padding-bottom: 56px;
	overflow: hidden;
}

.wb2-footer__top {
	display: flex;
	gap: 40px;
	padding-top: var(--wb-s-16);
	padding-bottom: var(--wb-s-12);
	flex-wrap: wrap;
}

.wb2-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 320px;
	flex-shrink: 0;
}

.wb2-footer__logo {
	height: 24px;
	width: auto;
	filter: brightness(0) invert(1);
	opacity: 0.92;
}

.wb2-footer__desc {
	font-size: 13px;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.45);
}

.wb2-footer__links {
	display: flex;
	gap: 80px;
	flex-wrap: wrap;
	margin-left: auto;
}

.wb2-footer__col {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-4);
}

.wb2-footer__col-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--wb-white);
}

.wb2-footer__col-list {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-3);
}

.wb2-footer__col-list a {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.45);
}

.wb2-footer__col-list a:hover {
	color: var(--wb-brand);
}

.wb2-footer__bottom {
	display: flex;
	align-items: center;
	gap: var(--wb-s-6);
	padding-top: var(--wb-s-6);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	flex-wrap: wrap;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.35);
}

.wb2-footer__bottom a:hover {
	color: var(--wb-brand);
}

/* ==========================================================================
   响应式 — 断点 1200 / 980 / 768 / 480
   ========================================================================== */

@media (max-width: 1200px) {
	.wb2-footer__links {
		gap: var(--wb-s-10);
	}
}

@media (max-width: 980px) {
	.blog-layout--sidebar {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.wb-sidebar {
		position: static;
	}

	.wb2-footer__links {
		gap: var(--wb-s-10);
	}
}

@media (max-width: 1024px) {
	.nav-menu {
		display: none;
	}

	.mobile-menu-toggle {
		display: flex;
	}

	.nav-content {
		grid-template-columns: 1fr auto;
	}

	.nav-actions {
		display: none;
	}
}

@media (max-width: 768px) {
	:root {
		--wb-header-h: 56px;
		--wb-gutter: 20px;
	}

	.site-hero {
		padding-top: calc(var(--wb-header-h) + 48px);
	}

	.site-hero__title {
		font-size: 34px;
	}

	.site-hero__desc {
		font-size: 15px;
	}

	.wb-page__title {
		font-size: 28px;
	}

	.post-card__title {
		font-size: 21px;
	}

	.wb2-footer__top {
		gap: var(--wb-s-8);
	}

	.wb2-footer__links {
		gap: var(--wb-s-8);
		margin-left: 0;
	}

	.wb-404__code {
		font-size: 72px;
	}
}

@media (max-width: 480px) {
	:root {
		--wb-gutter: 16px;
	}

	.site-hero__title {
		font-size: 28px;
	}

	.wb2-footer__links {
		flex-direction: column;
		gap: var(--wb-s-8);
	}
}
