/* =========================================================
   李思远 · 个人主页
   纯手写样式 · 深色科技感
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #06070b;
  --bg-soft: #0a0c12;
  --panel: rgba(255, 255, 255, 0.032);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef0f6;
  --text-soft: #c6cbd8;
  --muted: #8d95a9;
  --teal: #5eead4;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --grad: linear-gradient(120deg, #5eead4 0%, #60a5fa 52%, #a78bfa 100%);
  --radius: 22px;
  --container: 1160px;
  --header-h: 74px;
  --font: "Inter", ui-sans-serif, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
}

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

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

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* clip 不会创建滚动容器，可避免破坏 position: sticky */
@supports (overflow-x: clip) {
  body {
    overflow-x: clip;
  }
}

h1, h2, h3, h4, p, dl, dd, figure {
  margin: 0;
}

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

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

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

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(94, 234, 212, 0.25);
  color: #fff;
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #080a10;
}

::-webkit-scrollbar-thumb {
  background: #232838;
  border-radius: 999px;
  border: 2px solid #080a10;
}

::-webkit-scrollbar-thumb:hover {
  background: #333a4f;
}

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--teal);
  color: #04110f;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

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

/* ---------- 背景 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 5%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 5%, transparent 72%);
  opacity: 0.55;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.aurora-1 {
  width: 620px;
  height: 620px;
  left: -220px;
  top: -180px;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.34), transparent 65%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.aurora-2 {
  width: 560px;
  height: 560px;
  right: -160px;
  top: 40px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 65%);
  animation: drift-b 26s ease-in-out infinite alternate;
}

.aurora-3 {
  width: 700px;
  height: 520px;
  left: 30%;
  bottom: -260px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 65%);
  animation: drift-a 30s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(70px, 50px, 0) scale(1.12); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-60px, 70px, 0) scale(0.95); }
}

/* 让页面内容浮在背景之上 */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- 顶部滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.6);
}

/* ---------- 头部导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.site-header.is-scrolled {
  background: rgba(6, 7, 11, 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.35s var(--ease);
}

.site-header.is-scrolled .header-inner {
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.3);
  background: linear-gradient(140deg, rgba(94, 234, 212, 0.18), rgba(167, 139, 250, 0.12));
  color: var(--teal);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.brand:hover .brand-mark {
  border-color: rgba(94, 234, 212, 0.65);
  box-shadow: 0 0 22px rgba(94, 234, 212, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-text {
  font-size: 15px;
}

.brand .dot {
  color: var(--teal);
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text-soft);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.2s ease;
}

.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 24px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  top: 20px;
  transform: rotate(-45deg);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.btn svg {
  transition: transform 0.3s var(--ease);
}

.btn:hover svg {
  transform: translateX(2px);
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn-primary {
  color: #04110f;
  background: linear-gradient(120deg, #5eead4, #7dd3fc 55%, #a78bfa);
  box-shadow: 0 10px 30px -12px rgba(94, 234, 212, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary:hover {
  box-shadow: 0 16px 38px -12px rgba(94, 234, 212, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.07);
  color: var(--text);
  transform: translateY(-2px);
}

.btn-small {
  padding: 10px 16px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-h) + 76px) 0 108px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: 60px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.9);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(94, 234, 212, 0.55);
  animation: pulse-ring 2.4s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0.9; }
  80%, 100% { transform: scale(1.5); opacity: 0; }
}

.hero h1 {
  margin: 26px 0 22px;
  font-size: clamp(2.45rem, 5.2vw, 4.15rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

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

.lede {
  max-width: 54ch;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 38px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta svg {
  color: var(--teal);
  opacity: 0.8;
}

.hero-socials {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.hero-socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease,
    background 0.25s ease, transform 0.25s var(--ease);
}

.hero-socials a:hover {
  color: var(--teal);
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.07);
  transform: translateY(-2px);
}

/* Hero 右侧代码卡片 */
.hero-copy,
.hero-visual {
  min-width: 0;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.hero-visual::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, 100%);
  height: 460px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(96, 165, 250, 0.16), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.code-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 470px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(20, 24, 36, 0.94), rgba(8, 10, 16, 0.96));
  box-shadow:
    0 50px 90px -40px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: rotate(-1.4deg);
  transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
}

