/* ==========================================================================
   styles.css —— 单文件样式表
   结构：变量 → 基础 → 组件 → 各区块 → 动效 → 响应式 → 无障碍
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
:root {
  /* 颜色 */
  --bg: #faf9f7;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(250, 249, 247, 0.82);
  --fg: #16161a;
  --fg-muted: #6b6a66;
  --line: rgba(22, 22, 26, 0.13);
  --line-strong: rgba(22, 22, 26, 0.28);

  /* 唯一强调色（陶土色），如需更换只改这四个值 */
  --accent: #a9502f;
  --accent-hover: #8f4327;
  --accent-fg: #ffffff;
  --accent-soft: rgba(169, 80, 47, 0.12);

  --shadow-md: 0 18px 40px -24px rgba(22, 22, 26, 0.35);

  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    sans-serif;
  --font-serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman",
    "Songti SC", "Noto Serif CJK SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* 尺寸 */
  --header-h: 4rem;
  --radius: 20px;
  --measure: 62ch;

  /* 动效 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #101012;
  --bg-elevated: #17171a;
  --bg-glass: rgba(16, 16, 18, 0.82);
  --fg: #ececee;
  --fg-muted: #a3a3ad;
  --line: rgba(236, 236, 238, 0.15);
  --line-strong: rgba(236, 236, 238, 0.32);

  --accent: #e29070;
  --accent-hover: #ee9f81;
  --accent-fg: #1a1210;
  --accent-soft: rgba(226, 144, 112, 0.14);

  --shadow-md: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}

/* --------------------------------------------------------------------------
   2. 基础
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

svg {
  display: block;
}

::selection {
  background: var(--accent);
  color: var(--accent-fg);
}

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

.container {
  width: min(100% - 2.5rem, 1120px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.875rem;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.noscript {
  padding: 1.25rem;
  text-align: center;
  color: var(--fg-muted);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   3. 通用组件
   -------------------------------------------------------------------------- */

/* 图标按钮 */
.icon-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--fg);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

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

.icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

/* 区块标题 */
.section {
  padding-block: clamp(4.5rem, 11vw, 8rem);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.section-eyebrow .num {
  color: var(--accent);
}

.section-eyebrow::after {
  content: "";
  flex: 1;
  max-width: 4rem;
  height: 1px;
  background: var(--line-strong);
}

.section-title {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
}

.section-desc {
  margin-top: 1.1rem;
  max-width: var(--measure);
  color: var(--fg-muted);
}

/* 文字链接 */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 500;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   4. 顶栏 / 导航
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header.is-scrolled,
body.nav-open .site-header {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s var(--ease);
}

.brand:hover {
  color: var(--accent);
}

.nav-desktop {
  display: none;
}

.nav-list {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.nav-list a {
  position: relative;
  font-size: 0.875rem;
  color: var(--fg-muted);
  transition: color 0.25s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4em;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav-list a:hover,
.nav-list a[aria-current="true"] {
  color: var(--fg);
}

.nav-list a:hover::after,
.nav-list a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 主题图标切换 */
.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

/* 汉堡按钮 */
.menu-toggle .icon-close {
  display: none;
}

body.nav-open .menu-toggle .icon-menu {
  display: none;
}

body.nav-open .menu-toggle .icon-close {
  display: block;
}

/* 移动端导航面板 */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding-top: var(--header-h);
  background: var(--bg);
  visibility: hidden;
  opacity: 0;
  /* 打开时立刻可见（便于移动焦点），关闭时等淡出结束再隐藏 */
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
  overflow-y: auto;
}

body.nav-open .mobile-nav {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0s;
}

.mobile-nav-inner {
  padding-top: clamp(2rem, 8vh, 4rem);
  padding-bottom: 3rem;
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--line);
}

.mobile-nav-list li:first-child {
  border-top: 1px solid var(--line);
}

.mobile-nav-list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.35rem 0.25rem;
  transition: color 0.25s var(--ease), padding-left 0.35s var(--ease);
}

.mobile-nav-list a:hover,
.mobile-nav-list a[aria-current="true"] {
  color: var(--accent);
  padding-left: 0.75rem;
}

.mn-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.mn-label {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 8vw, 2rem);
  letter-spacing: -0.02em;
}

.mn-en {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   5. 首屏
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(4rem, 12vh, 8rem);
  overflow: hidden;
  overflow: clip;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-eyebrow::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: currentColor;
}

