/* Global */
/* Self-hosted Inter (static WOFF2 files) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("./Inter-Light.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./Inter-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./Inter-SemiBold.ttf") format("truetype");
}



*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  padding-top: 55px; /* adjust if nav height changes */
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background-color: #f5f7fb;
  line-height: 1.6;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}


/* Header */

.site-header {
  margin: 0;
  padding: 0;
}

/* Make the banner image span the full width and keep its aspect ratio */
.site-header-image {
  display: block;
  width: 100%;
  height: auto;
}



.header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title {
  margin: 0 0 0.25rem;
  font-size: 1.8rem;
  font-weight: 600;
}

.site-subtitle {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.header-meta {
  text-align: right;
  font-size: 0.9rem;
}

/* Nav */
.site-nav {
  background-color: #0f172a;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.nav-inner {
  padding: 0.75rem 1.5rem;
}

/* Navigation with logo */
.nav-with-logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Left brand block */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}


/* White circular background behind logo */
.nav-logo-wrap {
  width: 35px;
  height: 35px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG logo itself */
.nav-logo {
  height: 30px;
  width: auto;
}


/* Group name text */
.nav-title {
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
}

/* Right-side nav links */
.nav-links {
  display: flex;
  gap: 1.4rem;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 400;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Hide the checkbox (we just use its state) */
.nav-toggle {
  display: none;
}

/* Hamburger icon (3 bars) – hidden on desktop by default */
.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 999px;
  position: relative;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-label span::before {
  top: -6px;
}

.nav-toggle-label span::after {
  top: 6px;
}

/* --------- Mobile layout --------- */
@media (max-width: 768px) {

  .nav-with-logo {
    flex-wrap: wrap;
    align-items: center;
  }

  /* Put brand on the left, hamburger on the right */
  .nav-brand {
    flex: 1;
  }

  .nav-toggle-label {
    display: block;
  }

  /* By default hide links on small screens */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
    gap: 0.75rem;
  }

  .nav-links a {
    padding: 0.25rem 0;
  }

  /* When checkbox is checked, show menu */
  .nav-toggle:checked + .nav-toggle-label + .nav-links {
    display: flex;
  }
}









/* Main layout */

.main-content {
  padding: 2.5rem 0 3rem;
}

.section {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.75rem 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  scroll-margin-top: 50px; /* adjust */
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section h2 {
  margin: 0;
  font-size: 1.3rem;
}

.section-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.intro-section {
  text-align: center;
}

/* Quote container */
.group-quote {
  margin: 0 auto 1.5rem;
  padding: 0;
  border: none;
  max-width: 720px;   /* keeps justification readable */
}

/* English quote */
.quote-en {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;

  text-align: justify;        /* justify the paragraph */
  text-align-last: center;   /* last line centered */

  margin-bottom: 0.6rem;
}

/* Chinese quote – larger and clean */
.quote-zh {
  font-size: 1.55rem;         /* larger than English */
  line-height: 1.5;
  color: #475569;
  text-align-last: center;   /* last line centered */

  font-family:
    "Noto Serif SC",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "SimSun",
    serif;
}

/* Intro text paragraph */
.intro-text {
  max-width: 880px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.5;
}



/* About section */

.about-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 15%;
}


/* Pills */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background-color: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  line-height: 1.3;
  white-space: nowrap;
}


/* Card grid for group members */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1rem 1.1rem;
  background-color: #f9fafb;
}

.card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.card-role {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.card-text {
  margin: 0;
  font-size: 0.9rem;
}

/* Publications */

.pub-link {
  font-size: 0.9rem;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.25rem 0 2rem;
  font-size: 0.85rem;
  color: #6b7280;
  background-color: #f9fafb;
}

/* Responsive tweaks */

@media (max-width: 640px) {
  .header-meta {
    text-align: left;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .section {
    padding: 1.4rem 1.3rem 1.1rem;
  }
}


.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  background-color: #000;
}

/* Large video overlay (separate from .rs-media .yt styles) */
.video-wrapper .yt-large {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-wrapper .yt-large-btn {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.video-wrapper .yt-large-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-wrapper .yt-large-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 8px 22px rgba(0,0,0,.45);
  pointer-events: none;
}

/* When iframe is injected, make it fill the wrapper */
.video-wrapper .yt-large iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}


/* Shared grid for Research Staff / Graduate Students / Alumni */
.alumni-intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #64748b;
}

