/* ========================================
   摸鱼塔 Landing Page
   ======================================== */

/* CSS Variables */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border-color: #30363d;
  --text-primary: #f0f6fc;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --accent-blue: #58a6ff;
  --accent-green: #3fb950;
  --accent-purple: #a371f7;
  --accent-cyan: #39d353;
  --glow-color: rgba(88, 166, 255, 0.15);
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 粒子画布 */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* CRT 扫描线效果 */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  animation: scanline 8s linear infinite;
}

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* Logo 文字 */
.logo-text {
  display: inline-flex;
}

.logo-text .char {
  display: inline-block;
  transition: all 0.3s ease;
}

/* 发射时文字消散动画 */
.logo.launching .logo-text .char,
.logo.flying .logo-text .char {
  animation: char-dissolve 0.8s ease-out forwards;
}

.logo.launching .logo-text .char-1,
.logo.flying .logo-text .char-1 {
  animation-delay: 0s;
  --dx: 15px;
  --dy: -20px;
  --rotate: 25deg;
}

.logo.launching .logo-text .char-2,
.logo.flying .logo-text .char-2 {
  animation-delay: 0.1s;
  --dx: 5px;
  --dy: 25px;
  --rotate: -30deg;
}

.logo.launching .logo-text .char-3,
.logo.flying .logo-text .char-3 {
  animation-delay: 0.2s;
  --dx: -10px;
  --dy: -15px;
  --rotate: 45deg;
}

@keyframes char-dissolve {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
    filter: blur(0);
  }
  30% {
    opacity: 0.8;
    transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) rotate(calc(var(--rotate) * 0.3)) scale(0.9);
    filter: blur(1px);
  }
  70% {
    opacity: 0.3;
    transform: translate(calc(var(--dx) * 0.8), calc(var(--dy) * 0.8)) rotate(calc(var(--rotate) * 0.8)) scale(0.5);
    filter: blur(3px);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rotate)) scale(0);
    filter: blur(5px);
  }
}

/* 降落时文字聚合动画 */
.logo.landing .logo-text .char {
  animation: char-assemble 1.2s ease-out forwards;
  opacity: 0;
}

.logo.landing .logo-text .char-1 {
  animation-delay: 1s;
  --dx: -20px;
  --dy: 30px;
  --rotate: -35deg;
}

.logo.landing .logo-text .char-2 {
  animation-delay: 1.1s;
  --dx: 25px;
  --dy: -20px;
  --rotate: 40deg;
}

.logo.landing .logo-text .char-3 {
  animation-delay: 1.2s;
  --dx: -15px;
  --dy: -25px;
  --rotate: -50deg;
}

@keyframes char-assemble {
  0% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rotate)) scale(0);
    filter: blur(5px);
  }
  30% {
    opacity: 0.3;
    transform: translate(calc(var(--dx) * 0.7), calc(var(--dy) * 0.7)) rotate(calc(var(--rotate) * 0.7)) scale(0.5);
    filter: blur(3px);
  }
  70% {
    opacity: 0.8;
    transform: translate(calc(var(--dx) * 0.2), calc(var(--dy) * 0.2)) rotate(calc(var(--rotate) * 0.2)) scale(0.95);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
    filter: blur(0);
  }
}

/* 火箭容器 */
.logo-icon.rocket-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: visible;
}

.rocket {
  display: inline-block;
  transition: transform 0.3s ease;
  animation: rocket-idle 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
  transform: rotate(-45deg);
}

/* 火箭待机时的浮动动画 */
@keyframes rocket-idle {
  0%, 100% {
    transform: rotate(-45deg) translateY(0);
  }
  50% {
    transform: rotate(-45deg) translateY(-3px);
  }
}

/* 烟尘爆炸效果容器 */
.rocket-flame {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* 烟尘粒子 */
.smoke {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(200,200,200,0.6) 40%, rgba(150,150,150,0.2) 70%, transparent 100%);
  opacity: 0;
  filter: blur(2px);
}