.code-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 60px 110px -40px rgba(0, 0, 0, 1),
    0 0 0 1px rgba(94, 234, 212, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.85;
}

.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.code-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}

.code-file svg {
  opacity: 0.7;
}

.code-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(94, 234, 212, 0.9);
  animation: blink-soft 2s ease-in-out infinite;
}

@keyframes blink-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.code {
  padding: 22px 22px 24px;
  margin: 0;
  overflow-x: auto;
  color: #cbd2e1;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.95;
  tab-size: 2;
}

.code code {
  font-family: inherit;
}

.tok-k { color: #c792ea; }
.tok-v { color: #82aaff; }
.tok-p { color: #7fdbca; }
.tok-s { color: #ecc48d; }
.tok-b { color: #ff9cac; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: var(--teal);
  animation: caret-blink 1.15s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.code-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 17px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: #7c8598;
  font-family: var(--mono);
  font-size: 10.5px;
}

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(12, 15, 23, 0.86);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 11.5px;
  color: var(--muted);
  animation: chip-float 6s ease-in-out infinite;
}

.chip-a {
  top: -30px;
  left: -20px;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 12px 16px;
}

.chip-a strong {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chip-b {
  right: -18px;
  bottom: -22px;
  animation-delay: -3s;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.9);
}

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 86px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12, 14, 21, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.stat {
  padding: 24px 14px;
  text-align: center;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
}

.stat strong {
  display: block;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

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

.section-head {
  max-width: 730px;
  margin-bottom: 54px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow i {
  font-style: normal;
  color: var(--teal);
}

.section-title {
  margin: 16px 0 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-desc {
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

.profile-card {
  position: sticky;
  top: 100px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.7), transparent);
}

.profile-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background:
    radial-gradient(circle at 30% 20%, rgba(94, 234, 212, 0.28), transparent 60%),
    linear-gradient(140deg, rgba(96, 165, 250, 0.18), rgba(167, 139, 250, 0.16));
  color: #e6fffb;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.profile-id h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
}

.profile-id p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.07);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(94, 234, 212, 0.9);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 22px;
}

.profile-tags span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10.5px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  margin-bottom: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 13px;
}

.about-copy {
  padding-top: 4px;
}

.about-copy p {
  max-width: 68ch;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.about-copy .about-lead {
  margin-bottom: 20px;
  color: var(--text-soft);
  font-size: 18.5px;
  line-height: 1.8;
  letter-spacing: -0.01em;
}

.about-highlights {
  display: grid;
  gap: 2px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.highlight {
  display: flex;
  gap: 15px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.highlight-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.06);
  color: var(--teal);
}

.highlight h4 {
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 600;
}

.highlight p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.skill-card {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.028);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s var(--ease),
    background 0.3s ease;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(96, 165, 250, 0.1),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

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

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

.skill-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(94, 234, 212, 0.12), rgba(167, 139, 250, 0.1));
  color: var(--teal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skill-head h3 {
  font-size: 16.5px;
  letter-spacing: -0.015em;
}

.skill-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.skill-list {
  display: grid;
  gap: 18px;
  margin-top: 25px;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.skill-meta span:last-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(94, 234, 212, 0.3);
  transition: width 1.15s var(--ease);
}

.skill-card.in-view .bar-fill {
  width: var(--w);
}

.skill-card.in-view li:nth-child(1) .bar-fill { transition-delay: 0.05s; }
.skill-card.in-view li:nth-child(2) .bar-fill { transition-delay: 0.14s; }
.skill-card.in-view li:nth-child(3) .bar-fill { transition-delay: 0.23s; }
.skill-card.in-view li:nth-child(4) .bar-fill { transition-delay: 0.32s; }

/* ---------- 项目 ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.028);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease,
    box-shadow 0.35s ease, background 0.35s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.32);
  background: rgba(255, 255, 255, 0.042);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(94, 234, 212, 0.06);
}

.project-cover {
  position: relative;
  display: grid;
  place-items: center;
  height: 196px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}

.project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 82%);
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 82%);
  opacity: 0.55;
  z-index: -1;
}

.cover-1 {
  background:
    radial-gradient(circle at 22% 18%, rgba(94, 234, 212, 0.34), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(96, 165, 250, 0.28), transparent 55%),
    #0a151b;
  --glow: rgba(94, 234, 212, 0.35);
}

.cover-2 {
  background:
    radial-gradient(circle at 22% 18%, rgba(167, 139, 250, 0.34), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(96, 165, 250, 0.26), transparent 55%),
    #100f1d;
  --glow: rgba(167, 139, 250, 0.35);
}

.cover-3 {
  background:
    radial-gradient(circle at 22% 18%, rgba(96, 165, 250, 0.34), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(56, 189, 248, 0.24), transparent 55%),
    #0a101d;
  --glow: rgba(96, 165, 250, 0.35);
}

.cover-4 {
  background:
    radial-gradient(circle at 22% 18%, rgba(244, 114, 182, 0.28), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(167, 139, 250, 0.3), transparent 55%),
    #170e17;
  --glow: rgba(244, 114, 182, 0.3);
}

.project-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--glow);
  filter: blur(70px);
  opacity: 0.55;
  z-index: -1;
  transition: opacity 0.4s ease, transform 0.6s var(--ease);
}

.project-card:hover .project-glow {
  opacity: 0.85;
  transform: scale(1.15);
}

.project-index {
  position: absolute;
  top: 15px;
  left: 20px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
}

.project-glyph {
  color: rgba(255, 255, 255, 0.16);
  font-size: 78px;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.14);
  transition: transform 0.55s var(--ease), color 0.4s ease;
}

.project-card:hover .project-glyph {
  transform: scale(1.1) rotate(-6deg);
  color: rgba(255, 255, 255, 0.26);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
}

.project-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.project-top h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
}

.project-year {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.project-body > p {
  flex: 1;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.78;
}

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

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

.tags li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
}

.project-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.3s ease, background 0.3s ease,
    border-color 0.3s ease, transform 0.3s var(--ease);
}

.project-card:hover .project-arrow {
  border-color: transparent;
  background: var(--teal);
  color: #04110f;
  transform: translate(2px, -2px);
}

/* ---------- 时间线 ---------- */
.timeline {
  position: relative;
  max-width: 860px;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 10px;
  left: 5px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(94, 234, 212, 0.6),
    rgba(96, 165, 250, 0.35) 55%,
    rgba(167, 139, 250, 0.12)
  );
}

.timeline-item {
  position: relative;
  padding-bottom: 46px;
}

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

.timeline-dot {
  position: absolute;
  top: 7px;
  left: -34px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: var(--bg-soft);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.1),
    0 0 18px rgba(94, 234, 212, 0.55);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.timeline-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.timeline-badge {
  padding: 3px 8px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.07);
  color: var(--teal);
  font-size: 10px;
}

