/* ==========================================================================
   曹腾飞个人主页 — 共享样式表
   包含：主页（吸顶导航 / Hero / 卡片分区）与相册页（网格 / 灯箱）
   ========================================================================== */

/* 配色严格对齐原版：原版渲染后只有三种文字颜色 ——
   黑 rgb(0,0,0) 占 98%、栏目标题与链接 蓝 rgb(0,0,255)、强调项 紫 rgb(128,0,128)。
   原版没有任何灰色文字，此处 --ink-soft 仅用于相册页图注（原相册页 .caption color:#666）。 */
:root {
	--bg: #f4f6fa;
	--surface: #ffffff;
	--ink: #000000;
	--ink-soft: #666666;
	--line: #e5e9f0;
	--brand: #0000ff;
	--brand-soft: #eef2ff;
	--purple: #800080;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(16, 32, 64, .04), 0 10px 28px -14px rgba(16, 32, 64, .22);
	--shadow-lg: 0 2px 6px rgba(16, 32, 64, .06), 0 22px 48px -20px rgba(16, 32, 64, .32);
	--maxw: 1180px;
	--nav-h: 58px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
	font-size: 16px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; border: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* --------------------------------------------------------------------------
   吸顶导航
   -------------------------------------------------------------------------- */

.nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .9);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--line);
}

.nav .wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	height: var(--nav-h);
}

.nav-home {
	font-weight: 700;
	font-size: 16px;
	color: var(--ink);
	white-space: nowrap;
}
.nav-home:hover { text-decoration: none; color: var(--brand); }

.nav-links {
	display: flex;
	gap: 2px;
	margin-left: auto;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
	padding: 6px 13px;
	border-radius: 999px;
	font-size: 14px;
	color: var(--ink);
	white-space: nowrap;
	transition: background .18s, color .18s;
}
.nav-links a:hover {
	background: var(--brand-soft);
	color: var(--brand);
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Hero 个人信息区
   -------------------------------------------------------------------------- */

.hero { padding: 36px 0 4px; }

.hero-card {
	background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 32px;
	display: grid;
	grid-template-columns: 152px 1fr auto;
	gap: 32px;
	align-items: start;
	overflow: hidden;
}

.hero-photo {
	width: 100%;
	height: 190px;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: var(--brand-soft);
}

.hero-main { min-width: 0; }

.hero-name {
	margin: 0 0 4px;
	font-size: 32px;
	line-height: 1.3;
	letter-spacing: .5px;
	color: var(--ink);
}
.hero-name span {
	margin-left: 10px;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: .3px;
	color: var(--ink);
	white-space: nowrap;
}

.hero-title {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 600;
	color: var(--ink);
}

.hero-line {
	margin: 0 0 4px;
	font-size: 14.5px;
	color: var(--ink);
}
.hero-line.hero-en {
	font-family: "Times New Roman", Georgia, serif;
	font-size: 14px;
	color: var(--ink);
}

.hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 13px;
	border-radius: 999px;
	background: var(--brand-soft);
	color: var(--ink);
	font-size: 13.5px;
	line-height: 1.7;
	border: 1px solid #dbe1fb;
}

/* 原版「致报考我的研究生」是紫字链接，保持紫字（不填紫底白字） */
.hero-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
	padding: 7px 20px;
	border-radius: 999px;
	background: var(--surface);
	color: var(--purple);
	border: 1.5px solid var(--purple);
	font-size: 14.5px;
	font-weight: 600;
	transition: background .18s;
}
.hero-cta:hover {
	background: #f7edf7;
	color: var(--purple);
	text-decoration: none;
}

.hero-logo {
	width: 128px;
	height: 128px;
	object-fit: contain;
}
.hero-logo-link { display: block; }

/* --------------------------------------------------------------------------
   分区与卡片
   -------------------------------------------------------------------------- */

section { padding: 26px 0 0; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

.sec-head {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 0 0 14px;
}
.sec-head::before {
	content: "";
	flex: none;
	width: 4px;
	height: 20px;
	border-radius: 2px;
	background: var(--brand);
}
.sec-head h2 {
	margin: 0;
	font-size: 20px;
	letter-spacing: .4px;
	color: var(--brand);
}
/* 原版「荣誉※风采」标题为紫色 */
.sec-head.purple::before { background: var(--purple); }
.sec-head.purple h2 { color: var(--purple); }

/* 原版单独设为紫色的链接（导师 / dblp / 期刊 / 虚拟仿真平台） */
.link-p { color: var(--purple); }

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 26px 32px;
}