.smoke-1 {
  width: 20px;
  height: 20px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.smoke-2 {
  width: 16px;
  height: 16px;
  left: 30%;
  top: 60%;
}

.smoke-3 {
  width: 14px;
  height: 14px;
  left: 70%;
  top: 55%;
}

.smoke-4 {
  width: 18px;
  height: 18px;
  left: 40%;
  top: 70%;
}

.smoke-5 {
  width: 12px;
  height: 12px;
  left: 60%;
  top: 75%;
}

/* 发射状态 */
.logo.launching .rocket {
  animation: rocket-launch 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.logo.launching .rocket-flame {
  opacity: 1;
}

.logo.launching .smoke {
  animation: smoke-burst 1s ease-out forwards;
}

.logo.launching .smoke-1 {
  animation-delay: 0s;
}
.logo.launching .smoke-2 {
  animation-delay: 0.05s;
}
.logo.launching .smoke-3 {
  animation-delay: 0.1s;
}
.logo.launching .smoke-4 {
  animation-delay: 0.15s;
}
.logo.launching .smoke-5 {
  animation-delay: 0.2s;
}

@keyframes smoke-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  40% {
    opacity: 0.8;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 10px))) scale(1.5);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 30px))) scale(2);
  }
}

.smoke-1 { --dx: 0px; --dy: 15px; }
.smoke-2 { --dx: -15px; --dy: 20px; }
.smoke-3 { --dx: 15px; --dy: 18px; }
.smoke-4 { --dx: -8px; --dy: 25px; }
.smoke-5 { --dx: 10px; --dy: 22px; }

/* 火箭发射动画 - 垂直起飞 */
@keyframes rocket-launch {
  0% {
    transform: rotate(-45deg) translate(0, 0);
    opacity: 1;
  }
  /* 起飞准备 - 轻微下沉蓄力 */
  8% {
    transform: rotate(-45deg) translate(-3px, 3px);
    opacity: 1;
  }
  /* 开始加速升空 */
  20% {
    transform: rotate(-45deg) translate(20px, -20px);
    opacity: 1;
  }
  /* 快速加速 */
  40% {
    transform: rotate(-45deg) translate(85px, -85px);
    opacity: 1;
  }
  /* 高速上升 */
  60% {
    transform: rotate(-45deg) translate(200px, -200px);
    opacity: 0.9;
  }
  /* 消失在天空 */
  80% {
    transform: rotate(-45deg) translate(350px, -350px);
    opacity: 0.5;
  }
  100% {
    transform: rotate(-45deg) translate(500px, -500px);
    opacity: 0;
  }
}

/* 飞行状态 - 保持隐藏 */
.logo.flying .rocket {
  transform: rotate(-45deg) translate(500px, -500px);
  opacity: 0;
  animation: none;
}

/* 降落状态 */
.logo.landing .rocket {
  animation: rocket-land 2s cubic-bezier(0.2, 0, 0.4, 1) forwards;
}

.logo.landing .rocket-flame {
  opacity: 1;
}

.logo.landing .smoke {
  animation: smoke-land 0.8s ease-out forwards;
  animation-delay: 1.6s;
}

@keyframes smoke-land {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  30% {
    opacity: 0.8;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.5), calc(-50% + var(--dy, 5px) * 0.3)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 15px))) scale(1.5);
  }
}

/* 火箭降落动画 - 垂直降落 */
@keyframes rocket-land {
  0% {
    transform: rotate(-45deg) translate(500px, -500px);
    opacity: 0;
  }
  /* 从高空出现 */
  10% {
    transform: rotate(-45deg) translate(420px, -420px);
    opacity: 0.3;
  }
  /* 开始减速 */
  25% {
    transform: rotate(-45deg) translate(300px, -300px);
    opacity: 0.6;
  }
  /* 持续减速 */
  45% {
    transform: rotate(-45deg) translate(170px, -170px);
    opacity: 0.9;
  }
  /* 进一步减速 */
  65% {
    transform: rotate(-45deg) translate(70px, -70px);
    opacity: 1;
  }
  /* 最后接近 */
  85% {
    transform: rotate(-45deg) translate(15px, -15px);
    opacity: 1;
  }
  /* 轻微反弹 */
  92% {
    transform: rotate(-45deg) translate(-3px, 3px);
    opacity: 1;
  }
  /* 稳定着陆 */
  100% {
    transform: rotate(-45deg) translate(0, 0);
    opacity: 1;
  }
}

