/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #1a1a2e;
  background: #f8f9fc;
  line-height: 1.7;
  font-size: 16px;
}
a { color: #003b6f; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: #003b6f22; }

/* ===== VARIABLES ===== */
:root {
  --navy: #002b5c;
  --navy-light: #003b6f;
  --blue-accent: #1a6bb0;
  --blue-light: #e8f0fe;
  --gold: #c9a84c;
  --gray-100: #f1f3f8;
  --gray-200: #e2e5ed;
  --gray-400: #8b95a8;
  --gray-600: #4a5568;
  --max-width: 1100px;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  height: 64px;
}
nav .inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; height: 100%;
  padding: 0 24px; gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav .inner::-webkit-scrollbar { display: none; }
nav .brand {
  font-weight: 700; font-size: 15px; color: var(--navy);
  white-space: nowrap; margin-right: 16px; flex-shrink: 0;
}
nav a.nav-link {
  white-space: nowrap; font-size: 13px; font-weight: 500;
  color: var(--gray-600); padding: 6px 12px;
  border-radius: 6px; transition: all .15s;
  flex-shrink: 0;
}
nav a.nav-link:hover {
  background: var(--blue-light); color: var(--navy-light); text-decoration: none;
}

/* ===== HAMBURGER (mobile) ===== */
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 4px; margin-left: auto; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: .2s; }

/* ===== HERO ===== */
.hero {
  margin-top: 64px;
  background: linear-gradient(135deg, var(--navy) 0%, #004b8d 100%);
  color: #fff;
  padding: 64px 24px 48px;
}
.hero .inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; gap: 48px; align-items: flex-start;
}
.hero-info { flex: 1; }
.hero-name {
  font-size: 36px; font-weight: 700; line-height: 1.2;
}
.hero-name .chinese { font-weight: 400; font-size: 28px; color: rgba(255,255,255,.75); }
.hero-titles { margin: 12px 0 16px; font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.85); }
.hero-titles a { color: #90caf9; }
.hero-titles a:hover { color: #fff; }
.hero-contact {
  background: rgba(255,255,255,.08);
  border-radius: 12px; padding: 16px 20px;
  font-size: 14px; line-height: 1.7;
  margin-top: 16px;
}
.hero-contact a { color: #90caf9; }
.hero-contact a:hover { color: #fff; }
.hero-photo {
  width: 200px; flex-shrink: 0;
}
.hero-photo img {
  width: 100%; border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  border: 3px solid rgba(255,255,255,.15);
}

/* ===== SECTION ===== */
section { padding: 48px 24px; }
section:nth-child(even) { background: #fff; }
section .inner {
  max-width: var(--max-width); margin: 0 auto;
}
.section-title {
  font-size: 22px; font-weight: 700; color: var(--navy);
  border-bottom: 3px solid var(--blue-accent);
  padding-bottom: 8px; margin-bottom: 28px;
  display: flex; align-items: center; gap: 10px;
}
.section-title .icon { font-size: 24px; }

/* ===== HOME SECTION (inline on hero / below) ===== */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.home-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
}
.home-card h3 {
  font-size: 16px; font-weight: 600; color: var(--navy);
  margin-bottom: 12px;
}
.home-card ul, .home-card ol { padding-left: 20px; }
.home-card li { margin-bottom: 4px; font-size: 14px; line-height: 1.6; }
.full-width { grid-column: 1 / -1; }

/* ===== BIOGRAPHY ===== */
.biography-text {
  font-size: 15px; line-height: 1.8; color: var(--gray-600);
}
.biography-text p { margin-bottom: 12px; }
.biography-text a { font-weight: 500; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px;
  width: 2px; background: var(--gray-200);
}
.timeline-item {
  position: relative; margin-bottom: 20px; padding-left: 8px;
}
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue-accent); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--blue-accent);
}
.timeline-date {
  font-size: 13px; font-weight: 600; color: var(--blue-accent);
  text-transform: uppercase; letter-spacing: .5px;
}
.timeline-role { font-weight: 600; font-size: 15px; margin: 2px 0; }
.timeline-org { font-size: 14px; color: var(--gray-600); }
.timeline-detail { font-size: 14px; color: var(--gray-600); font-style: italic; margin-top: 2px; }

/* ===== PUBLICATIONS ===== */
.pub-section { margin-bottom: 32px; }
.pub-section h3 {
  font-size: 17px; font-weight: 600; color: var(--navy);
  margin-bottom: 12px; padding-bottom: 4px;
  border-bottom: 1px solid var(--gray-200);
}
.pub-list { list-style: none; }
.pub-list li {
  font-size: 14px; line-height: 1.6; padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list li a { color: var(--blue-accent); font-weight: 500; }

/* collapsible sub-sections */
details.pub-group {
  margin-bottom: 16px; border: 1px solid var(--gray-200);
  border-radius: 8px; overflow: hidden;
}
details.pub-group summary {
  padding: 12px 16px; cursor: pointer;
  font-weight: 600; font-size: 15px; color: var(--navy);
  background: var(--gray-100);
  transition: background .15s;
}
details.pub-group summary:hover { background: var(--blue-light); }
details.pub-group summary::-webkit-details-marker { color: var(--blue-accent); }
details.pub-group .pub-body { padding: 12px 16px; }

/* ===== RESEARCH AREAS ===== */
.research-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow .15s;
}
.research-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.research-card h3 {
  font-size: 16px; font-weight: 600; color: var(--navy);
  margin-bottom: 8px;
}
.research-card p, .research-card ul {
  font-size: 14px; line-height: 1.7; color: var(--gray-600);
}
.research-card ul { padding-left: 18px; }
.research-card li { margin-bottom: 4px; }
.research-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  background: var(--blue-light); color: var(--navy-light);
  padding: 2px 8px; border-radius: 4px; margin-right: 4px;
  text-transform: uppercase; letter-spacing: .5px;
}

