/* ==========================================================
   星码手记 · 主题样式
   ========================================================== */
:root {
  --bg: #070b18;
  --bg-soft: #0b1124;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8edf7;
  --text-muted: #9aa7bd;
  --text-faint: #6b7a95;
  --accent: #6ea8fe;
  --accent-2: #8ab4ff;
  --gold: #f5c65c;
  --green: #4dd0a8;
  --danger: #ff8f8f;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --font-ui: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun,
    Georgia, serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;
  --header-h: 66px;
  --shadow: 0 18px 50px rgba(2, 6, 18, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 14px);
}

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

::selection {
  background: rgba(110, 168, 254, 0.35);
  color: #fff;
}

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

img,
svg {
  display: inline-block;
  vertical-align: middle;
}

button {
  font: inherit;
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #061024;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

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

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 11, 24, 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 29px;
  height: 29px;
  fill: var(--gold);
  filter: drop-shadow(0 0 9px rgba(245, 198, 92, 0.35));
}

.brand-code {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  font-size: 1.08rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 1.5vw, 1.3rem);
}

.site-nav a {
  position: relative;
  padding: 7px 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
}

.site-nav a:hover::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--text);
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

/* ---------------- 首页主视觉 ---------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 4rem) 1.25rem 5rem;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(900px 420px at 18% 12%, rgba(66, 111, 222, 0.2), transparent 62%),
    radial-gradient(760px 420px at 84% 86%, rgba(114, 65, 222, 0.14), transparent 60%),
    linear-gradient(180deg, #090f21 0%, var(--bg) 78%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(110, 168, 254, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 168, 254, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 70% 62% at 50% 42%, black 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 42%, black 15%, transparent 78%);
  pointer-events: none;
}

.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.starfield i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #d9e6ff;
  opacity: 0;
  animation: twinkle 5s ease-in-out infinite;
  box-shadow: 0 0 5px rgba(217, 230, 255, 0.55);
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.2);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.08em;
  text-shadow: 0 0 50px rgba(110, 168, 254, 0.22);
  background: linear-gradient(115deg, #ffffff 10%, #b8d2ff 55%, #f6dc9d 105%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 0 1.1rem;
  color: var(--accent-2);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  letter-spacing: 0.34em;
  white-space: nowrap;
}

.hero-desc {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.6rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(120deg, #75aaff, #4d7fe8);
  color: #061024;
  box-shadow: 0 8px 26px rgba(77, 127, 232, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(77, 127, 232, 0.45);
}

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

.btn-ghost:hover {
  border-color: rgba(110, 168, 254, 0.65);
  background: rgba(110, 168, 254, 0.1);
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  bottom: 28px;
  left: 50%;
  width: 24px;
  height: 40px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
}

.scroll-hint span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--gold);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

@keyframes scrollPulse {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  65% {
    opacity: 0.2;
    transform: translateY(13px);
  }
  100% {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ---------------- 通用版块 ---------------- */
.section {
  position: relative;
  padding: clamp(4rem, 8vw, 7.2rem) 0;
  scroll-margin-top: var(--header-h);
}

.section.hero {
  padding: calc(var(--header-h) + 4rem) 1.25rem 5rem;
}

.section-alt {
  background:
    radial-gradient(640px 360px at 8% 0%, rgba(79, 124, 232, 0.09), transparent 62%),
    linear-gradient(180deg, rgba(11, 17, 36, 0.62), rgba(11, 17, 36, 0.35));
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.section-head {
  max-width: 760px;
  margin-bottom: 2.7rem;
}

.section-head.left {
  margin-bottom: 1.4rem;
}

.section-tag {
  margin: 0 0 0.28rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.25;
}

.section-lead {
  margin: 0;
  color: var(--text-muted);
}

.empty-tip {
  text-align: center;
  color: var(--text-faint);
}

/* ---------------- 成果筛选与卡片 ---------------- */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.7rem;
}

