/* ============================================================
 * 个人网站 · 样式表（浅色简约 + 轻盈微动效）
 * ============================================================ */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1c1f2e;
  --text-2: #5b6172;
  --text-3: #8b90a0;
  --border: #e7e9f0;
  --accent: #4f46e5;
  --accent-2: #8b5cf6;
  --accent-soft: #eef0ff;
  --green: #16a34a;
  --green-bg: #e8f8ee;
  --amber: #d97706;
  --amber-bg: #fdf3e3;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(28, 31, 46, 0.05);
  --shadow-md: 0 12px 32px rgba(28, 31, 46, 0.10);
  --shadow-lg: 0 24px 64px rgba(28, 31, 46, 0.16);
  --nav-h: 68px;
  --container: 1080px;
}

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

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

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

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

.hidden { display: none !important; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; letter-spacing: 0.5px;
}
.brand-dot {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transition: transform 0.3s ease;
}
.brand:hover .brand-dot { transform: rotate(-12deg) scale(1.08); }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }

.nav-link {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  font-size: 15px; color: var(--text-2);
  transition: color 0.25s ease, background 0.25s ease;
}
.nav-link:hover { color: var(--text); background: rgba(79, 70, 229, 0.07); }
.nav-link.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(79, 70, 229, 0.06), transparent 60%),
    radial-gradient(1000px 500px at 90% 110%, rgba(139, 92, 246, 0.06), transparent 60%);
}

.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.blob {
  position: absolute; border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
  animation: blobFloat 16s ease-in-out infinite alternate;
}
.blob-1 { width: 420px; height: 420px; top: -140px; left: -100px; background: radial-gradient(circle at 35% 35%, #c7d2fe, #8b5cf6); }
.blob-2 { width: 380px; height: 380px; bottom: -160px; right: -80px; background: radial-gradient(circle at 60% 40%, #bae6fd, #38bdf8); animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; top: 42%; left: 58%; background: radial-gradient(circle at 50% 50%, #fbcfe8, #e879f9); opacity: 0.32; animation-delay: -11s; }

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(34px, -30px) scale(1.08); }
}

.hero-inner { position: relative; max-width: 760px; }

.hero-inner > * {
  opacity: 0;
  animation: heroIn 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.10s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.22s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.34s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.46s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.60s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero-avatar-wrap { margin: 0 auto 26px; width: 104px; height: 104px; }

.hero-avatar-img,
.hero-avatar-initial {
  width: 104px; height: 104px; border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 40px rgba(79, 70, 229, 0.28), 0 0 0 5px #fff;
}
.hero-avatar-initial {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 44px; font-weight: 700;
  user-select: none;
}

.hero-name {
  font-size: clamp(40px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.2;
}

.hero-tagline {
  margin-top: 14px;
  font-size: clamp(16px, 2.4vw, 19px);
  color: var(--text-2);
}

.hero-socials {
  margin-top: 30px;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}

.social-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.social-btn svg { width: 21px; height: 21px; }
.social-btn .social-glyph { font-size: 13px; font-weight: 700; letter-spacing: 0; }
.social-btn:hover {
  transform: translateY(-3px);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
}

.social-btn-lg {
  width: 56px; height: 56px;
}
.social-btn-lg svg { width: 26px; height: 26px; }
.social-btn-lg .social-glyph { font-size: 16px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(79, 70, 229, 0.45); }
.btn-ghost {
  color: var(--text); background: var(--surface);
  border-color: var(--border); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(79, 70, 229, 0.4); color: var(--accent); }
.btn-sm { padding: 9px 20px; font-size: 14px; }

/* ---------- 通用区块 ---------- */

.section { padding: 96px 0; }

.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.section-title::after {
  content: "";
  display: block;
  width: 52px; height: 4px; border-radius: 4px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section-sub { color: var(--text-2); font-size: 15px; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- 关于我 ---------- */

.about-grid {
  margin-top: 40px;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start;
}

.about-text {
  color: var(--text-2); font-size: 16.5px;
  max-width: 640px;
}

.about-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}

.stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat b {
  display: block; font-size: 30px; font-weight: 800; line-height: 1.2;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span { font-size: 13px; color: var(--text-3); }

/* ---------- 项目筛选 ---------- */

.filters {
  margin: 36px 0 28px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2); font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.chip:hover { border-color: rgba(79, 70, 229, 0.45); color: var(--text); }
.chip.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}
.chip-count {
  font-size: 12px; font-weight: 700;
  background: rgba(28, 31, 46, 0.06); color: var(--text-3);
  border-radius: 999px; padding: 1px 8px;
}
.chip.active .chip-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---------- 项目卡片 ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  background: var(--surface);
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 18px 44px rgba(79, 70, 229, 0.14);
}
.project-card:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.5); outline-offset: 2px;
}

.card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}

.card-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease;
}
.project-card:hover .card-icon { transform: scale(1.08) rotate(-4deg); }
.card-icon svg { width: 24px; height: 24px; }

