/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  background: #0D0D0F;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Hero 首页 ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(131,135,231,0.08) 0%, transparent 50%);
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  max-width: 800px;
}
.hero h1 {
  font-size: 3.5em;
  font-weight: 800;
  margin: 0.5em 0;
  line-height: 1.3;
}
.hero h2 {
  font-size: 1.6em;
  font-weight: 600;
  margin: 0.5em 0;
  color: #a0a0ff;
}
.hero p {
  font-size: 1.05em;
  margin: 0.6em 0;
  color: #ccc;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5em 0;
  gap: 8px;
}
.tag {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(160,160,255,0.2);
  color: #ddd;
  padding: 0.5em 1.2em;
  border-radius: 50px;
  font-size: 0.85em;
  transition: all 0.3s;
}
.tag:hover {
  background: rgba(160,160,255,0.15);
  border-color: #a0a0ff;
  color: #fff;
}
.btn-primary {
  display: inline-block;
  background: #8387E7;
  color: #fff;
  padding: 0.8em 2.5em;
  border-radius: 50px;
  font-size: 1em;
  margin-top: 1.5em;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: #6A72FA;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(131,135,231,0.4);
}

/* ===== Navbar 导航 ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(28,28,32,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transform: translateY(-100%);
  transition: transform 0.3s;
}
#navbar.show { transform: translateY(0); }
.nav-logo {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
#navbar nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}
#navbar nav ul li a {
  color: #aaa;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.2s;
}
#navbar nav ul li a:hover { color: #fff; }
.nav-btn {
  background: #8387E7;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.nav-btn:hover { background: #6A72FA; }

/* ===== Work 作品 ===== */
.work-section {
  padding: 100px 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.work-header {
  margin-bottom: 48px;
}
.work-header h2 {
  font-size: 2.2em;
  font-weight: 800;
  margin-bottom: 8px;
}
.work-header p {
  color: #888;
  font-size: 0.95em;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Product Card */
.product-card {
  background: #1a1a24;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.05);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(131,135,231,0.3);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.product-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #111;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}
.placeholder-ai-skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2450 50%, #16213e 100%);
}
.placeholder-icon {
  font-size: 3em;
  filter: drop-shadow(0 4px 12px rgba(131,135,231,0.4));
}
.placeholder-label {
  color: #a0a0ff;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.product-info {
  padding: 20px 24px 24px;
}
.product-info .category {
  font-size: 0.8em;
  color: #8387E7;
  margin-bottom: 8px;
  font-weight: 600;
}
.product-info h3 {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 8px;
}
.product-info p {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 16px;
}
.view-link {
  color: #8387E7;
  font-size: 0.85em;
  cursor: pointer;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.tools button {
  background: rgba(131,135,231,0.12);
  border: 1px solid rgba(131,135,231,0.2);
  color: #a0a0ff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75em;
  cursor: default;
  transition: all 0.2s;
}
.tools button:hover {
  background: rgba(131,135,231,0.2);
  color: #fff;
}

/* ===== Skills 技能 ===== */
.skills-section {
  padding: 80px 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.skills-section h2 {
  font-size: 2.2em;
  font-weight: 800;
  margin-bottom: 48px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-card {
  background: #1a1a24;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid rgba(255,255,255,0.05);
}
.skill-card h3 {
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #8387E7;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-tags span {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #ccc;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8em;
  transition: all 0.2s;
}
.skill-tags span:hover {
  background: rgba(131,135,231,0.15);
  border-color: rgba(131,135,231,0.3);
  color: #fff;
}

/* ===== About 关于 ===== */
.about-section {
  padding: 80px 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.about-section h2 {
  font-size: 2.2em;
  font-weight: 800;
  margin-bottom: 48px;
}
.about-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}
.about-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 24px;
  background: #1a1a24;
  border-radius: 10px;
  border-left: 3px solid #8387E7;
}
.about-label {
  font-size: 0.8em;
  color: #8387E7;
  font-weight: 600;
  min-width: 50px;
}
.about-value {
  font-size: 0.95em;
  color: #ccc;
}
.about-bio {
  padding: 32px;
  background: #1a1a24;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}
.about-bio p {
  font-size: 0.95em;
  color: #aaa;
  line-height: 2;
  margin-bottom: 16px;
}

/* ===== Contact 联系 ===== */
.contact-section {
  padding: 100px 24px 80px;
  text-align: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}
.contact-section h2 {
  font-size: 2.2em;
  font-weight: 800;
  margin-bottom: 32px;
}
.contact-name {
  font-size: 2.5em;
  font-weight: 800;
  margin-bottom: 8px;
}
.contact-role {
  font-size: 1.2em;
  color: #8387E7;
  margin-bottom: 32px;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.contact-links a, .contact-links span {
  color: #aaa;
  font-size: 1em;
  transition: color 0.2s;
}
.contact-links a:hover { color: #8387E7; }

/* ===== Footer ===== */
footer {
  padding: 32px 24px;
  text-align: center;
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.05);
}
footer p {
  font-size: 0.8em;
  color: #555;
}

/* ===== Modal 项目详情弹窗 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 60px 24px;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: #1a1a24;
  border-radius: 16px;
  max-width: 1000px;
  width: 100%;
  padding: 48px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }

/* Modal 内项目详情 */
.modal-content h2 {
  font-size: 2em;
  margin-bottom: 8px;
}
.modal-content .modal-cat {
  color: #8387E7;
  font-size: 0.9em;
  margin-bottom: 24px;
}
.modal-content .modal-desc {
  color: #aaa;
  font-size: 0.95em;
  line-height: 2;
  margin-bottom: 32px;
}
.modal-content .modal-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.modal-content .modal-info .info-row {
  display: flex;
  gap: 12px;
  font-size: 0.9em;
}
.modal-content .modal-info .info-row strong {
  color: #8387E7;
  min-width: 60px;
}
.modal-content .modal-info .info-row span {
  color: #ccc;
}
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.modal-gallery.three {
  grid-template-columns: repeat(3, 1fr);
}
.modal-gallery img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}
.modal-gallery img:hover { transform: scale(1.02); }
.modal-gallery-full {
  margin-bottom: 16px;
}
.modal-gallery-full img {
  width: 100%;
  border-radius: 8px;
}
.modal-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.highlight-card {
  background: #111;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid rgba(131,135,231,0.15);
}
.highlight-card h4 {
  color: #8387E7;
  font-size: 0.95em;
  font-weight: 700;
  margin-bottom: 8px;
}
.highlight-card p {
  color: #aaa;
  font-size: 0.85em;
  line-height: 1.6;
}
.modal-videos {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}
.modal-video-item {
  background: #111;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.modal-video-label {
  color: #8387E7;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 12px;
}
.modal-video-item video {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2em; }
  .hero h2 { font-size: 1.2em; }
  #navbar { padding: 12px 16px; }
  #navbar nav ul { gap: 4px; }
  #navbar nav ul li a { padding: 6px 10px; font-size: 12px; }
  .work-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .modal-content { padding: 32px 20px; }
  .modal-gallery { grid-template-columns: 1fr; }
  .modal-gallery.three { grid-template-columns: 1fr; }
  .modal-highlights { grid-template-columns: 1fr; }
  .about-item { flex-direction: column; gap: 4px; }
}