.alumni-grid{
  display: grid;
  gap: 1.5rem;

  /* Make columns fixed-width so they can be centered as a pack */
  grid-template-columns: repeat(auto-fit, 200px);
  justify-content: center;

  margin: 0 auto 2rem;
}

/* Ensure cards don't stretch wider than the column */
.alumni-card{
  width: 200px;          /* must match the column width */
  text-align: center;
}

/* Circular avatar */
.alumni-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 0.75rem;
  border-radius: 999px;
  background-color: #e5e7eb; /* light grey placeholder */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Portrait image inside avatar */
.alumni-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Name + affiliation */
.alumni-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
}

.alumni-affiliation {
  margin: 0;
  font-size: 0.9rem;
  color: #000000; /* warm accent; change if you want */
}


.address-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.map-icon-inline {
  width: 22px;
  height: 22px;
  vertical-align: middle;
}

.map-icon-inline:hover {
  opacity: 0.8;
  cursor: pointer;
}

.icon-credit {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #64748b;
}

.icon-credit a {
  color: inherit;
  text-decoration: none;
}

.icon-credit a:hover {
  text-decoration: underline;
}


.pi-links {
  margin-top: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.pi-icon {
  width: 30px;
  height: 30px;
  vertical-align: middle;
  transition: opacity 0.2s ease;
}

.pi-icon:hover {
  opacity: 0.7;
  cursor: pointer;
}

/* Wider ACS Nano logo */
.pi-icon-wide {
  width: 60px;   /* double width */
  height: 30px;  /* same height as others */
  object-fit: contain;
}

.pi-info p {
  text-align: justify;
  text-align-last: left;   /* prevents stretched last line */
  line-height: 1.7;
  margin-bottom: 1rem;
}

html {
  overflow-y: scroll;
}


/* Year quick links */
.year-jumplist{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin: 1rem 0 1.25rem;
}

.year-pill{
  display:inline-block;
  padding:.35rem .7rem;
  border-radius:999px;
  font-size:.92rem;
  text-decoration:none;
  border:1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.75);
  box-shadow: 0 5px 15px rgba(15, 23, 42, 0.18);
}

.year-pill:hover{
  background: rgba(255,255,255,1);
}


/* Collapsible year panels */
.year-panel{
  border: 0;
  background: transparent;
  padding: 0;
}

.year-summary{
  cursor: pointer;
  list-style: none;
  padding-left: 0;
  display: flex;
  align-items: baseline;
  gap: .75rem;
}


.year-summary::-webkit-details-marker{ display:none; }

.year-title{
  font-weight:700;
  font-size:1.1rem;
}

.year-meta{
  font-size:.9rem;
  opacity:.7;
}

/* Add a subtle "Show/Hide" cue */
.year-summary::after{
  content:"Show";
  margin-left:auto;
  font-size:.9rem;
  opacity:.8;
}

.year-panel[open] > .year-summary::after{
  content:"Hide";
}

/* Publications list: good wrapping alignment */
.year-panel .pub-list{
  margin: 0;
  padding: .2rem 0 1rem;
  list-style: none;          /* kill ::marker */
  counter-reset: pub 0;
}

