/* =========================================
   Timeline 時間軸
   ========================================= */



/* 時間軸容器 */
.timeline-container {
	max-width: 1200px;
	margin: 80px auto;
	position: relative;
	z-index: 1;
}

/* 中央主軸線 */
.timeline-container::before {
	content: '';
	position: absolute;
	left: 50%;
	top: -20px;
	bottom: -20px;
	width: 4px;
	background: linear-gradient(180deg,
			transparent 0%,
			rgba(0, 217, 255, .8) 10%,
			rgba(100, 147, 250, .9) 50%,
			rgba(0, 217, 255, .8) 90%,
			transparent 100%);
	transform: translateX(-50%);
	box-shadow:
		0 0 20px rgba(0, 217, 255, .6),
		0 0 40px rgba(0, 217, 255, .4),
		0 0 60px rgba(100, 147, 250, .3);
	z-index: 0;
}

/* 時間軸項目 */
.timeline-item {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 50px;
	margin-bottom: 80px;
	align-items: center;
	position: relative;
	z-index: 1;
}

.timeline-item::before,
.timeline-item::after {
	content: '';
	display: block;
}

/* 奇數項目：左側內容 */
.timeline-item:nth-child(odd) {
	grid-template-areas: "content year empty";
}

.timeline-item:nth-child(odd) .timeline-content {
	grid-area: content;
	text-align: left;
}

.timeline-item:nth-child(odd) .timeline-year {
	grid-area: year;
}

.timeline-item:nth-child(odd)::after {
	grid-area: empty;
}

/* 偶數項目：右側內容 */
.timeline-item:nth-child(even) {
	grid-template-areas: "empty year content";
}

.timeline-item:nth-child(even) .timeline-content {
	grid-area: content;
	text-align: left;
}

.timeline-item:nth-child(even) .timeline-year {
	grid-area: year;
}

.timeline-item:nth-child(even)::before {
	grid-area: empty;
}

/* 年份標籤 */
.timeline-year {
	position: relative;
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
	background: linear-gradient(135deg,
			rgba(0, 217, 255, .15) 0%,
			rgba(100, 147, 250, .08) 100%);
	padding: 12px 20px;
	border-radius: 30px;
	border: 2px solid rgba(0, 217, 255, .6);
	width: max-content;
	min-width: 120px;
	text-align: center;
	z-index: 2;
	backdrop-filter: blur(10px);
	box-shadow:
		0 0 20px rgba(0, 217, 255, .3),
		0 0 40px rgba(0, 217, 255, .15),
		inset 0 0 15px rgba(0, 217, 255, .08);
	transition: all .3s ease;
	text-shadow: 0 0 8px rgba(0, 217, 255, .5);
	margin: 0 auto;
}

.timeline-year:hover {
	transform: scale(1.05);
	box-shadow:
		0 0 30px rgba(0, 217, 255, .5),
		0 0 60px rgba(0, 217, 255, .25),
		inset 0 0 20px rgba(0, 217, 255, .15);
	border-color: var(--cyan);
}

/* 年份連接線 */
.timeline-year::before {
	content: '';
	position: absolute;
	top: 50%;
	width: 50px;
	height: 2px;
	background: linear-gradient(90deg, rgba(0, 217, 255, .6), transparent);
	transform: translateY(-50%);
	box-shadow: 0 0 8px rgba(0, 217, 255, .4);
	z-index: -1;
}

.timeline-item:nth-child(odd) .timeline-year::before {
	right: 100%;
	left: auto;
}

.timeline-item:nth-child(even) .timeline-year::before {
	left: 100%;
	right: auto;
}

/* 內容卡片 */
.timeline-content {
	position: relative;
	background: rgba(255, 255, 255, .08);
	padding: 28px;
	border: 1px solid rgba(0, 217, 255, .35);
	border-radius: 16px;
	backdrop-filter: blur(12px) saturate(120%);
	box-shadow:
		0 10px 28px rgba(0, 0, 0, .28),
		0 0 18px rgba(0, 217, 255, .45);
	transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
	z-index: 3;
}

