
/* ==============================
   Lab 110 — Cleaned stylesheet
   - Removes duplicate rules
   - Fixes stray brace
   - Normalizes nav padding & spacing
   - Keeps layout consistent across pages
   ============================== */

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
}

/* Header / Lab titles */
header {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}
.lab { text-align: center; }
.lab img { height: 120px; max-height: 22.5vh; width: auto; }
.lab-title { margin-top: 6px; font-weight: 700; }

/* Top Navigation */
nav {
  background: #222;
  padding: 12px 0;
  text-align: center;
  position: relative;
  z-index: 1;
}
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #333;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;               /* consistent gap control */
}
.menu > li { position: relative; }
.menu a,
.menu span,
.dropdown .dropbtn {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 8px;      /* single, canonical padding */
  white-space: nowrap;
}
.menu a:hover,
.menu span:hover { background: #111; }

/* Active item underline */
.menu a.active,
.dropdown .dropbtn.active {
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 700;
}

/* Dropdown */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #333;
  box-shadow: 0 8px 16px rgba(0,0,0,.2);
  z-index: 999;
}
.dropdown-content li { list-style: none; margin: 0; }
.dropdown-content a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: #fff;
  text-decoration: none;
  background: #333;
}
.dropdown-content a:hover { background: #111; }
.dropdown:hover .dropdown-content { display: block; }

/* Main */
main {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* Footer logos */
.footer-logo { height: 120px; width: auto; margin: 0 15px; }
.academia-logo { height: 100px; width: auto; margin: 0 15px; }
.iams-logo     { height: 120px; width: auto; margin: 0 15px; }

/* Publications lists */
.pub-list { line-height: 1.5; padding-left: 1.2em; }
.pub-list li { margin-bottom: 8px; }
.pub-list .title { font-weight: 600; }
.pub-list.selected li { margin-bottom: 10px; }
.pub-list a.arxiv { font-size: .95em; margin-left: 6px; }
a.pdf-local { font-size: .95em; margin-left: 6px; }

/* Scholar icon */
.scholar-icon { height: 16px; width: auto; vertical-align: -0.2em; }

/* Contact page – PI cards */
.pi-grid  { display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 28px; align-items: flex-start; }
.pi-card  { display: flex; gap: 18px; align-items: center; max-width: 530px; }
.pi-photo { width: 100px; height: auto; border-radius: 4px; object-fit: cover; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.pi-text  { display: flex; flex-direction: column; gap: 6px; }
.pi-name  { margin: 0; font-size: 1.4rem; }
/*.pi-name-zh { font-size: 1.4rem; color: #333; }*/
.pi-text { font-size: 0.8rem; } 
.pi-lines div { margin: 2px 0; }
.contact-block { margin-top: 28px; }

.pi-spacer {
  visibility: hidden;   /* keeps space but hides content */
  width: 255px;         /* adjust until equal to the longest card */
  height: 0;            /* don’t add vertical space */
}

@media (max-width: 400px) {
  header { flex-direction: column; gap: 16px; }
  .pi-card { max-width: 100%; }
  .pi-photo { width: 180px; }
}

/* Utility (optional) */
.hidden { display: none !important; }
.center { text-align: center; }