.card > p:first-child { margin-top: 0; }
.card > p:last-child { margin-bottom: 0; }

.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }

.prose { text-align: justify; }

/* 团队招募：高亮提示卡 */
.callout {
	background: linear-gradient(180deg, #f7fafe 0%, #eff5fc 100%);
	border: 1px solid #dbe7f5;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px 32px;
	font-size: 15.5px;
}
.callout b { color: var(--ink); }

/* --------------------------------------------------------------------------
   团队动态（时间线）
   -------------------------------------------------------------------------- */

.news { list-style: none; margin: 0; padding: 0; }

.news li {
	display: flex;
	gap: 16px;
	padding: 9px 0;
	border-bottom: 1px dashed var(--line);
}
.news li:last-child { border-bottom: 0; }

.news-date {
	flex: none;
	width: 76px;
	padding-top: 2px;
	font-size: 13.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	letter-spacing: .2px;
}

.news-text { flex: 1; min-width: 0; font-size: 15px; }

/* --------------------------------------------------------------------------
   团队学生
   -------------------------------------------------------------------------- */

.sub-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 20px 0 8px;
	font-size: 15.5px;
	font-weight: 700;
	color: var(--ink);
}
.sub-head:first-child { margin-top: 0; }
.sub-head::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line);
}

.student-line {
	margin: 0 0 6px;
	font-size: 15px;
	color: var(--ink);
}
.student-line .grade {
	display: inline-block;
	min-width: 62px;
	margin-right: 10px;
	padding: 1px 9px;
	border-radius: 6px;
	background: var(--brand-soft);
	color: var(--ink);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

/* 荣誉※风采图片墙：整宽铺开。共 6 张，列数取 6 / 3 / 2 的整除数，避免末行参差 */
.photo-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}
.photo-grid img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 9px;
	border: 1px solid var(--line);
	cursor: pointer;
	transition: transform .22s, box-shadow .22s;
}
.photo-grid img:hover {
	transform: scale(1.04);
	box-shadow: var(--shadow-lg);
	position: relative;
	z-index: 1;
}

@media (min-width: 1080px) {
	.photo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.more-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-size: 15px;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   条目列表（项目 / 论文 / 专利 / 荣誉）
   -------------------------------------------------------------------------- */

.list { list-style: none; margin: 0; padding: 0; }

.list li {
	padding: 11px 0;
	border-bottom: 1px solid var(--line);
	font-size: 15px;
}
.list li:first-child { padding-top: 2px; }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }

/* 原版的 <b> 是纯加粗，不额外着色 */
.list.dense li { padding: 8px 0; font-size: 14.5px; }

/* 奖励荣誉 */
.honor-list { list-style: none; margin: 0; padding: 0; }
.honor-list li {
	display: flex;
	gap: 16px;
	padding: 8px 0;
	border-bottom: 1px dashed var(--line);
	font-size: 15px;
}
.honor-list li:last-child { border-bottom: 0; }
.honor-year {
	flex: none;
	width: 62px;
	font-size: 13.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

/* 原版：蓝色 27pt 华文行楷，配 #6495ED 投影 */
.slogan-band {
	margin: 34px 0 0;
	padding: 30px;
	border-radius: var(--radius);
	background: #eef4ff;
	border: 1px solid #d6e2fb;
	box-shadow: var(--shadow);
	text-align: center;
}
.slogan-band p {
	margin: 0;
	font-family: "华文行楷", "STXingkai", "KaiTi", "楷体", serif;
	font-size: 30px;
	line-height: 1.6;
	color: var(--brand);
	letter-spacing: 3px;
	text-shadow: 0 2px 8px rgba(100, 149, 237, .8);
}

/* --------------------------------------------------------------------------
   相册页
   -------------------------------------------------------------------------- */

.page-head {
	padding: 34px 0 4px;
}

.back-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.back-bar a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--line);
	font-size: 14px;
	color: var(--brand);
	box-shadow: var(--shadow);
	transition: background .18s, border-color .18s;
}
.back-bar a:hover {
	background: var(--brand-soft);
	border-color: #c9dcf1;
	text-decoration: none;
}

