/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-surface: #1a1a25;
  --accent: #e8a020;
  --accent-light: #f5c542;
  --accent-dark: #b87a15;
  --text-primary: #e0e0e8;
  --text-secondary: #8888a0;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Noto Serif SC', 'Georgia', serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 120px 0;
  position: relative;
}

/* ===== Section Tags & Titles ===== */
.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative;
  padding-left: 36px;
}

.section-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: translateY(-50%);
}

.section-tag.center {
  display: block;
  text-align: center;
  padding-left: 0;
}

.section-tag.center::before {
  display: none;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 24px;
  color: #fff;
}

.section-title.center {
  text-align: center;
}

.section-header {
  margin-bottom: 60px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  flex-direction: column;
}

.nav-brand-zh {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}

.nav-brand-en {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at center,
      rgba(10, 10, 15, 0.2) 0%,
      rgba(10, 10, 15, 0.6) 50%,
      rgba(10, 10, 15, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: 8px;
}

.hero-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: charReveal 0.6s ease forwards;
}

.hero-title span:nth-child(1) { animation-delay: 0.3s; }
.hero-title span:nth-child(2) { animation-delay: 0.4s; }
.hero-title span:nth-child(3) { animation-delay: 0.5s; }
.hero-title span:nth-child(4) { animation-delay: 0.6s; }
.hero-title span:nth-child(5) { animation-delay: 0.7s; }
.hero-title span:nth-child(6) { animation-delay: 0.8s; }
.hero-title span:nth-child(7) { animation-delay: 0.9s; }

@keyframes charReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  color: var(--accent);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.2s forwards;
}

.hero-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.4s forwards;
}

.hero-btn {
  display: inline-block;
  padding: 14px 40px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 2px;
  border-radius: 2px;
  transition: all 0.4s ease;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.6s forwards;
}

.hero-btn:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 30px rgba(232, 160, 32, 0.3);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.4);
  animation: floatUpDown 2s ease-in-out infinite;
}

@keyframes floatUpDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== About ===== */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.about-image img {
  border-radius: 12px;
  box-shadow:
    0 0 60px rgba(232, 160, 32, 0.15),
    0 0 120px rgba(232, 160, 32, 0.08);
  transition: box-shadow 0.5s ease;
}

.about-image img:hover {
  box-shadow:
    0 0 80px rgba(232, 160, 32, 0.25),
    0 0 160px rgba(232, 160, 32, 0.12);
}

/* ===== Research ===== */
.research {
  background: var(--bg-primary);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.research-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(232, 160, 32, 0.1);
  border-radius: 8px;
  padding: 40px 32px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.research-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.research-card:hover {
  transform: translateY(-8px);
  border-color: rgba(232, 160, 32, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.research-card:hover::after {
  transform: scaleX(1);
}

.research-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  color: var(--accent);
}

.research-icon svg {
  width: 100%;
  height: 100%;
}

.research-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #fff;
}

.research-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Team ===== */
.team {
  background: var(--bg-secondary);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
}

.team-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 32px 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.team-card:hover {
  border-color: rgba(232, 160, 32, 0.2);
  transform: translateY(-4px);
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(232, 160, 32, 0.2), rgba(232, 160, 32, 0.05));
  border: 2px solid rgba(232, 160, 32, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 1px;
}

.team-card h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.team-link {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ===== Highlights ===== */
.highlights {
  background: var(--bg-primary);
}

.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.highlight-item {
  display: flex;
  gap: 32px;
  padding: 32px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.highlight-item:hover {
  border-color: rgba(232, 160, 32, 0.15);
  background: var(--bg-surface);
}

.highlight-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.date-day {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.date-month {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.highlight-content {
  flex: 1;
}

.highlight-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.tag-paper {
  background: rgba(232, 160, 32, 0.15);
  color: var(--accent);
}

.tag-event {
  background: rgba(100, 149, 237, 0.15);
  color: #6495ed;
}

.tag-observe {
  background: rgba(50, 205, 50, 0.15);
  color: #32cd32;
}

.highlight-content h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.5;
}

.highlight-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Gallery ===== */
.gallery {
  background: var(--bg-secondary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  background: var(--bg-surface);
}

.gallery-large {
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
}

.gallery-overlay p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.gallery-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(232, 160, 32, 0.9);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 2;
}

.gallery-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 30px rgba(232, 160, 32, 0.5);
}

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  background: transparent;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  gap: 4px;
}

/* ===== Contact ===== */
.contact {
  background: var(--bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(232, 160, 32, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-primary);
  padding: 40px 0;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin-bottom: 32px;
}

.footer-content {
  text-align: center;
}

.footer-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-en {
  margin-top: 4px;
  font-size: 0.75rem !important;
  color: rgba(136, 136, 160, 0.5) !important;
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
  opacity: 1;
}

.slide-left {
  transform: translateX(-50px);
}

.slide-left.visible {
  transform: translateX(0);
}

.slide-right {
  transform: translateX(50px);
}

.slide-right.visible {
  transform: translateX(0);
}

.fade-up {
  transform: translateY(40px);
}

.fade-up.visible {
  transform: translateY(0);
}

/* ===== Mobile Nav Overlay ===== */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.97);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.nav-overlay.active {
  display: flex;
}

.nav-overlay ul {
  list-style: none;
  text-align: center;
}

.nav-overlay ul li {
  margin-bottom: 24px;
}

.nav-overlay ul li a {
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-image {
    order: -1;
  }

  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 80px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.3rem;
    letter-spacing: 3px;
  }

  .hero-title {
    letter-spacing: 4px;
  }

  .hero-subtitle {
    letter-spacing: 3px;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .highlight-item {
    flex-direction: column;
    gap: 16px;
  }

  .highlight-date {
    flex-direction: row;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0;
    padding-bottom: 12px;
    justify-content: flex-start;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-large {
    grid-row: span 1;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: column;
    gap: 16px;
  }
}