.hero-name {
  font-size: clamp(3rem, 13vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.hero-role {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-tagline {
  margin-top: 1rem;
  max-width: 44ch;
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  color: var(--fg-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}

/* 首屏纯 CSS 图形 */
.hero-art {
  position: absolute;
  top: 50%;
  right: -18%;
  width: min(620px, 78vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 30%,
    var(--accent-soft),
    transparent 64%
  );
  filter: blur(6px);
}

.hero-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero-ring-1 {
  border-style: dashed;
  border-color: var(--line-strong);
  animation: spin 90s linear infinite;
}

.hero-ring-2 {
  inset: 13%;
}

.hero-ring-3 {
  inset: 26%;
  border-color: var(--accent-soft);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1.2px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 68% 45%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 60% at 68% 45%, #000, transparent 72%);
  opacity: 0.7;
  pointer-events: none;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  width: 1px;
  height: 3.5rem;
  background: var(--line-strong);
  overflow: hidden;
  transform: translateX(-50%);
}

.hero-scroll span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: scroll-hint 2.4s var(--ease) infinite;
}

/* --------------------------------------------------------------------------
   6. 关于
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

.about-intro {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.about-text {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
  max-width: var(--measure);
  color: var(--fg-muted);
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.fact {
  padding: 1.35rem 1rem 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.fact-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.fact-value {
  margin-top: 0.4rem;
  font-size: 1.0625rem;
}

/* 纯 CSS 视觉占位块（需要真实照片时，把整个 .about-visual 换成 <img>） */
.about-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: linear-gradient(
      150deg,
      var(--accent-soft),
      transparent 55%
    ),
    var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
}

.about-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--line) 0,
    var(--line) 1px,
    transparent 1px,
    transparent 14px
  );
  opacity: 0.65;
}

.about-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 55%;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   7. 教育
   -------------------------------------------------------------------------- */
.edu-list {
  border-top: 1px solid var(--line);
}

.edu-item {
  display: grid;
  gap: 0.75rem;
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}