.timeline-content:hover {
	transform: translateY(-5px);
	border-color: rgba(0, 217, 255, .6);
	background: rgba(255, 255, 255, .12);
	box-shadow:
		0 16px 38px rgba(0, 0, 0, .35),
		0 0 28px rgba(0, 217, 255, .6);
}


/* 卡片頂部標題區 */
.timeline-header {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 8px;
	position: relative;
	z-index: 1;
}

.timeline-content h3 {
	color: #ffffff;
	font-size: 23px;
	font-weight: 700;
	margin: 0;
	text-shadow: 0 0 12px rgba(0, 217, 255, .4);
	transition: color .3s;
	letter-spacing: 0.5px;
}

.timeline-content:hover h3 {
	color: var(--cyan);
	text-shadow: 0 0 18px rgba(0, 217, 255, .7);
}

/* 🏷️ 次級角色/榮譽膠囊標籤 */
.sub-role-tags {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.sub-role-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	font-size: 13px;
	font-weight: 600;
	color: #38bdf8;
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.35);
	border-radius: 6px;
	backdrop-filter: blur(6px);
	transition: all 0.25s ease;
	letter-spacing: 0.3px;
}

.sub-role-badge i {
	font-size: 11.5px;
	color: #38bdf8;
}

.sub-role-badge.highlight {
	color: #fbbf24;
	background: rgba(251, 191, 36, 0.12);
	border-color: rgba(251, 191, 36, 0.45);
	box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

.sub-role-badge.highlight i {
	color: #fbbf24;
}

.timeline-content:hover .sub-role-badge {
	background: rgba(56, 189, 248, 0.18);
	border-color: #38bdf8;
	color: #ffffff;
}

.timeline-content:hover .sub-role-badge.highlight {
	background: rgba(251, 191, 36, 0.22);
	border-color: #fbbf24;
	box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
	color: #ffffff;
}

/* 🟢 在職狀態呼吸光點 */
.pulse-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	background: #10b981;
	border-radius: 50%;
	margin-right: 8px;
	position: relative;
	vertical-align: middle;
	box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
	animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
	0% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
	}
	70% {
		transform: scale(1.15);
		box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
	}
	100% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
	}
}

.timeline-content .company {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #38bdf8;
	font-size: 14.5px;
	font-weight: 600;
	margin-bottom: 14px;
	padding: 5px 14px;
	background: rgba(0, 217, 255, 0.08);
	border-radius: 20px;
	border: 1px solid rgba(0, 217, 255, 0.35);
	position: relative;
	z-index: 1;
	transition: all .3s ease;
	letter-spacing: 0.5px;
}

.timeline-content .company i {
	font-size: 13.5px;
	color: #38bdf8;
}

.timeline-content .company.school {
	color: #34d399;
	background: rgba(52, 211, 153, 0.08);
	border-color: rgba(52, 211, 153, 0.35);
}

.timeline-content .company.school i {
	color: #34d399;
}

