/* ============================================================
   首页专属样式（Hero / 关于 / 作品 / 知识沉淀）
   共享变量与壳层见 base.css
   ============================================================ */

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* 子页粒子层：保持与首页一致的星空背景 */
.knowledge-page #particles {
  width: 100%;
  height: 100%;
}

main { position: relative; z-index: 1; }
section { max-width: 1080px; margin: 0 auto; padding: 110px 24px 40px; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--cyan);
  margin-bottom: 14px;
}
.section-tag::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 14px;
}
.section-desc { color: var(--text-dim); max-width: 620px; margin-bottom: 48px; }

/* ========== Hero ========== */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 80px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  color: var(--blue);
  font-size: 13px;
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

h1.hero-name {
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 4px;
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
  filter: drop-shadow(0 0 30px rgba(129, 140, 248, 0.35));
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-role {
  margin-top: 18px;
  font-size: clamp(18px, 3vw, 26px);
  color: var(--text);
  min-height: 1.6em;
}
.hero-role .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--cyan);
  margin-left: 4px;
  vertical-align: -0.15em;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 8px var(--cyan);
}
@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  margin-top: 22px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 16px;
}
.hero-sub .domain {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hero-actions { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--gradient);
  color: #0b1120;
  border: none;
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(129, 140, 248, 0.5); }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: rgba(56, 189, 248, 0.5); transform: translateY(-2px); }

.scroll-hint {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-hint .mouse {
  width: 22px; height: 36px;
  border: 1.5px solid var(--text-faint);
  border-radius: 12px;
  position: relative;
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cyan);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0; }
}

/* ========== 关于 ========== */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}
.avatar-card {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 34px 24px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  text-align: center;
}
.avatar-ring {
  width: 130px; height: 130px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--cyan), var(--violet), var(--pink), var(--cyan));
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 2px;
  overflow: hidden;
}
.avatar-inner span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.avatar-card h3 { font-size: 20px; }
.avatar-card .motto { color: var(--text-dim); font-size: 13px; }
.identity-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.identity-pills span {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #c7d2fe;
  background: rgba(129, 140, 248, 0.08);
}

.about-text p { color: var(--text-dim); margin-bottom: 16px; }
.about-text strong { color: var(--text); font-weight: 600; }

.timeline { margin-top: 30px; border-left: 2px solid rgba(129, 140, 248, 0.25); padding-left: 24px; display: grid; gap: 24px; }
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -31px; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}
.tl-item .tl-role { font-weight: 600; font-size: 16px; }
.tl-item .tl-note { color: var(--text-faint); font-size: 13px; }
.tl-item .tl-desc { color: var(--text-dim); font-size: 14px; margin-top: 2px; }

