/* ============================================================
   阿拉帕提·阿迪力 · 个人主页
   炫酷黑白风 —— 设计系统与全部样式
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --ink: #050505;
  --ink-2: #0b0b0c;
  --ink-3: #141416;
  --paper: #f4f3f0;
  --paper-2: #ffffff;
  --paper-3: #e7e5e0;

  --bg: var(--ink);
  --fg: var(--paper);
  --surface: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.32);
  --muted: rgba(244, 243, 240, 0.5);
  --muted-2: rgba(244, 243, 240, 0.32);

  --font-display: "Songti SC", "Noto Serif SC", "Source Han Serif SC",
    "Times New Roman", Times, Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas,
    "Courier New", monospace;

  --shell: 1220px;
  --gut: clamp(20px, 5vw, 84px);
  --sect-y: clamp(88px, 13vw, 190px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --nav-h: 70px;
}

/* ---------- 反色（纸）主题 ---------- */
body.is-paper {
  --bg: var(--paper);
  --fg: var(--ink);
  --surface: rgba(0, 0, 0, 0.028);
  --surface-2: rgba(0, 0, 0, 0.05);
  --line: rgba(0, 0, 0, 0.14);
  --line-strong: rgba(0, 0, 0, 0.4);
  --muted: rgba(5, 5, 5, 0.55);
  --muted-2: rgba(5, 5, 5, 0.35);
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.012em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

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

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

/* ---------- 页面纹理与氛围 ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  animation: grainShift 700ms steps(2, end) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1.5%); }
  50%  { transform: translate(1.5%, -1%); }
  75%  { transform: translate(-1%, -2%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: radial-gradient(
    125% 92% at 50% 42%,
    transparent 42%,
    rgba(0, 0, 0, 0.3) 100%
  );
  transition: opacity 0.5s var(--ease);
}

body.is-paper .vignette { opacity: 0.18; }
body.is-paper .grain { opacity: 0.1; }

/* ---------- 光标辉光 ---------- */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 460px;
  height: 460px;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.075) 0%,
    rgba(255, 255, 255, 0.028) 38%,
    transparent 68%
  );
  transition: opacity 0.6s var(--ease);
  will-change: transform;
}

body.is-paper .cursor-glow {
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.02) 38%,
    transparent 68%
  );
}

body.cursor-live .cursor-glow { opacity: 1; }

/* ---------- 滚动进度 ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--fg);
  will-change: transform;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease),
    backdrop-filter 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}

.nav__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand__mark {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.brand__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg);
  animation: pulse 2.6s var(--ease-io) infinite;
  align-self: center;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.25; transform: scale(0.72); }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
}

.nav__link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.3s var(--ease);
  white-space: nowrap;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--ease);
}

.nav__link:hover,
.nav__link.is-active { color: var(--fg); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__link .num {
  font-size: 9px;
  vertical-align: super;
  opacity: 0.55;
  margin-right: 3px;
}

.nav__tail {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 主题开关 */
.theme-toggle {
  position: relative;
  width: 46px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  transition: border-color 0.35s var(--ease);
  flex: none;
}

.theme-toggle:hover { border-color: var(--fg); }

.theme-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg);
  transition: transform 0.42s var(--ease);
}

body.is-paper .theme-toggle__knob { transform: translateX(22px); }

/* 汉堡 */
.nav__burger {
  display: none;
  width: 34px;
  height: 34px;
  position: relative;
  flex: none;
}

.nav__burger span {
  position: absolute;
  left: 6px;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}

.nav__burger span:nth-child(1) { top: 12px; }
.nav__burger span:nth-child(2) { top: 21px; }

body.nav-open .nav__burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
body.nav-open .nav__burger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* 移动端抽屉 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gut);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
}

body.nav-open .drawer { clip-path: inset(0 0 0 0); }

.drawer__item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(26px, 8vw, 40px);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