.timeline-content:hover .company {
	background: rgba(0, 217, 255, .16);
	border-color: rgba(0, 217, 255, .7);
	box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.timeline-content:hover .company.school {
	background: rgba(52, 211, 153, .16);
	border-color: rgba(52, 211, 153, .7);
	box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}

.timeline-content p,
.timeline-content ul {
	color: rgba(230, 241, 255, .9);
	line-height: 1.8;
	font-size: 15px;
	margin: 0;
	position: relative;
	z-index: 1;
}

.timeline-content ul {
	margin-top: 10px;
	padding-left: 20px;
}

.timeline-content ul li {
	margin-bottom: 9px;
	line-height: 1.75;
}

.timeline-content ul li strong {
	color: #fbbf24;
	font-weight: 600;
	letter-spacing: 0.2px;
}

.timeline-content ul li::marker {
	color: #00d9ff;
}

/* RWD：平板 */
@media (max-width: 1024px) {
	.timeline-item {
		gap: 40px;
		margin-bottom: 70px;
	}

	.timeline-year {
		font-size: 20px;
		padding: 11px 18px;
		min-width: 110px;
	}

	.timeline-content {
		padding: 24px;
	}

	.timeline-content h3 {
		font-size: 20px;
	}

	.timeline-content .company {
		font-size: 14px;
	}

	.timeline-content p,
	.timeline-content ul {
		font-size: 14px;
		line-height: 1.7;
	}
}

/* RWD：手機版 */
@media (max-width: 768px) {
	#timeline {
		padding: 80px 5% 60px;
	}

	.timeline-container {
		margin: 60px auto;
	}

	.timeline-container::before {
		left: 60px;
	}

	.timeline-container::after {
		left: 60px;
		width: 6px;
	}

	.timeline-item {
		grid-template-columns: auto 1fr !important;
		grid-template-areas: "year content" !important;
		gap: 18px;
		margin-bottom: 50px;
	}

	.timeline-item::before,
	.timeline-item::after {
		display: none;
	}

	.timeline-year {
		grid-area: year !important;
		font-size: 18px;
		padding: 10px 14px;
		margin: 0;
		min-width: 95px;
	}

	.timeline-year::before {
		display: none;
	}

	.timeline-content {
		grid-area: content !important;
		text-align: left !important;
		padding: 20px;
	}

	.timeline-content h3 {
		font-size: 18px;
		margin-bottom: 8px;
	}

	.timeline-content .company {
		font-size: 13px;
		padding: 3px 10px;
		margin-bottom: 12px;
	}

	.timeline-content .company::before {
		font-size: 12px;
	}

	.timeline-content p,
	.timeline-content ul {
		font-size: 14px;
		line-height: 1.7;
	}

	.timeline-content ul {
		margin-top: 10px;
		padding-left: 18px;
	}

	.timeline-content ul li {
		margin-bottom: 6px;
	}
}

/* RWD：小手機 */
@media (max-width: 480px) {
	#timeline {
		padding: 70px 4% 50px;
	}

	.timeline-container {
		margin: 50px auto;
	}

	.timeline-container::before {
		left: 50px;
	}

	.timeline-container::after {
		left: 50px;
		height: 60px;
	}

	.timeline-item {
		gap: 15px;
		margin-bottom: 45px;
	}

	.timeline-year {
		font-size: 16px;
		padding: 8px 12px;
		min-width: 85px;
		border-width: 1.5px;
	}

	.timeline-content {
		padding: 16px;
		border-radius: 12px;
	}

	.timeline-content h3 {
		font-size: 16px;
		margin-bottom: 6px;
	}

	.timeline-content .company {
		font-size: 12px;
		padding: 3px 8px;
		margin-bottom: 10px;
		gap: 6px;
	}

	.timeline-content .company::before {
		font-size: 11px;
	}

	.timeline-content p,
	.timeline-content ul {
		font-size: 13px;
		line-height: 1.65;
	}

	.timeline-content ul {
		margin-top: 8px;
		padding-left: 16px;
	}

	.timeline-content ul li {
		margin-bottom: 5px;
	}
}

/* RWD：極小螢幕 */
@media (max-width: 375px) {
	#timeline {
		padding: 60px 3% 40px;
	}

	.timeline-container {
		margin: 40px auto;
	}

	.timeline-container::before,
	.timeline-container::after {
		left: 45px;
	}

	.timeline-item {
		gap: 12px;
		margin-bottom: 40px;
	}

	.timeline-year {
		font-size: 15px;
		padding: 7px 10px;
		min-width: 75px;
	}

	.timeline-content {
		padding: 14px;
	}

	.timeline-content h3 {
		font-size: 15px;
	}

	.timeline-content .company {
		font-size: 11px;
	}

	.timeline-content p,
	.timeline-content ul {
		font-size: 12px;
		line-height: 1.6;
	}
}

/* =========================================================
   📖 個人自傳專屬現代化卡片系統 (Autobiography Section)
   ========================================================= */
#autobiography {
	padding: 90px 4% 110px;
	position: relative;
	z-index: 10;
	clear: both;
	display: block;
	width: 100%;
}

