/* 林海鹏 · 个人主页 - 炫酷版 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-alt: #12121a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --text: #f0f0f5;
  --text-muted: #8888a0;
  --accent: #00d4aa;
  --accent-glow: rgba(0, 212, 170, 0.4);
  --accent-alt: #7c3aed;
  --gradient: linear-gradient(135deg, #00d4aa 0%, #7c3aed 100%);
  --font: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 动态背景 */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 布局 */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 导航 */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  z-index: 100;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(0, 212, 170, 0.2);
  margin-bottom: 1.5rem;
}

.hero-name {
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.name-char {
  display: inline-block;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: charFadeIn 0.8s ease backwards;
}

.name-char:nth-child(1) { animation-delay: 0.1s; }
.name-char:nth-child(2) { animation-delay: 0.2s; }
.name-char:nth-child(3) { animation-delay: 0.3s; }

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

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  min-height: 2em;
}

.cursor {
  animation: blink 1s infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 0.9rem 2rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 30px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

/* 通用区块 */
.section {
  padding: 6rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0.7;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
}

/* 关于 */
.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s;
}

.about-card:hover {
  background: var(--surface-hover);
  transform: translateY(-5px);
  border-color: rgba(0, 212, 170, 0.2);
}

.about-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 项目 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-alt);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-cover {
  height: 180px;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: var(--surface);
  border-radius: 100px;
  color: var(--accent);
}

/* 技能 */
.skills-wrapper {
  overflow: hidden;
}

.skills-track {
  display: flex;
  gap: 1rem;
  animation: scroll 20s linear infinite;
}

.skills-wrapper:hover .skills-track {
  animation-play-state: paused;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.skill-item {
  flex-shrink: 0;
  padding: 0.8rem 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s;
}

.skill-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 联系 */
.contact {
  text-align: center;
}

.contact-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s;
}

.contact-link:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateX(5px);
}

.contact-icon {
  font-size: 1.5rem;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--accent);
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .section {
    padding: 4rem 0;
  }
}