:root {
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: #fafaf8;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fafaf8;
  color: #171717;
  display: flex;
  flex-direction: column;
}

/* ===== 背景星云粒子 ===== */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
}

.particle {
  position: absolute;
  width: clamp(3px, 0.25vw, 5px);
  height: clamp(3px, 0.25vw, 5px);
  background: rgba(0, 150, 255, 0.7);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
  filter: blur(2px);
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
  50% { transform: translateY(-6vh) scale(1.4); opacity: 1; }
}

/* ===== 左右能量流 ===== */
.energy {
  position: fixed;
  top: 0;
  bottom: 0;
  width: clamp(28px, 10vw, 160px);
  display: none;
  z-index: 1;
}

.left { left: 0; }
.right { right: 0; }

.beam {
  position: absolute;
  width: clamp(2px, 0.2vw, 4px);
  height: 12vh;
  background: linear-gradient(180deg, transparent, #00eaff, transparent);
  opacity: 0.6;
  animation: beamMove 4s infinite linear;
  filter: blur(2px);
}

@keyframes beamMove {
  0% { transform: translateY(120%); }
  100% { transform: translateY(-120%); }
}

/* ===== 中央光晕 ===== */
.glow {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(36vw, 560px);
  height: min(36vw, 560px);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.035), transparent 68%);
  filter: blur(clamp(32px, 5vw, 72px));
  z-index: 0;
}

/* ===== 轻量流星 ===== */
.meteors {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.meteor {
  position: absolute;
  width: clamp(90px, 13vw, 190px);
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(55, 67, 78, 0.16) 42%, rgba(55, 67, 78, 0.68) 100%);
  opacity: 0;
  transform: rotate(35deg);
  transform-origin: right center;
  filter: blur(0.2px);
  animation: meteor-fall 7s linear infinite;
}

.meteor::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4a5965;
  box-shadow: 0 0 10px rgba(74, 89, 101, 0.28);
  transform: translateY(-50%);
}

.meteor-one {
  top: 12%;
  left: 24%;
  animation-delay: 0s;
}

.meteor-two {
  top: 4%;
  left: 68%;
  width: clamp(70px, 10vw, 150px);
  animation-delay: 0.9s;
}

.meteor-three {
  top: 46%;
  left: 78%;
  width: clamp(60px, 9vw, 130px);
  animation-delay: 1.8s;
}

.meteor-four {
  top: 22%;
  left: 52%;
  width: clamp(70px, 11vw, 160px);
  animation-delay: 2.7s;
}

.meteor-five {
  top: 34%;
  left: 8%;
  width: clamp(60px, 9vw, 130px);
  animation-delay: 3.6s;
}

.meteor-six {
  top: 58%;
  left: 58%;
  width: clamp(50px, 8vw, 120px);
  animation-delay: 4.5s;
}

@keyframes meteor-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(35deg);
  }
  8% { opacity: 0.82; }
  45% { opacity: 0; }
  100% {
    opacity: 0;
    transform: translate3d(34vw, 34vh, 0) rotate(35deg);
  }
}

/* ===== 主体内容 ===== */
.content {
  z-index: 10;
  width: min(100%, 1160px);
  /* 桌面端填满剩余高度，让页脚与右下角悬浮机器人处于同一底线 */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  padding: clamp(28px, 4vh, 54px) clamp(16px, 4vw, 48px) clamp(28px, 5vh, 64px);
}

.avatar {
  width: clamp(84px, 8vw, 128px);
  height: clamp(84px, 8vw, 128px);
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: clamp(3px, 0.3vw, 5px) solid #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  transition: transform 0.4s;
}

.avatar:hover { transform: scale(1.04); }

h1 {
  margin: 14px 0 6px;
  font-size: clamp(2.25rem, 3.4vw, 3.5rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #111;
  text-align: center;
}

.bio {
  max-width: 100%;
  margin: 0;
  color: #6f6f6a;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.6;
  text-align: center;
}

/* ===== 链接卡片 ===== */
.links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
  width: 100%;
  margin-top: clamp(28px, 4vh, 48px);
}

.card {
  position: relative;
  min-width: 0;
  min-height: 94px;
  padding: clamp(16px, 1.2vw, 22px);
  border: 1px solid #e5e5e1;
  border-radius: clamp(12px, 0.8vw, 16px);
  color: #171717;
  text-align: center;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 8px 22px rgba(26, 26, 22, 0.055);
  overflow: hidden;
  transition: transform 0.35s, box-shadow 0.35s;
}

.card-title {
  margin-bottom: 6px;
  font-size: clamp(1.05rem, 1.25vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
}


.card-desc {
  color: #777771;
  font-size: clamp(0.82rem, 0.9vw, 0.98rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.card::before {
  display: none;
}

.card::after {
  display: none;
}

@keyframes neonFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: #171717;
    box-shadow: 0 14px 28px rgba(26, 26, 22, 0.11);
  }
}

.card:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 4px;
}

/* ===== 页脚 ===== */
footer {
  z-index: 10;
  margin-top: clamp(24px, 5vh, 56px);
  padding: 12px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  color: #777771;
  font-size: clamp(0.78rem, 0.9vw, 0.95rem);
  line-height: 1.5;
  text-align: center;
}

footer a { display: inline-block; }
footer img { vertical-align: -2px; }

@media (max-width: 1024px) {
  .links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .content { flex: 0 1 auto; padding-top: 24px; }
  .links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
  .card { min-height: 92px; }
  .energy { opacity: 0.55; }
}

@media (max-width: 480px) {
  .content { padding-right: 14px; padding-left: 14px; }
  .bio { max-width: 290px; }
  .links { grid-template-columns: 1fr; width: min(100%, 360px); }
  .card { min-height: 84px; padding: 15px 18px; }
  .card-desc { white-space: normal; }
  .energy { display: none; }
  .meteor-three,
  .meteor-six { display: none; }
  footer { padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
