/* ==========================================================================
   SPIRE Lab — Yong Zhang Group · HKUST (Guangzhou)
   Design system & stylesheet
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* palette */
  --navy:        #0B2C4D;
  --navy-deep:   #061A30;
  --navy-soft:   #16497B;
  --ink:         #12263A;
  --body:        #41556B;
  --muted:       #7B8CA0;
  --line:        #E2E9F1;
  --line-soft:   #EEF3F9;

  --paper:       #FFFFFF;
  --paper-2:     #F7FAFD;
  --paper-3:     #EDF3FA;

  --amber:       #E9A227;
  --amber-dark:  #B87A12;
  --amber-2:     #FFCE7A;
  --amber-soft:  #FFF6E8;

  --teal:        #0E7C6B;
  --teal-soft:   #E6F5F2;

  --coral:       #C4553A;
  --coral-soft:  #FCEDE8;

  --violet:      #5B52A8;
  --violet-soft: #EFEDFA;

  /* shape */
  --radius:      18px;
  --radius-sm:   11px;
  --radius-xs:   8px;

  /* elevation */
  --shadow-xs: 0 1px 2px rgba(11,44,77,.05);
  --shadow-sm: 0 1px 2px rgba(11,44,77,.05), 0 6px 18px rgba(11,44,77,.06);
  --shadow-md: 0 12px 34px rgba(11,44,77,.10);
  --shadow-lg: 0 30px 70px rgba(11,44,77,.18);

  /* type */
  --serif: "Source Serif 4", Georgia, "Songti SC", "SimSun", serif;
  --sans: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

[id] { scroll-margin-top: 92px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--amber-2); color: var(--navy-deep); }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 68px 0; }
.section--paper { background: var(--paper-2); }
.section--edge { border-top: 1px solid var(--line); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--amber-dark);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
}
.eyebrow--light { color: var(--amber-2); }

.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -.02em;
  max-width: 22ch;
}
.section-title .en {
  display: block; font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: .52em; color: var(--muted); letter-spacing: 0; margin-top: 10px;
}
.section-head { margin-bottom: 52px; }
.section-head--split {
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  gap: 48px; align-items: end;
}
.section-head--split .lead { color: var(--body); font-size: 16.5px; }
.section-head--center { text-align: center; }
.section-head--center .section-title { margin: 0 auto; }
.section-head--center .eyebrow { margin-left: auto; margin-right: auto; }

