/* About / 个人简历页 — PC 布局保持不变，移动端样式见文件末尾 media queries */

.about-page,
.about-page * {
	font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.about-page {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.about-page .hero-grid,
.about-page .content-grid,
.about-page .left-stack,
.about-page .section,
.about-page .hero-left,
.about-page .hero-left > div:not(.avatar),
.about-page .achievement-board,
.about-page .cert-marquee-wrap {
	min-width: 0;
	max-width: 100%;
}

.about-page .hero-grid > *,
.about-page .content-grid > *,
.about-page .left-stack > * {
	min-width: 0;
}

.about-page .section {
	border: 1px solid color-mix(in srgb, var(--bs-border-color) 72%, transparent);
	border-radius: 14px;
	background: var(--bs-body-bg);
	padding: 18px;
}

.about-page .hero {
	margin-bottom: 12px;
}

.about-page .hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
	gap: 14px;
}

.about-page .hero-left {
	display: flex;
	gap: 16px;
	align-items: center;
}

.about-page .avatar {
	width: 150px;
	height: 196px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--bs-border-color);
	background: var(--bs-tertiary-bg);
	flex: 0 0 auto;
}

.about-page .avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.about-page .hero-name {
	font-size: 44px;
	line-height: 1.05;
	margin: 0 0 6px;
	font-weight: 700;
}

.about-page .hero-title {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	border: 1px solid var(--bs-border-color);
	background: var(--bs-tertiary-bg);
	margin-bottom: 10px;
}

.about-page .hero-bio {
	margin: 0;
	color: var(--bs-secondary-color);
	line-height: 1.55;
}

.about-page .contact-row {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.about-page .contact-pill,
.about-page .link-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--bs-border-color);
	border-radius: 999px;
	padding: 5px 10px;
	font-size: 13px;
	color: var(--bs-body-color);
	background: var(--bs-body-bg);
	text-decoration: none;
}

.about-page .hero-right {
	border: 1px solid var(--bs-border-color);
	border-radius: 12px;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr 1fr;
	height: fit-content;
}

.about-page .metric {
	padding: 16px 10px;
	text-align: center;
	border-right: 1px solid var(--bs-border-color);
	border-bottom: 1px solid var(--bs-border-color);
}

.about-page .metric:nth-child(2n) {
	border-right: 0;
}

.about-page .metric:nth-last-child(-n + 2) {
	border-bottom: 0;
}

.about-page .metric i {
	color: var(--bs-primary);
	font-size: 16px;
}

.about-page .metric-value {
	margin-top: 6px;
	font-size: 34px;
	line-height: 1;
	font-weight: 700;
}

.about-page .metric-label {
	margin-top: 4px;
	font-size: 13px;
	color: var(--bs-secondary-color);
}

.about-page .content-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	min-width: 0;
	width: 100%;
}

.about-page .left-stack {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: 12px;
	min-width: 0;
	width: 100%;
}

.about-page .title-row {
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}

.about-page .timeline {
	margin-left: 8px;
}

.about-page .timeline-item {
	position: relative;
	padding-left: 16px;
	padding-bottom: 14px;
	border-left: 2px solid color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color) 55%);
}

.about-page .timeline-item:last-child {
	padding-bottom: 8px;
}

.about-page .timeline-item::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 4px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--bs-primary);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--bs-primary) 18%, transparent);
}

.about-page .timeline-item:last-child::after {
	content: "";
	position: absolute;
	left: -5px;
	bottom: -6px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--bs-primary) 60%, var(--bs-border-color) 40%);
}

.about-page .item-title {
	font-weight: 700;
	font-size: 19px;
	margin: 0;
}

.about-page .item-sub {
	margin: 2px 0 0;
	color: var(--bs-secondary-color);
	font-size: 13px;
}

.about-page .practice-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.about-page .practice-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--bs-border-color);
	border-radius: 10px;
	padding: 10px 12px;
}

.about-page .practice-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
}

.about-page .practice-meta {
	margin-top: 2px;
	font-size: 13px;
	color: var(--bs-secondary-color);
}

