/* ========== 基础与变量 ========== */
:root {
	--timeline-bg: #0a0e17;
	--timeline-surface: #111827;
	--timeline-card: rgba(30, 41, 59, 0.85);
	--timeline-card-border: rgba(99, 179, 237, 0.35);
	--timeline-line: linear-gradient(180deg, transparent 0%, #3b82f6 15%, #06b6d4 50%, #3b82f6 85%, transparent 100%);
	--timeline-dot: #06b6d4;
	--timeline-dot-glow: rgba(6, 182, 212, 0.6);
	--timeline-year: #38bdf8;
	--timeline-text: #e2e8f0;
	--timeline-muted: #94a3b8;
	--timeline-accent: #22d3ee;
	--timeline-link: #38bdf8;
	--timeline-font: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
	--timeline-font-display: 'Orbitron', 'Noto Sans SC', sans-serif;
	--timeline-radius: 16px;
	--timeline-max: 900px;
}

* { box-sizing: border-box; }
body, p, form, input, textarea, ul, li, h1, h2, h3, h4, dl, dt, dd, table, td, th { margin: 0; padding: 0; }
ul, li { list-style: none; }
img, input, textarea { vertical-align: middle; border: 0; }
a { text-decoration: none; color: inherit; outline: none; }
body {
	font-family: var(--timeline-font);
	background: var(--timeline-bg);
	color: var(--timeline-text);
	line-height: 1.6;
	min-height: 100vh;
	overflow-x: hidden;
}

/* ========== 顶部 Hero ========== */
.timeline-hero {
	position: relative;
	min-height: 55vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}
.hero-bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.25), transparent),
		radial-gradient(ellipse 60% 40% at 80% 50%, rgba(6, 182, 212, 0.15), transparent),
		radial-gradient(ellipse 50% 30% at 20% 80%, rgba(99, 102, 241, 0.12), transparent);
	pointer-events: none;
}
.hero-title {
	position: relative;
	font-family: var(--timeline-font-display);
	font-size: clamp(2.5rem, 8vw, 4.5rem);
	font-weight: 900;
	letter-spacing: 0.15em;
	color: #fff;
	text-shadow: 0 0 40px rgba(56, 189, 248, 0.4);
	margin-bottom: 0.25em;
}
.hero-sub {
	position: relative;
	font-family: var(--timeline-font-display);
	font-size: clamp(0.7rem, 2.5vw, 1rem);
	letter-spacing: 0.5em;
	color: var(--timeline-muted);
	text-transform: uppercase;
}
.scroll-hint {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	width: 24px;
	height: 40px;
	border: 2px solid var(--timeline-muted);
	border-radius: 12px;
	opacity: 0.7;
}
.scroll-hint::after {
	content: '';
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 8px;
	background: var(--timeline-accent);
	border-radius: 2px;
	animation: scrollHint 2s ease-in-out infinite;
}
@keyframes scrollHint {
	0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
	50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

/* ========== 时间轴主容器 ========== */
.timeline-main {
	position: relative;
	max-width: calc(var(--timeline-max) + 120px);
	margin: 0 auto;
	padding: 2rem 24px 6rem;
}
.timeline-line {
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 3px;
	transform: translateX(-50%);
	background: var(--timeline-line);
	border-radius: 3px;
	opacity: 0.9;
}
.timeline-inner {
	position: relative;
	z-index: 1;
}

/* ========== 年份节点 ========== */
.timeline-year {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 3rem 0;
	opacity: 0;
	transform: scale(0.9);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-year.is-visible {
	opacity: 1;
	transform: scale(1);
}
.timeline-year-dot {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	height: 20px;
	background: var(--timeline-dot);
	border-radius: 50%;
	box-shadow: 0 0 0 6px var(--timeline-bg), 0 0 20px var(--timeline-dot-glow);
	z-index: 2;
}
.timeline-year-title {
	font-family: var(--timeline-font-display);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--timeline-year);
	letter-spacing: 0.1em;
	padding: 0.5rem 1.25rem;
	background: rgba(15, 23, 42, 0.9);
	border: 1px solid rgba(56, 189, 248, 0.3);
	border-radius: 999px;
	position: relative;
	z-index: 2;
}
.timeline-year-title span {
	font-size: 0.85em;
	opacity: 0.9;
	margin-left: 0.15em;
}

/* ========== 时间轴条目 ========== */
.timeline-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	width: 100%;
	margin-bottom: 2.5rem;
	opacity: 0;
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item--left {
	justify-content: flex-end;
	padding-right: calc(50% + 28px);
}
.timeline-item--left .timeline-item-card { text-align: right; }
.timeline-item--right {
	justify-content: flex-start;
	padding-left: calc(50% + 28px);
}
.timeline-item--right .timeline-item-dot { left: calc(50% - 28px); right: auto; }
.timeline-item.is-visible {
	opacity: 1;
}
.timeline-item.is-visible.timeline-item--left {
	animation: slideInLeft 0.6s ease forwards;
}
.timeline-item.is-visible.timeline-item--right {
	animation: slideInRight 0.6s ease forwards;
}
@keyframes slideInLeft {
	from { transform: translateX(40px); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInRight {
	from { transform: translateX(-40px); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

.timeline-item-dot {
	position: absolute;
	left: calc(50% - 28px);
	top: 28px;
	width: 14px;
	height: 14px;
	background: var(--timeline-dot);
	border: 3px solid var(--timeline-bg);
	border-radius: 50%;
	box-shadow: 0 0 12px var(--timeline-dot-glow);
	z-index: 2;
	flex-shrink: 0;
}

.timeline-item-card {
	width: 100%;
	max-width: 380px;
	padding: 1.35rem 1.5rem;
	background: var(--timeline-card);
	backdrop-filter: blur(12px);
	border: 1px solid var(--timeline-card-border);
	border-radius: var(--timeline-radius);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.timeline-item-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(6, 182, 212, 0.15), 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.timeline-item-date {
	display: inline-block;
	font-family: var(--timeline-font-display);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	color: var(--timeline-accent);
	margin-bottom: 0.5rem;
}
.timeline-item-title {
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.5rem;
	line-height: 1.35;
}
.timeline-item-title a {
	color: #fff;
	transition: color 0.2s ease;
}
.timeline-item-title a:hover {
	color: var(--timeline-link);
	text-decoration: none;
}
.timeline-item-content {
	font-size: 0.9rem;
	color: var(--timeline-muted);
	line-height: 1.65;
}
.timeline-item-content p { margin: 0.35em 0; }
.timeline-item-content p:first-child { margin-top: 0; }
.timeline-item-content p:last-child { margin-bottom: 0; }
.timeline-item-expand {
	display: inline-block;
	margin-top: 0.75rem;
	padding: 0.4rem 1rem;
	font-size: 0.85rem;
	color: var(--timeline-accent);
	background: rgba(6, 182, 212, 0.1);
	border: 1px solid rgba(6, 182, 212, 0.3);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: var(--timeline-font);
}
.timeline-item-expand:hover {
	background: rgba(6, 182, 212, 0.2);
	border-color: var(--timeline-accent);
	color: #fff;
	transform: translateY(-1px);
}

/* ========== 磨砂弹窗 ========== */
.content-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	pointer-events: none;
}
.content-modal[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
.content-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 14, 23, 0.75);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.content-modal-container {
	position: relative;
	width: 90%;
	max-width: 600px;
	max-height: 85vh;
	background: rgba(30, 41, 59, 0.95);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(56, 189, 248, 0.25);
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(6, 182, 212, 0.1);
	display: flex;
	flex-direction: column;
	transform: scale(0.95) translateY(20px);
	transition: transform 0.3s ease;
	overflow: hidden;
}
.content-modal[aria-hidden="false"] .content-modal-container {
	transform: scale(1) translateY(0);
}
.content-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}
.content-modal-title {
	font-family: var(--timeline-font-display);
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
	letter-spacing: 0.05em;
}
.content-modal-close {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 6px;
	color: var(--timeline-muted);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
	padding: 0;
}
.content-modal-close:hover {
	color: #fff;
	border-color: var(--timeline-accent);
	background: rgba(6, 182, 212, 0.1);
	transform: rotate(90deg);
}
.content-modal-body {
	flex: 1;
	padding: 1.5rem;
	overflow-y: auto;
	overflow-x: hidden;
}
.content-modal-body::-webkit-scrollbar {
	width: 8px;
}
.content-modal-body::-webkit-scrollbar-track {
	background: rgba(15, 23, 42, 0.5);
	border-radius: 4px;
}
.content-modal-body::-webkit-scrollbar-thumb {
	background: rgba(56, 189, 248, 0.4);
	border-radius: 4px;
}
.content-modal-body::-webkit-scrollbar-thumb:hover {
	background: rgba(56, 189, 248, 0.6);
}
.content-modal-text {
	font-size: 0.95rem;
	color: var(--timeline-text);
	line-height: 1.8;
	word-wrap: break-word;
}
.content-modal-text p {
	margin: 0.75em 0;
}
.content-modal-text p:first-child {
	margin-top: 0;
}
.content-modal-text p:last-child {
	margin-bottom: 0;
}

/* ========== 回到顶部 ========== */
.gototop {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 48px;
	height: 48px;
	background: var(--timeline-surface);
	border: 1px solid var(--timeline-card-border);
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 100;
}
.gototop::before,
.gototop::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 10px;
	height: 2px;
	background: var(--timeline-accent);
	transform-origin: center;
}
.gototop::before {
	transform: translate(-50%, -50%) rotate(-45deg);
	margin-left: -3px;
}
.gototop::after {
	transform: translate(-50%, -50%) rotate(45deg);
	margin-left: 3px;
}
.gototop:hover {
	opacity: 1;
	transform: scale(1.08);
	box-shadow: 0 0 20px var(--timeline-dot-glow);
}

/* ========== 侧边悬浮链接（微博等） ========== */
.float-link {
	position: fixed;
	left: 0;
	width: 36px;
	padding: 10px 8px;
	background: var(--timeline-surface);
	border: 1px solid var(--timeline-card-border);
	border-left: none;
	border-radius: 0 8px 8px 0;
	font-size: 12px;
	color: var(--timeline-muted);
	text-align: center;
	transition: left 0.25s ease, color 0.2s ease, background 0.2s ease;
	z-index: 99;
}
.float-link:hover {
	left: 0;
	color: var(--timeline-link);
	background: rgba(30, 41, 59, 0.95);
}
.float-link--sina { top: 45%; }
.float-link--qq   { top: 52%; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
	.timeline-line { left: 20px; transform: none; }
	.timeline-year-dot { left: 20px; transform: translateX(-50%); }
	.timeline-year-title { margin-left: 28px; }
	.timeline-item--left,
	.timeline-item--right {
		justify-content: flex-start;
		padding-left: 48px;
		padding-right: 24px;
	}
	.timeline-item--left .timeline-item-card { text-align: left; }
	.timeline-item-dot,
	.timeline-item--right .timeline-item-dot {
		left: 13px;
		top: 24px;
	}
	.timeline-item-card { max-width: none; }
	.hero-title { letter-spacing: 0.08em; }
	.hero-sub { letter-spacing: 0.3em; }
}