.lead { font-size: 17px; line-height: 1.85; color: var(--body); }
.small { font-size: 14px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn--primary {
  background: linear-gradient(135deg, var(--amber) 0%, #F3B64D 100%);
  color: #3A2607; box-shadow: 0 8px 22px rgba(233,162,39,.34);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(233,162,39,.42); }
.btn--ghost { border-color: rgba(255,255,255,.34); color: #fff; background: rgba(255,255,255,.05); }
.btn--ghost:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); transform: translateY(-2px); }
.btn--outline { border-color: var(--line); color: var(--navy); background: var(--paper); }
.btn--outline:hover { border-color: var(--navy-soft); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.btn--sm { padding: 10px 20px; font-size: 14px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  height: var(--nav-h);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(11,44,77,.05); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.logo-svg { width: 38px; height: 38px; color: var(--navy); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.brand-text em { font-style: normal; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > a {
  position: relative; padding: 9px 15px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--body);
  white-space: nowrap;   /* a wrapped "Join Us" looked broken at ~830px */
  transition: color .18s ease, background .18s ease;
}
.nav > a::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 4px; height: 2px;
  border-radius: 2px; background: var(--amber);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav > a:hover { color: var(--navy); }
.nav > a:hover::after, .nav > a.is-active::after { transform: scaleX(1); }
.nav > a.is-active { color: var(--navy); }
.nav > a.nav-cta {
  margin-left: 10px; background: var(--navy); color: #fff; border-radius: 999px; padding: 10px 20px;
}
.nav > a.nav-cta::after { display: none; }
.nav > a.nav-cta:hover { background: var(--navy-soft); color: #fff; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--paper); padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 1.8px; background: var(--navy); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy-deep);
  color: #fff;
  padding: 84px 0 0;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(820px 520px at 8% 4%, rgba(233,162,39,.22), transparent 62%),
    radial-gradient(760px 620px at 96% 96%, rgba(22,73,123,.75), transparent 62%),
    linear-gradient(158deg, #0C2E52 0%, #0B2C4D 42%, #061A30 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(60deg, rgba(255,255,255,.055) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(-60deg, rgba(255,255,255,.055) 0 1px, transparent 1px 46px);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  opacity: .9;
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 60px; align-items: center; padding-bottom: 66px;
}
.hero-copy .eyebrow { color: var(--amber-2); }
.hero h1 {
  color: #fff; font-size: clamp(42px, 6vw, 76px);
  letter-spacing: -.035em; line-height: .98; margin-bottom: 4px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--amber-2) 0%, var(--amber) 60%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-fullname {
  font-family: var(--serif); font-size: clamp(19px, 2.3vw, 27px);
  color: #D9E6F5; letter-spacing: .01em; margin-bottom: 6px;
}
.hero-cn { font-size: 15.5px; color: rgba(217,230,245,.72); letter-spacing: .14em; margin-bottom: 26px; }
.hero-lead {
  font-size: 17px; line-height: 1.86; color: rgba(226,237,250,.9);
  max-width: 58ch; margin-bottom: 32px;
}
.hero-lead strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; }
.hero-figure {
  margin: 0; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-figure img { width: 100%; height: 400px; object-fit: cover; }
.hero-figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(6,26,48,0) 30%, rgba(6,26,48,.45) 62%, rgba(6,26,48,.92) 100%);
}
.hero-figure figcaption {
  position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 2;
  font-size: 12.5px; color: rgba(235,243,252,.96); letter-spacing: .02em;
  text-shadow: 0 1px 6px rgba(3,14,28,.85), 0 1px 2px rgba(3,14,28,.9);
}

/* hero stats */
.hero-stats {
  position: relative; z-index: 2;
  border-top: 1px solid rgba(255,255,255,.14);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.hero-stats .stat { padding: 30px 26px 34px; border-right: 1px solid rgba(255,255,255,.1); }
.hero-stats .stat:last-child { border-right: 0; }
.hero-stats .stat b {
  display: block; font-size: clamp(26px, 3vw, 36px); font-weight: 800;
  color: #fff; letter-spacing: -.03em; line-height: 1.1;
}
.hero-stats .stat b span { color: var(--amber-2); font-size: .58em; font-weight: 700; margin-left: 3px; }
.hero-stats .stat p { margin-top: 8px; font-size: 13px; color: rgba(206,223,242,.7); letter-spacing: .02em; }
.hero-stats .stat .stat-link { color: inherit; text-decoration: none; }
.hero-stats .stat .stat-link:hover { color: var(--amber-2); text-decoration: underline; text-underline-offset: 4px; }
.hero-stats .stat .stat-src {
  display: block; margin-top: 5px;
  font-size: 11px; letter-spacing: .04em; color: rgba(206,223,242,.5);
  text-transform: none;
}

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #D3E0EE; }
.news-thumb { position: relative; height: 204px; overflow: hidden; background: var(--paper-3); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-tag {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.94); color: var(--navy);
  box-shadow: var(--shadow-xs);
}
.news-tag--hot { background: var(--amber); color: #3A2607; }
.news-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; margin-bottom: 9px; }
.news-body h3 { font-size: 17.5px; line-height: 1.5; margin-bottom: 10px; }
.news-body p { font-size: 14.5px; line-height: 1.7; color: var(--body); flex: 1; }
.news-more { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--navy); display: inline-flex; align-items: center; gap: 6px; }
.news-more svg { transition: transform .22s ease; }
.news-card:hover .news-more svg { transform: translateX(4px); }

/* ---------- research cards ---------- */
.research-layout { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); gap: 56px; align-items: center; }
.research-figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); background: var(--paper); }
.research-figure img { width: 100%; }
.research-figure figcaption { padding: 14px 20px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-soft); background: var(--paper); }

