/* ===== CSS 变量 / 主题 ===== */
:root {
  --primary: #4a9eff;
  --primary-dark: #2d7dd2;
  --bg-color: #ffffff;
  --bg-card: #f8f9fa;
  --text-color: #333333;
  --text-muted: #666666;
  --border-color: #e8e8e8;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.14);
  --banner-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --skill-bg: #e8f0fe;
  --skill-fill: var(--primary);
  --tag-cpp: #e3f2fd;
  --tag-cpp-text: #1565c0;
  --tag-linux: #e8f5e9;
  --tag-linux-text: #2e7d32;
  --tag-qt: #fce4ec;
  --tag-qt-text: #c62828;
  --tag-net: #fff3e0;
  --tag-net-text: #e65100;
  --tag-algo: #f3e5f5;
  --tag-algo-text: #6a1b9a;
}

[data-theme="dark"] {
  --bg-color: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.08);
  --text-color: #e0e0e0;
  --text-muted: #aaaaaa;
  --border-color: rgba(255, 255, 255, 0.12);
  --nav-bg: rgba(10, 10, 26, 0.85);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.5);
  --skill-bg: rgba(255, 255, 255, 0.06);
  --tag-cpp: rgba(100, 181, 246, 0.15);
  --tag-cpp-text: #64b5f6;
  --tag-linux: rgba(129, 199, 132, 0.15);
  --tag-linux-text: #81c784;
  --tag-qt: rgba(239, 154, 154, 0.15);
  --tag-qt-text: #ef9a9a;
  --tag-net: rgba(255, 183, 77, 0.15);
  --tag-net-text: #ffb74d;
  --tag-algo: rgba(206, 147, 216, 0.15);
  --tag-algo-text: #ce93d8;
}

/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== 导航栏 ===== */
#nav-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: background 0.3s;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
}

.nav-logo img { border-radius: 50%; width: 36px; height: 36px; transition: transform 0.6s ease; }

.nav-logo img:hover {
  transform: rotate(360deg);
}

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

.nav-item {
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
  background: var(--primary);
  color: #fff;
}

.nav-right { display: flex; align-items: center; gap: 8px; }

.theme-toggle, .menu-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 36px; height: 36px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}

.theme-toggle:hover, .menu-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.menu-toggle { display: none; }

/* ===== 移动端菜单 ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  z-index: 999;
  flex-direction: column;
  padding: 10px 0;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 12px 24px;
  color: var(--text-color);
  font-size: 0.95rem;
  transition: background 0.2s;
}

.mobile-menu a:hover { background: var(--bg-card); }

/* ===== Banner ===== */
.page-banner {
  position: relative;
  background: var(--banner-bg);
  padding: 120px 20px 100px;
  text-align: center;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234a9eff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.banner-content { position: relative; z-index: 1; }
.banner-content h1 { font-size: 2.5rem; color: #fff; margin-bottom: 8px; }
.banner-content p { font-size: 1.1rem; color: rgba(255,255,255,0.7); letter-spacing: 4px; }

.banner-wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 65px;
}

.banner-wave svg { width: 100%; height: 100%; }

/* ===== 水浪动效 ===== */
.waves-area { height: 65px; }

.waves-svg { width: 100%; height: 100%; }

.parallax > use {
  animation: wave-move 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-duration: 7s; animation-delay: -2s; }
.parallax > use:nth-child(2) { animation-duration: 10s; animation-delay: -3s; }
.parallax > use:nth-child(3) { animation-duration: 13s; animation-delay: -4s; }
.parallax > use:nth-child(4) { animation-duration: 20s; animation-delay: -5s; }

@keyframes wave-move {
  0%   { transform: translate3d(-90px, 0, 0); }
  100% { transform: translate3d(85px,  0, 0); }
}

/* ===== 展示区域 ===== */
.showcase-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 40px 20px;
}

