/* ============================================================
   李一丰 · 个人主页
   方向：深色终端 / 霓虹扫光 / 等宽细节
   纯手写 CSS，无外部依赖，移动优先
   ============================================================ */

/* ---------- 字体：本地自托管，不请求任何外部 CDN ---------- */
/* 拉丁展示字 Chakra Petch，只用于姓名旁的英文标签与状态行 */
@font-face {
  font-family: "Chakra Petch";
  src: url("./assets/fonts/chakra-petch-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("./assets/fonts/chakra-petch-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB;
}
/* 等宽字 JetBrains Mono，用于时间戳、编号、数字 */
@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/JetBrainsMono-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB;
}

/* ---------- 设计令牌 ---------- */
:root {
  /* 色彩：主表面 60 / 次级表面 30 / 强调 10 */
  --bg: #07080C;
  --surface: #0C0F16;
  --card: rgba(255, 255, 255, 0.032);
  --text: #E9EDF6;
  --muted: #8C95A8;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* 霓虹：青色是唯一动作色，紫色只做渐变第二端 */
  --cyan: #4DE1FF;
  --violet: #7C5CFF;
  --neon: linear-gradient(120deg, #4DE1FF 0%, #7C5CFF 100%);

  /* 占位提示，故意用一个暖色把它和霓虹区分开 */
  --pending: #FFB020;

  /* 字体：中文走系统栈，拉丁展示字与等宽字用同目录 assets/fonts 自托管文件 */
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "MiSans", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Chakra Petch", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas,
          "PingFang SC", "Microsoft YaHei", monospace;

  /* 间距梯度 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;

  --r-sm: 8px; --r-md: 14px; --r-lg: 20px;

  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 12px 36px -14px rgba(0, 0, 0, 0.7);
  --glow: 0 12px 44px -18px rgba(77, 225, 255, 0.45);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-base: 320ms;
  --dur-slow: 720ms;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* 兜底：任何情况下都不出现横向滚动条 */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, dl, dd, dt, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
mark { background: none; color: var(--text); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 99;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04121A;
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 背景氛围层：网格 + 双色光晕 ---------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* 24px 网格，向下逐渐隐去 */
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
  -webkit-mask-image: radial-gradient(130% 85% at 50% -10%, #000 8%, rgba(0, 0, 0, 0.55) 48%, transparent 82%);
          mask-image: radial-gradient(130% 85% at 50% -10%, #000 8%, rgba(0, 0, 0, 0.55) 48%, transparent 82%);
}
.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42rem 30rem at 8% -6%, rgba(77, 225, 255, 0.16), transparent 62%),
    radial-gradient(38rem 28rem at 96% 4%, rgba(124, 92, 255, 0.16), transparent 60%);
  filter: blur(0.5px);
}

/* 内容层压在背景之上 */
.hero, main, .footer { position: relative; z-index: 1; }

/* ---------- 通用容器 ---------- */
.wrap {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(44px, 9vw, 76px); }
.section + .section { padding-top: 0; }

/* 小节标题：序号用等宽青色，像日志分区 */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: var(--s5);
  font-size: clamp(19px, 4.6vw, 24px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sec-idx {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--cyan);
  opacity: 0.85;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;           /* 老浏览器兜底 */
  min-height: 100svh;          /* 移动端地址栏友好的真实视口高度 */
  display: flex;
  align-items: center;
  padding: clamp(28px, 7vw, 64px) 0;
}

/* 首屏底部的滚动提示：把下方的空白变成「还有内容」的信号 */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--muted);
  opacity: 0.75;
  padding: 8px 10px;           /* 触摸目标 */
}
.scroll-hint .arrow { color: var(--cyan); letter-spacing: 0; }

@media (max-height: 700px) {
  .scroll-hint { display: none; }   /* 矮屏优先保证内容不重叠 */
}