.edu-period {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.edu-name {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.edu-degree {
  margin-top: 0.35rem;
  color: var(--fg);
}

.edu-detail {
  margin-top: 0.6rem;
  max-width: var(--measure);
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   8. 项目
   -------------------------------------------------------------------------- */
.project-grid {
  display: grid;
  gap: 1.25rem;
}

.project {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.project:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.project-num {
  color: var(--accent);
}

.project-name {
  margin-top: 1.25rem;
  font-size: clamp(1.3rem, 3vw, 1.65rem);
}

.project-summary {
  margin-top: 0.75rem;
  color: var(--fg-muted);
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tags li {
  padding: 0.3rem 0.75rem;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--fg);
}

.project-link {
  margin-top: 1.75rem;
  align-self: flex-start;
}

.project-link .icon {
  width: 0.95rem;
  height: 0.95rem;
  transition: transform 0.3s var(--ease);
}

.project-link:hover .icon {
  transform: translate(3px, -3px);
}

/* --------------------------------------------------------------------------
   9. 时间线
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 1.75rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: clamp(2.25rem, 5vw, 3.25rem);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.75rem + 0.25rem);
  top: 0.55rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
  transform: translateX(-50%);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.timeline-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.timeline-title {
  margin-top: 0.6rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.timeline-org {
  margin-top: 0.3rem;
  font-size: 0.9375rem;
  color: var(--fg-muted);
}

.timeline-desc {
  margin-top: 0.7rem;
  max-width: var(--measure);
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   10. 联系
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.contact-list {
  border-top: 1px solid var(--line);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease);
}

.contact-row:hover {
  padding-left: 0.5rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.contact-value {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  overflow-wrap: anywhere;
}

a.contact-value {
  color: var(--accent);
}

a.contact-value::after {
  content: "↗";
  margin-left: 0.4rem;
  font-size: 0.85em;
}

.contact-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(11rem, 30vw, 15rem);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--accent-soft), transparent 65%),
    var(--bg-elevated);
}

.contact-cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
}

.contact-cta .btn {
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   11. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
}

.footer-note {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

.footer-note:empty {
  display: none;
}

.to-top {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.25s var(--ease);
}

.to-top:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   12. 动效
   -------------------------------------------------------------------------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scroll-hint {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

/* 入场动画：只有在 JS 可用时才隐藏初始状态，保证无 JS 时内容可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   13. 响应式
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .about-grid {
    grid-template-columns: 1.35fr 1fr;
    align-items: start;
  }

  .about-visual {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  .edu-item {
    grid-template-columns: 10rem 1fr;
    gap: 2rem;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 7.5rem;
  }

  .timeline-item {
    padding-left: 10rem;
  }

  .timeline-item::before {
    left: 7.5rem;
  }

  .timeline-period {
    position: absolute;
    /* 定位相对 .timeline-item 的 padding box，写 -10rem 会被推出屏幕外 */
    left: 0;
    top: 0.35rem;
    width: 6.25rem;
    text-align: right;
  }
}

@media (min-width: 900px) {
  :root {
    --header-h: 4.5rem;
  }

  .container {
    width: min(100% - 6rem, 1120px);
  }

  .nav-desktop {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-nav {
    display: none;
  }

  .hero-art {
    right: -6%;
    width: min(660px, 52vw);
    opacity: 0.9;
  }

  .contact-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

@media (max-width: 899px) {
  /* --- 首屏图形：退到右下角，圆形只露一角，不与文字争视线 --- */
  .hero-art {
    top: auto;
    right: -32%;
    bottom: -7rem;
    width: min(360px, 72vw);
    transform: none;
    opacity: 0.3;
  }

  .hero-ring-1 {
    animation: none;
  }

  /* 点阵背景只留在右下角，不再铺到文字后面 */
  .hero::before {
    opacity: 0.45;
    -webkit-mask-image: radial-gradient(ellipse 50% 42% at 88% 88%, #000, transparent 74%);
    mask-image: radial-gradient(ellipse 50% 42% at 88% 88%, #000, transparent 74%);
  }

  .hero-scroll {
    display: none;
  }

  /* 图标按钮达到 44px 的最小点按尺寸 */
  .icon-btn {
    width: 2.75rem;
    height: 2.75rem;
  }

  /* --- 首屏排版：姓名 → 身份 → 个人定位 的主次关系 --- */
  .hero {
    padding-block: clamp(3rem, 9vh, 5rem);
  }

  .hero-eyebrow {
    gap: 0.6rem;
    margin-bottom: 1.1rem;
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    line-height: 1.5;
  }

  .hero-eyebrow::before {
    width: 1.75rem;
  }

  .hero-name {
    font-size: clamp(2.75rem, 12.5vw, 4.25rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
  }

  .hero-role {
    margin-top: 1.05rem;
    font-size: clamp(1.125rem, 4.8vw, 1.4rem);
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
  }

  .hero-tagline {
    margin-top: 0.85rem;
    max-width: 32ch;
    font-size: 1.0625rem;
    line-height: 1.78;
  }

  .hero-actions {
    gap: 0.75rem;
    margin-top: clamp(1.75rem, 7vw, 2.5rem);
  }

  .btn {
    padding: 0.8rem 1.4rem;
  }

  /* --- 手机阅读：左右留白、行高、区块节奏 --- */
  .container {
    width: min(100% - 3rem, 1120px);
  }

  h1,
  h2,
  h3 {
    line-height: 1.18;
  }

  .section {
    padding-block: clamp(3.5rem, 13vw, 5rem);
  }

  .section-head {
    margin-bottom: clamp(2rem, 7vw, 2.75rem);
  }

  .section-eyebrow {
    margin-bottom: 0.75rem;
    letter-spacing: 0.14em;
  }

  .section-desc,
  .about-text,
  .edu-degree,
  .edu-detail,
  .project-summary,
  .timeline-org,
  .timeline-desc,
  .contact-value {
    line-height: 1.78;
  }

  .about-intro {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    line-height: 1.45;
  }

  .about-text {
    gap: 1.1rem;
    margin-top: 1.4rem;
  }

  .about-facts {
    margin-top: clamp(2rem, 8vw, 3rem);
  }

  .project-name,
  .edu-name,
  .timeline-title {
    line-height: 1.3;
  }

  /* 触摸目标：顶栏署名与页脚链接补足可点区域 */
  .brand {
    padding-block: 0.7rem;
  }

  .to-top {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
}

@media (max-width: 480px) {
  .hero-art {
    opacity: 0.22;
  }
}

/* 屏幕过矮（横屏手机等）时首屏没有余量：收紧排版并去掉装饰图形 */
@media (max-width: 899px) and (max-height: 540px) {
  .hero {
    padding-block: 1rem;
  }

  .hero-art {
    display: none;
  }

  .hero-eyebrow {
    margin-bottom: 0.5rem;
  }

  .hero-name {
    font-size: clamp(2.25rem, 8vw, 3rem);
  }

  .hero-role {
    margin-top: 0.5rem;
  }

  .hero-tagline {
    margin-top: 0.5rem;
    font-size: 1rem;
  }

  .hero-actions {
    margin-top: 1rem;
  }
}

/* 平板宽度下给图形留出更多横向空间，避免只剩一条窄边 */
@media (min-width: 640px) and (max-width: 899px) {
  .hero-art {
    right: -10%;
    bottom: -6rem;
    width: min(420px, 60vw);
  }
}