body.nav-open .drawer__item { opacity: 1; transform: none; }
body.nav-open .drawer__item:nth-child(1) { transition-delay: 0.1s; }
body.nav-open .drawer__item:nth-child(2) { transition-delay: 0.15s; }
body.nav-open .drawer__item:nth-child(3) { transition-delay: 0.2s; }
body.nav-open .drawer__item:nth-child(4) { transition-delay: 0.25s; }
body.nav-open .drawer__item:nth-child(5) { transition-delay: 0.3s; }
body.nav-open .drawer__item:nth-child(6) { transition-delay: 0.35s; }
body.nav-open .drawer__item:nth-child(7) { transition-delay: 0.4s; }
body.nav-open .drawer__item:nth-child(8) { transition-delay: 0.45s; }

.drawer__item .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
}

/* ---------- 通用版心 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.section {
  position: relative;
  padding: var(--sect-y) 0;
}

.section--tight { padding: calc(var(--sect-y) * 0.6) 0; }

/* ---------- 章节标题 ---------- */
.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: clamp(16px, 3vw, 40px);
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 6vw, 76px);
}

.sec-head__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
  padding-bottom: 6px;
}

.sec-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 5.4vw, 58px);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.sec-head__en {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 12px;
}

/* ---------- 滚动浮现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
  transition-delay: var(--d, 0ms);
}

[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 30px);
  padding-bottom: 70px;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(115% 85% at 50% 40%, #000 8%, transparent 72%);
  -webkit-mask-image: radial-gradient(115% 85% at 50% 40%, #000 8%, transparent 72%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(22px, 4vw, 40px);
}

.hero__eyebrow::before {
  content: "";
  width: clamp(28px, 7vw, 74px);
  height: 1px;
  background: var(--line-strong);
  flex: none;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  /* 姓名为 8 个全角字符（含间隔号），必须单行显示。
     实测 Songti SC 的字形步进约 1.14em，含字距后约 1.125em/字；
     8 字 ≤ 1220px 版心 → fontSize ≤ 135px。取 130px 作为安全上限，
     并强制 nowrap，避免回退字体度量不同导致折行。 */
  font-size: clamp(34px, 10.2vw, 130px);
  white-space: nowrap;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: clamp(14px, 2vw, 26px);
}

.hero__name .ch {
  display: inline-block;
  transform: translateY(115%) rotate(5deg);
  opacity: 0;
  will-change: transform;
}

.hero.is-ready .hero__name .ch {
  animation: chIn 1.15s var(--ease) forwards;
  animation-delay: calc(var(--i) * 62ms + 120ms);
}

@keyframes chIn {
  to { transform: none; opacity: 1; }
}

.hero__latin {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.5vw, 13px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(26px, 4vw, 44px);
  opacity: 0;
}

.hero.is-ready .hero__latin {
  animation: fadeUp 1s var(--ease) 0.85s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero__claim {
  max-width: 66ch;
  font-size: clamp(15px, 1.75vw, 20px);
  line-height: 1.72;
  color: var(--muted);
  opacity: 0;
  text-wrap: pretty;
}

.hero__claim strong {
  color: var(--fg);
  font-weight: 500;
}

.hero.is-ready .hero__claim {
  animation: fadeUp 1s var(--ease) 1.05s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(30px, 4.6vw, 52px);
  opacity: 0;
}

.hero.is-ready .hero__actions {
  animation: fadeUp 1s var(--ease) 1.25s forwards;
}

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 28px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.42s var(--ease), border-color 0.42s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: translateY(101%);
  transition: transform 0.52s var(--ease);
}

.btn:hover { color: var(--bg); border-color: var(--fg); }
.btn:hover::before { transform: translateY(0); }

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

.btn--solid::before { background: var(--bg); }
.btn--solid:hover { color: var(--fg); }

.btn__arrow {
  transition: transform 0.42s var(--ease);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- HERO 滚动提示 ---------- */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-2);
  opacity: 0;
}

.hero.is-ready .hero__scroll {
  animation: fadeUp 1s var(--ease) 1.6s forwards;
}

.hero__scroll i {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--line-strong), transparent);
  position: relative;
  overflow: hidden;
}

.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  animation: scrollTrail 2.1s var(--ease-io) infinite;
}

