* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* Top Nav */
.top-nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 48px;
  background: rgba(10,10,10,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.top-nav .logo { font-weight: 700; font-size: 17px; letter-spacing: 1px; }
.top-nav .nav-center {
  display: flex; gap: 32px;
}
.top-nav .nav-center a {
  font-size: 13px; color: #666; letter-spacing: 2px;
  transition: 0.2s; cursor: pointer; border: none; background: none;
  padding: 4px 0; text-transform: uppercase;
}
.top-nav .nav-center a:hover, .top-nav .nav-center a.active { color: #fff; }
.top-nav .lang-toggle { display: flex; gap: 4px; }
.top-nav .lang-toggle button {
  background: none; border: 1px solid rgba(255,255,255,0.12);
  color: #666; padding: 6px 14px; border-radius: 4px;
  cursor: pointer; font-size: 12px; transition: 0.2s;
}
.top-nav .lang-toggle button.active { color: #fff; border-color: #fff; background: rgba(255,255,255,0.08); }
.top-nav .lang-toggle button:hover { color: #fff; }

section { position: relative; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 100px 48px; }

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.section-subtitle {
  font-size: 14px; color: #666;
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 48px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 140px 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero .hero-bg-videos {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1; overflow: hidden;
}
.hero .hero-bg-videos video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero .hero-content { position: relative; z-index: 10; }
.hero-overlay-gradient {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 3;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(10,10,10,0.4) 50%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.hero .subtitle {
  font-size: clamp(18px, 2.5vw, 28px);
  color: #ccc; font-weight: 300;
  letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero .tagline {
  font-size: 16px; color: rgba(255,255,255,0.4);
  max-width: 480px; margin: 0 auto; line-height: 1.8;
}

/* Timeline section */
.timeline-section { background: #0d0d0d; padding-top: 1px; }
.project-media {
  width: 100%;
  height: clamp(400px, 55vw, 640px);
  margin-bottom: 48px;
  overflow: hidden; background: #050505;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
}
.project-media video {
  display: block; width: 100%; height: 100%; object-fit: cover;
}

/* Category */
.category-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
}
.category-header .cat-line {
  flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}
.category-header h3 {
  font-size: 13px; letter-spacing: 4px; text-transform: uppercase;
  color: #666; white-space: nowrap;
}
.category-block { margin-bottom: 64px; }
.category-block:last-child { margin-bottom: 0; }

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 24px;
  background: rgba(255,255,255,0.02);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer; overflow: hidden;
  min-height: 150px; display: flex; flex-direction: column;
}
.project-card:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.project-card .card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 8px;
}
.project-card .card-title {
  font-size: 15px; font-weight: 600; color: #eee; line-height: 1.3; flex: 1;
}
.project-card .card-year {
  font-size: 12px; color: #555; white-space: nowrap; margin-left: 12px;
}
.project-card .card-role {
  font-size: 12px; color: #777; letter-spacing: 1px; margin-bottom: 8px;
}
.project-card .card-expand-icon {
  font-size: 10px; color: #444; letter-spacing: 1px; margin-top: auto; transition: 0.3s;
}
.project-card:hover .card-expand-icon { color: #888; }
.project-card .card-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  padding: 24px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; pointer-events: none; transition: 0.35s; border-radius: 10px;
}
.project-card:hover .card-overlay { opacity: 1; pointer-events: auto; }
.card-overlay .overlay-desc {
  font-size: 13px; color: #aaa; line-height: 1.6; margin-bottom: 12px;
}
.card-overlay .overlay-tools {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.card-overlay .overlay-tools span {
  font-size: 10px; padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: #888;
}
.card-overlay .overlay-result {
  font-size: 12px; color: #6a9; letter-spacing: 0.5px;
}
.project-card.expanded { grid-column: 1 / -1; cursor: default; border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); transform: none; }
.project-card.expanded .card-overlay { position: relative; opacity: 1; pointer-events: auto; background: transparent; backdrop-filter: none; padding: 20px 0 0 0; height: auto; }
.project-card.expanded .card-expand-icon { display: none; }

/* Poster grid */
.series-poster-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px;
}
.series-poster-card {
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  aspect-ratio: 2 / 3; transition: 0.4s; cursor: pointer;
}
.series-poster-card:hover {
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.series-poster-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* CTA */
.cta {
  text-align: center; padding: 120px 48px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}
.cta h2 { font-size: clamp(24px, 3vw, 40px); margin-bottom: 16px; }
.cta p { color: #777; font-size: 15px; max-width: 500px; margin: 0 auto 32px; }
.cta .btn {
  display: inline-block; border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 40px; border-radius: 6px;
  font-size: 14px; letter-spacing: 2px; text-transform: uppercase; transition: 0.3s;
}
.cta .btn:hover { background: rgba(255,255,255,0.06); border-color: #fff; }

/* Footer */
footer {
  padding: 48px; border-top: 1px solid rgba(255,255,255,0.04);
  text-align: center; font-size: 13px; color: #444;
}

.lang-zh, .lang-en { display: none; }
.lang-zh.active, .lang-en.active { display: block; }

/* Page header (for about, cv) */
.page-header {
  padding-top: 100px;
}
.page-header .section-inner { padding: 60px 48px 20px; }

/* CV Page */
.cv-section { margin-bottom: 48px; }
.cv-section h2 {
  font-size: 20px; font-weight: 600; margin-bottom: 24px;
  letter-spacing: -0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 12px;
}
.cv-intro {
  display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 48px;
  padding: 32px; background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 10px;
}
.cv-intro .cv-name { font-size: 28px; font-weight: 700; }
.cv-intro .cv-title { color: #999; font-size: 15px; margin-top: 4px; }
.cv-intro .cv-contact { margin-left: auto; text-align: right; }
.cv-intro .cv-contact p { font-size: 13px; color: #888; margin-bottom: 4px; }
.cv-intro .cv-contact a { color: #888; border-bottom: 1px solid rgba(255,255,255,0.1); }
.cv-intro .cv-contact a:hover { color: #fff; }

.cv-summary { color: #999; font-size: 15px; line-height: 1.8; margin-bottom: 48px; }
.cv-table { width: 100%; border-collapse: collapse; }
.cv-table tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.cv-table td { padding: 14px 8px; font-size: 14px; vertical-align: top; }
.cv-table td:first-child { color: #555; width: 60px; font-weight: 300; }
.cv-table td:nth-child(2) { color: #eee; }
.cv-table td:nth-child(3) { color: #999; text-align: right; width: 200px; }

.cv-skills { display: flex; flex-wrap: wrap; gap: 12px; }
.cv-skills span {
  padding: 8px 20px; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; font-size: 13px; color: #aaa;
}
.cv-edu { color: #eee; font-size: 15px; }
.cv-edu .edu-detail { color: #999; font-size: 13px; margin-top: 4px; }

/* About page */
.about-modern {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start;
}
.about-photo { position: relative; }
.about-photo img { width: 100%; border-radius: 12px; display: block; }
.about-photo .float-tags {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
}
.about-photo .float-tag {
  position: absolute;
  padding: 8px 16px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; font-size: 12px; color: #ccc;
  animation: floatTag 6s ease-in-out infinite;
  pointer-events: auto; transition: 0.3s; cursor: default; white-space: nowrap;
}
.about-photo .float-tag:hover { color: #fff; border-color: rgba(255,255,255,0.3); transform: scale(1.08); background: rgba(20,20,20,0.95); }
.about-photo .float-tag:nth-child(1) { top: 8%; left: -8%; animation-delay: 0s; }
.about-photo .float-tag:nth-child(2) { top: 40%; right: -10%; animation-delay: 1.5s; }
.about-photo .float-tag:nth-child(3) { bottom: 12%; left: -5%; animation-delay: 3s; }
.about-photo .float-tag:nth-child(4) { top: 65%; left: -12%; animation-delay: 4.5s; }
@keyframes floatTag { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.about-content h2 { font-size: 28px; margin-bottom: 16px; }
.about-content .about-bio { color: #999; font-size: 15px; line-height: 1.8; margin-bottom: 32px; }
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px;
}
.stat-item {
  text-align: center; padding: 20px 8px;
  border: 1px solid rgba(255,255,255,0.06); border-radius: 8px;
  background: rgba(255,255,255,0.02); transition: 0.3s; cursor: default; position: relative;
}
.stat-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.stat-item .stat-num {
  font-size: 32px; font-weight: 700;
  background: linear-gradient(135deg, #fff, #888);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-item .stat-label { font-size: 11px; color: #666; letter-spacing: 2px; text-transform: uppercase; margin-top: 4px; }
.stat-item .stat-hover {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: rgba(20,20,20,0.95); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 12px 16px;
  font-size: 12px; color: #aaa; white-space: nowrap; pointer-events: none;
}
.stat-item:hover .stat-hover { display: block; }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.skill-cloud span {
  padding: 8px 18px; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; font-size: 12px; color: #aaa; transition: 0.3s; cursor: default;
}
.skill-cloud span:hover { border-color: rgba(255,255,255,0.3); color: #fff; background: rgba(255,255,255,0.05); transform: translateY(-3px); box-shadow: 0 4px 16px rgba(255,255,255,0.05); }
.timeline-compact { border-left: 1px solid rgba(255,255,255,0.1); padding-left: 20px; }
.timeline-compact .tl-item { position: relative; padding-bottom: 20px; cursor: default; }
.timeline-compact .tl-item:last-child { padding-bottom: 0; }
.timeline-compact .tl-item::before {
  content: ''; position: absolute; left: -25px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #333; border: 2px solid #555; transition: 0.3s;
}
.timeline-compact .tl-item:hover::before { background: #fff; border-color: #aaa; box-shadow: 0 0 12px rgba(255,255,255,0.15); }
.timeline-compact .tl-year { font-size: 11px; color: #555; letter-spacing: 2px; margin-bottom: 4px; }
.timeline-compact .tl-text { font-size: 14px; color: #bbb; transition: 0.3s; }
.timeline-compact .tl-item:hover .tl-text { color: #eee; }
.timeline-compact .tl-text strong { color: #eee; font-weight: 500; }

@media (max-width: 768px) {
  .top-nav { padding: 14px 20px; flex-wrap: wrap; gap: 10px; }
  .top-nav .nav-center { order: 3; width: 100%; justify-content: center; gap: 20px; }
  .top-nav .nav-center a { font-size: 11px; }
  .section-inner { padding: 60px 24px; }
  .hero { padding: 120px 24px 60px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-media { height: auto; aspect-ratio: 16 / 9; }
  .series-poster-grid { grid-template-columns: 1fr; }
  .cta { padding: 80px 24px; }
  footer { padding: 32px 24px; }
  .about-modern { grid-template-columns: 1fr; gap: 32px; }
  .about-photo .float-tag:nth-child(1) { left: 0; }
  .about-photo .float-tag:nth-child(2) { right: 0; }
  .about-photo .float-tag:nth-child(3) { left: 5%; }
  .about-photo .float-tag:nth-child(4) { left: 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .cv-intro { flex-direction: column; }
  .cv-intro .cv-contact { margin-left: 0; text-align: left; }
}
