/* =========================================================================
   关于我页面样式（全部作用域 .about-page，嵌入安全，不污染主题）
   文字色继承主题；卡片背景用 light-dark() 浅/深自适应（依赖主题 color-scheme）。
   ========================================================================= */

.about-page {
  /* -- 设计 token -- */
  --maxw: 760px;
  --radius: 10px;
  --space: 8px;

  --accent: #2f6feb;                          /* 默认强调色；前台由 inline 注入覆盖 */
  --surface: light-dark(#ffffff, #1b1b1f);    /* 卡片背景：浅/深自适应（依赖主题 color-scheme） */
  --line:        color-mix(in srgb, currentColor 14%, transparent); /* 边框/分隔线 */
  --soft:        color-mix(in srgb, currentColor 5%,  transparent); /* 内卡片底 */
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent); /* 标签底 */

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;

  max-width: var(--maxw);
  margin-inline: auto;
  margin-bottom: 48px;
  padding: 32px 28px 56px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px color-mix(in srgb, currentColor 8%, transparent);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

/* -- 局部 reset（仅限 .about-page 内） -- */
.about-page *, .about-page *::before, .about-page *::after { box-sizing: border-box; }
.about-page h1, .about-page h2, .about-page h3, .about-page h4,
.about-page p, .about-page ul, .about-page ol, .about-page dl { margin: 0; }
.about-page ul, .about-page ol { padding: 0; list-style: none; }
.about-page a { color: var(--accent); text-decoration: none; }
.about-page a:hover { text-decoration: underline; }
.about-page :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.about-page img { display: block; max-width: 100%; }

/* -- 区块通用 -- */
.about-page .section { margin-block: 44px; }
.about-page .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.about-page .section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.about-page .muted { opacity: .6; }

/* -- Hero -- */
.about-page .hero { margin-bottom: 8px; }
.about-page .hero-head {
  display: flex;
  align-items: center;
  gap: 20px;
}
.about-page .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  flex-shrink: 0;
}
.about-page .hero h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.about-page .tagline {
  margin-top: 4px;
  font-size: 15px;
  opacity: .65;
}
.about-page .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 22px;
}
.about-page .meta > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.about-page .meta dt {
  font-size: 13px;
  opacity: .55;
}
.about-page .meta dd {
  font-size: 15px;
}

/* -- 关于我 -- */
.about-page .intro p + p { margin-top: 14px; }

/* -- 教育经历 / 时间线 -- */
.about-page .timeline {
  position: relative;
  padding-left: 22px;
}
.about-page .timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}
.about-page .timeline li {
  position: relative;
  padding-bottom: 26px;
}
.about-page .timeline li:last-child { padding-bottom: 0; }
.about-page .timeline li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.about-page .timeline .time {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: .6;
  margin-bottom: 2px;
}
.about-page .timeline h3 {
  font-size: 17px;
  font-weight: 600;
}
.about-page .timeline h3 small {
  font-size: 14px;
  font-weight: 400;
  opacity: .6;
  margin-left: 6px;
}
.about-page .timeline-desc { margin-top: 6px; font-size: 15px; }