@keyframes scrollTrail {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* ---------- HERO 侧边社交 ---------- */
.hero__side {
  position: absolute;
  right: var(--gut);
  bottom: 26px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  opacity: 0;
}

.hero.is-ready .hero__side {
  animation: fadeUp 1s var(--ease) 1.5s forwards;
}

.hero__side a { transition: color 0.3s var(--ease); }
.hero__side a:hover { color: var(--fg); }

/* ---------- 跑马灯 ---------- */
.marquee {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 20px 0;
  background: var(--surface);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: slide 42s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-right: clamp(24px, 4vw, 56px);
}

.marquee__item {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  font-family: var(--font-display);
  font-size: clamp(17px, 2.4vw, 30px);
  white-space: nowrap;
  color: var(--fg);
}

.marquee__item::after {
  content: "◆";
  font-size: 0.42em;
  color: var(--muted-2);
  transform: translateY(-0.15em);
}

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: clamp(26px, 3.6vw, 46px) clamp(16px, 2.4vw, 34px);
  border-right: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.stat:last-child { border-right: 0; }

.stat::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.75s var(--ease);
}

.stat:hover::after { transform: scaleX(1); }

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.6vw, 62px);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.stat__num sup {
  font-family: var(--font-mono);
  font-size: 0.26em;
  letter-spacing: 0.1em;
  color: var(--muted);
  top: -0.3em;
  position: relative;
}

.stat__label {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 个人简介 ---------- */
.about {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: clamp(34px, 6vw, 90px);
  align-items: start;
}

.about__lead {
  font-family: var(--font-display);
  font-size: clamp(21px, 3vw, 36px);
  line-height: 1.62;
  text-wrap: pretty;
}

.about__lead em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.about__lead em::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.06em;
  height: 1px;
  background: var(--line-strong);
}

.about__body p + p { margin-top: 18px; }

.about__body p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}

.about__meta {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.about__meta > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.about__meta dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.about__meta dd { font-size: 14.5px; }

/* ---------- 核心技能 ---------- */
.skills {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(34px, 5.5vw, 80px);
  align-items: start;
}

/* IELTS 分数面板 */
.ielts {
  border: 1px solid var(--line);
  padding: clamp(24px, 3.4vw, 40px);
  background: var(--surface);
  position: relative;
}

.ielts::before {
  content: "IELTS";
  position: absolute;
  top: -0.62em;
  left: 22px;
  padding: 0 10px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.ielts__overall {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.ielts__overall b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 8vw, 86px);
  line-height: 0.9;
}

.ielts__overall span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.ielts__list { display: grid; gap: 15px; }

.ielts__row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 14px;
}

.ielts__row dt {
  font-size: 13.5px;
  color: var(--muted);
}

.ielts__row dd {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.bar {
  position: relative;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.bar i {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.25s var(--ease);
  transition-delay: var(--d, 0ms);
}

.is-in .bar i,
.ielts.is-in .bar i { transform: scaleX(var(--v, 0)); }

.skill-list { display: grid; gap: 0; }

.skill-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 22px;
  align-items: start;
}

.skill-item:first-child { border-top: 1px solid var(--line); }

.skill-item__title {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.1vw, 23px);
  line-height: 1.35;
}

.skill-item__title span {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 7px;
}

.skill-item__desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.8;
}

/* ---------- 经历时间线 ---------- */
.timeline { position: relative; }

.tl-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: clamp(20px, 4vw, 54px);
  padding: clamp(28px, 4vw, 46px) 0;
  border-top: 1px solid var(--line);
  position: relative;
}

.tl-item:last-child { border-bottom: 1px solid var(--line); }

.tl-item__aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-item__date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tl-item__place {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.tl-item__role {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.7vw, 30px);
  line-height: 1.28;
  margin-bottom: 6px;
}

.tl-item__org {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.tl-item__org::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--line-strong);
  vertical-align: middle;
  margin-right: 9px;
}

.bullets { display: grid; gap: 13px; }

.bullets li {
  position: relative;
  padding-left: 25px;
  color: var(--muted);
  font-size: 14.8px;
  line-height: 1.82;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.72em;
  width: 9px;
  height: 1px;
  background: var(--line-strong);
  transition: width 0.42s var(--ease), background-color 0.42s var(--ease);
}