/* Each LI becomes: [number column] [content column] */
.year-panel .pub-list > li{
  counter-increment: pub;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

/* Fixed-width number column */
.year-panel .pub-list > li::before{
  content: counter(pub) ".";
  width: 3ch;              /* use 3.6ch if you might have 100+ items */
  text-align: left;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

/* Content column wraps nicely under itself */
.year-panel .pub-list > li > .pub-content{
  flex: 1 1 auto;
  min-width: 0;              /* critical so flex-wrap behaves properly */
}



.archived-wrap{
  padding: 0;
}

.archived-year{
  margin-top: .9rem;
}

.archived-year-header{
  display:flex;
  align-items:baseline;
  gap:.6rem;
  margin: .2rem 0 .4rem;
}

.archived-year-title{
  font-weight:700;
  font-size:1.1rem;
}

/* tighten list inside archived block */
.archived-year .pub-list{
  margin: 0;
  padding-left: .2rem 1.6rem 1rem;
}

.inline-icon{
  height: 1em;           /* scales with text size */
  width: auto;
  vertical-align: -0.15em; /* tweak up/down to match baseline */
  margin: 0 .25em;       /* spacing around the icon */
}




/* =========================
   Research split layout
   ========================= */

/* Normal: text left, media right */
.research-split{
  display: grid;
  grid-template-columns: 1fr minmax(220px, 400px);
  gap: 1.75rem;
  align-items: center;

  /* uniform spacing between blocks */
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* Reversed: media left, text right (swap columns; NO order used) */
.research-split-reverse{
  display: grid;
  grid-template-columns: minmax(220px, 400px) 1fr;
  gap: 1.75rem;
  align-items: center;

  /* uniform spacing between blocks */
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}


/* Remove divider spacing for the first split in a section */
.research-split:first-of-type,
.research-split-reverse:first-of-type,
.research-split-reverse-2:first-of-type{
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Responsive: stack */
@media (max-width: 900px){
  .research-split,
  .research-split-reverse,
  .research-split-reverse-2{
    grid-template-columns: 1fr;
  }
}

/* =========================
   Text styling
   ========================= */
.rs-text h3{
  margin: 0 0 .5rem;
}

.rs-lead{
  margin: 0 0 .75rem;
  font-size: 1.02rem;
  color: #334155;
}

.rs-links{
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* =========================
   Media + figure + captions
   (stable sizing for image & video)
   ========================= */
.rs-media{
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Figure should NOT clip caption; only media box clips */
.rs-media .rs-figure{
  margin: 0;
  width: 100%;
  max-width: 400px; /* match your minmax(..., 400px) */
}

/* Frame for both images and video posters/iframes */
.rs-media .rs-figure .media-box{
  width: 100%;
  aspect-ratio: 16 / 9;  /* change to 3/2 if you prefer */
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  background: #f1f5f9;
}

/* Image fills the media box */
.rs-media .rs-figure .media-box img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Caption */
.rs-media .rs-figure figcaption{
  padding: .6rem .75rem;
  font-size: .9rem;
  color: #64748b;
  background: white;
  text-align: center;
  margin-top: .6rem;
  border-radius: 0.75rem;

  /* ✅ add shadow */
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}


/* =========================
   YouTube thumbnail-to-iframe
   (keeps same size after click)
   ========================= */
.rs-media .yt{
  width: 100%;
  height: 100%;
  position: relative;
}

/* Button fills the box */
.rs-media .yt-btn{
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: block;
  position: relative;
}

/* Poster fills the box */
.rs-media .yt-thumb{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Play icon overlay */
.rs-media .yt-play{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: #ffffff;
  text-shadow: 0 8px 22px rgba(0,0,0,.45);
  pointer-events: none;
}

/* Iframe fills the same box after click */
.rs-media .yt iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}


/* Caption (your original look) */


/* Wider media variant */
.research-split-reverse-2{
  display: grid;
  grid-template-columns: minmax(220px, 600px) 1fr;
  gap: 1.75rem;
  align-items: center;

  /* uniform spacing between blocks */
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.rs-media .rs-figure.rs-figure--lg{
  max-width: 600px;
  
}

.rs-media .rs-figure.rs-figure--lg .media-box--wide img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 900px){
  .research-split-reverse-2{ grid-template-columns: 1fr; }
  .research-split-reverse-2 .rs-figure--lg{ max-width: 100%; }
  .research-split-reverse-2 .rs-media{ justify-content: flex-start; }
}