.about-page .practice-proof-btn {
	white-space: nowrap;
}

.about-page .full {
	grid-column: 1 / -1;
}

.about-page .achievement-board {
	border: 1px solid var(--bs-border-color);
	border-radius: 10px;
	padding: 12px;
	margin-bottom: 10px;
}

.about-page .achievement-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
	gap: 10px;
	min-width: 0;
}

.about-page .achievement-col + .achievement-col {
	border-left: 1px solid var(--bs-border-color);
	padding-left: 10px;
}

.about-page .achievement-col-title {
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--bs-primary);
}

.about-page .achievement-list {
	margin: 0;
	padding-left: 16px;
	font-size: 14px;
}

.about-page .achievement-list li {
	margin-bottom: 4px;
}

.about-page .achievement-cert-btn {
	border: 0;
	background: transparent;
	padding: 0;
	text-align: left;
	cursor: pointer;
}

.about-page .achievement-cert-btn:hover {
	color: var(--bs-primary);
	text-decoration: underline;
}

.about-page .cert-marquee-wrap {
	overflow: hidden;
	border: 1px solid var(--bs-border-color);
	border-radius: 10px;
	padding: 8px 0;
	width: 100%;
	max-width: 100%;
	isolation: isolate;
}

.about-page .cert-marquee-track {
	display: inline-flex;
	gap: 10px;
	white-space: nowrap;
	padding-left: 10px;
	animation: about-cert-scroll 32s linear infinite;
	width: max-content;
	max-width: none;
}

.about-page .cert-marquee-wrap:hover .cert-marquee-track {
	animation-play-state: paused;
}

.about-page .cert-photo-btn {
	border: 0;
	background: transparent;
	padding: 0;
	width: 230px;
	flex: 0 0 230px;
}

.about-page .cert-photo-card {
	border: 1px solid var(--bs-border-color);
	border-radius: 10px;
	overflow: hidden;
	background: var(--bs-body-bg);
}

.about-page .cert-photo-img-wrap {
	height: 128px;
	background: var(--bs-tertiary-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.about-page .cert-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.about-page .cert-photo-fallback {
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: var(--bs-secondary-color);
	font-size: 12px;
}

.about-page .cert-photo-meta {
	padding: 7px 9px;
	font-size: 12px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.about-page .skills-block {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
	gap: 14px;
	align-items: stretch;
}

.about-page .skills-cloud {
	border: 1px solid var(--bs-border-color);
	border-radius: 12px;
	padding: 12px;
	background: color-mix(in srgb, var(--bs-primary) 3%, var(--bs-body-bg) 97%);
}

.about-page .skills-title {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--bs-secondary-color);
	text-transform: uppercase;
}

.about-page .skills-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.about-page .skill-tag {
	border: 1px solid color-mix(in srgb, var(--bs-primary) 24%, var(--bs-border-color) 76%);
	border-radius: 999px;
	padding: 6px 11px;
	font-size: 13px;
	background: var(--bs-body-bg);
	color: var(--bs-emphasis-color);
}

.about-page .skills-raw {
	margin-top: 10px;
	font-size: 13px;
	color: var(--bs-secondary-color);
	line-height: 1.6;
	white-space: pre-wrap;
}

.about-page .value-card {
	border: 1px solid color-mix(in srgb, var(--bs-primary) 26%, var(--bs-border-color) 74%);
	border-radius: 12px;
	background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 8%, var(--bs-body-bg) 92%), var(--bs-body-bg));
	padding: 14px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.about-page .value-label {
	font-size: 12px;
	color: var(--bs-secondary-color);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.about-page .value-text {
	font-size: 18px;
	line-height: 1.45;
	font-weight: 700;
	margin: 0;
}

.about-page .cert-preview-frame {
	width: 100%;
	min-height: 62vh;
	border: 0;
	border-radius: 8px;
	background: var(--bs-tertiary-bg);
}

.about-page .cert-preview-image {
	width: 100%;
	max-height: 62vh;
	object-fit: contain;
	border-radius: 8px;
	background: var(--bs-tertiary-bg);
}

#certificatePreviewModal .cert-preview-frame {
	width: 100%;
	min-height: 62vh;
	border: 0;
	border-radius: 8px;
	background: var(--bs-tertiary-bg);
}

#certificatePreviewModal .cert-preview-image {
	width: 100%;
	max-height: 62vh;
	object-fit: contain;
	border-radius: 8px;
	background: var(--bs-tertiary-bg);
}