/* ========== 技能 ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.skill-card {
  padding: 26px 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 16px 40px rgba(14, 116, 144, 0.18);
}
.skill-card .ico { font-size: 26px; margin-bottom: 12px; }
.skill-card h4 { font-size: 16px; margin-bottom: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span {
  font-size: 12.5px;
  padding: 4px 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s;
}
.skill-card:hover .tag-list span { color: var(--text); border-color: rgba(255, 255, 255, 0.15); }

/* ========== 作品 ========== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.work-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--card-border);
  padding: 28px 26px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 20px 50px rgba(76, 29, 149, 0.28);
}
.work-card::after {
  content: "";
  position: absolute;
  top: -50%; left: -60%;
  width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  transform: rotate(20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.work-card:hover::after { left: 120%; }
.work-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.work-ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.work-status {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-live { color: #6ee7b7; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-wip { color: #7dd3fc; background: rgba(14, 165, 233, 0.1); border: 1px solid rgba(14, 165, 233, 0.28); }
.status-soon { color: #c4b5fd; background: rgba(139, 92, 246, 0.1); border: 1px dashed rgba(139, 92, 246, 0.4); }
.work-card h4 { font-size: 18px; margin-bottom: 8px; }
.work-card p { color: var(--text-dim); font-size: 14px; flex: 1; }
.work-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.work-tags span {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
}
.work-card.placeholder {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
}
.work-card.placeholder .ph-ico { font-size: 34px; margin-bottom: 10px; opacity: 0.7; }
.work-card.placeholder p { color: var(--text-faint); }

.works-stats {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 36px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card);
  overflow: hidden;
}
.stat-item {
  flex: 1;
  min-width: 120px;
  padding: 22px 16px;
  text-align: center;
  border-right: 1px solid var(--card-border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

.work-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(129, 140, 248, 0.06), rgba(232, 121, 249, 0.04));
  border-color: rgba(129, 140, 248, 0.25);
  padding: 36px 32px;
}
.work-card.featured h4 { font-size: 20px; }
.work-card.featured p { max-width: 740px; }
.featured-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.featured-features .ff-label {
  width: 100%;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.featured-features span:not(.ff-label) {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s;
}
.work-card.featured:hover .featured-features span:not(.ff-label) {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.modules-sub { margin-top: 48px; }
.modules-sub .sub-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modules-sub .sub-desc { color: var(--text-faint); font-size: 14px; margin-bottom: 28px; }
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.module-card {
  position: relative;
  padding: 22px 20px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.module-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.25s;
}
.module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 36px rgba(14, 116, 144, 0.16);
}
.module-card:hover::before { opacity: 1; }
.module-card .mc-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  margin-bottom: 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
}
.module-card h5 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.module-card p { font-size: 13px; color: var(--text-faint); line-height: 1.6; }
.module-card .mc-arrow {
  margin-top: 12px;
  font-size: 12px;
  color: var(--cyan);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s, transform 0.25s;
}
.module-card:hover .mc-arrow { opacity: 1; transform: none; }

/* ========== 知识沉淀 ========== */
.knowledge-banner {
  position: relative;
  border-radius: 20px;
  padding: 40px 36px;
  margin-bottom: 28px;
  background:
    radial-gradient(800px 200px at 10% 0%, rgba(34, 211, 238, 0.12), transparent),
    radial-gradient(700px 220px at 90% 100%, rgba(232, 121, 249, 0.1), transparent),
    var(--card);
  border: 1px solid var(--card-border);
  overflow: hidden;
}
.knowledge-banner h3 { font-size: 22px; margin-bottom: 10px; }
.knowledge-banner p { color: var(--text-dim); max-width: 640px; }
.topic-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.topic-tags span {
  font-size: 13px;
  padding: 6px 15px;
  border-radius: 999px;
  color: #e0e7ff;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.28);
  transition: transform 0.2s, background 0.2s;
}
.topic-tags span:hover { transform: translateY(-2px); background: rgba(129, 140, 248, 0.2); }

.articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.article-card {
  display: block;
  padding: 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, border-color 0.25s;
}
.article-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); }
.article-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.article-meta .cat { font-size: 12px; color: var(--cyan); }
.article-meta .soon {
  font-size: 11px; color: var(--text-faint);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 2px 9px; border-radius: 999px;
}
.article-card h4 { font-size: 16.5px; line-height: 1.5; margin-bottom: 8px; }
.article-card p { font-size: 13.5px; color: var(--text-faint); }

.articles-more {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
}
.articles-more a {
  font-size: 14px;
  color: var(--cyan);
  text-decoration: none;
  padding: 8px 4px;
}
.articles-more a:hover { text-decoration: underline; }

/* ========== 分区入口 ========== */
.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(255, 255, 255, 0.05);
}
.entry-card .entry-ico { font-size: 28px; }
.entry-card h3 { font-size: 18px; }
.entry-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;
}
.entry-card .entry-link {
  margin-top: 8px;
  font-size: 13px;
  color: var(--cyan);
}

/* ========== 知识沉淀清单页 ========== */
.knowledge-page main {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 120px 24px 0;
}
.knowledge-page .section-tag { margin-bottom: 12px; }
.knowledge-page .page-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 10px;
}
.knowledge-page .page-desc {
  color: var(--text-dim);
  margin-bottom: 8px;
}
.knowledge-page .page-meta {
  color: var(--text-faint);
  font-size: 13px;
  margin-bottom: 36px;
}

.post-list { display: grid; gap: 14px; }
.post-item {
  display: block;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.post-item:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(255, 255, 255, 0.05);
}
.post-item .post-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.post-item .cat {
  color: var(--cyan);
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.post-item h3 {
  font-size: 18px;
  line-height: 1.45;
  margin-bottom: 8px;
}
.post-item .summary {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.post-item .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.post-item .tags span {
  font-size: 12px;
  color: var(--text-faint);
}

@media (max-width: 720px) {
  .knowledge-page main { padding: 104px 20px 0; }
  .post-item { padding: 18px 16px; }
  .post-item h3 { font-size: 16.5px; }
}

/* ========== 响应式 ========== */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .avatar-card { position: static; max-width: 380px; margin: 0 auto; }
}
@media (max-width: 720px) {
  section { padding-top: 84px; }
}
