/* ===== 星烬逐光 · StarEmber ===== */
:root {
  --bg: #07051a;
  --ink: #f1eeff;
  --ink-dim: #a8a3c7;
  --violet: #a855f7;
  --pink: #ec4899;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.3);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(168, 85, 247, 0.45); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--violet), var(--pink));
  border-radius: 8px;
  border: 2px solid var(--bg);
}

/* ===== 星空画布 ===== */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== 全局鼠标追光 / cursor glow ===== */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.18) 35%, rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

/* ===== 玻璃拟态 ===== */
.glass {
  background: transparent;
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 44px rgba(3, 0, 20, 0.35);
}

/* ===== 液态玻璃公共层：顶部弧光 ===== */
.btn, .tag, .link-action, .card, .link-card {
  position: relative;
  overflow: hidden;
}

.btn::before, .link-action::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(130% 120% at 50% -25%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.42) 50%, transparent 58%);
  transform: translateX(-130%) skewX(-12deg);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.btn:hover::after {
  transform: translateX(130%) skewX(-12deg);
}

/* ===== 卡片灵动交互：悬浮 + 高光 + 追光 ===== */
.card::before, .link-card::before, .tag::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(240px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.14), transparent 65%),
    radial-gradient(150% 120% at 50% -20%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 52%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover::before, .link-card:hover::before, .tag:hover::before {
  opacity: 1;
}

.card:hover .stat-icon {
  animation: icon-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.link-card:hover .link-icon {
  transform: scale(1.1) rotate(-4deg);
}

@keyframes icon-bounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* ===== 导航 ===== */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 10px 22px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
}

.nav-logo {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: linear-gradient(120deg, #e9d5ff, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: 4px; }

.nav-links a {
  position: relative;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.25s, background 0.25s, box-shadow 0.25s, text-shadow 0.25s;
}

.nav-links a span { font-size: 0.72rem; opacity: 0.65; margin-left: 2px; }

.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.nav-links a.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(168, 85, 247, 0.34), rgba(236, 72, 153, 0.34));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 4px 22px rgba(168, 85, 247, 0.42),
    inset 0 0 14px rgba(255, 255, 255, 0.08);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.avatar-ring {
  --angle: 0deg;
  position: relative;
  width: 188px;
  height: 188px;
  border-radius: 50%;
  padding: 5px;
  background: conic-gradient(from var(--angle), var(--violet), var(--pink), var(--blue), var(--cyan), var(--violet));
  animation: spin-ring 6s linear infinite;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.45), 0 0 120px rgba(236, 72, 153, 0.25);
  margin-bottom: 34px;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spin-ring { to { --angle: 360deg; } }

.avatar-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  animation: spin-slow 24s linear infinite;
}

@keyframes spin-slow { to { transform: rotate(360deg); } }

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

.name {
  font-size: clamp(3rem, 10vw, 5.6rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  background: linear-gradient(115deg, #c084fc 10%, #f472b6 40%, #93c5fd 70%, #c084fc 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
  filter: drop-shadow(0 0 26px rgba(192, 132, 252, 0.35));
}

@keyframes shimmer { to { background-position: 220% 0; } }

.subtitle {
  margin-top: 10px;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  letter-spacing: 0.24em;
  color: var(--ink-dim);
}

.typing {
  margin-top: 26px;
  min-height: 1.8em;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: #e6dcff;
  letter-spacing: 0.06em;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.15em;
  background: linear-gradient(var(--violet), var(--pink));
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }

.btn {
  position: relative;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn span { font-size: 0.78rem; opacity: 0.75; margin-left: 6px; }

.btn-primary {
  color: #fff;
  background:
    radial-gradient(130% 120% at 50% -25%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%) padding-box,
    linear-gradient(120deg, rgba(168, 85, 247, 0.5), rgba(236, 72, 153, 0.5)) padding-box,
    linear-gradient(155deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.14) 35%, rgba(255, 255, 255, 0.34)) border-box;
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -2px 6px rgba(120, 40, 160, 0.3),
    0 8px 30px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(236, 72, 153, 0.55);
}

.btn-ghost {
  color: var(--ink);
  background:
    radial-gradient(130% 120% at 50% -25%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 55%) padding-box,
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)) padding-box,
    linear-gradient(155deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.1) 35%, rgba(255, 255, 255, 0.3)) border-box;
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.1);
  backdrop-filter: blur(16px) saturate(180%) brightness(1.1);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    0 10px 28px rgba(3, 0, 20, 0.4);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(96, 165, 250, 0.3);
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-hint span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(var(--violet), var(--pink));
  animation: hint 1.8s ease-in-out infinite;
}

