* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: #333; line-height: 1.8; background: #fafafa; }
a { color: inherit; text-decoration: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid #eee; padding: 0 40px; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-brand { font-size: 20px; font-weight: 700; color: #333; }
.nav-links { display: flex; gap: 8px; }
.nav-links a { padding: 8px 16px; color: #555; border-radius: 6px; font-size: 14px; transition: all 0.2s; }
.nav-links a:hover, .nav-links a.active { background: #f0f0f0; color: #333; }

/* Hero */
.hero { text-align: center; padding: 16px 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero h1 { font-size: 36px; margin-bottom: 12px; }
.hero p { font-size: 16px; opacity: 0.9; max-width: 600px; margin: 0 auto; }
.hero-sub { font-size: 14px; opacity: 0.7; margin-top: 8px; }

/* Section */
.section { max-width: 1200px; margin: 0 auto; padding: 60px 40px; }
.section-title { font-size: 28px; font-weight: 700; margin-bottom: 40px; text-align: center; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: linear-gradient(135deg, #667eea, #764ba2); margin: 12px auto 0; border-radius: 2px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about-text p { margin-bottom: 16px; color: #555; }
.about-skills { background: white; border-radius: 12px; padding: 30px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.about-skills h3 { font-size: 18px; margin-bottom: 16px; color: #333; }
.skill-tag { display: inline-block; padding: 6px 14px; background: #f0f0f0; border-radius: 20px; font-size: 13px; color: #555; margin: 4px; }
.skill-category { margin-bottom: 16px; }
.skill-cat-title { font-size: 13px; color: #667eea; font-weight: 600; margin-bottom: 6px; }
.sub-nav { display: flex; gap: 12px; margin-bottom: 40px; justify-content: center; flex-wrap: wrap; }
.sub-nav a { padding: 8px 20px; background: white;  color: #555; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: all 0.2s; }
.sub-nav a:hover { background: #667eea; color: white; }

/* Project Card */
.project { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 40px; transition: transform 0.3s, box-shadow 0.3s; }
.project:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.project-body { padding: 30px; }
.project-body h3 { font-size: 22px; margin-bottom: 8px; }
.project-body .tags { color: #667eea; font-size: 13px; margin-bottom: 16px; }
.project-body h4 { font-size: 16px; margin: 20px 0 10px; color: #444; border-left: 3px solid #667eea; padding-left: 10px; }
.project-body p { color: #666; margin-bottom: 8px; }
.project-body ul { padding-left: 20px; color: #666; }
.project-body li { margin-bottom: 6px; }
.project-tech { margin-top: 12px; color: #999; font-size: 13px; }
.project-img-placeholder { width: 100%; height: 200px; background: none display: flex; align-items: center; justify-content: center; color: #999; font-size: 14px; }
.category-label { display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.category-ai { background: #eef2ff; color: #667eea; }
.category-trad { background: #fef2f2; color: #f5576c; }

/* Layout variants */
.layout-text-img { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.layout-text-img .project-img-area { padding: 30px 30px 30px 0; display: flex; align-items: center; }
.layout-img-text { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.layout-img-text .project-img-area { padding: 30px 0 30px 30px; order: -1; display: flex; align-items: center; }
.layout-full .project-img-placeholder { height: 160px; }

/* Photo */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-item { aspect-ratio: 4/3; background: none;  display: flex; align-items: center; justify-content: center; color: #999; font-size: 14px; }

/* Footer */
.footer { text-align: center; padding: 40px; color: #999; font-size: 13px; border-top: 1px solid #eee; margin-top: 40px; }

@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 10px; font-size: 12px; }
  .hero { padding: 50px 20px 40px; }
  .hero h1 { font-size: 28px; }
  .section { padding: 40px 20px; }
  .about-grid { grid-template-columns: 1fr; }
  .layout-text-img, .layout-img-text { grid-template-columns: 1fr; }
  .layout-text-img .project-img-area, .layout-img-text .project-img-area { padding: 0 30px; order: 0; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Solution button */
.btn-solution {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-left: 8px;
  color: #ea580c;
  background: #fff7ed;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-solution:hover {
  background: #ea580c;
  color: white;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}
.modal-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 800px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-content h2 { font-size: 24px; margin-bottom: 20px; color: #333; }
.modal-content h4 { font-size: 16px; margin: 20px 0 10px; color: #444; border-left: 3px solid #667eea; padding-left: 10px; }
.modal-content p { color: #666; margin-bottom: 8px; line-height: 1.8; }
.modal-content ul { padding-left: 20px; color: #666; }
.modal-content li { margin-bottom: 6px; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: #666;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #475569; color: white; }
.modal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.modal-table th, .modal-table td {
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  text-align: left;
}
.modal-table th { background: #f8f9fa; font-weight: 600; color: #444; }
.modal-table td { color: #666; }

/* Modal (matching index.html style) */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  justify-content: center;
  align-items: center;
}
.modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  position: sticky;
  top: 0;
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}
.modal-header h2 { font-size: 22px; }
.modal-close {
  width: 36px; height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: #e0e0e0; }
.modal-body {
  padding: 30px;
}
.modal-body h4 { font-size: 15px; margin: 20px 0 8px; color: #444; border-left: 3px solid #667eea; padding-left: 10px; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body p { color: #666; margin-bottom: 8px; font-size: 14px; line-height: 1.8; }
.modal-body ul { padding-left: 18px; color: #666; }
.modal-body li { margin-bottom: 4px; font-size: 14px; }
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 3px; }
.modal::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }
.modal-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.modal-table th, .modal-table td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
.modal-table th { background: #f8f9fa; font-weight: 600; color: #444; }
.modal-table td { color: #666; }

/* Security report button - green */
.btn-security {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-left: 8px;
  color: #059669;
  background: #ecfdf5;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-security:hover {
  background: #059669;
  color: white;
}

/* Meteor / Shooting Star Animation */
.meteor-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.meteor {
  position: absolute;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.3), rgba(200,220,255,0.4));
  border-radius: 0 0 2px 2px;
  opacity: 0;
  animation: meteor-fall linear forwards;
}
.meteor::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 6px 2px rgba(200,220,255,0.8);
}
@keyframes meteor-fall {
  0% { opacity: 0; transform: translateY(-100px) translateX(0) rotate(25deg); }
  10% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(100vh + 100px)) translateX(-150px) rotate(25deg); }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
  z-index: 100;
  transition: all 0.3s;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102,126,234,0.5);
}

/* Modal scrollbar fix - hide scrollbar completely */
.modal::-webkit-scrollbar { display: none; }
.modal { scrollbar-width: none; }
