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

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-bg: #eef2ff;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 8px 32px rgba(79, 70, 229, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

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

/* ===== Hero ===== */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-greeting {
  font-size: 18px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.highlight {
  color: var(--primary);
  position: relative;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-2px);
}

/* ===== Code Window ===== */
.code-window {
  background: #1e1e2e;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #2a2a3e;
}

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

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.code-body {
  padding: 24px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-body code { display: block; }

.c-keyword { color: #c792ea; }
.c-pkg     { color: #82aaff; }
.c-fn      { color: #82aaff; }
.c-str     { color: #c3e88d; }

/* ===== Section Common ===== */
.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text);
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ===== About ===== */
.about {
  padding: 80px 0;
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card {
  padding: 32px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s;
}

.about-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.about-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ===== Skills ===== */
.skills {
  padding: 80px 0;
  background: var(--bg-alt);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.skill-tag {
  padding: 10px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
  cursor: default;
}

.skill-tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* ===== Projects ===== */
.projects {
  padding: 80px 0;
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  padding: 28px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.project-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.project-header {
  margin-bottom: 16px;
}

.project-lang {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.project-lang.go  { background: #e0f2fe; color: #0369a1; }
.project-lang.ts  { background: #ede9fe; color: #5b21b6; }
.project-lang.web { background: #dcfce7; color: #15803d; }

.project-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.project-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tags span {
  padding: 3px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* ===== Footer ===== */
.footer {
  padding: 28px 0;
  background: var(--text);
  color: #94a3b8;
  text-align: center;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-copy {
  font-size: 14px;
}

.footer-beian {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-beian a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-beian a:hover {
  color: #e2e8f0;
}

.beian-divider {
  color: #475569;
}

.beian-gongan {
  display: flex;
  align-items: center;
  gap: 6px;
}

.beian-icon {
  width: 16px;
  height: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-code {
    display: none;
  }

  .about-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}