/* -- 待补充占位 -- */
.about-page .pending {
  display: inline-block;
  font-size: 13px;
  opacity: .5;
  font-style: italic;
  padding: 2px 8px;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

/* -- 技术栈 -- */
.about-page .stack-group { margin-bottom: 18px; }
.about-page .stack-group:last-child { margin-bottom: 0; }
.about-page .stack-group h4 {
  font-size: 13px;
  font-weight: 600;
  opacity: .55;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.about-page .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.about-page .tag {
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-mono);
  line-height: 1.5;
  transition: background .2s ease, color .2s ease;
}
.about-page .tag:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* -- 项目 -- */
.about-page .projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.about-page .project-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.about-page .project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, currentColor 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.about-page .project-card h3 { font-size: 17px; font-weight: 600; }
.about-page .project-card .desc { font-size: 14px; opacity: .75; }
.about-page .project-card .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.about-page .project-card .time {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: .55;
}

/* 空状态（项目整理中） */
.about-page .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.about-page .empty-state .es-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.about-page .empty-state .es-sub { font-size: 14px; opacity: .6; }

/* -- 校园经历 / 项目经历（共用的列表卡片样式） -- */
.about-page .campus-list,
.about-page .work-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-page .campus-item,
.about-page .work-item {
  padding: 14px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.about-page .campus-item:hover,
.about-page .work-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, currentColor 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.about-page .campus-head,
.about-page .work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.about-page .campus-title,
.about-page .work-title { font-size: 16px; font-weight: 600; }
.about-page .campus-time,
.about-page .work-time {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: .6;
}
.about-page .campus-desc,
.about-page .work-desc { margin-top: 6px; font-size: 14px; opacity: .75; }

/* -- 项目经历：项目名 + 所属公司 -- */
.about-page .work-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.about-page .work-company { font-size: 13px; opacity: .6; }

/* -- 技能证书 -- */
.about-page .certs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-page .cert-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.about-page .cert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, currentColor 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.about-page .cert-badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.about-page .cert-badge svg { width: 22px; height: 22px; }
.about-page .cert-body { flex: 1; min-width: 0; }
.about-page .cert-row1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.about-page .cert-name { font-size: 16px; font-weight: 600; }
.about-page .cert-name .cert-number {
  font-size: 14px;
  font-weight: 400;
  opacity: .6;
  margin-left: 6px;
}
.about-page .cert-link {
  color: var(--accent);
  text-decoration: none;
}
.about-page .cert-link:hover {
  text-decoration: underline;
}
.about-page .cert-date {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: .6;
}
.about-page .cert-issuer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
}
.about-page .cert-issuer .cert-issuer-label {
  padding: 1px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.about-page .cert-issuer .cert-issuer-name { opacity: .72; }

/* -- 获奖情况：奖章卡片（奖项 / 颁奖机构 / 时间 / 简介） -- */
.about-page .awards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-page .award-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.about-page .award-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, currentColor 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.about-page .award-badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.about-page .award-badge svg { width: 22px; height: 22px; }
.about-page .award-body { flex: 1; min-width: 0; }
.about-page .award-row1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.about-page .award-name { font-size: 16px; font-weight: 600; }
.about-page .award-date {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: .6;
}
.about-page .award-issuer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
}
.about-page .award-issuer-label {
  padding: 1px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.about-page .award-issuer-name { opacity: .72; }
.about-page .award-desc { margin-top: 8px; font-size: 14px; opacity: .75; }

/* -- 联系方式：整张卡片即 <a>/<button>，有链接可跳转，无链接点击复制 -- */
.about-page .contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.about-page .contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, background .2s ease, transform .1s ease;
}
.about-page .contact-item:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--soft);
}
.about-page .contact-item.is-copy:active { transform: translateY(1px); }
.about-page .contact-item.is-copied {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* -- 页脚 -- */
.about-page .about-footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
  opacity: .55;
}

/* -- 渐入（渐进增强：仅当 JS 给容器加 .js 类时才隐藏） -- */
.about-page.js .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.about-page.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* -- 响应式 -- */
@media (max-width: 768px) {
  .about-page { padding: 24px 18px 40px; margin-inline: 12px; margin-bottom: 32px; }
  .about-page .section { margin-block: 32px; }
  .about-page .hero-head { flex-direction: column; text-align: center; gap: 14px; }
  .about-page .meta { justify-content: center; }
  .about-page .projects { grid-template-columns: 1fr; }
}

/* -- 尊重减少动效偏好 -- */
@media (prefers-reduced-motion: reduce) {
  .about-page.js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .about-page .project-card:hover,
  .about-page .campus-item:hover,
  .about-page .work-item:hover,
  .about-page .cert-card:hover,
  .about-page .award-card:hover { transform: none; }
  .about-page .tag, .about-page .project-card, .about-page .contact-item,
  .about-page .campus-item, .about-page .work-item,
  .about-page .cert-card, .about-page .award-card { transition: none; }
}

/* -- 复制成功提示（toast，挂载在 body 上，独立于 .about-page） -- */
.ta-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 16px);
  z-index: 99999;
  max-width: 80vw;
  padding: 10px 18px;
  background: #1f2328;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.ta-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  .ta-toast { transition: none; }
}