/* 悬浮预热效果 */
.logo:hover:not(.launching):not(.landing) .rocket-flame {
  opacity: 0.7;
}

.logo:hover:not(.launching):not(.landing) .smoke {
  animation: smoke-preheat 0.5s ease-in-out infinite;
}

.logo:hover:not(.launching):not(.landing) .smoke-1 { animation-delay: 0s; }
.logo:hover:not(.launching):not(.landing) .smoke-2 { animation-delay: 0.1s; }
.logo:hover:not(.launching):not(.landing) .smoke-3 { animation-delay: 0.2s; }
.logo:hover:not(.launching):not(.landing) .smoke-4 { animation-delay: 0.3s; }
.logo:hover:not(.launching):not(.landing) .smoke-5 { animation-delay: 0.4s; }

@keyframes smoke-preheat {
  0%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, calc(-50% + 5px)) scale(0.8);
  }
}

.logo:hover:not(.launching):not(.landing) .rocket {
  animation: rocket-shake 0.15s ease-in-out infinite;
}

@keyframes rocket-shake {
  0%, 100% {
    transform: rotate(-45deg) translateY(0);
  }
  25% {
    transform: rotate(-43deg) translateY(-1px) translateX(1px);
  }
  75% {
    transform: rotate(-47deg) translateY(1px) translateX(-1px);
  }
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link .icon {
  width: 16px;
  height: 16px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--accent-blue);
  color: var(--bg-primary);
}

.lang-divider {
  color: var(--border-color);
  font-size: 12px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 0 80px;
}

.hero-content {
  text-align: center;
}

/* Glitch 效果标题 */
.hero-title {
  font-size: clamp(48px, 12vw, 96px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  position: relative;
  animation: glitch-skew 4s infinite linear alternate-reverse;
}

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-title::before {
  color: var(--accent-cyan);
  animation: glitch-1 2s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.hero-title::after {
  color: var(--accent-purple);
  animation: glitch-2 3s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(2px, -2px);
  }
  40% {
    transform: translate(2px, 2px);
  }
  60% {
    transform: translate(-2px, -2px);
  }
  80% {
    transform: translate(-2px, 2px);
  }
}

@keyframes glitch-skew {
  0%,
  100% {
    transform: skew(0deg);
  }
  20% {
    transform: skew(0.5deg);
  }
  40% {
    transform: skew(-0.5deg);
  }
  60% {
    transform: skew(0.3deg);
  }
  80% {
    transform: skew(-0.3deg);
  }
}

/* 打字机效果 */
.hero-subtitle {
  font-size: clamp(18px, 4vw, 28px);
  color: var(--accent-blue);
  font-family: "SF Mono", "Fira Code", monospace;
  margin-top: 8px;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent-blue);
  animation: typing 2s steps(6) forwards, blink 0.8s step-end infinite;
  width: 0;
  display: inline-block;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 6ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.hero-desc {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
}

.tag:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  box-shadow: 0 0 20px var(--glow-color);
}

.tag-separator {
  color: var(--text-muted);
}

.hero-motto {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 个人信息区域 */
.hero-info {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 8px 16px;
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.info-item:hover {
  border-color: var(--accent-blue);
  color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.1);
}

.info-item.slogan {
  background: linear-gradient(
    135deg,
    rgba(163, 113, 247, 0.1),
    rgba(88, 166, 255, 0.1)
  );
  border-color: rgba(163, 113, 247, 0.3);
}

/* Slogan 打字机效果 */
.slogan-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent-purple);
  animation: slogan-typing 2s steps(12) forwards,
    slogan-cursor-hide 0s 2s forwards;
  width: 0;
}

@keyframes slogan-typing {
  from {
    width: 0;
  }
  to {
    width: 12em;
  }
}