.type-软件 { background: #eef0ff; color: #4f46e5; }
.type-游戏 { background: #fdf0ff; color: #c026d3; }
.type-PPT { background: #fff4e6; color: #ea580c; }
.type-文稿 { background: #e6faf1; color: #0d9488; }

.status {
  font-size: 12.5px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  letter-spacing: 0.5px;
}
.status-done { background: var(--green-bg); color: var(--green); }
.status-wip { background: var(--amber-bg); color: var(--amber); }

.card-name { font-size: 18px; font-weight: 700; letter-spacing: 0.3px; }

.card-summary {
  margin-top: 8px;
  font-size: 14px; color: var(--text-2);
  min-height: 44px;
}

.card-tech {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.card-tech span {
  font-size: 12px; color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 11px;
}

.card-update {
  margin-top: 14px;
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12.5px; color: var(--text-3);
  line-height: 1.55;
}
.card-update svg {
  flex: none; width: 14px; height: 14px;
  margin-top: 2px; color: var(--accent);
}

.card-more {
  display: inline-block; margin-top: 18px;
  font-size: 13.5px; font-weight: 600; color: var(--accent);
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.project-card:hover .card-more, .project-card:focus-visible .card-more {
  opacity: 1; transform: none;
}

.empty { grid-column: 1 / -1; color: var(--text-3); text-align: center; padding: 40px 0; }

/* ---------- 联系 ---------- */

.contact-inner { text-align: center; }
.contact-inner .section-title::after { margin-left: auto; margin-right: auto; }

.contact-socials {
  margin-top: 36px;
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  text-align: center;
  color: var(--text-3); font-size: 13.5px;
}

/* ---------- 详情弹窗 ---------- */

.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  visibility: hidden; opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.open { visibility: visible; opacity: 1; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(23, 25, 35, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-panel {
  position: relative;
  width: 100%; max-width: 620px;
  max-height: 84vh; overflow-y: auto;
  background: var(--surface);
  border-radius: 20px;
  padding: 38px;
  box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.modal.open .modal-panel { transform: none; }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-2); font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
}
.modal-close:hover { background: var(--accent); border-color: transparent; color: #fff; transform: rotate(90deg); }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.modal-name { font-size: 24px; font-weight: 800; letter-spacing: 0.5px; }

.modal-summary {
  margin-top: 10px; font-size: 15px; color: var(--text-2);
  padding-bottom: 18px; border-bottom: 1px solid var(--border);
}

.modal-detail {
  margin-top: 18px;
  font-size: 15px; color: var(--text-2);
  white-space: pre-line;
}

.modal-update {
  font-size: 13.5px; color: var(--text-2);
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.7;
}

.modal-block { margin-top: 22px; }
.modal-block h4 {
  font-size: 13px; font-weight: 700; color: var(--text-3);
  letter-spacing: 1px; margin-bottom: 10px;
}

.modal-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.modal-list li {
  font-size: 13.5px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 13px;
}

.modal-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-tech span {
  font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 4px 13px;
}

.modal-links {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 12px;
  padding-top: 22px; border-top: 1px solid var(--border);
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 14px 20px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { text-align: center; padding: 12px; }

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

  .section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .project-grid { grid-template-columns: 1fr; }
  .modal-panel { padding: 28px 22px; }
}

@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;
  }
  .reveal { opacity: 1; transform: none; }
}
/* ---------- 名字轮换 ---------- */

#heroNameText, #brandName {
  display: inline-block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---------- 主力项目卡片标识 ---------- */

.card-flag {
  margin-right: auto; margin-left: 10px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px; padding: 3px 11px;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.28);
}

.card-featured {
  border-color: rgba(79, 70, 229, 0.42);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg) 55%);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.12);
}

.card-foot {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-foot .card-more { margin-top: 0; }

.card-gh {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card-gh svg { width: 14px; height: 14px; }
.card-gh:hover {
  color: var(--accent); border-color: rgba(79, 70, 229, 0.4);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}

/* ---------- 主力项目模块 ---------- */

.section-featured { padding-bottom: 72px; }

.featured-head { text-align: center; margin-bottom: 44px; }

.featured-eyebrow {
  display: inline-block;
  font-size: 12.5px; font-weight: 800; letter-spacing: 2px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 999px; padding: 5px 16px;
  margin-bottom: 18px;
}
.featured-head .section-title::after { margin-left: auto; margin-right: auto; }

.featured-panel {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #f6f4ff);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 46px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.featured-panel::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(480px 240px at 88% 8%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(360px 220px at 8% 100%, rgba(79, 70, 229, 0.08), transparent 60%);
}

.featured-main { position: relative; z-index: 1; }

.featured-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

.featured-flag {
  font-size: 12.5px; font-weight: 800; letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px; padding: 5px 14px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.featured-name { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: 0.5px; }

.featured-summary { margin-top: 12px; font-size: 16px; font-weight: 600; color: var(--text-2); }

.featured-detail { margin-top: 10px; font-size: 14.5px; color: var(--text-2); line-height: 1.8; }

.featured-list {
  margin-top: 18px; list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px;
}
.featured-list li {
  font-size: 13.5px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.featured-list li::before {
  content: "✓";
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--green);
  background: var(--green-bg);
}

.featured-tech { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.featured-tech span {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: 999px; padding: 4px 12px;
}

.featured-update {
  margin-top: 16px; display: flex; align-items: flex-start; gap: 7px;
  font-size: 12.5px; color: var(--text-3); line-height: 1.55;
}
.featured-update svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--accent); }

.featured-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

.featured-show {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
}

.glass-ball { position: relative; width: 220px; height: 220px; }

.ring {
  position: absolute; inset: 0; margin: auto;
  border-radius: 50%;
  border: 1.5px dashed rgba(79, 70, 229, 0.35);
  animation: ringSpin 26s linear infinite;
}
.ring-1 { width: 100%; height: 100%; }
.ring-2 { width: 150%; height: 150%; animation-direction: reverse; animation-duration: 34s; border-color: rgba(139, 92, 246, 0.28); }
.ring-3 { width: 118%; height: 118%; animation-duration: 20s; border-style: solid; border-color: rgba(79, 70, 229, 0.14); }

.ball-core {
  position: absolute; inset: 0; margin: auto;
  width: 116px; height: 116px; border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #ede9fe);
  border: 1px solid rgba(79, 70, 229, 0.25);
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.35), inset 0 -10px 24px rgba(79, 70, 229, 0.12);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  animation: ballFloat 6s ease-in-out infinite;
}
.ball-core img { width: 62%; height: 62%; object-fit: contain; }

.badge {
  position: absolute;
  font-size: 12px; font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px;
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
  animation: badgeFloat 5.5s ease-in-out infinite;
  white-space: nowrap;
}
.badge-api    { top: 8%;  left: -14%; color: var(--amber); border-color: rgba(217, 119, 6, 0.35); }
.badge-news   { right: -18%; top: 30%; color: var(--accent); border-color: rgba(79, 70, 229, 0.35); animation-delay: -1.8s; }
.badge-skills { bottom: 6%; left: 2%; color: #0d9488; border-color: rgba(13, 148, 136, 0.35); animation-delay: -3.4s; }

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ballFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@media (max-width: 860px) {
  .featured-panel { grid-template-columns: 1fr; padding: 32px 26px; gap: 28px; }
  .featured-show { min-height: 260px; }
}
@media (max-width: 480px) {
  .featured-list { grid-template-columns: 1fr; }
  .glass-ball { transform: scale(0.85); }
}

/* ---------- 暗色模式 ---------- */

[data-theme="dark"] {
  --bg: #0f1117;
  --surface: #171a23;
  --text: #e7e9f2;
  --text-2: #a6adc2;
  --text-3: #6e7590;
  --border: #272c3a;
  --accent: #8b93ff;
  --accent-2: #b18cff;
  --accent-soft: #1c2140;
  --green: #4ade80;
  --green-bg: #122a1c;
  --amber: #fbbf24;
  --amber-bg: #33230c;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .site-header { background: rgba(15, 17, 23, 0.82); }
[data-theme="dark"] .blob { opacity: 0.28; }

.hero-avatar-img,
.hero-avatar-initial {
  box-shadow: 0 14px 40px rgba(79, 70, 229, 0.28), 0 0 0 5px var(--surface);
}

[data-theme="dark"] .type-软件 { background: #23264a; color: #a5b4fc; }
[data-theme="dark"] .type-游戏 { background: #3a1f42; color: #f0abfc; }
[data-theme="dark"] .type-PPT { background: #3d2a12; color: #fdba74; }
[data-theme="dark"] .type-文稿 { background: #0f2e29; color: #5eead4; }

[data-theme="dark"] .featured-panel { background: linear-gradient(135deg, #1a1d29, #211b38); }
[data-theme="dark"] .ball-core { background: linear-gradient(135deg, #232738, #2a2445); }

/* ---------- 主题切换按钮 ---------- */

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: rgba(79, 70, 229, 0.4); transform: rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- 主力项目 · 截图展示 ---------- */

.featured-show {
  flex-direction: column;
  gap: 18px;
}

.showcase {
  width: 100%; max-width: 470px;
  animation: showcaseFloat 7s ease-in-out infinite;
}
@keyframes showcaseFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.showcase-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-r { background: #f87171; }
.dot-y { background: #fbbf24; }
.dot-g { background: #34d399; }
.showcase-url {
  flex: 1; margin-left: 8px;
  font-size: 12px; color: var(--text-3);
  background: var(--bg);
  border-radius: 999px; padding: 3px 12px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.showcase-stage {
  border: 1px solid var(--border);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  background: #0b0d14;
  aspect-ratio: 980 / 680;
  display: flex; align-items: center; justify-content: center;
}
.showcase-img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity 0.35s ease;
}

.showcase-thumbs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.thumb {
  width: 76px; height: 53px; padding: 0;
  border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; cursor: pointer; background: none;
  opacity: 0.72;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; transform: translateY(-2px); }
.thumb.active { border-color: var(--accent); opacity: 1; }

.featured-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px;
  box-shadow: var(--shadow-sm);
  animation: badgeFloat 5.5s ease-in-out infinite;
}
.stat-chip:nth-child(2) { animation-delay: -2.6s; }
.stat-chip b { color: var(--accent); }

/* ---------- 卡片自动数据 ---------- */

.card-auto {
  margin-top: 12px;
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; color: var(--text-3);
}
.card-auto .gh-stars { color: var(--amber); font-weight: 700; }
.card-auto .gh-ver { color: var(--accent); font-weight: 700; }

/* ---------- 弹窗截图 ---------- */

.mshot-main {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0b0d14;
  position: relative;
}
.mshot-main img { width: 100%; display: block; }
.mshot-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 10px;
  font-size: 12.5px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}
.mshot-thumbs { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.mshot {
  width: 64px; height: 44px; padding: 0;
  border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; cursor: pointer; background: none;
  opacity: 0.7;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.mshot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mshot:hover { opacity: 1; }
.mshot.active { border-color: var(--accent); opacity: 1; }

.modal-repo {
  margin-top: 18px;
  display: flex; align-items: center; gap: 16px;
  font-size: 13.5px; color: var(--text-2);
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.modal-repo .gh-stars { color: var(--amber); font-weight: 700; }
.modal-repo .gh-ver { color: var(--accent); font-weight: 700; }

/* ---------- 开发日志 ---------- */

.logs-list {
  margin: 36px auto 0;
  max-width: 820px;
  display: flex; flex-direction: column; gap: 14px;
}
.log-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.log-item[open] { box-shadow: var(--shadow-md); border-color: rgba(79, 70, 229, 0.35); }
.log-item summary {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}
.log-item summary::-webkit-details-marker { display: none; }
.log-item summary::after {
  content: "+";
  margin-left: auto;
  font-size: 18px; line-height: 1;
  color: var(--text-3);
  transition: transform 0.3s ease;
}
.log-item[open] summary::after { transform: rotate(45deg); }
.log-item summary:hover .log-title { color: var(--accent); }
.log-date {
  flex: none;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px; border-radius: 999px;
}
.log-title { font-size: 15.5px; font-weight: 700; transition: color 0.25s ease; }
.log-body {
  padding: 0 20px 18px;
  color: var(--text-2); font-size: 14px; line-height: 1.85;
}
.log-body p + p { margin-top: 8px; }
.log-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.log-tags span {
  font-size: 12px; color: var(--text-2);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 10px;
}

@media (max-width: 860px) {
  .featured-show { min-height: 0; }
  .showcase { max-width: 100%; }
  .log-item summary { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 480px) {
  .showcase-thumbs { gap: 8px; }
  .thumb { width: 64px; height: 45px; }
}

/* ---------- 首页弹幕 ---------- */

.danmaku-layer {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.hero-inner { z-index: 2; }

.danmaku {
  position: absolute;
  white-space: nowrap;
  max-width: 46vw;
  overflow: hidden; text-overflow: ellipsis;
  font-size: 14px; line-height: 1.4;
  color: #fff;
  background: rgba(20, 22, 34, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow: 0 6px 18px rgba(20, 22, 34, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: danmakuFly var(--dur, 14s) linear forwards;
  will-change: transform;
}
.danmaku .d-nick {
  color: #ffd166; font-weight: 600;
  margin-right: 6px;
}
[data-theme="dark"] .danmaku {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.14);
}

@keyframes danmakuFly {
  0%   { transform: translateX(calc(100vw + 160px)); opacity: 0; }
  5%   { opacity: 0.92; }
  88%  { opacity: 0.92; }
  100% { transform: translateX(-140%); opacity: 0; }
}

.danmaku-composer {
  margin-top: 26px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
}
.d-input, .d-name {
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.d-input { width: min(320px, 62vw); }
.d-name { width: 132px; }
.d-input:focus, .d-name:focus {
  border-color: rgba(79, 70, 229, 0.5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.danmaku-hint {
  width: 100%;
  margin-top: 4px;
  font-size: 12.5px; color: var(--text-3);
}
.hero-inner > *:nth-child(6) { animation-delay: 0.74s; }

.toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.site-visits {
  margin-top: 8px;
  font-size: 12.5px; color: var(--text-3);
}
