/* ==========================================================================
   restart-fluent · pages.css
   阶段三：归档 / 分类 / 标签 / 搜索 / 友链 / 关于。
   与站内其它区块共用 1px 描边、直角、平面底；不使用渐变。
   ========================================================================== */

.page-shell {
	width: 100%;
	max-width: 1000px;
	margin: 0 auto;
}

.term-summary {
	margin: 0 0 14px;
	font-size: 13px;
	color: var(--text-mute);
}

/* ---------- 归档 ---------- */
.archive-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 18px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.archive-stat {
	padding: 14px 10px;
	text-align: center;
	border-right: 1px solid var(--stroke);
}

.archive-stat:last-child { border-right: 0; }

.archive-stat b {
	display: block;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--text);
	font-variant-numeric: tabular-nums;
}

.archive-stat span {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	color: var(--text-mute);
}

.archive-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
}

.archive-nav .chip sup {
	margin-left: 5px;
}

.archive-group { margin-bottom: 26px; }

.archive-year {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 10px;
	padding-bottom: 8px;
	font-size: 19px;
	font-weight: 600;
	color: var(--text);
	border-bottom: 1px solid var(--stroke);
}

.archive-year span {
	font-size: 11.5px;
	font-weight: 400;
	color: var(--text-mute);
}

.archive-month {
	margin: 12px 0 4px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--text-mute);
}

.archive-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* 归档里的每篇文章是一条完整按钮，不再只有标题可点 */
.archive-row { margin: 0; }

.archive-item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 38px;
	padding: 0 10px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
	transition: background .12s var(--ease), border-color .12s var(--ease);
}

.archive-item:hover {
	background: var(--tile-tint-hover);
	border-color: var(--stroke-strong);
}

.archive-date {
	flex: none;
	width: 48px;
	font-size: 11.5px;
	color: var(--text-mute);
	font-variant-numeric: tabular-nums;
}

.archive-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 14px;
	color: var(--text);
}

.archive-item:hover .archive-title { color: var(--accent-text); }

/* ---------- 分类 / 标签列表 ---------- */
.term-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 12px;
}

.term-card {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 14px 16px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
	transition: background .12s var(--ease), border-color .12s var(--ease);
}

.term-card:hover {
	background: var(--tile-tint-hover);
	border-color: var(--stroke-strong);
}

.term-icon {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	flex: none;
	font-size: 14px;
	color: var(--accent-text);
	background: var(--accent-soft);
}

.term-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.term-name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--text);
}

.term-count {
	font-size: 11.5px;
	color: var(--text-mute);
}

.tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.tag-cloud a.tag {
	height: 30px;
	padding: 0 12px;
	font-size: 13px;
}

.tag-cloud a.tag sup {
	margin-left: 6px;
	font-size: 9px;
	color: var(--text-mute);
	font-variant-numeric: tabular-nums;
}

/* ---------- 友链 ---------- */
.links-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.links-head .term-summary { margin: 0; }

.friend-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
	margin-top: 8px;
}

.friend-card {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 14px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
	transition: background .12s var(--ease), border-color .12s var(--ease);
}

.friend-card:hover {
	background: var(--tile-tint-hover);
	border-color: var(--stroke-strong);
}

.friend-avatar {
	display: block;
	width: 44px;
	height: 44px;
	flex: none;
	object-fit: cover;
	border: 1px solid var(--stroke-strong);
}

.friend-avatar-fallback {
	display: grid;
	place-items: center;
	background: var(--accent);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
}

.friend-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.friend-name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
}

.friend-desc {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12px;
	color: var(--text-mute);
}

/* ---------- 关于 ---------- */
.about-hero {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: 18px;
	padding: 20px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
	border-left: 3px solid var(--accent);
}

.about-avatar-link { flex: none; }

.about-avatar {
	display: block;
	width: 76px;
	height: 76px;
	object-fit: cover;
	border: 1px solid var(--stroke-strong);
}

.about-avatar-fallback {
	display: grid;
	place-items: center;
	background: var(--accent);
	color: #fff;
	font-size: 24px;
	font-weight: 600;
}

.about-identity { min-width: 0; }

.about-name {
	margin: 0;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--text);
}

.about-motto {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--text-mute);
}

.about-social {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.about-social a {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	font-size: 13px;
	color: var(--text-mute);
	border: 1px solid transparent;
	transition: background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease);
}

.about-social a:hover {
	background: var(--surface-hover);
	border-color: var(--stroke);
	color: var(--accent-text);
}

.about-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 16px;
	align-items: start;
}

.about-main,
.about-side {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.about-card {
	padding: 18px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.about-card-title {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--text-mute);
}

.about-intro p { margin: 0 0 .55em; }
.about-intro p:last-child { margin-bottom: 0; }

.about-facts,
.about-stats,
.about-contact {
	list-style: none;
	margin: 0;
	padding: 0;
}

.about-facts li,
.about-stats li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	font-size: 13px;
	color: var(--text-mute);
}

.about-facts b,
.about-stats b {
	font-weight: 600;
	color: var(--text);
	text-align: right;
}

.about-stats b {
	font-size: 16px;
	font-variant-numeric: tabular-nums;
}

.about-contact li {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 6px 0;
	font-size: 12.5px;
	color: var(--text-mute);
}

.about-contact li > i {
	width: 14px;
	flex: none;
	text-align: center;
}

.about-contact a {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--text-dim);
}

