/* 基础设置 */
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  color: #f0f0f0;
  background-color: #0a0a0a;
  overflow-x: hidden;
}

canvas#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
}

/* 导航 */
header {
  background: rgba(17,17,17,0.85);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 { margin-left: 20px; color: #00ffff; }
header nav { margin-right: 20px; }
header nav a { margin-left: 15px; color: #00ffff; text-decoration: none; font-weight: 500; }
header nav button {
  margin-left: 15px;
  background: none;
  border: none;
  color: #00ffff;
  cursor: pointer;
  font-size: 1rem;
}

/* 英雄区 */
.hero {
  height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  padding-top: 60px;
}
.hero h2 { font-size: 2.5rem; margin-bottom: 10px; }
.hero p { font-size: 1.2rem; margin-bottom: 20px; }
.btn {
  background: #00ffff;
  color: #000;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
}
.btn:hover { background: #00aaaa; }

/* Section 样式 */
.section { padding: 80px 0; text-align: center; }
.skills-grid, .projects-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.skill {
  background: rgba(17,17,17,0.9);
  border: 1px solid #00ffff;
  padding: 15px 25px;
  border-radius: 8px;
  transition: 0.3s;
}
.skill:hover { transform: scale(1.1); }

.project-card {
  perspective: 1000px;
  width: 280px;
  height: 180px;
  margin: 10px;
}
.project-card .card-front, .project-card .card-back {
  background: rgba(17,17,17,0.9);
  border: 1px solid #00ffff;
  border-radius: 10px;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden;
  position: absolute;
  transition: transform 0.6s;
  padding: 15px;
  box-sizing: border-box;
}
.project-card .card-back { transform: rotateY(180deg); }
.project-card:hover .card-front { transform: rotateY(180deg); }
.project-card:hover .card-back { transform: rotateY(0deg); }

/* Footer */
footer { text-align: center; padding: 15px 0; border-top: 1px solid #00ffff; }

/* 响应式 */
@media(max-width:768px) {
  .skills-grid, .projects-grid { flex-direction: column; }
}