.timeline-role {
  margin: 9px 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.timeline-role span {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 400;
}

.timeline-item p {
  max-width: 68ch;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

/* ---------- 联系 ---------- */
.section-contact {
  padding-top: 70px;
  padding-bottom: 120px;
}

.contact-card {
  position: relative;
  padding: clamp(42px, 7vw, 82px) 32px;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  text-align: center;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 70%);
  pointer-events: none;
}

.contact-glow {
  position: absolute;
  top: -300px;
  left: 50%;
  width: 720px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(94, 234, 212, 0.22),
    rgba(96, 165, 250, 0.12) 42%,
    transparent 68%
  );
  filter: blur(30px);
  pointer-events: none;
}

.contact-card > :not(.contact-glow) {
  position: relative;
  z-index: 1;
}

.contact-card .eyebrow {
  justify-content: center;
}

.contact-title {
  margin: 18px 0;
  font-size: clamp(2.15rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.contact-desc {
  max-width: 520px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

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

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease,
    color 0.25s ease, transform 0.25s var(--ease);
}

.copy-btn:hover {
  border-color: rgba(94, 234, 212, 0.42);
  background: rgba(94, 234, 212, 0.07);
  color: var(--text);
  transform: translateY(-2px);
}

.copy-btn .icon-check {
  display: none;
}

.copy-btn.copied {
  border-color: rgba(94, 234, 212, 0.5);
  color: var(--teal);
}

.copy-btn.copied .icon-copy {
  display: none;
}

.copy-btn.copied .icon-check {
  display: block;
}

.contact-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 13px;
}

.contact-socials a {
  transition: color 0.25s ease;
}

.contact-socials a:hover {
  color: var(--teal);
}

.contact-socials span {
  opacity: 0.4;
}

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 12.5px;
}