@keyframes about-cert-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

/* 平板及以下：单列 + 头部纵向排列（≥992px PC 布局不变） */
@media (max-width: 991.98px) {
	.about-page .hero-grid,
	.about-page .content-grid,
	.about-page .left-stack,
	.about-page .skills-block {
		grid-template-columns: minmax(0, 1fr);
		width: 100%;
	}

	.about-page .left-stack {
		grid-template-rows: auto;
	}

	.about-page .hero-left > div:not(.avatar) {
		width: 100%;
		max-width: 100%;
	}

	.about-page .achievement-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.about-page .hero-left {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 12px;
	}

	.about-page .contact-row {
		justify-content: center;
	}

	.about-page .hero-name {
		font-size: 32px;
	}

	.about-page .avatar {
		width: min(150px, 38vw);
		height: auto;
		aspect-ratio: 150 / 196;
		flex: 0 0 auto;
		min-width: 120px;
		max-width: 150px;
	}

	.about-page .hero-right {
		width: 100%;
	}
}

/* 手机：新增布局，不影响 PC */
@media (max-width: 767.98px) {
	.about-page {
		overflow-x: clip;
	}

	.about-page .section {
		padding: 14px 12px;
		border-radius: 12px;
	}

	.about-page .hero {
		margin-bottom: 10px;
	}

	.about-page .hero-grid {
		gap: 12px;
	}

	.about-page .hero-name {
		font-size: 28px;
		word-break: break-word;
	}

	.about-page .hero-bio {
		font-size: 14px;
		text-align: left;
	}

	.about-page .contact-pill,
	.about-page .link-pill {
		max-width: 100%;
		font-size: 12px;
		padding: 5px 9px;
		word-break: break-all;
	}

	.about-page .metric {
		padding: 12px 8px;
	}

	.about-page .metric-value {
		font-size: 28px;
	}

	.about-page .metric-label {
		font-size: 12px;
		line-height: 1.35;
	}

	.about-page .content-grid {
		gap: 10px;
	}

	.about-page .title-row {
		font-size: 17px;
	}

	.about-page .item-title {
		font-size: 16px;
		word-break: break-word;
	}

	.about-page .item-sub {
		word-break: break-word;
	}

	.about-page .practice-row {
		grid-template-columns: 1fr;
		align-items: stretch;
		gap: 8px;
	}

	.about-page .practice-proof-btn {
		width: 100%;
		white-space: normal;
	}

	.about-page .achievement-grid {
		grid-template-columns: 1fr;
	}

	.about-page .achievement-col + .achievement-col {
		border-left: 0;
		padding-left: 0;
		border-top: 1px solid var(--bs-border-color);
		padding-top: 10px;
		margin-top: 2px;
	}

	.about-page .achievement-cert-btn {
		word-break: break-word;
	}

	.about-page .cert-photo-btn {
		width: 180px;
		flex: 0 0 180px;
	}

	.about-page .cert-photo-img-wrap {
		height: 110px;
	}

	#certificatePreviewModal .modal-dialog {
		margin: 0.5rem auto;
		max-width: calc(100% - 1rem);
	}
}

@media (max-width: 575.98px) {
	.about-page .hero-name {
		font-size: 24px;
	}

	.about-page .metric-value {
		font-size: 24px;
	}

	.about-page .metric-label {
		font-size: 11px;
	}

	.about-page .timeline {
		margin-left: 4px;
	}

	.about-page .timeline-item {
		padding-left: 14px;
	}

	.about-page .cert-preview-frame,
	#certificatePreviewModal .cert-preview-frame {
		min-height: 50vh;
	}

	.about-page .cert-preview-image,
	#certificatePreviewModal .cert-preview-image {
		max-height: 50vh;
	}
}