.showcase-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.showcase-card-left {
  background: linear-gradient(135deg, #1a3a6b 0%, #2b5ea7 100%);
  border-radius: 16px;
  padding: 36px 32px;
  color: #fff;
}

.showcase-card-left .greeting {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.showcase-card-left .intro-name {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.showcase-card-left .intro-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.showcase-card-right {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.motto-line {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.flip-container {
  height: 42px;
  overflow: hidden;
}

.flip-word {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
}

.flip-word.flip-out {
  animation: flipOut 0.6s ease-in-out forwards;
}

.flip-word.flip-in {
  animation: flipIn 0.6s ease-in-out forwards;
}

@keyframes flipOut {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-50px);
    opacity: 0;
  }
}

@keyframes flipIn {
  0% {
    transform: translateY(50px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== 逆境多读书 交互区域 ===== */
.motto-area {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 60px 20px;
  cursor: none;
  user-select: none;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.motto-char {
  font-size: 7rem;
  font-weight: 900;
  color: #2b5ea7;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1;
  font-family: "STKaiti", "KaiTi", "楷体", "华文行楷", serif;
    /* 缩放文字大小，1.2表示放大20%，0.8表示缩小20% */
  transform: scale(1.4);
}

.motto-char.active {
  color: var(--active-color, #f0a030);
}

.motto-cursor {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.8);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 3;
  opacity: 0;
  transition: background 0.3s;
}

.motto-ring-inner {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.12);
  border: 2px solid rgba(74, 158, 255, 0.25);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: background 0.3s, border-color 0.3s;
}

.motto-ring-outer {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.06);
  border: 2px solid rgba(74, 158, 255, 0.12);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: background 0.3s, border-color 0.3s;
}

.motto-area:hover .motto-cursor,
.motto-area:hover .motto-ring-inner,
.motto-area:hover .motto-ring-outer {
  opacity: 1;
}

@media (max-width: 900px) {
  .showcase-cards { grid-template-columns: 1fr; }
  .motto-char { font-size: 3rem; }
  .motto-area { gap: 12px; padding: 40px 16px; }
}

/* ===== 主内容：卡片网格 ===== */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
  position: relative;
  min-width: 0;
}

.info-card:hover {
  box-shadow: var(--shadow-hover);
}

.card-label {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--skill-bg);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.info-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.info-card p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

/* 性格卡片 */
.personality-card {
  display: flex;
  flex-direction: column;
}

.personality-type {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 8px 0;
}

.personality-link {
  font-size: 0.85rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

/* 像素图卡片 */
.pixel-card {
  background: linear-gradient(180deg, #87ceeb 0%, #f4a460 70%, #8b7355 100%);
  overflow: hidden;
  position: relative;
  min-height: 200px;
}

.pixel-scene {
  position: relative;
  width: 100%;
  height: 100%;
}

.pixel-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: #90ee90;
  border-top: 3px solid #228b22;
}

.pixel-mushroom {
  position: absolute;
  bottom: 30%;
  width: 60px;
  height: 70px;
  background: #ff6347;
  border-radius: 50% 50% 0 0;
}

.pixel-mushroom::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: #f5deb3;
  border-radius: 4px;
}

.mushroom-1 {
  left: 20%;
}

.mushroom-2 {
  right: 25%;
  width: 50px;
  height: 60px;
}

.pixel-character {
  position: absolute;
  bottom: 35%;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 50px;
  background: #ffd700;
  border-radius: 8px;
}

/* 座右铭卡片 */
.motto-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.motto-card .card-label {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.motto-text {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.6;
  color: #fff !important;
  margin: 16px 0 0 0;
}

/* 个人爱好卡片 */
.hobby-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.hobby-card .card-label {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.hobby-card h3,
.hobby-card p {
  color: #fff !important;
}

/* 为什么建站 */
.site-card {
  grid-column: 1 / -1;
}

/* 技能图标卡片 */
/* 技能卡片 */
.skills-icon-card {
  display: flex;
  flex-direction: column;
}

/* 滚动状态（默认显示）*/
.skills-scroll {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  overflow: hidden;
  padding: 8px 0;
  width: 100%;
}

.skills-icon-card:hover .skills-scroll {
  display: none;
}

.skills-row {
  display: flex;
  gap: 14px;
  animation: scroll-icons 20s linear infinite;
}

.skills-row-2 {
  animation-delay: -10s;
}

@keyframes scroll-icons {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 展开状态（悬浮时显示）*/
.skills-expand {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.skills-icon-card:hover .skills-expand {
  display: flex;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: all 0.2s;
  white-space: nowrap;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.skill-tag i {
  font-size: 1.1rem;
}

/* 图标样式 */
.s-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
  transition: transform 0.2s;
}

.s-icon:hover {
  transform: translateY(-4px);
}

.si-vue { background: #42b883; }
.si-bootstrap { background: #7952b3; }
.si-html { background: #e34c26; }
.si-js { background: #f7df1e; color: #333; }
.si-swift { background: #fa7343; }
.si-react { background: #61dafb; color: #333; }
.si-html5 { background: #e34c26; }
.si-c { background: #a8b9cc; }
.si-cpp { background: #00599c; }
.si-golang { background: #00add8; }
.si-python { background: #3776ab; }
.si-docker { background: #2496ed; }
.si-linux { background: #fcc624; color: #333; }
.si-java { background: #007396; }
.si-git { background: #f05032; }
.si-ps { background: #31a8ff; }
.si-pr { background: #9999ff; }
.si-excel { background: #217346; }
.si-css { background: #1572b6; }
.si-qt { background: #41cd52; }
.si-redis { background: #dc382d; }
.si-rabbitmq { background: #ff6600; }
.si-mysql { background: #4479a1; }
.si-pg { background: #336791; }
.si-langchain { background: #1c3c3c; }

/* 生涯时间线卡片 */
.career-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-axis {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 60px 0;
  margin-top: 20px;
}

.timeline-axis::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-color);
  transform: translateY(-50%);
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  z-index: 1;
}

.timeline-item.item-top {
  flex-direction: column-reverse;
}

.timeline-item.item-bottom {
  flex-direction: column;
}

.timeline-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary);
  z-index: 2;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 120px;
  text-align: center;
}

.item-top .timeline-content {
  margin-bottom: 20px;
}

.item-bottom .timeline-content {
  margin-top: 20px;
}

.timeline-emoji {
  font-size: 1.8rem;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-color);
}

.timeline-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 8px 0;
}

.item-top .timeline-year {
  order: 1;
  margin-top: 8px;
}

.item-bottom .timeline-year {
  order: -1;
  margin-bottom: 8px;
}

/* 地图卡片 */
.map-card {
  grid-column: 1 / -1;
}

.map-placeholder {
  margin-top: 16px;
  height: 200px;
  background: var(--skill-bg);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
}

.map-placeholder i {
  font-size: 2rem;
  color: var(--primary);
}

@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .site-card,
  .map-card {
    grid-column: 1;
  }

  .skills-icons {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 生涯时间线移动端优化 */
  .timeline-axis {
    flex-direction: column;
    padding: 20px 0 20px 40px;
    align-items: flex-start;
  }

  .timeline-axis::before {
    top: 0;
    bottom: 0;
    left: 20px;
    right: auto;
    width: 3px;
    height: auto;
    transform: none;
  }

  .timeline-item {
    flex-direction: row !important;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
  }

  .timeline-item:last-child {
    margin-bottom: 0;
  }

  .timeline-node {
    position: absolute;
    left: -27px;
  }

  .timeline-content {
    margin: 0 0 0 20px !important;
    min-width: auto;
    max-width: 100%;
    text-align: left;
    align-items: flex-start;
  }

  .timeline-year {
    position: absolute;
    left: -60px;
    margin: 0 !important;
    font-size: 0.8rem;
  }

  .timeline-emoji {
    font-size: 1.5rem;
  }

  .timeline-title {
    font-size: 0.85rem;
  }

  .timeline-sub {
    font-size: 0.7rem;
  }
}

/* ===== 旧样式保留（其他页面可能用到）===== */
.content-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  align-items: start;
}

/* ===== 个人信息卡片 ===== */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  transition: transform 0.3s;
}

.avatar:hover { transform: rotate(10deg) scale(1.05); }

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.social-links { display: flex; justify-content: center; gap: 12px; }

.social-links a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.social-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===== 文章卡片 ===== */
.about-article { display: flex; flex-direction: column; gap: 24px; }

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

.article-card:hover { box-shadow: var(--shadow-hover); }

.article-card h2 {
  font-size: 1.2rem;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.article-card p { color: var(--text-muted); margin-bottom: 12px; }
.article-card p:last-child { margin-bottom: 0; }
.article-card strong { color: var(--text-color); }

/* ===== 技能条 ===== */
.skills-grid { display: flex; flex-direction: column; gap: 14px; }

.skill-item { display: flex; align-items: center; gap: 12px; }

.skill-name {
  width: 160px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.skill-bar {
  flex: 1;
  height: 8px;
  background: var(--skill-bg);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 标签 ===== */
.category-tags { display: flex; flex-wrap: wrap; gap: 10px; }

.tag {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.tag-cpp  { background: var(--tag-cpp);   color: var(--tag-cpp-text); }
.tag-linux{ background: var(--tag-linux); color: var(--tag-linux-text); }
.tag-qt   { background: var(--tag-qt);    color: var(--tag-qt-text); }
.tag-net  { background: var(--tag-net);   color: var(--tag-net-text); }
.tag-algo { background: var(--tag-algo);  color: var(--tag-algo-text); }

/* ===== 联系列表 ===== */
.contact-list { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-list li i { color: var(--primary); width: 18px; text-align: center; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 24px 20px;
  text-align: center;
}

.footer-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== 流星雨按钮 ===== */
.meteor-shower-btn {
  position: fixed;
  bottom: 30px;
  right: 86px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6c5ce7;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 1001;
}

.meteor-shower-btn:hover {
  background: #5b4cdb;
  transform: translateY(-3px);
}

[data-theme="dark"] .meteor-shower-btn {
  display: flex;
}

.meteor-color {
  position: fixed;
  width: 3px;
  pointer-events: none;
  z-index: 9999;
  animation: meteor-color-fly 1.5s linear forwards;
  transform: rotate(45deg);
  transform-origin: top center;
}

@keyframes meteor-color-fly {
  0% { opacity: 1; transform: rotate(45deg) translateY(0); }
  100% { opacity: 0; transform: rotate(45deg) translateY(80vmin); }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .nav-menu { display: none; }
  .menu-toggle { display: flex; }
}

@media (max-width: 480px) {
  .banner-content h1 { font-size: 1.8rem; }
  .article-card { padding: 20px; }
  .skill-name { width: 120px; }
}

/* ===== Banner 变体 ===== */
.banner-projects {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}
.banner-life {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

/* ===== 统计栏 ===== */
.stats-bar {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.stat-item i { color: var(--primary); }
.stat-item span { font-weight: 700; color: var(--text-color); font-size: 1rem; }

/* ===== 过滤器 ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(74,158,255,0.35);
}

/* ===== 项目网格 ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.project-header { display: flex; align-items: center; gap: 14px; }

.project-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.cpp-icon   { background: #e3f2fd; color: #1565c0; }
.linux-icon { background: #e8f5e9; color: #2e7d32; }
.qt-icon    { background: #fce4ec; color: #c62828; }
.net-icon   { background: #fff3e0; color: #e65100; }

[data-theme="dark"] .cpp-icon   { background: #1a2a4a; color: #64b5f6; }
[data-theme="dark"] .linux-icon { background: #1a2e1a; color: #81c784; }
[data-theme="dark"] .qt-icon    { background: #2e1a1a; color: #ef9a9a; }
[data-theme="dark"] .net-icon   { background: #2e2010; color: #ffb74d; }

.project-meta { flex: 1; min-width: 0; }
.project-meta h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }

.project-lang {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.cpp-lang   { background: #e3f2fd; color: #1565c0; }
.linux-lang { background: #e8f5e9; color: #2e7d32; }
.qt-lang    { background: #fce4ec; color: #c62828; }
.net-lang   { background: #fff3e0; color: #e65100; }

[data-theme="dark"] .cpp-lang   { background: #1a2a4a; color: #64b5f6; }
[data-theme="dark"] .linux-lang { background: #1a2e1a; color: #81c784; }
[data-theme="dark"] .qt-lang    { background: #2e1a1a; color: #ef9a9a; }
[data-theme="dark"] .net-lang   { background: #2e2010; color: #ffb74d; }

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ptag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--skill-bg);
  color: var(--text-muted);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 8px;
}

.project-stats { display: flex; gap: 14px; }
.project-stats span {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.project-stats i { color: #f5a623; }

.project-links { display: flex; gap: 8px; }
.plink {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.plink:hover { border-color: var(--primary); color: var(--primary); }
.plink-demo { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.plink-demo:hover { background: var(--primary-dark); }
.plink-doc:hover { border-color: #43e97b; color: #43e97b; }

/* ===== 生活网格 ===== */
.life-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.life-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s;
}
.life-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.life-img {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.life-img-icon {
  font-size: 3rem;
  color: rgba(255,255,255,0.5);
  transition: transform 0.4s;
}
.life-card:hover .life-img-icon { transform: scale(1.15) rotate(5deg); }

.life-cat-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 4px;
}
.travel-badge  { background: rgba(74,158,255,0.85); color: #fff; }
.food-badge    { background: rgba(245,87,108,0.85); color: #fff; }
.reading-badge { background: rgba(79,172,254,0.85); color: #fff; }
.daily-badge   { background: rgba(67,233,123,0.85); color: #fff; }

.life-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }

.life-body h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.life-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.life-date i { color: var(--primary); }

.life-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.life-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 8px;
}

.life-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ltag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--skill-bg);
  color: var(--text-muted);
}

.life-read-more {
  font-size: 0.8rem;
  color: var(--primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.life-read-more:hover { gap: 8px; }

/* ===== 响应式补充 ===== */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .life-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .stats-bar { gap: 16px; }
}
@media (max-width: 480px) {
  .life-grid { grid-template-columns: 1fr; }
  .project-footer { flex-direction: column; align-items: flex-start; }
}

/* ===== 夜间模式特殊容器 ===== */
[data-theme="dark"] .hobby-card {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.3) 0%, rgba(245, 87, 108, 0.3) 100%);
}

[data-theme="dark"] .motto-area {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .showcase-card-left {
  background: linear-gradient(135deg, rgba(26, 58, 107, 0.4) 0%, rgba(43, 94, 167, 0.4) 100%);
}

/* ===== 星空背景 ===== */
[data-theme="dark"] body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: transparent;
}

[data-theme="dark"] body {
  position: relative;
  overflow-x: hidden;
}

.starfield {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s;
  animation: starfield-drift 150s linear infinite;
}

[data-theme="dark"] .starfield {
  opacity: 1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
}

@keyframes starfield-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(50%, -50%);
  }
}

.meteor {
  position: fixed;
  width: 2px;
  height: 80px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
  z-index: 1;
  animation: meteor-fly 1.5s ease-out forwards;
  transform: rotate(45deg);
  transform-origin: center;
  will-change: transform, opacity;
}

@keyframes meteor-fly {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(50vmin, -50vmin) rotate(45deg);
  }
}

/* 移动端优化流星动画 */
@media (max-width: 768px) {
  .meteor {
    height: 60px;
  }
}

/* 确保内容在星空之上 */
[data-theme="dark"] .showcase-section,
[data-theme="dark"] .main-container,
[data-theme="dark"] .site-footer {
  position: relative;
  z-index: 10;
}

[data-theme="dark"] .mobile-menu {
  z-index: 999;
}

[data-theme="dark"] #nav-header,
[data-theme="dark"] .back-to-top {
  z-index: 1001;
}

/* ===== 性格卡片布局调整 ===== */
.personality-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.personality-text {
  display: flex;
  flex-direction: column;
}

.enfj-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  align-self: center;
  transition: transform 0.6s ease;
}

.enfj-img:hover {
  transform: rotate(-45deg);
}

@media (max-width: 600px) {
  .enfj-img {
    width: 120px;
    height: 120px;
  }
}

/* ===== 空调卡片 ===== */
.ac-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 30px 24px;
}

.ac-unit {
  width: 100%;
  max-width: 360px;
}

.ac-unit-body {
  position: relative;
  background: #f0f2f5;
  border: 1px solid #ddd;
  border-radius: 12px 12px 4px 4px;
  padding: 16px 20px 30px;
  min-height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

[data-theme="dark"] .ac-unit-body {
  background: #2a2a3a;
  border-color: rgba(255,255,255,0.25);
}

.ac-label {
  width: 50px;
  height: 60px;
  background: #fff;
  border: 2px solid #4a9eff;
  border-radius: 4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ac-label-dots span,
.ac-label-dots-bottom span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4a9eff;
  display: inline-block;
}

.ac-label-dots, .ac-label-dots-bottom {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.ac-label-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ac-label-bars span {
  height: 4px;
  border-radius: 1px;
}

.bar-green { background: #4caf50; width: 90%; }
.bar-yellow { background: #ffc107; width: 75%; }
.bar-orange { background: #ff9800; width: 60%; }
.bar-red { background: #f44336; width: 45%; }

/* ===== 空调卡片续 ===== */
.ac-temp-display {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  position: relative;
}

.ac-sun-icon {
  font-size: 0.9rem;
  color: #f5a623;
  position: absolute;
  top: -4px;
  right: -2px;
}

.ac-temp-num {
  font-family: 'Courier New', monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: #999;
  letter-spacing: 2px;
  transition: color 0.3s;
}

.ac-temp-num.on { color: #333; }
[data-theme="dark"] .ac-temp-num { color: #555; }
[data-theme="dark"] .ac-temp-num.on { color: #eee; }

.ac-temp-deg {
  font-size: 0.9rem;
  color: #999;
  margin-top: 6px;
}

.ac-vent-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #ccc;
  letter-spacing: 4px;
}

[data-theme="dark"] .ac-vent-dots { color: #555; }

.ac-unit-bottom {
  height: 8px;
  background: #e8eaed;
  border-radius: 0 0 8px 8px;
  border: 1px solid #ddd;
  border-top: none;
  position: relative;
}

[data-theme="dark"] .ac-unit-bottom {
  background: #222;
  border-color: rgba(255,255,255,0.25);
}

.ac-led {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #666;
  transition: all 0.3s;
}

.ac-led.on {
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

.ac-wind-lines {
  display: flex;
  justify-content: center;
  gap: 20px;
  height: 50px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s;
}

.ac-wind-lines.on { opacity: 1; }

.ac-wind-line {
  width: 3px;
  height: 36px;
  background: #ccc;
  border-radius: 2px;
  transform: rotate(-15deg);
  animation: ac-wind-sway 2s ease-in-out infinite;
}

.ac-wind-line:nth-child(2) { animation-delay: 0.3s; }
.ac-wind-line:nth-child(3) { animation-delay: 0.6s; }

[data-theme="dark"] .ac-wind-line { background: #666; }

@keyframes ac-wind-sway {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(5deg); }
}

.ac-buttons {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.ac-btn-round {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ac-btn-round:hover { transform: scale(1.1); }
.ac-btn-round:active { transform: scale(0.95); }

.ac-btn-cool { background: #4285f4; }
.ac-btn-power { background: #ea4335; }
.ac-btn-heat { background: #f5a623; }

.ac-btn-cool:hover { box-shadow: 0 4px 12px rgba(66,133,244,0.4); }
.ac-btn-power:hover { box-shadow: 0 4px 12px rgba(234,67,53,0.4); }
.ac-btn-heat:hover { box-shadow: 0 4px 12px rgba(245,166,35,0.4); }

.ac-temp-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ac-btn-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #e0e0e0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #333;
  transition: transform 0.2s, background 0.2s;
}

.ac-btn-arrow:hover { background: #d0d0d0; transform: scale(1.1); }
.ac-btn-arrow:active { transform: scale(0.95); }

[data-theme="dark"] .ac-btn-arrow {
  background: #444;
  color: #eee;
}
[data-theme="dark"] .ac-btn-arrow:hover { background: #555; }
.ld-hero {
  margin-top: 60px;
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
}

.ld-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ld-back {
  align-self: flex-start;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.ld-back:hover { color: #fff; }

.ld-badge {
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
}

.ld-title {
  font-size: 2rem;
  color: #fff;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ld-meta {
  display: flex;
  gap: 20px;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
}
.ld-meta span { display: flex; align-items: center; gap: 6px; }

/* ===== 详情页主体布局 ===== */
.ld-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.ld-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
}

/* ===== 文章正文 ===== */
.ld-article {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: var(--shadow);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-color);
}

.ld-article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ld-article h3::before {
  content: '';
  display: inline-block;
  width: 4px; height: 1em;
  background: var(--primary);
  border-radius: 2px;
}

.ld-article p { margin-bottom: 16px; color: var(--text-muted); }

.ld-article blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--primary);
  background: var(--skill-bg);
  border-radius: 0 10px 10px 0;
  color: var(--text-color);
  font-style: italic;
}

/* ===== 侧边栏 ===== */
.ld-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

.ld-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.ld-sidebar-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ld-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.ld-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.ld-all-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 800px) {
  .ld-layout { grid-template-columns: 1fr; }
  .ld-sidebar { position: static; }
  .ld-title { font-size: 1.5rem; }
  .ld-article { padding: 24px 20px; }
}
