/**
 * hero.css - Hero 区域、头像、浮动装饰
 * NEGIAO.github.io 模块化 CSS
 */

/* ========================
   Section Hero
   ======================== */
.section--hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

.section--hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
}

.section--hero::after {
  content: '';
  position: absolute;
  width: min(40vw, 600px);
  height: min(40vw, 600px);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%),
    linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
  border: 2px solid rgba(0, 217, 255, 0.15);
  top: -10%;
  right: -10%;
  z-index: -1;
  animation: heroFloat 20s infinite alternate ease-in-out;
  backdrop-filter: blur(1px);
}

@keyframes heroFloat {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(-3%, 2%) rotate(2deg) scale(1.05);
  }
  66% {
    transform: translate(2%, -3%) rotate(-1deg) scale(0.95);
  }
  100% {
    transform: translate(-1%, 1%) rotate(1deg) scale(1.02);
  }
}

/* ========================
   Hero Content
   ======================== */
.hero {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 8px rgba(0, 217, 255, 0.3));
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

/* ========================
   Avatar with Modern Design
   ======================== */
.avatar-container {
  position: relative;
  width: var(--dynamic-avatar-container, 200px);
  height: var(--dynamic-avatar-container, 200px);
  margin: var(--space-lg) auto var(--space-2xl);
}

.avatar {
  width: var(--dynamic-avatar, 180px);
  height: var(--dynamic-avatar, 180px);
  border-radius: 50%;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--surface-elevated), var(--surface-elevated)) padding-box,
    var(--gradient-primary) border-box;
  display: block;
  transition: all var(--transition-slow);
  box-shadow:
    var(--shadow-xl),
    0 0 40px rgba(0, 217, 255, 0.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  will-change: transform;
  object-fit: cover;
}

.avatar:hover {
  transform: translate(-50%, -50%) scale(1.08) rotate(2deg);
  box-shadow:
    var(--shadow-2xl),
    0 0 60px rgba(0, 217, 255, 0.4);
  border-color: var(--primary-light);
}

.avatar-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  filter: blur(20px);
  opacity: 0.2;
  z-index: 1;
  animation: avatarPulse 4s infinite alternate ease-in-out;
}

.avatar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--primary), var(--accent-secondary), var(--accent), var(--primary));
  z-index: 2;
  animation: rotate 15s linear infinite;
  opacity: 0.6;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--surface-elevated);
}

@keyframes avatarPulse {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.3);
    opacity: 0.35;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========================
   Tech Badges Container
   ======================== */
.hero-tech-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================
   Floating Shapes
   ======================== */
.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(40px);
}

.shape-1 {
  width: 300px;
  height: 300px;
  background-color: var(--primary);
  top: 20%;
  left: -100px;
  animation: float-1 25s infinite alternate ease-in-out;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background-color: var(--accent);
  bottom: 10%;
  right: -50px;
  animation: float-2 20s infinite alternate-reverse ease-in-out;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background-color: var(--success);
  top: 60%;
  left: 20%;
  animation: float-3 15s infinite alternate ease-in-out;
}

@keyframes float-1 {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(50px, 50px) rotate(15deg);
  }
}

@keyframes float-2 {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(-30px, -30px) rotate(-15deg);
  }
}

@keyframes float-3 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(20px, -20px) scale(1.2);
  }
}

/* ========================
   Light Theme Overrides
   ======================== */
body[data-theme='light'] .section--hero {
  background: var(--background);
}

body[data-theme='light'] .section--hero::before {
  opacity: 0.6;
}

body[data-theme='light'] .section--hero::before {
  opacity: 0.5;
}

body[data-theme='light'] .section--hero::after {
  border-color: rgba(37, 99, 235, 0.08);
  background:
    radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(13, 148, 136, 0.02) 100%);
}

body[data-theme='light'] .avatar {
  border: 3px solid #FFFFFF;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

body[data-theme='light'] .avatar:hover {
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.12),
    0 0 0 2px rgba(37, 99, 235, 0.2);
}

body[data-theme='light'] .avatar-glow {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  opacity: 0.4;
}

body[data-theme='light'] .avatar-ring {
  opacity: 0.3;
}

body[data-theme='light'] .floating-shapes .shape {
  opacity: 0.04;
  filter: blur(80px);
}

body[data-theme='light'] .shape-1 {
  background-color: rgba(37, 99, 235, 0.2);
}

body[data-theme='light'] .shape-2 {
  background-color: rgba(239, 68, 68, 0.15);
}

body[data-theme='light'] .shape-3 {
  background-color: rgba(22, 163, 74, 0.15);
}

body[data-theme='light'] .hero__title {
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.1));
}

body[data-theme='light'] .hero__subtitle {
  color: var(--text-secondary);
  margin-bottom: 0; /* 或者 8px / 12px，根据需要微调 */
  display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.35rem auto 0.45rem;
    line-height: 1;
    max-width: min(435px, 100%);
    min-height: 0;
}
