/* 基础样式 */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --text-color: #333;
  --bg-color: #f5f5f5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
}

/* 导航栏样式 */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--primary-color);
  padding: 1rem 0;
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--secondary-color);
}

/* 响应式布局 */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }
}

/* 首页样式 */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

/* 滚动渐变效果 */
section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 关于我页面样式 */
#about {
  padding: 4rem 2rem;
}

#about .content {
  max-width: 800px;
  margin: 0 auto;
}

#about .bio, #about .skills {
  margin-bottom: 2rem;
}

#about h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

#about ul {
  list-style: none;
  padding: 0;
}

#about li {
  background: white;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 作品页面样式 */
#portfolio {
  padding: 4rem 2rem;
  background: white;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.gallery-item p {
  margin-top: 1rem;
  text-align: center;
}

/* 联系页面样式 */
#contact {
  padding: 4rem 2rem;
}

.contact-info {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.social-links {
  margin-top: 2rem;
}

.social-links a {
  display: inline-block;
  margin: 0 1rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.social-links a:hover {
  background: var(--secondary-color);
}