.footer-note {
  color: #7d8698;
  font-family: var(--mono);
  font-size: 11.5px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 200;
  padding: 12px 18px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 12px;
  background: rgba(13, 17, 26, 0.96);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  color: var(--text-soft);
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease),
    visibility 0.3s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 入场动画 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1040px) {
  .hero-grid {
    gap: 40px;
  }

  .about-grid {
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 38px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: calc(var(--header-h) + 56px);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .hero-visual {
    justify-content: center;
    margin-top: 64px;
  }

  .code-card {
    max-width: 520px;
    transform: none;
  }

  .chip-a {
    left: 0;
  }

  .chip-b {
    right: 0;
  }

  .stats {
    margin-top: 64px;
  }

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

  .profile-card {
    position: relative;
    top: 0;
    max-width: 560px;
  }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: 82px;
    left: 16px;
    right: 16px;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: rgba(10, 12, 18, 0.97);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease),
      visibility 0.25s ease;
  }

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

  .nav-link {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
  }

  .menu-toggle {
    display: block;
  }

  .header-cta {
    display: none;
  }

  body.menu-open {
    overflow: hidden;
  }

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

  .skill-card:last-child {
    grid-column: span 2;
  }

  .section {
    padding: 88px 0;
  }

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

@media (max-width: 720px) {
  .container {
    width: calc(100% - 40px);
  }

  .hero {
    padding-bottom: 84px;
  }

  .hero-actions {
    margin: 30px 0 34px;
  }

  .hero-meta {
    padding-top: 22px;
    gap: 10px 18px;
  }

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

  .stat {
    padding: 20px 12px;
  }

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .skill-card:last-child {
    grid-column: auto;
  }

  .skills-grid {
    gap: 14px;
  }

  .project-cover {
    height: 178px;
  }

  .contact-card {
    padding: 46px 22px;
    border-radius: 24px;
  }

  .section-contact {
    padding-bottom: 88px;
  }

  .float-chip {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 32px);
  }

  .brand-text {
    display: none;
  }

  .hero h1 {
    font-size: 2.3rem;
    letter-spacing: -0.03em;
  }

  .badge {
    font-size: 11.5px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-meta {
    font-size: 12px;
  }

  .code {
    font-size: 11.5px;
    padding: 18px 16px 20px;
  }

  .code-head {
    padding: 0 13px;
  }

  .code-foot {
    padding: 8px 13px;
    font-size: 9.5px;
  }

  .code-live {
    display: none;
  }

  .about-copy .about-lead {
    font-size: 16.5px;
  }

  .facts {
    gap: 14px;
  }

  .profile-top {
    gap: 12px;
  }

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-btn,
  .contact-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .copy-btn {
    font-size: 12px;
  }

  .contact-socials {
    gap: 9px;
    font-size: 12px;
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline-dot {
    left: -28px;
  }
}

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

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

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

  .bar-fill {
    width: var(--w);
  }
}