.dir-list { display: grid; gap: 14px; }
.dir-item {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start;
  padding: 20px 22px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper);
  transition: border-color .22s ease, box-shadow .24s ease, transform .24s ease, background .24s ease;
}
.dir-item:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateX(3px); background: var(--paper); }
.dir-num {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: var(--navy);
  background: var(--amber-soft); border: 1px solid #F6E3C0;
}
.dir-item h3 { font-size: 16.5px; margin-bottom: 5px; }
.dir-item h3 em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 8px; letter-spacing: .02em; }
.dir-item p { font-size: 14.3px; line-height: 1.7; }

/* ---------- feature / highlight band ---------- */
.feature { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.feature::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 460px at 88% 8%, rgba(233,162,39,.19), transparent 62%),
              radial-gradient(700px 500px at 4% 96%, rgba(22,73,123,.6), transparent 62%);
}
.feature .wrap { position: relative; z-index: 2; }
.feature h2 { color: #fff; }
.feature .lead { color: rgba(214,229,246,.88); }
.feature .eyebrow { color: var(--amber-2); }

.feature-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 52px; align-items: start; margin-top: 8px; }
.feature-quote {
  margin: 0 0 26px; padding: 20px 24px; border-left: 3px solid var(--amber);
  background: rgba(255,255,255,.055); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif); font-size: 17.5px; font-style: italic; color: #EAF2FB; line-height: 1.7;
}
.feature-quote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; font-family: var(--sans); color: rgba(206,223,242,.65); }
.feature-points { display: grid; gap: 16px; }
.feature-point { display: grid; grid-template-columns: 26px 1fr; gap: 12px; }
.feature-point .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(233,162,39,.18); color: var(--amber-2); margin-top: 2px; }
.feature-point h4 { color: #fff; font-size: 15.5px; margin-bottom: 4px; }
.feature-point p { font-size: 14.3px; color: rgba(206,223,242,.8); line-height: 1.7; }

.feature-figs { display: grid; gap: 18px; }
.feature-fig { margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: #fff; box-shadow: var(--shadow-md); }
.feature-fig img { width: 100%; }
.feature-fig figcaption { padding: 12px 16px; font-size: 12.2px; color: var(--muted); background: #fff; line-height: 1.6; }
.feature-fig--row { display: grid; grid-template-columns: 1fr 1fr; }
.feature-fig--row figure { margin: 0; }
.feature-fig--row figure + figure { border-left: 1px solid var(--line-soft); }

/* ---------- publications ---------- */
.pub-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pub {
  display: grid; grid-template-columns: 118px 1fr auto; gap: 26px;
  padding: 26px 4px; border-bottom: 1px solid var(--line);
  align-items: start; transition: background .2s ease;
}
.pub:hover { background: var(--paper-2); }
.pub-badge {
  display: inline-flex; flex-direction: column; gap: 5px;
}
.pub-badge .j {
  font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 7px; text-align: center;
}
.j--nature { background: #EAF3EC; color: #1F6B3B; }
.j--science { background: #FDEBE9; color: #B03127; }
.j--natenergy { background: var(--amber-soft); color: var(--amber-dark); }
.j--natmater { background: var(--violet-soft); color: var(--violet); }
.j--natsynth { background: var(--teal-soft); color: var(--teal); }
.j--other { background: var(--paper-3); color: var(--navy-soft); }
.pub-badge .y { font-size: 12px; color: var(--muted); text-align: center; letter-spacing: .06em; }
.pub-title { font-size: 16.5px; line-height: 1.55; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.pub-title a:hover { color: var(--navy-soft); text-decoration: underline; text-underline-offset: 3px; }
.pub-authors { font-size: 13.2px; line-height: 1.75; color: var(--muted); }
.pub-authors b { color: var(--navy); font-weight: 700; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.pill {
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--paper-3); color: var(--navy-soft);
}
.pill--amber { background: var(--amber-soft); color: var(--amber-dark); }
.pill--teal { background: var(--teal-soft); color: var(--teal); }
.pub-link { align-self: center; }
.pub-link a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--navy);
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line);
  transition: all .2s ease; white-space: nowrap;
}
.pub-link a:hover { border-color: var(--navy); background: var(--navy); color: #fff; }

/* ---------- publications: full list ---------- */
.pub-subhead {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 58px 0 8px; font-size: 21px; font-weight: 700; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.3;
}
.pub-subhead:first-of-type { margin-top: 4px; }
.pub-subhead .pub-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 26px; padding: 0 11px; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 800;
}
.pub-subnote { margin-bottom: 24px; max-width: 780px; font-size: 16px; color: var(--body); }

.co-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.co-item {
  padding: 17px 4px; border-bottom: 1px solid var(--line-soft);
  transition: background .2s ease;
}
.co-item:hover { background: var(--paper-2); }
.co-top { display: flex; gap: 12px; align-items: baseline; }
.co-year {
  flex: 0 0 auto; font-size: 12px; font-weight: 800; letter-spacing: .06em;
  color: var(--navy-soft); background: var(--paper-3);
  border-radius: 6px; padding: 3px 8px;
}
.co-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.co-title:hover { color: var(--navy-soft); text-decoration: underline; text-underline-offset: 3px; }
.co-authors { margin-top: 7px; font-size: 12.6px; color: var(--muted); line-height: 1.6; }
.co-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 9px; font-size: 11.8px; color: var(--muted); }
.co-venue { font-weight: 700; color: var(--navy-soft); letter-spacing: .02em; }
.co-pos, .co-cites { letter-spacing: .04em; }
@media (max-width: 640px) {
  .co-top { flex-direction: column; gap: 7px; }
  .pub-subhead { font-size: 19px; margin-top: 44px; }
}

/* ---------- patents ---------- */
.pat-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow-sm);
  overflow: hidden; margin-bottom: 46px;
}
.pat-stat { padding: 26px 26px 24px; border-right: 1px solid var(--line); }
.pat-stat:last-child { border-right: 0; }
.pat-stat b {
  display: block; font-size: 32px; font-weight: 800; line-height: 1;
  color: var(--navy); letter-spacing: -.02em;
}
.pat-stat p { margin-top: 9px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

.pat-list { display: grid; gap: 16px; }
.pat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pat:hover { border-color: var(--navy-soft); box-shadow: var(--shadow-md); }
.pat-top { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 13px; }
.pat-no {
  margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .01em; color: var(--muted);
}
.pat-title { font-size: 17.5px; font-weight: 600; line-height: 1.55; color: var(--ink); margin-bottom: 7px; }
.pat-title a { color: inherit; }
.pat-title a:hover { color: var(--navy-soft); text-decoration: underline; text-underline-offset: 3px; }
/* our English rendering of a title that is Chinese on the record; the Chinese
   line above it is the one that counts, so this sits back in muted grey */
.pat-title-en { font-size: 13.4px; line-height: 1.6; color: var(--muted); margin-bottom: 11px; }
.pat-inventors { font-size: 13.2px; line-height: 1.7; color: var(--muted); }
.pat-inventors b { color: var(--navy); font-weight: 700; }
.pat-pos { color: var(--navy-soft); font-weight: 600; letter-spacing: .02em; }
.pat-abstract { margin-top: 13px; max-width: 92ch; font-size: 13.4px; line-height: 1.8; color: var(--body); }
.pat-meta {
  display: flex; flex-wrap: wrap; gap: 15px 40px;
  margin-top: 17px; padding-top: 15px; border-top: 1px dashed var(--line);
}
.pat-meta dt {
  font-size: 10.5px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--amber-dark); margin-bottom: 4px;
}
.pat-meta dd { font-size: 13.2px; font-weight: 600; color: var(--ink); }

