/* ================================================
   NVIDIA 风格 Hero 区域
   动态粒子 + 霓虹渐变 + 科技网格
   ================================================ */

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

/* ===== Hero 区域 ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(60px + var(--space-12)) var(--space-6) var(--space-12);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 渐变光球 */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.3) 0%, transparent 70%);
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

/* 科技网格背景 */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* ===== Hero 内容 ===== */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--space-6);
  animation: fadeInUp 1s var(--ease-out);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 状态徽章 */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* 主标题 */
.hero-title {
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}

.title-line {
  display: block;
}

/* CTA 按钮组 */
.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-10);
  margin-bottom: var(--space-12);
}

/* ===== GitHub 风格日历卡片 ===== */
.hero-github-card {
  margin-top: var(--space-8);
  padding: var(--space-4) var(--space-5);
  max-width: 650px;
  width: 100%;
}

.github-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.github-card-header svg {
  color: var(--text-tertiary);
}

.github-card-header a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.github-card-header a:hover {
  text-decoration: underline;
}

/* 日历网格 */
.github-calendar-mini {
  overflow-x: auto;
  padding-bottom: var(--space-1);
}

.cal-wrapper {
  display: inline-block;
  min-width: fit-content;
}

.cal-months {
  display: grid;
  grid-template-columns: repeat(20, 13px);
  gap: 3px;
  margin-bottom: var(--space-1);
  padding-left: 0;
}

.cal-month {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(20, 13px);
  grid-template-rows: repeat(7, 13px);
  gap: 3px;
}

.cal-cell {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  transition: transform 0.1s;
}

.cal-cell:hover {
  transform: scale(1.2);
}

.level-0 { background: var(--contrib-0); }
.level-1 { background: var(--contrib-1); }
.level-2 { background: var(--contrib-2); }
.level-3 { background: var(--contrib-3); }
.level-4 { background: var(--contrib-4); }

/* 浅色主题适配 */
[data-theme="light"] .level-0 { background: #ebedf0; }
[data-theme="light"] .level-1 { background: #9be9a8; }
[data-theme="light"] .level-2 { background: #40c463; }
[data-theme="light"] .level-3 { background: #30a14e; }
[data-theme="light"] .level-4 { background: #216e39; }

.github-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-3);
}

.contrib-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* 滚动条样式 */
.github-calendar-mini::-webkit-scrollbar {
  height: 6px;
}

.github-calendar-mini::-webkit-scrollbar-track {
  background: transparent;
}

.github-calendar-mini::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

.github-calendar-mini::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ===== 滚动指示器 ===== */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 24px;
  height: 36px;
  border: 2px solid var(--text-tertiary);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--text-tertiary);
  border-radius: 2px;
  animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(8px); }
}

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: calc(56px + var(--space-10)) var(--space-4) var(--space-10);
  }

  .hero-title {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
    margin-bottom: var(--space-8);
  }

  /* GitHub 日历卡片移动端 */
  .hero-github-card {
    padding: var(--space-3) var(--space-4);
    margin-top: var(--space-6);
    max-width: 100%;
  }

  .github-card-header {
    font-size: 0.75rem;
  }

  .cal-grid {
    grid-template-columns: repeat(20, 11px);
    grid-template-rows: repeat(7, 11px);
    gap: 2px;
  }

  .cal-cell {
    width: 11px;
    height: 11px;
  }

  .cal-months {
    grid-template-columns: repeat(20, 11px);
    gap: 2px;
  }

  .cal-month {
    font-size: 0.5625rem;
  }

  .scroll-indicator {
    display: none;
  }

  .orb-1, .orb-2 {
    width: 300px;
    height: 300px;
  }
}