.hero-inner {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

/* 首屏分两块：左＝身份 + 一句话，右＝动作区（桌面端变两栏） */
.hero-lead,
.hero-actions {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hero-lead { gap: var(--s5); }
.hero-actions { gap: 18px; align-items: flex-start; }

/* 顶部状态行 */
.status {
  font-family: var(--display);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid rgba(77, 225, 255, 0.55);
  line-height: 1.2;
}

/* 头像 + 姓名 */
.id-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.avatar-tile {
  width: 68px;
  flex: 0 0 auto;
  aspect-ratio: 3 / 4;         /* 竖构图，避免方裁切把下巴切掉 */
  overflow: hidden;
  border-radius: 12px;
  /* 渐变描边：外亮内暗 */
  background: var(--neon);
  padding: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 30px -14px rgba(77, 225, 255, 0.6);
}
.avatar-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 11px;
  filter: saturate(0.92) contrast(1.04);
}

/* 姓名与头像留 12px 间距，避免「李」和下方英文行压到头像上被裁掉 */
.id-text { padding-bottom: 2px; min-width: 0; }

h1 {
  font-size: clamp(40px, 12.5vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.02em;
  /* 姓名带一点青色辉光，深色底上才立得住 */
  text-shadow: 0 0 28px rgba(77, 225, 255, 0.28);
}
.latin {
  font-family: var(--display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-top: 6px;
}

/* 一句话介绍 */
.tagline {
  font-size: clamp(19px, 5.2vw, 26px);
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 2.2em;           /* 打字过程中不跳动 */
  text-wrap: balance;          /* 窄屏换行时避免最后一行只剩一个字 */
}
.caret {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(77, 225, 255, 0.85);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* 数字胶囊 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}
.chips b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--cyan);
  margin-right: 3px;
  font-variant-numeric: tabular-nums;
}

/* 按钮 */
.cta { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 20px;
  min-height: 46px;            /* 触摸目标 */
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              background-position var(--dur-slow) var(--ease),
              border-color var(--dur-base) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  color: #04121A;
  background-image: linear-gradient(120deg, #4DE1FF 0%, #7C5CFF 100%);
  background-size: 200% 100%;
  background-position: 0% 50%;
  box-shadow: 0 10px 30px -12px rgba(77, 225, 255, 0.7);
}
.btn-primary:hover { background-position: 100% 50%; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.985); }
.btn-primary.is-done { background-image: linear-gradient(120deg, #3BE8A0, #4DE1FF); }

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  border-color: rgba(77, 225, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(77, 225, 255, 0.18), 0 8px 24px -14px rgba(77, 225, 255, 0.6);
  transform: translateY(-1px);
}

.hero-note {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-height: 18px;
}

/* ---------- 数字区：发丝网格 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.stat-num {
  font-family: var(--mono);
  font-size: clamp(24px, 6.5vw, 30px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* 渐变只作用在数字本身，单位单独用青色，避免背景裁切出现接缝 */
.stat-num .grad {
  background-image: linear-gradient(100deg, #9BF2FF 0%, #BCA6FF 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-num i {
  font-style: normal;
  font-size: 0.64em;
  letter-spacing: 0.01em;
  margin-left: 1px;
  vertical-align: 0.06em;
  color: var(--cyan);
  opacity: 0.9;
}
.stat-label {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- 关于 ---------- */
.about-body p {
  font-size: 15.5px;
  line-height: 1.9;
  color: #CBD2DF;
}
.about-body p + p { margin-top: var(--s4); }
.about-body mark {
  color: var(--text);
  font-weight: 600;
  /* 青色下划线扫过感：用渐变底线 */
  background-image: linear-gradient(transparent 62%, rgba(77, 225, 255, 0.28) 62%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding-bottom: 1px;
}

/* ---------- 技能 ---------- */
.skill-group + .skill-group { margin-top: var(--s5); }
.skill-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 10px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #C9D1E0;
  transition: border-color var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.tags li:hover {
  border-color: rgba(77, 225, 255, 0.45);
  color: var(--text);
  box-shadow: 0 0 18px -6px rgba(77, 225, 255, 0.55);
}

/* ---------- 时间轴 ---------- */
.timeline {
  position: relative;
  padding-left: 22px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg,
    rgba(77, 225, 255, 0.55), rgba(124, 92, 255, 0.35) 55%, transparent);
}
.entry { position: relative; }
.entry + .entry { margin-top: 14px; }
.entry::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 24px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 10px rgba(77, 225, 255, 0.7);
}

/* 卡片 */
.card {
  position: relative;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
/* 顶边扫光：进入视口时从左划到右，桌面悬停再亮一次 */
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 35%, var(--violet) 70%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: transform var(--dur-slow) var(--ease), opacity var(--dur-slow) var(--ease);
}
.card.is-in::before { transform: scaleX(1); opacity: 0.9; }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    border-color: rgba(77, 225, 255, 0.3);
    box-shadow: var(--glow);
  }
}

.card-head h3 {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}
.role {
  font-size: 13px;
  color: var(--cyan);
  opacity: 0.9;
  margin-top: 2px;
}
.when {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.summary {
  font-size: 14px;
  line-height: 1.8;
  color: #C2CAD8;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.detail {
  margin-top: 12px;
  display: grid;
  gap: 4px;
}
.detail dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 12px;
}
.detail dd {
  font-size: 13.5px;
  line-height: 1.85;
  color: #B9C2D2;
}
.detail b {
  color: var(--cyan);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 论文引用条 */
.paper {
  display: block;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: var(--r-sm);
  background: rgba(124, 92, 255, 0.07);
  transition: border-color var(--dur-base) var(--ease),
              background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.paper:hover {
  border-color: rgba(77, 225, 255, 0.5);
  background: rgba(77, 225, 255, 0.06);
  box-shadow: 0 0 24px -10px rgba(77, 225, 255, 0.6);
}
.paper-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  border: 1px solid rgba(77, 225, 255, 0.35);
  border-radius: 4px;
  padding: 1px 5px;
  margin-bottom: 8px;
}
.paper-title {
  display: block;
  font-size: 13px;
  line-height: 1.65;
  color: #D5DBE7;
  /* 超长英文标题在 375px 下强制换行，避免撑破容器 */
  overflow-wrap: anywhere;
}
.paper-meta {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.paper-meta + .paper-meta { margin-top: 2px; }
.paper-arrow { color: var(--cyan); margin-left: 4px; }

/* ---------- 教育 ---------- */
.edu-list {
  border-top: 1px solid var(--line);
}
.edu-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.edu-main h3 {
  font-size: 15px;
  font-weight: 700;
}
.edu-main p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.edu-list .when { margin-top: 0; }

.lang-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: var(--s5);
}
.lang-row .skill-label { margin-bottom: 0; }

/* ---------- 联系 ---------- */
.contact-card {
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid rgba(77, 225, 255, 0.22);
  border-radius: var(--r-lg);
  background:
    radial-gradient(28rem 16rem at 100% 0%, rgba(124, 92, 255, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(77, 225, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 24px 60px -40px rgba(77, 225, 255, 0.5);
}
.contact-lead {
  font-size: 14.5px;
  line-height: 1.8;
  color: #C2CAD8;
  margin-top: -8px;
  margin-bottom: var(--s5);
}
.cta-wide .btn { flex: 1 1 140px; }

.contact-list {
  margin-top: var(--s5);
  border-top: 1px solid var(--line);
}
.contact-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.contact-list .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  flex: 0 0 auto;
}
.contact-list .v {
  text-align: right;
  overflow-wrap: anywhere;
  color: #D5DBE7;
}
a.v { transition: color var(--dur-fast) var(--ease); }
a.v:hover { color: var(--cyan); }

/* 【待补充】占位：虚线 + 暖色，明确是没填而不是设计元素 */
.pending {
  color: var(--pending);
  border: 1px dashed rgba(255, 176, 32, 0.45);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 12.5px;
  background: rgba(255, 176, 32, 0.07);
}

/* ---------- 页脚 ---------- */
.footer {
  padding: var(--s6) 0 var(--s7);
  border-top: 1px solid var(--line);
  margin-top: var(--s6);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.footer .mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

/* ---------- 入场与滚动动效 ---------- */
/* 只有脚本正常运行（html.js）时才隐藏待出场元素，脚本挂了内容照常显示 */
.reveal {
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* 首屏一次性入场：元素依次上浮，只播一次 */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .hero-inner > * {
    animation: rise var(--dur-slow) var(--ease) both;
  }
  .hero-inner > :nth-child(1) { animation-delay: 40ms; }
  .hero-inner > :nth-child(2) { animation-delay: 110ms; }
  .hero-inner > :nth-child(3) { animation-delay: 190ms; }
  .hero-inner > :nth-child(4) { animation-delay: 270ms; }
  .hero-inner > :nth-child(5) { animation-delay: 340ms; }
  .hero-inner > :nth-child(6) { animation-delay: 400ms; }

  .scroll-hint .arrow { animation: nudge 2.6s ease-in-out infinite; }
}
@keyframes nudge {
  0%, 100% { transform: translateY(-1px); }
  50%      { transform: translateY(3px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* 未开启动效偏好时，打字机由 JS 接管；开启减少动效则直接显示全文 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .caret { display: none; }
  .card::before { transform: scaleX(1); opacity: 0.7; }
}

/* ---------- 断点：平板 / 桌面 ---------- */
@media (max-width: 599px) {
  /* 手机上学历条目统一换行，避免有的日期在右、有的掉到下一行 */
  .edu-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .edu-list .when { margin-top: 2px; }
}

@media (min-width: 600px) {
  .wrap, .hero-inner { padding-inline: 32px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding: 18px 16px; }
  .card { padding: 22px 22px; }
  .avatar-tile { width: 84px; border-radius: 14px; }
  .contact-list li { font-size: 14px; }
  /* 宽屏下按钮不要拉成两条长条，保持按钮的手感 */
  .cta-wide .btn { flex: 0 0 auto; min-width: 168px; }
}

@media (min-width: 900px) {
  body { font-size: 17px; }
  .wrap, .hero-inner { max-width: 860px; }
  .hero { padding-block: 104px; }
  .hero-inner { gap: 30px; }
  .avatar-tile { width: 116px; border-radius: 16px; }
  h1 { font-size: 84px; }
  .latin { font-size: 11.5px; letter-spacing: 0.3em; }
  .tagline { font-size: 30px; }
  .chips li { font-size: 13px; padding: 6px 13px; }
  .btn { padding: 13px 26px; font-size: 15px; }
  .about-body p { font-size: 16.5px; }
  .card-head h3 { font-size: 18px; }
  .detail dd { font-size: 14.5px; }
  .summary { font-size: 14.5px; }
  .stat { padding: 20px 18px; }
  .footer .wrap { align-items: baseline; }
}

/* 桌面宽屏：首屏改成左右两栏，把右侧的空白变成动作区 */
@media (min-width: 1000px) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 36px 44px;
    max-width: 960px;
  }
  .hero-inner > .status { grid-column: 1 / -1; }
  .hero-actions {
    align-items: flex-end;
    justify-self: end;
    padding-bottom: 2px;
  }
  .hero-actions .cta { justify-content: flex-end; width: 100%; }
  .hero-actions .chips { justify-content: flex-end; }
  .hero-note { text-align: right; }
}

/* 超宽屏：右侧加一组竖排等宽小字，制造非对称感（纯装饰） */
@media (min-width: 1200px) {
  .hero::after {
    content: "TIME SERIES · CTDG · ANOMALY · SSM";
    position: fixed;
    right: 4.5vw;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.42em;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
  }
}