@media (max-width: 900px) {
  .pat-stats { grid-template-columns: repeat(2, 1fr); }
  .pat-stat:nth-child(2) { border-right: 0; }
  .pat-stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .pat-stats { grid-template-columns: 1fr; }
  .pat-stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .pat-stat:last-child { border-bottom: 0; }
  .pat { padding: 20px 18px; }
  .pat-no { margin-left: 0; width: 100%; }
  .pat-meta { gap: 14px 26px; }
}

/* ---------- people ---------- */
.pi-card {
  display: grid; grid-template-columns: 340px 1fr; gap: 46px; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-sm);
}
.pi-photo { border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-3); }
.pi-photo img { width: 100%; height: 340px; object-fit: cover; object-position: center 28%; }
.pi-photo-meta { margin-top: 16px; display: grid; gap: 9px; }
.pi-photo-meta a, .pi-photo-meta span {
  display: flex; align-items: center; gap: 9px; font-size: 13.6px; color: var(--body);
}
.pi-photo-meta svg { color: var(--amber-dark); flex: none; }
.pi-photo-meta a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.pi-name { font-size: 30px; letter-spacing: -.02em; }
.pi-name span { font-family: var(--serif); font-size: .62em; color: var(--muted); font-weight: 400; margin-left: 10px; }
.pi-role { font-size: 14.5px; color: var(--amber-dark); font-weight: 600; letter-spacing: .02em; margin: 8px 0 20px; }
.pi-bio p { font-size: 15px; line-height: 1.85; margin-bottom: 14px; }
.pi-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 22px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.pi-fact { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 13.6px; align-items: start; }
.pi-fact svg { color: var(--amber-dark); margin-top: 4px; }
.pi-fact b { color: var(--ink); font-weight: 600; }

