/* ============ 设计令牌 ============ */
:root {
  --bg: #eef1f7;
  --bg-grad-a: #dfe6f5;
  --bg-grad-b: #f4eef8;
  --text: #1c2130;
  --text-secondary: #5b6475;
  --text-tertiary: #8b93a5;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-3: #0891b2;
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-inner: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 8px 32px rgba(30, 41, 82, 0.1);
  --chip-bg: rgba(255, 255, 255, 0.5);
  --sheen: rgba(255, 255, 255, 0.55);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
}

html[data-theme="dark"] {
  --bg: #0b0e16;
  --bg-grad-a: #10141f;
  --bg-grad-b: #141020;
  --text: #eaeef7;
  --text-secondary: #a2abbe;
  --text-tertiary: #6c7488;
  --accent: #6ea0ff;
  --accent-2: #a78bfa;
  --accent-3: #22d3ee;
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-inner: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  --chip-bg: rgba(255, 255, 255, 0.07);
  --sheen: rgba(255, 255, 255, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  transition: background 0.4s, color 0.4s;
}

/* ============ 背景光斑 ============ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-grad-a), var(--bg), var(--bg-grad-b));
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

html[data-theme="dark"] .orb {
  opacity: 0.32;
}

.orb-1 {
  width: 520px;
  height: 520px;
  left: -120px;
  top: -140px;
  background: radial-gradient(circle at 30% 30%, #6ea0ff, transparent 70%);
  animation: drift-1 26s ease-in-out infinite alternate;
}

.orb-2 {
  width: 460px;
  height: 460px;
  right: -140px;
  top: 220px;
  background: radial-gradient(circle at 60% 40%, #b48bff, transparent 70%);
  animation: drift-2 32s ease-in-out infinite alternate;
}

.orb-3 {
  width: 420px;
  height: 420px;
  left: 30%;
  bottom: -180px;
  background: radial-gradient(circle at 50% 50%, #4dd6e8, transparent 70%);
  animation: drift-3 38s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  to { transform: translate(90px, 60px) scale(1.12); }
}
@keyframes drift-2 {
  to { transform: translate(-70px, 90px) scale(0.92); }
}
@keyframes drift-3 {
  to { transform: translate(60px, -70px) scale(1.08); }
}

/* ============ 玻璃基元 ============ */
.glass,
.glass-card,
.glass-btn {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-inner);
}

.glass-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}

/* 鼠标跟随高光 */
.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    var(--sheen),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.glass-card:hover::after {
  opacity: 1;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(30, 41, 82, 0.16), inset 0 1px 0 var(--glass-inner);
}

html[data-theme="dark"] .glass-card:hover {
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--glass-inner);
}

/* ============ 顶部导航 ============ */
.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(960px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 20px;
  border-radius: 999px;
}

.topbar-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.topbar-links {
  display: flex;
  gap: 2px;
}

.topbar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  padding: 5px 13px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.topbar-links a:hover {
  color: var(--text);
}

.topbar-links a.active {
  color: var(--text);
  background: var(--chip-bg);
  box-shadow: inset 0 1px 0 var(--glass-inner);
}

.topbar-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  border: 1px solid var(--glass-border);
  background: var(--chip-bg);
  color: var(--text);
  border-radius: 999px;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============ 布局 ============ */