.filter-btn {
  padding: 0.42rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.filter-btn.is-active {
  color: #0b1124;
  border-color: transparent;
  background: linear-gradient(120deg, #8fb8ff, #70a1f7);
  font-weight: 600;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.15rem;
}

.research-card.is-filtered {
  display: none;
}

.card {
  position: relative;
  padding: 1.45rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--bg-card);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 168, 254, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card:hover::before {
  opacity: 0.9;
}

.research-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.type-chip {
  padding: 0.12rem 0.66rem;
  border: 1px solid rgba(110, 168, 254, 0.38);
  border-radius: 999px;
  color: #a9c7ff;
  background: rgba(110, 168, 254, 0.1);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.card-year {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.research-title {
  margin: 0 0 0.65rem;
  font-size: 1.11rem;
  font-weight: 650;
  line-height: 1.55;
}

.research-authors {
  margin: 0 0 0.28rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.research-venue {
  margin: 0 0 0.95rem;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.research-desc {
  margin: 0 0 1.2rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.badge-demo {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.05rem 0.48rem;
  border: 1px solid rgba(245, 198, 92, 0.45);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(245, 198, 92, 0.1);
  font-size: 0.7rem;
  vertical-align: middle;
}

.link-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.22rem 0.1rem;
  color: var(--accent-2);
  font-size: 0.88rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.link-chip:hover {
  border-bottom-color: var(--accent-2);
}

/* ---------------- 代表作品 ---------------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.2rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 290px;
  padding: 1.6rem 1.55rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.045), transparent 45%),
    rgba(255, 255, 255, 0.025);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 55%, rgba(110, 168, 254, 0.06));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 168, 254, 0.42);
  box-shadow: var(--shadow);
}

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

.project-code {
  position: absolute;
  right: -8px;
  bottom: -8px;
  z-index: 0;
  color: rgba(255, 255, 255, 0.035);
  font-family: var(--font-mono);
  font-size: 4.4rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.project-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.4;
}

.project-tagline {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.9rem;
}

.project-desc {
  position: relative;
  z-index: 1;
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.tech-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.tech-tag {
  padding: 0.08rem 0.55rem;
  border-radius: 6px;
  color: var(--green);
  background: rgba(77, 208, 168, 0.09);
  border: 1px solid rgba(77, 208, 168, 0.22);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.project-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  color: var(--accent-2);
  font-size: 0.9rem;
}

.project-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

.project-link:hover svg {
  transform: translateX(3px);
}

.project-year {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 0.9rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ---------------- 荣誉奖项 ---------------- */
.honor-timeline {
  position: relative;
  max-width: 720px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.honor-timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 11px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(110, 168, 254, 0.12));
}

.honor-item {
  position: relative;
  padding: 0 0 2rem 3rem;
}

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

.honor-dot {
  position: absolute;
  top: 0.7rem;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--gold);
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 14px rgba(245, 198, 92, 0.55);
}

.honor-meta {
  padding: 1.05rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.028);
}

.honor-year {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.honor-meta h3 {
  margin: 0 0 0.15rem;
  font-size: 1.06rem;
}

.honor-meta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.honor-desc {
  margin-top: 0.5rem !important;
  color: var(--text-faint) !important;
  font-size: 0.86rem !important;
}

/* ---------------- 关于 ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) 2fr;
  align-items: start;
  gap: clamp(1.8rem, 5vw, 4rem);
}

.about-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: min(240px, 70vw);
  aspect-ratio: 1;
  margin: 0 auto;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(110, 168, 254, 0.45);
  animation: spinSlow 22s linear infinite;
}

.avatar-ring::before,
.avatar-ring::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(245, 198, 92, 0.8);
}

.avatar-ring::before {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.avatar-ring::after {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes spinSlow {
  to {
    transform: rotate(360deg);
  }
}

.avatar-core {
  display: grid;
  place-items: center;
  width: 68%;
  height: 68%;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 4.4rem;
  color: #0c1633;
  background:
    radial-gradient(circle at 30% 25%, #fff2bd, transparent 38%),
    linear-gradient(145deg, #ffd978, #f0a54c);
  box-shadow:
    0 22px 55px rgba(240, 165, 76, 0.24),
    inset 0 0 0 6px rgba(255, 255, 255, 0.2);
}

.profile-list {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.about-intro {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
}

.profile-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.95rem;
}

.profile-label {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding-top: 0.22rem;
}

.about-note {
  padding-left: 1rem;
  border-left: 3px solid rgba(245, 198, 92, 0.7);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------------- 联系 ---------------- */
.contact-panel {
  max-width: 700px;
  padding: clamp(1.7rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(110, 168, 254, 0.11), transparent 65%),
    rgba(255, 255, 255, 0.025);
}

.contact-panel h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 210px;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 168, 254, 0.5);
  background: rgba(110, 168, 254, 0.08);
}

.contact-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--gold);
}

.contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-text strong {
  font-size: 0.9rem;
  color: var(--text);
}

.contact-text small {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  background: #05080f;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--text-faint);
  font-size: 0.87rem;
}

.footer-inner a {
  color: var(--text-faint);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
}

.footer-inner a:hover {
  color: var(--text);
  border-bottom-color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
}

/* ---------------- 404 ---------------- */
.error-page {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  background:
    radial-gradient(700px 400px at 50% 30%, rgba(110, 168, 254, 0.12), transparent 70%),
    var(--bg);
}

.error-page h1 {
  margin: 0.4rem 0 0.8rem;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.7rem);
}

.error-code {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 18vw, 9rem);
  line-height: 1;
  text-shadow: 0 0 60px rgba(245, 198, 92, 0.3);
}

.error-page p {
  color: var(--text-muted);
}

.error-page .btn {
  margin-top: 1rem;
}

/* ---------------- 滚动渐显 ---------------- */
.content-loading {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(110, 168, 254, 0.35);
  border-radius: 999px;
  color: #b9d2ff;
  background: rgba(9, 15, 33, 0.94);
  font-size: 0.85rem;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.content-loading--error {
  color: #ffd3d3;
  border-color: rgba(255, 143, 143, 0.4);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

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

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.7rem 1.25rem 1rem;
    background: rgba(7, 11, 24, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 0.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .site-nav a::after {
    display: none;
  }

  .hero-subtitle {
    letter-spacing: 0.18em;
  }

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

  .about-avatar {
    width: 190px;
    margin-bottom: 0.5rem;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(1160px, 100% - 1.6rem);
  }

  .section {
    padding: 3.6rem 0;
  }

  .contact-item {
    width: 100%;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto;
  }

  .profile-list li {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* ---------------- 减弱动态效果 ---------------- */
@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;
  }

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