
/* =========================================
	CSS START
========================================= */
/* --- CSS 变量与基础设置 --- */
:root {
	--bg-color: #ffffff;
	--text-color: #334155;
	--heading-color: #0f172a;
	--accent-color: #2563eb;
	/* 现代蓝 */
	--accent-hover: #1d4ed8;
	--secondary-bg: #f8fafc;
	--border-color: #e2e8f0;
	--card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--date-color: #64748b;
	--tag-bg: #eff6ff;
	--tag-text: #2563eb;
}


/* [更新] Gemini 风格暗色模式变量 */
[data-theme="dark"] {
	--bg-color: #131314;
	/* Gemini 主背景: 深灰黑 */
	--text-color: #c4c7c5;
	/* 正文: 柔和灰白 */
	--heading-color: #e3e3e3;
	/* 标题: 亮灰白 */
	--accent-color: #a8c7fa;
	/* 链接: Google 风格浅蓝 */
	--accent-hover: #d3e3fd;
	/* 链接悬停: 更浅的蓝 */
	--secondary-bg: #1e1f20;
	/* 卡片背景: 稍微浅一点的灰 */
	--border-color: #444746;
	/* 边框: 隐约的灰色 */
	--card-shadow: 0 4px 8px rgb(0 0 0 / 0.4);
	--date-color: #8e918f;
	/* 日期: 中性灰 */
	--tag-bg: #004a77;
	/* 标签背景: 深蓝 */
	--tag-text: #c2e7ff;
	/* 标签文字: 浅蓝 */
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	transition: background-color 0.3s ease, color 0.3s ease;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.6;
	font-size: 16px;
}

a {
	color: var(--accent-color);
	text-decoration: none;
	transition: color 0.2s;
}

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

/* --- 布局容器 --- */
.container {
	max-width: 960px;
	/* 学术主页标准宽度 */
	margin: 0 auto;
	padding: 2rem 1.5rem;
}

/* --- 导航栏 --- */
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 3rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.logo {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--heading-color);
}

nav ul {
	display: flex;
	gap: 1.5rem;
	list-style: none;
}

nav a {
	color: var(--text-color);
	font-weight: 500;
}

nav a:hover,
nav a.active {
	color: var(--accent-color);
	text-decoration: none;
}

/* --- 个人简介 (Profile) --- */
.profile-section {
	display: grid;
	grid-template-columns: 1fr 250px;
	gap: 3rem;
	margin-bottom: 4rem;
	align-items: start;
}

.profile-text h1 {
	font-size: 2.5rem;
	color: var(--heading-color);
	margin-bottom: 0.5rem;
	letter-spacing: -0.025em;
}

.profile-text h2 {
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--date-color);
	margin-bottom: 1.5rem;
}

.social-links {
	display: flex;
	gap: 1rem;
	margin-top: 1.5rem;
}

.social-links a {
	font-size: 1.25rem;
	color: var(--text-color);
	cursor: pointer;
}

.social-links a:hover {
	color: var(--accent-color);
	transform: translateY(-2px);
}

.profile-image-container {
	position: relative;
}

.profile-image {
	width: 100%;
	border-radius: 12px;
	/* 现代圆角 */
	box-shadow: var(--card-shadow);
	object-fit: cover;
	aspect-ratio: 1 / 1;
}

/* --- 通用章节样式 --- */
section {
	margin-bottom: 4rem;
}

.section-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--heading-color);
	margin-bottom: 1.5rem;
	position: relative;
	padding-bottom: 0.5rem;
}

.section-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 40px;
	height: 3px;
	background-color: var(--accent-color);
	border-radius: 2px;
}

/* --- Tab 切换样式 --- */
.pub-tabs {
	display: flex;
	gap: 2rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--border-color);
}

.tab-btn {
	background: none;
	border: none;
	font-family: inherit;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--date-color);
	padding-bottom: 0.75rem;
	cursor: pointer;
	position: relative;
	transition: color 0.3s;
}

.tab-btn:hover {
	color: var(--text-color);
}

.tab-btn.active {
	color: var(--accent-color);
}

.tab-btn.active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	/* 覆盖底边框 */
	left: 0;
	width: 100%;
	height: 3px;
	background-color: var(--accent-color);
	border-radius: 3px 3px 0 0;
}

.pub-group {
	display: none;
	/* 默认隐藏 */
	animation: fadeIn 0.4s ease-out;
	/* 切换动画 */
}

.pub-group.active-group {
	display: block;
	/* 激活时显示 */
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* --- Services 样式 --- */
.services-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	/* 响应式多列 */
	gap: 2.5rem;
}

.service-group h4 {
	font-size: 1.1rem;
	color: var(--heading-color);
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	border-bottom: 1px dashed var(--border-color);
	padding-bottom: 0.5rem;
}

.service-group h4 i {
	color: var(--accent-color);
}

.service-list {
	list-style: none;
	padding-left: 0.5rem;
}