.page {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ============ Hero ============ */
.hero {
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-top: 110px;
}

.hero-eyebrow {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.16;
  letter-spacing: -0.5px;
  font-weight: 800;
  background: linear-gradient(100deg, var(--text) 30%, var(--accent) 70%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 0 0 16px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.hero-summary {
  margin: 0 0 30px;
  max-width: 560px;
  font-size: 15px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 26px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, color 0.2s;
}

.glass-btn:hover {
  transform: translateY(-2px);
  color: var(--accent);
}

.hero-phone {
  font-size: 14px;
  color: var(--text-tertiary);
}

.hero-photo-wrap {
  flex-shrink: 0;
  padding: 14px;
  border-radius: var(--radius-lg);
  text-align: center;
  transform: rotate(2.5deg);
}

.hero-photo-wrap:hover {
  transform: rotate(0deg) translateY(-4px);
}

.hero-photo {
  display: block;
  width: 210px;
  height: 270px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.hero-photo-name {
  padding: 10px 0 2px;
  font-weight: 700;
  font-size: 17px;
}

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: -20px 0 90px;
}

.stat {
  padding: 18px 16px 14px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-value .suffix {
  font-size: 19px;
  font-weight: 700;
}

.stat-label {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============ 通用区块 ============ */
.section {
  margin-bottom: 110px;
  scroll-margin-top: 90px;
}

.section-head {
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-lede {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

/* ============ 经历时间线 ============ */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
  opacity: 0.45;
  border-radius: 2px;
}

.job {
  position: relative;
  padding: 26px 28px 22px;
}

.job::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 34px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent);
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}

.job-company {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.job-date {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--chip-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 2px 12px;
}

.job-role {
  margin: 4px 0 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--chip-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 2px 11px;
}

.job ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.job li {
  font-size: 14.2px;
  color: var(--text);
}

.job li.hidden-bullet {
  display: none;
}

.job.expanded li.hidden-bullet {
  display: list-item;
}

.expand-btn {
  margin-top: 14px;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.expand-btn:hover {
  text-decoration: underline;
}

.earlier {
  margin: 26px 0 0 34px;
  font-size: 13.5px;
  color: var(--text-tertiary);
}

/* ============ 项目卡片墙 ============ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.project {
  padding: 24px 26px 20px;
  display: flex;
  flex-direction: column;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.project-org {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

.project-metric {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--chip-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}

.project h3 {
  margin: 0 0 8px;
  font-size: 17.5px;
  font-weight: 700;
}

.project p {
  margin: 0 0 16px;
  font-size: 13.8px;
  color: var(--text-secondary);
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ---- 项目实证图集 ---- */
.gallery {
  margin-bottom: 16px;
}

.gallery-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

.gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.gallery-thumb {
  margin: 0;
  flex: 0 0 auto;
  max-width: 236px;
  cursor: zoom-in;
}

.gallery-thumb img {
  display: block;
  height: 128px;
  width: auto;
  max-width: 236px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  transition: transform 0.25s;
}

.gallery-thumb:hover img {
  transform: scale(1.04);
}

.gallery-thumb figcaption {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 单图项目卡：图文左右布局 */
.project.side {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "top top"
    "title title"
    "desc media"
    "tags media";
  column-gap: 20px;
}

.project.side .project-top {
  grid-area: top;
}

.project.side > h3 {
  grid-area: title;
}

.project.side > p {
  grid-area: desc;
  align-self: start;
}

.project.side .gallery {
  grid-area: media;
  margin-bottom: 0;
}

.project.side .gallery-label {
  display: none;
}

.project.side .gallery-thumb img {
  height: 212px;
}

.project.side .project-tags {
  grid-area: tags;
  align-self: end;
}

.award-strip {
  margin-top: 14px;
}

/* ---- 展会现场 ---- */
.moments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.moments-grid > * {
  min-width: 0;
}

.moment {
  margin: 0;
  padding: 12px;
  cursor: zoom-in;
}

.moment img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}

.moment figcaption {
  padding: 10px 6px 2px;
  font-size: 13px;
  color: var(--text-secondary);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10, 12, 20, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  cursor: zoom-out;
}

.lightbox img {
  max-width: min(88vw, 560px);
  max-height: 78vh;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox p {
  margin: 0;
  color: #fff;
  font-size: 14px;
}

/* ============ 能力 ============ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.skills-grid > *,
.projects-grid > *,
.honors-grid > * {
  min-width: 0;
}

.skill-card {
  padding: 24px 26px;
}

.skill-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.skill-card p {
  margin: 0 0 14px;
  font-size: 13.8px;
  color: var(--text-secondary);
}

/* ============ 荣誉 ============ */
.honors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.honor-card {
  padding: 26px 28px;
}

.honor-icon {
  font-size: 26px;
  margin-bottom: 10px;
}

.award-event,
.edu-label {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 15.5px;
}

.award-project {
  margin: 0 0 6px;
  font-size: 13.8px;
  color: var(--text-secondary);
}

.award-result {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.edu-detail {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============ 页脚 ============ */
.footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* ============ 滚动进场 ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.hero-photo-wrap.reveal.visible {
  transform: rotate(2.5deg);
}

.hero-photo-wrap.reveal.visible:hover {
  transform: rotate(0deg) translateY(-4px);
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .topbar-links {
    display: none;
  }

  .hero {
    flex-direction: column-reverse;
    justify-content: center;
    text-align: left;
    gap: 30px;
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 40px;
  }

  .hero-photo {
    width: 150px;
    height: 190px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 30px;
  }

  .stats .stat:last-child {
    grid-column: span 2;
  }

  .projects-grid,
  .skills-grid,
  .honors-grid,
  .moments-grid {
    grid-template-columns: 1fr;
  }

  .project.side {
    display: flex;
    flex-direction: column;
  }

  .project.side .gallery {
    margin-bottom: 16px;
  }

  .project.side .gallery-label {
    display: block;
  }

  .project.side .gallery-thumb img {
    height: 128px;
  }

  .section {
    margin-bottom: 70px;
  }
}

/* ============ 动效减弱 ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .glass-card,
  .glass-btn {
    transition: none;
  }
}

/* 截图/测试用：?noanim=1 关闭全部动效 */
html.no-anim {
  scroll-behavior: auto;
}

html.no-anim .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

html.no-anim .orb {
  animation: none;
}

/* ============ 打印 ============ */
@media print {
  .bg,
  .topbar,
  .expand-btn {
    display: none;
  }

  body {
    background: #fff;
    color: #111;
  }

  .glass,
  .glass-card,
  .glass-btn {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .hero {
    min-height: auto;
    padding-top: 20px;
  }

  .job li.hidden-bullet {
    display: list-item;
  }

  .section {
    margin-bottom: 40px;
  }

  .glass-card:hover {
    transform: none;
  }
}