@keyframes slogan-cursor-hide {
  to {
    border-color: transparent;
  }
}

.info-item.slogan:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 4px 20px rgba(163, 113, 247, 0.2);
}

.info-item.slogan .info-icon {
  color: var(--accent-purple);
}

.info-item.location .info-icon {
  color: var(--accent-green);
}

.info-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.info-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.info-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.info-link:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.15);
}

.info-link .info-icon {
  width: 16px;
  height: 16px;
}

/* 像素装饰 */
.hero-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.pixel-art {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  opacity: 0.3;
  animation: pixel-float 6s ease-in-out infinite;
}

.pixel-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.pixel-2 {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
  background: var(--accent-purple);
}

.pixel-3 {
  bottom: 30%;
  left: 20%;
  animation-delay: 4s;
  background: var(--accent-green);
}

@keyframes pixel-float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.3;
  }
  25% {
    transform: translate(10px, -20px) rotate(90deg);
    opacity: 0.6;
  }
  50% {
    transform: translate(-5px, -40px) rotate(180deg);
    opacity: 0.3;
  }
  75% {
    transform: translate(15px, -20px) rotate(270deg);
    opacity: 0.6;
  }
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: rotate(45deg) translate(0, 0);
    opacity: 0.5;
  }
  50% {
    transform: rotate(45deg) translate(5px, 5px);
    opacity: 1;
  }
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
  padding: 100px 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 60px;
  font-weight: 600;
}

.title-decorator {
  color: var(--accent-blue);
  font-family: "SF Mono", monospace;
}

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

/* 项目卡片 */
.project-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(30px);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-blue);
}

/* 卡片发光效果 */
.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-blue),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .card-glow {
  opacity: 1;
  animation: glow-scan 2s linear infinite;
}

@keyframes glow-scan {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* 卡片角落装饰 */
.card-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent-blue);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .card-corner {
  opacity: 1;
}

.card-corner.tl {
  top: 8px;
  left: 8px;
  border-width: 2px 0 0 2px;
}
.card-corner.tr {
  top: 8px;
  right: 8px;
  border-width: 2px 2px 0 0;
}
.card-corner.bl {
  bottom: 8px;
  left: 8px;
  border-width: 0 0 2px 2px;
}
.card-corner.br {
  bottom: 8px;
  right: 8px;
  border-width: 0 2px 2px 0;
}

.card-content {
  padding: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 8px;
  color: var(--accent-blue);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-icon.dim {
  color: var(--text-muted);
}

.card-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--bg-primary);
  background: var(--accent-green);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(63, 185, 80, 0);
  }
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-title.dim {
  color: var(--text-muted);
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-family: "SF Mono", monospace;
  margin-bottom: 12px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-desc.dim {
  color: var(--text-muted);
}

/* 特性标签 */
.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.feature:hover {
  color: var(--text-primary);
  background: var(--bg-primary);
}

.feature-icon {
  font-size: 12px;
}

/* 元信息 */
.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lang-dot.go {
  background: #00add8;
}

.version {
  font-family: "SF Mono", monospace;
  color: var(--accent-blue);
}

/* 按钮 */
.card-actions {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent-blue);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #79b8ff;
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-primary);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

/* Coming Soon 卡片 */
.coming-soon {
  border-style: dashed;
}

.coming-soon .card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
}

/* 加载进度条 */
.loading-bar {
  width: 120px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 16px;
}

.loading-progress {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 2px;
  animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-icon {
  animation: float 3s ease-in-out infinite;
}

.footer-separator {
  color: var(--border-color);
}

.footer-quote {
  font-style: italic;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .hero-title {
    letter-spacing: 0.05em;
  }

  .hero-desc {
    flex-direction: column;
    gap: 8px;
  }

  .tag-separator {
    display: none;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .nav {
    gap: 16px;
  }

  .footer-text {
    flex-direction: column;
    gap: 8px;
  }

  .footer-separator {
    display: none;
  }
}

/* 减少动画 - 尊重用户偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