@keyframes hint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(14px); opacity: 0.2; }
}

/* ===== 区块通用 ===== */
.section {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 90px 24px;
  text-align: center;
}

.section-title {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.section-title em {
  font-style: normal;
  font-size: 0.6em;
  margin-left: 10px;
  background: linear-gradient(120deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-desc {
  color: var(--ink-dim);
  line-height: 1.9;
  font-size: 0.98rem;
  margin-bottom: 44px;
}

/* ===== 数据卡片 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  border-radius: 22px;
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
}
.card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 26px 60px rgba(3, 0, 20, 0.55),
    0 0 34px rgba(196, 141, 255, 0.16);
}

.stat-icon { font-size: 1.5rem; filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.6)); }

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, #e9d5ff, #fbcfe8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-value small { font-size: 0.62em; margin-left: 2px; }

.stat-label { font-size: 0.78rem; color: var(--ink-dim); letter-spacing: 0.08em; }

/* ===== 兴趣标签 ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.tag {
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s, background 0.28s, border-color 0.28s;
  cursor: default;
}

.tag em { font-style: normal; font-size: 0.76rem; opacity: 0.7; margin-left: 6px; }

.tag:hover {
  transform: translateY(-6px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 18px 44px rgba(3, 0, 20, 0.5),
    0 0 30px rgba(196, 141, 255, 0.12);
}

/* ===== 社交链接 ===== */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  text-align: left;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
}
.link-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 26px 60px rgba(3, 0, 20, 0.55),
    0 0 34px rgba(196, 141, 255, 0.16);
}

.link-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.3s ease;
}

.link-icon svg { width: 26px; height: 26px; }

.link-icon.douyin   { background: linear-gradient(135deg, #25f4ee, #fe2c55); box-shadow: 0 6px 20px rgba(254, 44, 85, 0.4); }
.link-icon.qq       { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }
.link-icon.wechat   { background: linear-gradient(135deg, #4ade80, #16a34a); box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4); }
.link-icon.bilibili { background: linear-gradient(135deg, #f9a8d4, #fb7299); box-shadow: 0 6px 20px rgba(251, 114, 153, 0.4); }

.link-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.link-meta strong { font-size: 0.98rem; letter-spacing: 0.03em; }

.link-meta small {
  font-size: 0.82rem;
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-action {
  margin-left: auto;
  flex: none;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)) padding-box,
    linear-gradient(155deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.28)) border-box;
  transition: color 0.25s, background 0.25s;
}

.link-card:hover .link-action {
  color: #fff;
  background:
    radial-gradient(130% 120% at 50% -25%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%) padding-box,
    linear-gradient(120deg, rgba(168, 85, 247, 0.45), rgba(236, 72, 153, 0.45)) padding-box,
    linear-gradient(155deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.16) 40%, rgba(255, 255, 255, 0.36)) border-box;
}

/* ===== 页脚 ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 70px 24px 46px;
  color: var(--ink-dim);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.footer span {
  background: linear-gradient(120deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 4px;
}

.footer-sub { margin-top: 8px; font-size: 0.76rem; opacity: 0.7; }

/* ===== 复制提示 ===== */
.toast {
  position: fixed;
  bottom: 34px;
  left: 50%;
  transform: translate(-50%, 24px);
  z-index: 40;
  padding: 12px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* ===== 滚动显现 ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].in { opacity: 1; transform: translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .nav { gap: 14px; padding: 9px 16px; }
  .nav-links a { padding: 6px 8px; font-size: 0.8rem; }
  .nav-links a span { display: none; }
  .avatar-ring { width: 152px; height: 152px; }
  .section { padding-top: 70px; }
  .link-action { display: none; }
}

/* ===== 减少动态偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