.page-title {
	margin: 0 0 6px;
	font-size: 30px;
	letter-spacing: 1px;
}
.page-sub {
	margin: 0 0 26px;
	font-size: 14.5px;
	color: var(--ink-soft);
}

/* 相册总览卡片 */
.album-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 22px;
	padding-bottom: 40px;
}
.album-item {
	display: block;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	color: inherit;
	transition: transform .25s, box-shadow .25s;
}
.album-item:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
	text-decoration: none;
	color: inherit;
}
.album-item img {
	width: 100%;
	height: 190px;
	object-fit: cover;
}
.album-body { padding: 16px 20px 20px; }
.album-body h3 {
	margin: 0 0 3px;
	font-size: 17px;
	color: var(--ink);
}
.album-body p {
	margin: 0;
	font-size: 13.5px;
	color: var(--ink-soft);
}

/* 图片网格 */
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
	gap: 20px;
	padding-bottom: 40px;
}
.g-item {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: var(--shadow);
	overflow: hidden;
	cursor: pointer;
	transition: transform .25s, box-shadow .25s;
}
.g-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}
.g-item img {
	width: 100%;
	height: 210px;
	object-fit: cover;
}
.g-cap {
	margin: 0;
	padding: 11px 14px 13px;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--ink-soft);
	text-align: center;
}

/* 灯箱 */
.lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100;
	padding: 56px 32px 32px;
	background: rgba(10, 16, 26, .93);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
}
.lightbox.open { display: flex; }

.lightbox img {
	max-width: min(1040px, 92vw);
	max-height: 74vh;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8);
}

.lightbox-cap {
	max-width: 800px;
	margin: 0;
	font-size: 15.5px;
	line-height: 1.7;
	color: #e8edf5;
	text-align: center;
}

.lb-close {
	position: absolute;
	top: 12px;
	right: 20px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	opacity: .75;
	transition: opacity .18s, background .18s;
}
.lb-close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }

.lb-hint {
	position: absolute;
	bottom: 14px;
	font-size: 12.5px;
	color: rgba(255, 255, 255, .45);
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.hero-card { grid-template-columns: 140px 1fr; gap: 26px; }
	.hero-logo-link { grid-column: 1 / -1; }
	.hero-logo { width: 104px; height: 104px; }
}

@media (max-width: 720px) {
	body { font-size: 15px; }
	.wrap { padding: 0 16px; }

	.nav-home { display: none; }
	.nav .wrap { height: 52px; }

	.hero { padding: 22px 0 4px; }
	.hero-card {
		grid-template-columns: 1fr;
		padding: 22px;
		gap: 20px;
		text-align: center;
	}
	.hero-photo { margin: 0 auto; width: 132px; height: 165px; }
	.hero-name { font-size: 26px; }
	.hero-name span { display: block; margin: 4px 0 0; }
	.hero-meta, .hero-title, .hero-line { justify-content: center; }
	.hero-meta { justify-content: center; }
	.hero-cta { margin-top: 14px; }
	.hero-logo { margin: 0 auto; }

	.card, .callout, .slogan-band { padding: 20px; }
	.sec-head h2 { font-size: 18px; }

	.news li { gap: 10px; }
	.news-date { width: 62px; font-size: 13px; }

	.photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.photo-grid img { height: 96px; }

	.gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
	.g-item img { height: 150px; }
	.album-grid { grid-template-columns: 1fr; gap: 18px; }

	.page-title { font-size: 24px; }
	.lightbox { padding: 52px 14px 24px; }
	.lightbox img { max-height: 66vh; }
	.slogan-band p { font-size: 21px; letter-spacing: 1px; }
	.lb-hint { display: none; }
}

/* 打印：去掉阴影与吸顶，省墨 */
@media print {
	.nav, .hero-cta, .lb-hint { display: none; }
	body { background: #fff; font-size: 12pt; }
	.card, .hero-card, .callout, .slogan-band {
		box-shadow: none;
		border: 1px solid #ccc;
		break-inside: avoid;
	}
	.slogan-band { background: none; }
	.slogan-band p { color: #000; text-shadow: none; }
	a { color: #000; }
}
