/* ============================================================
   layout.css · 页面骨架 / 导航 / Hero / 区块 / 响应式
   ============================================================ */

/* ---------- 背景层 ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6vw;
  background: rgba(6, 8, 15, 0.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, padding 0.4s;
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  padding: 10px 6vw;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--neon-2));
  transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--neon); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.burger { display: none; cursor: pointer; }
.burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--neon);
  margin: 5px 0;
  transition: 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 6vw;
  overflow: hidden;
}

.hero-content { max-width: 860px; position: relative; z-index: 2; }

.hero-greet {
  font-family: var(--font-mono);
  color: var(--neon);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  background: linear-gradient(120deg, #fff 20%, var(--neon) 55%, var(--neon-2));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.hero-typing {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text);
  margin-top: 20px;
  min-height: 1.6em;
}
.cursor {
  color: var(--neon);
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 3px;
  z-index: 2;
}
.mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--text-dim);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}
.wheel {
  width: 3px; height: 7px;
  background: var(--neon);
  border-radius: 2px;
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- 通用 Section ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 110px 6vw;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #fff;
  margin-bottom: 56px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.section-title.center { justify-content: center; }
.section-title.center::after { display: none; }
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 20px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.index {
  font-family: var(--font-mono);
  font-size: 0.55em;
  color: var(--neon);
}

/* ---------- 关于我 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text p {
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 16px;
}
.about-text strong { color: var(--neon); }
.about-text em { font-style: normal; color: var(--neon-2); font-weight: 700; }
.about-text code {
  font-family: var(--font-mono);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--neon);
  font-size: 0.88em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

/* ---------- 技能 / 作品 网格 ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

/* ---------- 联络 ---------- */
.contact { text-align: center; padding-bottom: 140px; }
.contact-text {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  line-height: 2.1;
  margin-bottom: 10px;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px 50px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 2;
}
.footer-sub { font-size: 0.75rem; opacity: 0.7; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .burger { display: block; }
  .nav-links {
    position: fixed;
    top: 60px; right: -100%;
    flex-direction: column;
    background: rgba(6, 8, 15, 0.96);
    backdrop-filter: blur(18px);
    width: 70%;
    height: 100vh;
    padding: 50px 40px;
    gap: 28px;
    transition: right 0.4s var(--ease-out);
    border-left: 1px solid var(--border);
  }
  .nav-links.open { right: 0; }
}