.bullets li:hover::before { width: 15px; background: var(--fg); }

.bullets li strong { color: var(--fg); font-weight: 500; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

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

/* ---------- 教学案例 ---------- */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.case {
  background: var(--bg);
  padding: clamp(24px, 3.2vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s var(--ease);
}

.case::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.62s var(--ease);
}

.case:hover { background: var(--surface-2); }
.case:hover::before { transform: scaleX(1); }

.case__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
}

.case__title {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 26px);
  line-height: 1.34;
}

.case__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.case__desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.82;
  margin-top: auto;
}

.case__outcome {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fg);
  display: flex;
  gap: 10px;
}

.case__outcome b {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  flex: none;
  padding-top: 0.32em;
  text-transform: uppercase;
}

/* ---------- 教育 / 荣誉 ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.panel {
  background: var(--bg);
  padding: clamp(26px, 3.4vw, 44px);
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.panel__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
}

.panel__date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  white-space: nowrap;
}

.panel__sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.course-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 26px;
}

.course-grid div {
  font-size: 14px;
  color: var(--muted);
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-grid div::before {
  content: "";
  width: 4px;
  height: 4px;
  border: 1px solid var(--line-strong);
  transform: rotate(45deg);
  flex: none;
}

.award {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  padding-left: 0;
  transition: padding-left 0.5s var(--ease);
}

.award:last-child { border-bottom: 0; padding-bottom: 0; }
.award:first-child { padding-top: 0; }
.award:hover { padding-left: 12px; }

.award__title {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.4;
}

.award__desc {
  font-size: 13.5px;
  color: var(--muted);
}

.award__year {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}

.award__medal {
  position: absolute;
  right: 0;
  top: 22px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 100px;
}

/* ---------- 作品 ---------- */
.work {
  --work-bg: #0a0a0b;
  border: 1px solid var(--line);
  background: var(--work-bg);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  overflow: hidden;
  position: relative;
}

.work__body {
  padding: clamp(28px, 3.8vw, 54px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  order: 1;
}

.work__visual {
  order: 2;
  position: relative;
  border-left: 1px solid var(--line);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  background: radial-gradient(90% 80% at 60% 40%, #17171a 0%, #08080a 70%);
}

.work__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 243, 240, 0.55);
}

.work__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f4f3f0;
  animation: pulse 2.4s var(--ease-io) infinite;
}

.work__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.work__title span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(244, 243, 240, 0.42);
  margin-top: 14px;
}

.work__desc {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(244, 243, 240, 0.62);
  max-width: 54ch;
}

.work__specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(244, 243, 240, 0.14);
  border: 1px solid rgba(244, 243, 240, 0.14);
  margin-top: 4px;
}

.work__specs > div {
  background: var(--work-bg);
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: baseline;
}

.work__specs dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 243, 240, 0.38);
}

.work__specs dd {
  font-size: 13.5px;
  color: rgba(244, 243, 240, 0.88);
  line-height: 1.6;
}

.work__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.work .btn {
  border-color: rgba(244, 243, 240, 0.34);
  color: var(--paper);
}

.work .btn::before { background: var(--paper); }
.work .btn:hover { color: #08080a; border-color: var(--paper); }

.work .btn--solid {
  background: var(--paper);
  color: #08080a;
  border-color: var(--paper);
}

.work .btn--solid::before { background: #08080a; }
.work .btn--solid:hover { color: var(--paper); }

/* 贪吃蛇预览 */
.snake-preview {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 3vw, 40px);
  min-height: 300px;
}

.snake-preview canvas {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  border: 1px solid rgba(244, 243, 240, 0.16);
  background: #050506;
}

.work__visual-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px clamp(24px, 3vw, 40px);
  border-top: 1px solid rgba(244, 243, 240, 0.14);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 243, 240, 0.42);
}

.work__visual-foot em {
  font-style: normal;
  color: rgba(244, 243, 240, 0.78);
  font-variant-numeric: tabular-nums;
}