/* ---------- 打印（简历） ---------- */
@media print {
  @page {
    margin: 14mm;
  }

  .bg,
  .site-header,
  .scroll-progress,
  .hero-visual,
  .hero-socials,
  .hero-actions,
  .stats,
  .about-highlights,
  .contact-actions .btn,
  .contact-actions .copy-btn svg,
  .contact-socials,
  .site-footer,
  .toast,
  .skip-link {
    display: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  /* 打印时强制显示所有滚动入场元素 */
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero {
    padding: 0 0 20px;
  }

  .hero-grid {
    display: block;
  }

  .badge,
  .profile-tags span,
  .tags li,
  .status-pill {
    border-color: #bbb !important;
    background: transparent !important;
    color: #333 !important;
  }

  .gradient-text,
  .stat strong {
    background: none !important;
    -webkit-text-fill-color: #111 !important;
    color: #111 !important;
  }

  .section {
    padding: 22px 0;
  }

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

  .about-grid {
    display: block;
  }

  .profile-card {
    position: static;
    margin-bottom: 18px;
    break-inside: avoid;
  }

  .profile-card,
  .timeline-item {
    border-color: #ccc !important;
    background: transparent !important;
  }

  .profile-card::before,
  .timeline::before {
    display: none;
  }

  .eyebrow,
  .eyebrow i,
  .section-desc,
  .about-copy p,
  .facts dd,
  .hero-meta,
  .timeline-item p,
  .timeline-role span,
  .timeline-date {
    color: #444 !important;
  }

  .timeline-item {
    padding-bottom: 20px;
    break-inside: avoid;
  }

  .timeline-dot {
    border-color: #666 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .skill-card {
    padding: 12px;
    border-color: #ddd !important;
    background: transparent !important;
    break-inside: avoid;
  }

  .skill-card::before {
    display: none;
  }

  .skill-head {
    gap: 8px;
  }

  .skill-icon {
    width: 30px;
    height: 30px;
    border-color: #ccc !important;
    background: transparent !important;
    color: #333 !important;
    box-shadow: none !important;
  }

  .skill-icon svg {
    width: 16px;
    height: 16px;
  }

  .skill-head h3 {
    font-size: 12px;
  }

  .skill-head p {
    font-size: 9px;
    color: #666 !important;
  }

  .skill-list {
    gap: 7px;
    margin-top: 10px;
  }

  .skill-meta {
    font-size: 10px;
    color: #333 !important;
  }

  .skill-meta span:last-child {
    font-size: 9px;
  }

  .bar {
    height: 4px;
    background: #e5e5e5;
  }

  .bar-fill {
    width: var(--w) !important;
    background: #555 !important;
    box-shadow: none !important;
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .project-card {
    border-color: #ddd !important;
    background: transparent !important;
    break-inside: avoid;
    box-shadow: none !important;
    transform: none !important;
  }

  .project-cover {
    display: none !important;
  }

  .project-body {
    gap: 4px;
    padding: 10px 12px;
  }

  .project-top h3 {
    font-size: 13px;
  }

  .project-year,
  .project-body > p {
    color: #444 !important;
  }

  .project-body > p {
    font-size: 10px;
    line-height: 1.55;
  }

  .project-arrow {
    display: none;
  }

  .contact-actions {
    margin-bottom: 4px;
  }

  .copy-btn {
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font-size: 13px;
  }

  .contact-card {
    border: 1px solid #ddd !important;
    background: transparent !important;
    padding: 24px !important;
  }

  .contact-glow,
  .contact-card::before {
    display: none;
  }

  .contact-title {
    font-size: 26px;
  }

  .contact-desc {
    color: #444 !important;
  }
}