/* ===== FAQ / GETTING STARTED ===== */
.faq-img {
  max-width: 100%; height: auto; border-radius: 8px;
  margin: 12px 0; border: 1px solid var(--gray-200);
}
.faq-img-banner {
  max-width: 100%; height: auto; border-radius: 8px;
  margin: 0 0 20px 0; width: 100%;
}
.faq-img-row {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}
.faq-img-row img { flex: 1; min-width: 200px; }
.faq-block, .guide-block {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.faq-block h3, .guide-block h3 {
  font-size: 16px; font-weight: 600; color: var(--navy);
  margin-bottom: 10px;
}
.faq-block p, .faq-block ul, .guide-block p, .guide-block ul {
  font-size: 14px; line-height: 1.7; color: var(--gray-600);
}
.faq-block ul, .guide-block ul { padding-left: 18px; }
.faq-block li, .guide-block li { margin-bottom: 4px; }
.faq-quote {
  font-style: italic; font-size: 15px;
  border-left: 3px solid var(--blue-accent);
  padding: 12px 16px; margin: 12px 0;
  background: var(--gray-100); border-radius: 4px;
}
.faq-quote strong { font-style: normal; }

/* ===== JOB VACANCIES ===== */
.job-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.job-card h3 {
  font-size: 16px; font-weight: 600; color: var(--navy);
  margin-bottom: 8px;
}
.job-card .job-meta {
  font-size: 13px; color: var(--blue-accent); font-weight: 500;
  margin-bottom: 8px;
}
.job-card ul { padding-left: 18px; font-size: 14px; line-height: 1.7; color: var(--gray-600); }
.job-card li { margin-bottom: 4px; }

/* ===== FOOTER ===== */
footer {
  background: var(--navy); color: rgba(255,255,255,.6);
  text-align: center; padding: 24px;
  font-size: 13px;
}
footer a { color: #90caf9; }
footer a:hover { color: #fff; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--navy); color: #fff; border: none;
  cursor: pointer; font-size: 18px; box-shadow: 0 2px 12px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .3s; opacity: 0; z-index: 90; pointer-events: none;
}
.back-to-top.visible { opacity: .7; pointer-events: auto; }
.back-to-top:hover { opacity: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  html { scroll-padding-top: 56px; }
  nav { height: 56px; }
  nav .brand { font-size: 14px; }
  .hamburger { display: flex; }
  nav .nav-links { display: none; }
  nav .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 56px; left: 0; right: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 8px 16px;
    gap: 2px;
  }
  .hero { padding: 40px 16px 32px; }
  .hero .inner { flex-direction: column-reverse; align-items: center; gap: 24px; }
  .hero-name { font-size: 28px; text-align: center; }
  .hero-name .chinese { font-size: 22px; }
  .hero-titles { text-align: center; }
  .hero-photo { width: 140px; }
  section { padding: 32px 16px; }
  .home-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 20px; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 24px; }
  .hero-name .chinese { font-size: 18px; }
  .timeline { padding-left: 20px; }
}
