/* ============================================================
   YIN · 个人主页
   风格参考：深色科技风 + 红橙渐变（NEXUS 模板）
   ============================================================ */

:root {
  --bg: #08080a;
  --bg-soft: #0d0d11;
  --surface: #121218;
  --surface-2: #17171e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f6f3ee;
  --muted: #a29c94;
  --accent-1: #ff4b2b;
  --accent-2: #ff9a3d;
  --accent-3: #ffb347;
  --grad: linear-gradient(120deg, var(--accent-1) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  --radius: 20px;
  --nav-h: 68px;
  --font-display: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Space Grotesk", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

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

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

/* ---------- 全局噪点 ---------- */
.page-noise {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13.5px;
}

.btn-primary {
  background: var(--grad);
  color: #160a02;
  box-shadow: 0 10px 30px -10px rgba(255, 90, 40, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(255, 90, 40, 0.7);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: rgba(255, 120, 60, 0.65);
  color: #ffb27a;
  transform: translateY(-2px);
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-dot {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14.5px;
  color: var(--muted);
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

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

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-burger.open span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-burger.open span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 72px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 42% at 82% 6%, rgba(255, 77, 43, 0.16), transparent 62%),
    radial-gradient(36% 32% at 12% 88%, rgba(255, 138, 42, 0.08), transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(72% 64% at 52% 34%, #000 8%, transparent 78%);
  mask-image: radial-gradient(72% 64% at 52% 34%, #000 8%, transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6.2vw, 4.7rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags li {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- 可交互人像卡 ---------- */
.hero-portrait-wrap {
  position: relative;
  justify-self: end;
  width: min(100%, 700px);
}

.hero-portrait-wrap::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background:
    radial-gradient(56% 46% at 50% 42%, rgba(255, 77, 43, 0.22), transparent 68%),
    radial-gradient(52% 30% at 50% 100%, rgba(255, 120, 60, 0.12), transparent 72%);
  filter: blur(14px);
}

.portrait {
  position: relative;
  aspect-ratio: 1 / 2;
  height: min(96vh, 980px);
  width: auto;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}

.portrait-bg,
.portrait-reveal {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: inherit;
  pointer-events: none;
}

.portrait-bg {
  background-image: url("../assets/img-default-cutout.webp");
}

/* reveal 图层：径向渐变遮罩由 CSS 变量驱动（JS 每帧写入位置与透明度），
   相比逐帧 canvas.toDataURL 更流畅，且移动端无 hover 时保持隐藏 */
.portrait-reveal {
  background-image: url("../assets/img-reveal-cutout.webp");
  opacity: var(--spot-alpha, 0);
  -webkit-mask-image: radial-gradient(
    circle 340px at var(--spot-x, 50%) var(--spot-y, 50%),
    #fff 0%,
    #fff 34%,
    rgba(255, 255, 255, 0.38) 62%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle 340px at var(--spot-x, 50%) var(--spot-y, 50%),
    #fff 0%,
    #fff 34%,
    rgba(255, 255, 255, 0.38) 62%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  transform: translateZ(0);
  will-change: opacity;
}

.portrait[data-reveal="off"] .portrait-reveal {
  display: none;
}

.portrait[data-reveal="off"] .portrait-hint {
  display: none;
}

.portrait-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: #ffe9dc;
  background: rgba(20, 14, 10, 0.72);
  border: 1px solid rgba(255, 140, 70, 0.35);
  border-radius: 999px;
  padding: 8px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
  animation: hintPulse 2.6s ease-in-out infinite;
  pointer-events: none;
  white-space: nowrap;
}

.portrait-hint.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  animation: none;
}

@keyframes hintPulse {
  0%, 100% { box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(255, 140, 70, 0); }
  50% { box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(255, 140, 70, 0.12); }
}

/* 悬浮数据卡片 */
.stat-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 104px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(18, 18, 24, 0.82);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.stat-chip b {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.stat-chip span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.stat-1 {
  top: 13%;
  right: -38px;
  animation: floatY 5.5s ease-in-out infinite;
}

.stat-2 {
  top: 46%;
  right: -52px;
  animation: floatY 6.5s ease-in-out 1.2s infinite;
}

.stat-3 {
  bottom: 11%;
  right: -34px;
  animation: floatY 5s ease-in-out 0.6s infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- 跑马灯 ---------- */
.ticker {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 38px;
  width: max-content;
  animation: tickerMove 26s linear infinite;
}

.ticker-track span {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.ticker-track i {
  font-style: normal;
  color: var(--accent-2);
  font-size: 12px;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 110px 0;
  position: relative;
}

.section:nth-of-type(even) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014), transparent 40%);
}

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

.section-label {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about-copy p {
  font-size: 16.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.about-copy p:first-child {
  font-size: 19px;
  color: var(--text);
}

.about-points {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-points li {
  display: flex;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.about-points li:hover {
  border-color: rgba(255, 120, 60, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(255, 80, 40, 0.35);
}

.about-points b {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent-2);
  letter-spacing: 0.1em;
  padding-top: 4px;
}

.about-points h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.about-points p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 技能 ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 120, 60, 0.38);
  box-shadow: 0 24px 50px -28px rgba(255, 80, 40, 0.4);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 22px;
  background: rgba(255, 90, 40, 0.1);
  border: 1px solid rgba(255, 120, 60, 0.25);
  color: var(--accent-3);
  margin-bottom: 18px;
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.skill-card p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 作品 ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.works-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.works-all {
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--accent-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.works-all:hover {
  border-color: rgba(255, 120, 60, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(255, 80, 40, 0.5);
}

.work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 120, 60, 0.4);
  box-shadow: 0 26px 54px -28px rgba(255, 80, 40, 0.45);
}

.work-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}

.cover-glyph {
  position: absolute;
  top: 10px;
  right: 18px;
  z-index: 1;
  font-style: normal;
  font-size: 46px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

/* 作品封面：竖版 App 截图，用手机样机样式居中展示，避免被裁变形 */
.work-shot {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  height: 78%;
  width: auto;
  aspect-ratio: 780 / 1688;
  transform: translate(-50%, -50%) rotate(-2.5deg);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.65);
  object-fit: cover;
}

/* 作品封面：横版界面截图，整幅铺满 */
.work-shot-wide {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.95);
}

.work-cover span {
  z-index: 2;
}

.work-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.35;
}

.work-cover span {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(10, 8, 6, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cover-a {
  background: linear-gradient(135deg, #d82816, #ff7a18);
}

.cover-b {
  background: linear-gradient(135deg, #ff4b2b, #ff9a3d);
}

.cover-c {
  background: linear-gradient(135deg, #b3250f, #ff8f3d);
}

.cover-d {
  background: linear-gradient(135deg, #e6460f, #ffc25e);
}

.work-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.work-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.work-body p {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.work-tags li {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.03);
}

.work-link {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--accent-3);
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 14px;
}

/* ---------- 联系 ---------- */
.contact-panel {
  position: relative;
  text-align: center;
  padding: clamp(56px, 8vw, 96px) clamp(24px, 6vw, 80px);
  border-radius: 32px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(255, 77, 43, 0.16), transparent 60%),
    var(--bg-soft);
  overflow: hidden;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: var(--grad);
}

.contact-panel .section-label {
  margin-bottom: 18px;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.contact-sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 36px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner p {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 入场动画 ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-copy .reveal-up:nth-child(1) { animation-delay: 0.05s; }
.hero-copy .reveal-up:nth-child(2) { animation-delay: 0.16s; }
.hero-copy .reveal-up:nth-child(3) { animation-delay: 0.27s; }
.hero-copy .reveal-up:nth-child(4) { animation-delay: 0.38s; }
.hero-copy .reveal-up:nth-child(5) { animation-delay: 0.49s; }
.hero-portrait-wrap.reveal-up { animation-delay: 0.3s; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

.section-child {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section.in .section-child {
  opacity: 1;
  transform: none;
}

.section.in .skills-grid .skill-card:nth-child(1) { transition-delay: 0.04s; }
.section.in .skills-grid .skill-card:nth-child(2) { transition-delay: 0.1s; }
.section.in .skills-grid .skill-card:nth-child(3) { transition-delay: 0.16s; }
.section.in .skills-grid .skill-card:nth-child(4) { transition-delay: 0.22s; }
.section.in .skills-grid .skill-card:nth-child(5) { transition-delay: 0.28s; }
.section.in .skills-grid .skill-card:nth-child(6) { transition-delay: 0.34s; }
.section.in .works-grid .work-card:nth-child(1) { transition-delay: 0.04s; }
.section.in .works-grid .work-card:nth-child(2) { transition-delay: 0.12s; }
.section.in .works-grid .work-card:nth-child(3) { transition-delay: 0.2s; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .stat-1 { right: -12px; }
  .stat-2 { right: -16px; }
  .stat-3 { right: -8px; }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 12px 6vw 20px;
    background: rgba(8, 8, 10, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }

  .nav-burger {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 44px);
  }

  .hero-portrait-wrap {
    justify-self: center;
    width: min(78vw, 300px);
  }

  .portrait {
    height: auto;
    width: 100%;
  }

  .stat-1 { right: -8px; top: 12%; }
  .stat-2 { right: -12px; top: 46%; }
  .stat-3 { right: -4px; bottom: 3%; }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid,
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .section {
    padding: 76px 0;
  }

  .nav-cta {
    display: none;
  }

  .skills-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.3rem, 10vw, 3rem);
  }

  .hero-portrait-wrap {
    width: min(84vw, 280px);
  }

  .works-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-chip {
    min-width: 88px;
    padding: 10px 14px;
  }

  .stat-chip b {
    font-size: 19px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