.service-list li {
	position: relative;
	padding-left: 1.2rem;
	margin-bottom: 0.6rem;
	color: var(--text-color);
	font-size: 0.95rem;
}

.service-list li::before {
	content: '•';
	color: var(--accent-color);
	font-weight: bold;
	font-size: 1.2rem;
	position: absolute;
	left: 0;
	top: -0.1rem;
	line-height: 1;
}

/* --- Modal (弹窗) 样式 --- */
.modal {
	display: none;
	/* 默认隐藏 */
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.6);
	/* 半透明黑色背景 */
	backdrop-filter: blur(4px);
	/* 背景模糊 */
	animation: fadeIn 0.3s;
}

.modal-content {
	background-color: var(--bg-color);
	margin: 10% auto;
	padding: 2rem;
	border: 1px solid var(--border-color);
	width: 320px;
	/* 卡片宽度 */
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	text-align: center;
	position: relative;
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		transform: translateY(-20px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.close-modal {
	color: var(--date-color);
	float: right;
	font-size: 24px;
	font-weight: bold;
	cursor: pointer;
	position: absolute;
	right: 15px;
	top: 10px;
	transition: color 0.2s;
}

.close-modal:hover {
	color: var(--heading-color);
}

.qr-placeholder {
	width: 200px;
	height: 200px;
	background-color: var(--secondary-bg);
	color: var(--date-color);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 1rem auto;
	border-radius: 8px;
	border: 1px dashed var(--border-color);
	font-size: 0.9rem;
}

.qr-image {
	width: 100%;
	max-width: 220px;
	height: auto;
	border-radius: 8px;
	margin: 1rem 0;
	border: 1px solid var(--border-color);
}

/* --- 新闻 (News) --- */
.news-list {
	list-style: none;
}

.news-item {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1rem;
}

.news-date {
	font-family: 'Courier New', monospace;
	font-weight: 600;
	color: var(--date-color);
	min-width: 100px;
}

/* --- 论文列表 (Publications) --- */
.publication-item {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 1.5rem;
	margin-bottom: 2rem;
	padding: 1.5rem;
	background-color: var(--secondary-bg);
	border-radius: 12px;
	border: 1px solid var(--border-color);
	transition: transform 0.2s, box-shadow 0.2s;
}

.publication-item:hover {
	transform: translateY(-2px);
	box-shadow: var(--card-shadow);
	border-color: var(--accent-color);
}

.pub-thumb {
	width: 100%;
	height: auto;
	border-radius: 6px;
	border: 1px solid var(--border-color);
	object-fit: cover;
}

.pub-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.pub-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--heading-color);
	margin-bottom: 0.5rem;
	line-height: 1.4;
}

.pub-authors {
	font-size: 0.95rem;
	color: var(--text-color);
	margin-bottom: 0.5rem;
}

.pub-venue {
	font-style: italic;
	color: var(--heading-color);
	margin-bottom: 0.75rem;
}

.pub-venue .tag {
	display: inline-block;
	background-color: var(--tag-bg);
	color: var(--tag-text);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.8rem;
	font-style: normal;
	font-weight: 600;
	margin-left: 8px;
}

.pub-links {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.btn-sm {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.85rem;
	padding: 4px 10px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	color: var(--text-color);
	background: var(--bg-color);
	text-decoration: none;
}

/* 暗色模式下按钮需要稍微区分一下背景，否则和卡片背景混在一起 */
[data-theme="dark"] .btn-sm {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.1);
}

.btn-sm:hover {
	border-color: var(--accent-color);
	color: var(--accent-color);
	text-decoration: none;
	background-color: var(--secondary-bg);
}

[data-theme="dark"] .btn-sm:hover {
	background-color: rgba(168, 199, 250, 0.1);
	/* 浅蓝色半透明背景 */
}

/* --- 页脚 --- */
footer {
	text-align: center;
	padding: 3rem 0;
	color: var(--date-color);
	font-size: 0.9rem;
	border-top: 1px solid var(--border-color);
	margin-top: 4rem;
}

/* --- 响应式调整 (Mobile) --- */
@media (max-width: 768px) {
	.profile-section {
		grid-template-columns: 1fr;
		/* 变为单列 */
		gap: 2rem;
	}

	.profile-image-container {
		max-width: 200px;
		margin: 0 auto;
		order: -1;
		/* 图片在手机端置顶 */
	}

	.profile-text {
		text-align: center;
	}

	.social-links {
		justify-content: center;
	}

	.publication-item {
		grid-template-columns: 1fr;
		/* 论文缩略图占满 */
		gap: 1rem;
	}

	.pub-thumb {
		max-width: 100%;
		height: auto;
		max-height: 200px;
		object-fit: contain;
		/* 保持图片比例 */
		background-color: #000;
		/* 深色背景看gif更清楚 */
	}
}

/* --- 暗色模式切换按钮 --- */
.theme-toggle {
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	background: transparent;
	border: none;
	color: var(--text-color);
	font-size: 1.2rem;
}

/* =========================================
   CSS END
========================================= */