.member-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.member {
  background: var(--paper); border: 1px dashed #CBD8E6; border-radius: var(--radius-sm);
  padding: 26px 22px; text-align: center;
  transition: border-color .24s ease, background .24s ease;
}
.member:hover { border-color: var(--amber); background: var(--amber-soft); }
.member .ico { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-3); color: var(--navy); }
.member h4 { font-size: 15.5px; margin-bottom: 6px; }
.member p { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.member .slot { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--amber-dark); }

/* ---------- roster (real members) ---------- */
.roster { display: grid; gap: 42px; }
.roster-group { scroll-margin-top: 96px; }
.roster-head { display: flex; align-items: baseline; gap: 13px; flex-wrap: wrap; padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.roster-head h3 { font-size: 17px; margin: 0; letter-spacing: .01em; }
.roster-head .en { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.roster-head .cnt { margin-left: auto; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--navy); background: var(--paper-3); border-radius: 999px; padding: 4px 13px; white-space: nowrap; }
.roster-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
.roster-grid--wide { grid-template-columns: repeat(3, 1fr); }
.person {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); overflow: hidden;
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
.person:hover { border-color: var(--amber); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.person .avatar {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5;
  background: var(--paper-3); overflow: hidden;
  border-bottom: 3px solid var(--grp, #DDE5ED);
}
.person .avatar img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center 32%;
  transition: transform .7s cubic-bezier(.2,.7,.3,1);
}
.person:hover .avatar img { transform: scale(1.045); }
.person .meta { min-width: 0; padding: 13px 16px 15px; }
.person .name { font-size: 16.2px; font-weight: 700; color: var(--ink); line-height: 1.35; margin: 0; }
.person .en { font-size: 12.2px; color: var(--muted); letter-spacing: .02em; line-height: 1.5; margin: 2px 0 0; }
.person .mail {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 10px;
  font-size: 11.6px; line-height: 1.45; color: var(--navy-soft);
  text-decoration: none;
}
.person .mail span { min-width: 0; overflow-wrap: anywhere; }
.person .mail svg { flex: 0 0 auto; margin-top: 1px; opacity: .66; }
.person .mail:hover { color: var(--amber-dark); text-decoration: underline; }
.person .tagline { font-size: 11.8px; color: var(--amber-dark); font-weight: 700; letter-spacing: .04em; margin: 3px 0 0; }
.person--pd    { --grp: #4A87C8; }
.person--phd   { --grp: #E9A227; }
.person--mphil { --grp: #2FA093; }
.person--ug    { --grp: #6C5CE0; }
.person--ra    { --grp: #E2725B; }
.person--visit { --grp: #8FA3B8; }
.roster-group--alumni .person { border-style: dashed; background: var(--paper-2); }
.roster-group--alumni .person .name { color: var(--body); }
.roster-group--alumni .avatar { --grp: #C9D4E0; }
.roster-group--alumni .avatar img { filter: saturate(.72); }
.roster-group--alumni .person:hover .avatar img { filter: none; }
.roster-note { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* group photos */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  align-items: start; align-content: start;
}
.gallery figure {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--paper); box-shadow: var(--shadow-xs);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.gallery figure:hover { border-color: var(--amber); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.gallery .shot { position: relative; overflow: hidden; background: var(--paper-3); }
.gallery .shot img {
  display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3;
  object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.gallery figure:hover .shot img { transform: scale(1.045); }
.gallery .shot::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,26,48,0) 58%, rgba(6,26,48,.34) 100%);
  pointer-events: none;
}
.gallery .wide { grid-column: span 2; }
.gallery .wide .shot img { aspect-ratio: 16 / 9; }
.gallery .tall .shot img { aspect-ratio: 3 / 4; }
.gallery figcaption {
  padding: 13px 16px; font-size: 12.6px; color: var(--muted); line-height: 1.6;
  border-top: 1px solid var(--line-soft);
}
.gallery figcaption b { display: block; color: var(--ink); font-size: 13.4px; font-weight: 700; margin-bottom: 3px; }

/* home page team photo */
.team-photo { margin: 0 0 26px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); box-shadow: var(--shadow-xs); }
.team-photo img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 42%; }
.team-photo figcaption { padding: 14px 20px; font-size: 12.8px; color: var(--muted); line-height: 1.65; border-top: 1px solid var(--line-soft); }

/* PI card second image */
.pi-photo--lab { margin-top: 18px; }
.pi-photo--lab img { height: 190px; object-position: center 34%; }

/* home page member overview */
.people-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.people-strip .chip {
  padding: 15px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); text-align: center; transition: border-color .22s ease, transform .22s ease;
}
.people-strip .chip:hover { border-color: var(--amber); transform: translateY(-2px); }
.people-strip .n { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.1; letter-spacing: -.01em; margin: 0; }
.people-strip .k { font-size: 12.3px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }

/* ---------- join ---------- */
.join-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.join-card {
  position: relative; padding: 30px 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper);
  transition: box-shadow .26s ease, transform .26s ease, border-color .26s ease;
  overflow: hidden;
}
.join-card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--amber), var(--amber-2));
  transform: scaleY(0); transform-origin: top; transition: transform .3s ease;
}
.join-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.join-card:hover::after { transform: scaleY(1); }
.join-card h3 { font-size: 19px; margin-bottom: 8px; }
.join-card h3 em { font-style: normal; font-family: var(--serif); font-size: 13px; color: var(--muted); display: block; margin-top: 4px; font-weight: 400; }
.join-card > p { font-size: 14.5px; line-height: 1.78; margin-bottom: 18px; }
.tick-list { display: grid; gap: 10px; }
.tick-list li { display: grid; grid-template-columns: 20px 1fr; gap: 11px; font-size: 14.2px; line-height: 1.7; align-items: start; }
.tick-list svg { color: var(--teal); margin-top: 4px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 12px; }
.step { position: relative; padding: 0 26px 0 0; }
.step::after {
  content: ""; position: absolute; top: 17px; right: 8px; width: calc(100% - 52px); height: 1px;
  background: linear-gradient(90deg, var(--line), transparent); display: none;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: #fff; background: var(--navy); margin-bottom: 16px;
}
.step h4 { font-size: 15.5px; margin-bottom: 7px; }
.step p { font-size: 13.8px; line-height: 1.7; }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; color: #fff; background: var(--navy-deep);
}
.cta-img { position: absolute; inset: 0; }
.cta-img img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.cta::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(6,26,48,.97) 0%, rgba(9,36,63,.9) 44%, rgba(11,44,77,.6) 100%);
}
.cta .wrap { position: relative; z-index: 2; padding-top: 74px; padding-bottom: 74px; }
.cta-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 44px; align-items: center; }
.cta h2 { color: #fff; font-size: clamp(26px, 3.1vw, 38px); letter-spacing: -.02em; margin-bottom: 14px; }
.cta p { color: rgba(214,229,246,.85); font-size: 16px; max-width: 54ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }

/* ---------- footer ---------- */
.site-footer { background: #04121F; color: rgba(190,208,228,.72); padding: 66px 0 30px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 42px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.09); }
.footer-grid h4 { color: #fff; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid ul { display: grid; gap: 11px; }
.footer-grid a:hover { color: var(--amber-2); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .logo-svg { color: #fff; width: 34px; height: 34px; }
.footer-brand strong { color: #fff; font-size: 17px; }
.footer-about { font-size: 13.6px; line-height: 1.8; max-width: 40ch; }
.footer-contact li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 13.6px; line-height: 1.65; align-items: start; }
.footer-contact svg { margin-top: 4px; color: var(--amber); }
.footer-bottom {
  padding-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 26px;
  justify-content: space-between; font-size: 12.6px; color: rgba(160,182,206,.62);
}

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, #0C2E52, #061A30 88%);
  padding: 74px 0 62px;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(60deg, rgba(255,255,255,.05) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(-60deg, rgba(255,255,255,.05) 0 1px, transparent 1px 46px);
  -webkit-mask-image: linear-gradient(90deg, #000 10%, transparent 85%);
  mask-image: linear-gradient(90deg, #000 10%, transparent 85%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.03em; margin-bottom: 16px; }
.page-hero .lead { color: rgba(214,229,246,.85); max-width: 68ch; }
.page-hero .eyebrow { color: var(--amber-2); }
.crumb { font-size: 12.8px; color: rgba(190,210,232,.6); letter-spacing: .06em; margin-bottom: 20px; }
.crumb a:hover { color: var(--amber-2); }

/* ---------- prose blocks ---------- */
.prose p { font-size: 15.6px; line-height: 1.9; margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 46px; }

.figure-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.figure-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); box-shadow: var(--shadow-xs); }
.figure-card img { width: 100%; }
.figure-card figcaption { padding: 14px 18px; font-size: 12.6px; color: var(--muted); line-height: 1.65; border-top: 1px solid var(--line-soft); }
.figure-card--wide { grid-column: 1 / -1; }
/* Paper figures come in different shapes; giving every card the same picture
   box keeps a row level, and because both the figures and the card are white
   the letterboxing is invisible. */
.figure-row--uniform .figure-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff;
}
.fig-row-title {
  font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: -.01em;
  margin: 38px 0 18px;
}
.figure-row + .fig-row-title { margin-top: 44px; }

.note {
  padding: 18px 22px; border-radius: var(--radius-sm);
  background: var(--amber-soft); border: 1px solid #F5E4C4;
  font-size: 14px; color: #6B4A0C; line-height: 1.75;
}
.note strong { color: #4A3208; }

.dir-block { padding: 54px 0; border-bottom: 1px solid var(--line); }
.dir-block:last-child { border-bottom: 0; }
.dir-block-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.85fr); gap: 52px; align-items: center; }
.dir-block-grid--rev > :first-child { order: 2; }
.dir-block h2 { font-size: clamp(23px, 2.6vw, 31px); margin-bottom: 6px; letter-spacing: -.02em; }
.dir-block .dir-en { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

/* ---------- reveal (visible by default; .reveal-init is added by JS when animations are enabled) ---------- */
.reveal-init { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal-init.is-in { opacity: 1; transform: none; }

/* ---------- to top ---------- */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 80;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line);
  background: rgba(255,255,255,.94); color: var(--navy);
  box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none;
  transition: opacity .28s ease, transform .28s ease, box-shadow .24s ease;
  backdrop-filter: blur(8px);
}
.to-top.is-on { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  /* seven nav entries (six links + the contact pill) after Patents was added, so
     tighten them before the bar has to collapse into the burger at 820px */
  .nav { gap: 0; }
  .nav > a { padding: 9px 11px; font-size: 13.6px; }
  .nav > a::after { left: 11px; right: 11px; }
  .nav > a.nav-cta { padding: 9px 15px; margin-left: 7px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-figure img { height: 340px; }
  .research-layout, .feature-grid, .cta-inner, .pi-card, .dir-block-grid { grid-template-columns: 1fr; gap: 34px; }
  .dir-block-grid--rev > :first-child { order: 0; }
  .section-head--split { grid-template-columns: 1fr; gap: 22px; }
  .news-grid, .member-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 34px 0; }
  .pi-photo img { height: 300px; }
  .pi-photo--lab img { height: 170px; }
  .roster-grid, .roster-grid--wide { grid-template-columns: repeat(3, 1fr); }
  .people-strip { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* The nav collapses into the burger at 900px rather than 820px: with seven
   entries (Patents added) the row no longer fits comfortably below that, and a
   wrapped "Join Us" reads as a layout bug. Everything else still reflows at 820. */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line);
    padding: 14px 20px 20px; box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    backdrop-filter: blur(14px);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav > a { padding: 13px 14px; font-size: 15.5px; }
  .nav > a::after { display: none; }
  .nav > a.nav-cta { margin: 8px 0 0; text-align: center; justify-content: center; }
}

@media (max-width: 820px) {
  .section { padding: 68px 0; }
  .wrap { padding: 0 20px; }
  .hero { padding-top: 56px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats .stat:nth-child(2) { border-right: 0; }
  .hero-stats .stat:nth-child(1), .hero-stats .stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .pub { grid-template-columns: 1fr; gap: 14px; }
  .pub-badge { flex-direction: row; align-items: center; gap: 10px; }
  .pub-link { justify-self: start; }
  .figure-row, .two-col, .join-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .cta-inner { grid-template-columns: 1fr; }
  .cta-actions { justify-content: flex-start; }
  .pi-facts { grid-template-columns: 1fr; }
  .roster-grid, .roster-grid--wide { grid-template-columns: repeat(2, 1fr); }
  .people-strip { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .news-grid, .member-grid, .steps { grid-template-columns: 1fr; }
  .hero-figure img { height: 250px; }
  .pi-card { padding: 22px; }
  .pi-photo img { height: 240px; }
  .pi-photo--lab img { height: 150px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-title { max-width: none; }
  .roster-grid, .roster-grid--wide { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
  .roster-head .cnt { margin-left: 0; }
  .gallery { grid-template-columns: 1fr; gap: 14px; }
  .gallery .wide { grid-column: auto; }
  .gallery .wide .shot img { aspect-ratio: 4 / 3; }
  .team-photo img { aspect-ratio: 16 / 10; }
  /* Narrow screens: two-column portrait cards, with tighter email and name spacing */
  .wrap { padding: 0 20px; }
  .person .meta { padding: 10px 11px 12px; }
  .person .name { font-size: 14.4px; }
  .person .en { font-size: 11.4px; }
  .person .mail { margin-top: 7px; font-size: 10.4px; gap: 5px; }
  .person .mail svg { width: 12px; height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal-init { opacity: 1; transform: none; }
}

@media print {
  .site-header, .to-top, .nav, .cta { display: none; }
  body { color: #000; }
}