/* ---------- 联系 ---------- */
.contact {
  position: relative;
  border-top: 1px solid var(--line);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 7.6vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.contact__text {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
  max-width: 46ch;
}

.contact__list {
  display: grid;
  border-top: 1px solid var(--line);
}

.contact__row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease);
}

.contact__row:hover { padding-left: 12px; }

.contact__row dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.contact__row dd {
  font-size: clamp(15px, 2.1vw, 21px);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  word-break: break-all;
}

.contact__row .go {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  transition: transform 0.42s var(--ease), color 0.42s var(--ease);
}

.contact__row:hover .go { transform: translate(4px, -4px); color: var(--fg); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 30px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.footer__inner a { transition: color 0.3s var(--ease); }
.footer__inner a:hover { color: var(--fg); }

.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer__top svg { transition: transform 0.42s var(--ease); }
.footer__top:hover svg { transform: translateY(-3px); }

/* ---------- 大屏适配 ---------- */
@media (max-width: 1080px) {
  .about,
  .skills,
  .contact__grid { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .work { grid-template-columns: 1fr; }
  .work__visual {
    order: 1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .work__body { order: 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1),
  .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .duo { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 16px; }
  .tl-item__aside { flex-direction: row; align-items: center; gap: 14px; }
  .skill-item { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 780px) {
  :root { --nav-h: 60px; }
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .brand { font-size: 16px; gap: 8px; }
  .brand__mark { display: none; }
  .nav__inner { gap: 12px; }
  .hero__side { display: none; }
  .about__meta > div { grid-template-columns: 76px 1fr; }
  .course-grid { grid-template-columns: 1fr; }
  .work__specs { grid-template-columns: 1fr; }
  .contact__row { grid-template-columns: 1fr auto; gap: 6px 14px; }
  .contact__row dt { grid-column: 1 / -1; }
  .ielts__row { grid-template-columns: 62px 1fr auto; gap: 10px; }
  .award__medal { position: static; justify-self: start; margin-top: 4px; }
  .award { padding-left: 0; }
  .grain { opacity: 0.16; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .btn { padding: 12px 22px; font-size: 11px; }
  .marquee { padding: 15px 0; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__name .ch { opacity: 1; transform: none; }
  .hero__claim,
  .hero__latin,
  .hero__actions,
  .hero__scroll,
  .hero__side { opacity: 1; }
  .grain { animation: none; }
}

/* ---------- 无头渲染 / 截图模式：直接呈现动画终态 ---------- */
html.is-shot .hero__name .ch,
html.is-shot .hero__latin,
html.is-shot .hero__claim,
html.is-shot .hero__actions,
html.is-shot .hero__scroll,
html.is-shot .hero__side,
html.is-shot [data-reveal] {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}

html.is-shot .bar i { transition: none !important; transform: scaleX(var(--v, 0)) !important; }
html.is-shot .grain { animation: none !important; }

/* 脚本未启用时（渐进增强兜底）：内容照常可见 */
html:not(.has-js) .hero__name .ch,
html:not(.has-js) .hero__latin,
html:not(.has-js) .hero__claim,
html:not(.has-js) .hero__actions,
html:not(.has-js) .hero__scroll,
html:not(.has-js) .hero__side,
html:not(.has-js) [data-reveal] {
  opacity: 1;
  transform: none;
  animation: none;
}

html:not(.has-js) .nav__links { display: flex; }
html:not(.has-js) .drawer { display: none; }

/* ---------- 打印 ---------- */
@media print {
  .nav, .drawer, .progress, .grain, .vignette, .cursor-glow,
  .hero__scroll, .hero__side, .marquee, .hero__grid { display: none !important; }
  :root { --bg: #fff; --fg: #000; --muted: #333; --muted-2: #666; --line: #ccc; }
  body { background: #fff; color: #000; }
  .section { padding: 24px 0; break-inside: avoid; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .work, .work__visual { background: #fff !important; color: #000 !important; }
  .work__desc, .work__badge, .work__specs dd { color: #333 !important; }
  .btn { display: none; }
}