.autobio-container {
	max-width: 1240px;
	margin: 50px auto 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
	position: relative;
	z-index: 1;
	align-items: stretch;
}

.autobio-card {
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(16px) saturate(140%);
	border: 1px solid rgba(0, 217, 255, 0.22);
	border-radius: 20px;
	padding: 32px 30px;
	position: relative;
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.35s ease, box-shadow 0.35s ease;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(0, 217, 255, 0.04);
	display: flex !important;
	flex-direction: column;
	opacity: 1 !important;
	visibility: visible !important;
	height: auto;
}

.autobio-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at top right, rgba(0, 217, 255, 0.1), transparent 70%);
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
	z-index: 0;
}

.autobio-card:hover {
	transform: translateY(-6px);
	border-color: rgba(0, 217, 255, 0.65);
	box-shadow: 
		0 18px 45px rgba(0, 0, 0, 0.45),
		0 0 25px rgba(0, 217, 255, 0.25),
		inset 0 0 15px rgba(0, 217, 255, 0.06);
}

.autobio-card:hover::before {
	opacity: 1;
}

.autobio-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	position: relative;
	z-index: 1;
}

.autobio-badge-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.autobio-num {
	font-size: 22px;
	font-weight: 800;
	color: rgba(0, 217, 255, 0.4);
	font-family: 'JetBrains Mono', monospace, sans-serif;
	letter-spacing: 0.5px;
}

.autobio-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(0, 217, 255, 0.08);
	border: 1px solid rgba(0, 217, 255, 0.3);
	color: var(--cyan);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	box-shadow: 0 0 12px rgba(0, 217, 255, 0.15);
	transition: all 0.3s ease;
}

.autobio-card:hover .autobio-icon {
	transform: scale(1.08) rotate(3deg);
	border-color: var(--cyan);
	color: #ffffff;
	box-shadow: 0 0 18px rgba(0, 217, 255, 0.4);
}

.autobio-title-wrap {
	flex: 1;
	min-width: 0;
}

.autobio-title {
	font-size: 19px;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 3px;
	letter-spacing: 0.3px;
	transition: color 0.3s ease;
}

.autobio-card:hover .autobio-title {
	color: var(--cyan);
}

.autobio-subtitle {
	font-size: 11.5px;
	font-weight: 600;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.autobio-body {
	position: relative;
	z-index: 1;
	flex: 1;
}

.autobio-body p {
	font-size: 14.5px;
	line-height: 1.85;
	color: rgba(226, 232, 240, 0.88);
	margin: 0 0 14px;
	text-align: justify;
	letter-spacing: 0.2px;
}

.autobio-body p:last-child {
	margin-bottom: 0;
}

.autobio-body strong {
	color: #fbbf24;
	font-weight: 600;
	letter-spacing: 0.2px;
}

.autobio-list {
	margin: 10px 0 0;
	padding-left: 20px;
	color: rgba(226, 232, 240, 0.88);
}

.autobio-list li {
	font-size: 14.5px;
	line-height: 1.8;
	margin-bottom: 10px;
	text-align: justify;
	letter-spacing: 0.2px;
}

.autobio-list li:last-child {
	margin-bottom: 0;
}

.autobio-list li strong {
	color: #fbbf24;
	font-weight: 600;
	letter-spacing: 0.2px;
}

/* 📱 自傳 RWD 響應式 */
@media (max-width: 992px) {
	.autobio-container {
		grid-template-columns: 1fr;
		gap: 22px;
	}
	.autobio-card {
		padding: 26px 22px;
	}
}

@media (max-width: 640px) {
	#autobiography {
		padding: 70px 4% 80px;
	}
	.autobio-header {
		gap: 12px;
		margin-bottom: 16px;
		padding-bottom: 14px;
	}
	.autobio-num {
		font-size: 18px;
	}
	.autobio-icon {
		width: 38px;
		height: 38px;
		font-size: 16px;
	}
	.autobio-title {
		font-size: 17px;
	}
	.autobio-body p,
	.autobio-list li {
		font-size: 13.5px;
		line-height: 1.75;
	}
}