/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
.header {
  background-color: var(--bg-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

.logo:hover {
  color: var(--primary-hover);
}

.nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: var(--bg-light);
}

.nav-link.active {
  color: var(--primary-color);
  background-color: #e0f2fe;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
}

/* 主要内容区域 */
.main {
  min-height: calc(100vh - 200px);
}

/* 英雄区域 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 24px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.hero-description {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.8;
}

/* 通用区块 */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text-color);
}

.bg-light {
  background-color: var(--bg-light);
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background-color: var(--bg-color);
  padding: 32px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  display: block;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--text-color);
}

.card-text {
  color: var(--text-light);
  margin-bottom: 16px;
}

.card-link {
  color: var(--primary-color);
  font-weight: 500;
}

/* 内容方向卡片 */
.direction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.direction-card {
  padding: 32px;
  border-radius: 12px;
  transition: transform 0.3s;
}

.direction-card:hover {
  transform: translateY(-4px);
}

.direction-card-ai {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.direction-card-game {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.direction-card-art {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.direction-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}

.direction-text {
  color: var(--text-color);
  line-height: 1.6;
}

/* 联系CTA */
.contact-cta {
  background-color: var(--bg-light);
  padding: 48px;
  border-radius: 12px;
  text-align: center;
}

.contact-cta-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 16px;
}

.contact-cta-text {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 24px;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 页面头部 */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.page-title {
  font-size: 42px;
  font-weight: bold;
}

/* 内容包装器 */
.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.content-section {
  margin-bottom: 48px;
}

.content-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 16px;
  color: var(--text-color);
}

.content-text {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-list {
  list-style: none;
  padding-left: 0;
}

.content-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-light);
}

.content-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* 经历项 */
.experience-item {
  background-color: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.experience-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.experience-meta {
  font-size: 14px;
  color: var(--text-light);
}

/* 技能标签 */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  padding: 8px 16px;
  background-color: #e0f2fe;
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* 联系页面 */
.contact-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.contact-card {
  background-color: var(--bg-color);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.contact-item {
  margin-bottom: 32px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}

.contact-item-text {
  color: var(--text-light);
  line-height: 1.8;
}

.notice-box {
  background-color: var(--bg-light);
  padding: 24px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.notice-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.notice-text {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

/* 随笔列表 */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-card {
  background-color: var(--bg-color);
  padding: 32px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.blog-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  align-items: center;
}

.blog-category {
  padding: 4px 12px;
  background-color: #e0f2fe;
  color: var(--primary-color);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.blog-date {
  font-size: 14px;
  color: var(--text-light);
}

.blog-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--text-color);
}

.blog-excerpt {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.blog-link {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.blog-link:hover {
  text-decoration: underline;
}

/* 作品网格 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background-color: var(--bg-color);
  padding: 32px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.project-meta {
  margin-bottom: 12px;
}

.project-category {
  padding: 4px 12px;
  background-color: #e0f2fe;
  color: var(--primary-color);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.project-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--text-color);
}

.project-description {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tech-tag {
  padding: 4px 12px;
  background-color: var(--bg-light);
  color: var(--text-color);
  border-radius: 12px;
  font-size: 12px;
}

.project-link {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-text {
  color: var(--text-light);
  font-size: 18px;
}

/* 页脚 */
.footer {
  background-color: #1f2937;
  color: white;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
}

.footer-text {
  display: flex;
  align-items: center;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-text .logo {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.footer-text a {
  color: #9ca3af;
  text-decoration: none;
}

.footer-text a:hover {
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
  }

  .nav.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .hero-description {
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .direction-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 24px;
  }

  .page-title {
    font-size: 32px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 60px 0;
  }

  .section {
    padding: 40px 0;
  }

  .card {
    padding: 24px;
  }
}
