/* CSS 重置和规范化 */
*, *::before, *::after {
  box-sizing: border-box;
}

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

html, body {
  margin: 0;
  padding: 0;
}

/* CSS 变量 */
:root {
  --bg-start: #0f1724;
  --bg-end: #0b1220;
  --accent: rgba(190, 173, 255, 0.95);
  --accent-strong: rgba(138, 116, 255, 0.18);
  --muted: rgba(255, 255, 255, 0.65);
  --glass: rgba(255, 255, 255, 0.04);
  --card-shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
  --radius: 18px;
  --max-width: 980px;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family:
    "hm",
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background:
    radial-gradient(
      1200px 700px at 10% 20%,
      rgba(46, 39, 78, 0.45),
      transparent
    ),
    radial-gradient(
      900px 600px at 90% 80%,
      rgba(16, 28, 74, 0.38),
      transparent
    ),
    linear-gradient(180deg, var(--bg-start), var(--bg-end));
  color: #eaf0ff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* 粒子画布 */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 主容器 */
.wrap {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  flex-direction: column;
  flex: 1;
}

/* 卡片样式 */
.card {
  width: 100%;
  max-width: var(--max-width);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 24px;
  padding: 56px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(4px) saturate(1.05);
  backdrop-filter: blur(4px) saturate(1.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* 头像区域 */
.avatar-box {
  flex: 0 0 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 18px 40px rgba(5, 10, 24, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.5);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  animation: floaty 6s ease-in-out infinite;
}

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

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

/* 元信息区域 */
.meta {
  flex: 1;
  min-width: 0;
}

.name {
  font-size: 30px;
  font-weight: 1000;
  letter-spacing: 0.4px;
  margin: 0 0 8px;
  font-family: "code", "hm", monospace;
}

.motto {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  font-family: "code";
}

.gpg-info {
  margin: 8px 0;
  font-size: 18px;
  font-family: "hm";
  color: var(--muted);
}

.gpg-link {
  color: white;
  text-decoration: underline dashed;
  position: relative;
  transition: color 0.5s;
}

.gpg-link:hover {
  color: var(--accent);
}

.link-icon {
  font-size: 0.7em;
  position: absolute;
  top: -0.3em;
  right: -1.2em;
}

.subtitle {
  font-size: 18px;
  font-family: "hm";
  font-style: italic;
  color: rgba(255, 255, 255, 0.78);
  margin: 18px 0 24px;
}

/* 按钮组 */
.actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.btn {
  font-family: "code", "hm";
  font-size: 16px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  position: relative;
}

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

.btn-primary {
  background: linear-gradient(
    90deg,
    var(--accent-strong),
    rgba(138, 116, 255, 0.08)
  );
  box-shadow: 0 8px 30px rgba(100, 78, 255, 0.08);
}

.btn-ghost {
  background: transparent;
}

.btn:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 14px 40px rgba(100, 78, 255, 0.12);
  filter: saturate(1.06);
}

.btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220%;
  height: 220%;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.25s,
    transform 0.4s;
  background: radial-gradient(
    circle at center,
    rgba(180, 160, 255, 0.12),
    transparent 40%
  );
  border-radius: 50%;
}

.btn:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 页脚 */
footer {
  text-align: center;
  font-size: 18px;
  font-family: "hm";
  color: rgba(255, 255, 255, 0.5);
  padding: 20px;
}

.footer-copy {
  margin-bottom: 4px;
}

.footer-icp {
  opacity: 0.85;
}

.footer-icp a {
  color: inherit;
  text-decoration: none;
  transition:
    color 0.3s ease,
    opacity 0.2s ease;
}

.footer-icp a:hover {
  opacity: 1;
  color: beige;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
  footer {
    font-size: 14px;
  }
  .wrap {
    justify-content: space-between;
  }
  .card {
    flex-direction: column;
    padding: 36px;
    gap: 18px;
  }

  .avatar-box {
    flex: 0 0 auto;
  }

  .avatar {
    width: 160px;
    height: 160px;
  }

  .name {
    font-size: 26px;
  }

  .meta {
    text-align: center;
  }

  .actions {
    justify-content: center;
  }

  .btn::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding: 24px;
  }

  .card {
    padding: 24px;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }

  .name {
    font-size: 18px;
  }

  .motto,
  .gpg-info {
    font-size: 13px;
  }

  .subtitle {
    font-size: 14px;
  }

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

  .btn {
    justify-content: center;
  }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
  .avatar,
  #particles,
  .card,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}