.about-contact a:hover { color: var(--accent-text); }

.about-wechat {
	flex-wrap: wrap;
}

.about-wechat img {
	display: block;
	width: 120px;
	margin: 6px 0 0;
	border: 1px solid var(--stroke);
}

.about-wechat small {
	display: block;
	width: 100%;
	font-size: 10.5px;
	color: var(--text-mute);
}

/* ---------- 搜索 ---------- */
.search-page { max-width: 1000px; }

.search-panel {
	padding: 18px;
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.search-box {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--field);
	border: 1px solid var(--stroke);
	border-bottom: 2px solid var(--stroke-strong);
	transition: background .15s var(--ease), border-color .15s var(--ease);
}

.search-box:focus-within {
	background: var(--field-focus);
	border-bottom-color: var(--accent);
}

.search-box > .fa-search {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	color: var(--text-mute);
	pointer-events: none;
}

.search-box input {
	width: 100%;
	height: 46px;
	padding: 0 44px 0 40px;
	font-size: 15px;
	color: var(--text);
	background: transparent;
	border: 0;
	outline: none;
}

.search-box input::placeholder { color: var(--text-mute); }

.search-box input::-webkit-search-cancel-button { display: none; }

#search-clear {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	display: none;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	font-size: 19px;
	line-height: 1;
	color: var(--text-mute);
	background: transparent;
	border: 1px solid transparent;
	cursor: pointer;
}

#search-clear.show { display: grid; }

#search-clear:hover {
	color: var(--text);
	background: var(--surface-hover);
	border-color: var(--stroke);
}

.search-status {
	margin: 12px 0 0;
	font-size: 12.5px;
	color: var(--text-mute);
}

.search-status b { color: var(--text); }

.search-status code {
	padding: 1px 4px;
	font-family: var(--font-mono);
	font-size: .92em;
	color: var(--accent-text);
	background: var(--code-bg);
}

#search-results {
	margin-top: 14px;
}

#search-results .post-card { animation: none; }

.search-body { margin-top: 18px; }

mark {
	padding: 0 2px;
	color: var(--text);
	background: var(--accent-soft);
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
	.about-grid { grid-template-columns: minmax(0, 1fr); }
	.about-side {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.archive-stats { grid-template-columns: minmax(0, 1fr); }
	.archive-stat {
		border-right: 0;
		border-bottom: 1px solid var(--stroke);
	}
	.archive-stat:last-child { border-bottom: 0; }

	.about-hero { padding: 16px; gap: 14px; }
	.about-avatar { width: 60px; height: 60px; }
	.about-name { font-size: 20px; }
	.about-side { grid-template-columns: minmax(0, 1fr); }

	.term-grid,
	.friend-grid { grid-template-columns: minmax(0, 1fr); }

	.links-head {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.search-panel { padding: 14px; }
}

/* ---------- 关于：一张资料卡，而不是散落的小卡片 ---------- */
.about-page { max-width: 1000px; }

.about-profile {
	background: var(--tile-tint);
	border: 1px solid var(--stroke);
}

.about-profile .about-hero {
	gap: 22px;
	margin: 0;
	padding: 28px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--stroke);
}

.about-profile .about-avatar {
	width: 88px;
	height: 88px;
}

.about-profile .about-name {
	font-size: 30px;
}

.about-profile .about-motto {
	margin-top: 6px;
	font-size: 14px;
}

.about-profile .about-social {
	margin-top: 12px;
	gap: 8px;
}

.about-profile .about-social a {
	width: 32px;
	height: 32px;
	font-size: 14px;
}

.about-body {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(250px, .8fr);
}

.about-main {
	display: block;
	min-width: 0;
}

.about-section {
	padding: 24px 28px;
	border-bottom: 1px solid var(--stroke);
}

.about-section:last-child { border-bottom: 0; }

.about-section-title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--text-dim);
}

.about-side {
	display: block;
	min-width: 0;
	border-left: 1px solid var(--stroke);
}

.about-side-block {
	padding: 22px 24px;
	border-bottom: 1px solid var(--stroke);
}

.about-side-block:last-child { border-bottom: 0; }

.about-profile .about-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	padding: 0;
	background: var(--stroke);
	border: 1px solid var(--stroke);
}

.about-profile .about-stats li {
	display: block;
	padding: 12px;
	background: var(--surface);
}

.about-profile .about-stats span {
	display: block;
	font-size: 11px;
	color: var(--text-mute);
}

.about-profile .about-stats b {
	display: block;
	margin-top: 2px;
	font-size: 18px;
	text-align: left;
}

.about-profile .about-facts li,
.about-profile .about-contact li {
	padding: 7px 0;
}

.about-profile .about-contact a {
	color: var(--text-dim);
}

.about-profile .about-contact a:hover { color: var(--text); }

.about-profile .about-wechat img {
	width: 140px;
}

@media screen and (max-width: 900px) {
	.about-body { grid-template-columns: minmax(0, 1fr); }
	.about-side { border-left: 0; border-top: 1px solid var(--stroke); }
}

@media screen and (max-width: 600px) {
	.about-profile .about-hero {
		align-items: flex-start;
		gap: 16px;
		padding: 20px;
	}
	.about-profile .about-avatar { width: 68px; height: 68px; }
	.about-profile .about-name { font-size: 24px; }
	.about-section { padding: 20px; }
	.about-side-block { padding: 20px; }
}
