.fm-page {
  background: #fff;
  --hero-image: url("../assets/cuhksz-main-campus-hero.webp");
  --hero-image-mobile: url("../assets/cuhksz-main-campus-hero-mobile.webp");
  --hero-position: center center;
}

.page-vision {
  --hero-image: url("../assets/cuhksz-vision-hero.webp");
  --hero-image-mobile: url("../assets/cuhksz-vision-hero-mobile.webp");
  --hero-position: 56% center;
}

.page-publications {
  --hero-image: url("../assets/cuhksz-publications-hero.webp");
  --hero-image-mobile: url("../assets/cuhksz-publications-hero-mobile.webp");
  --hero-position: center 52%;
}

.page-people {
  --hero-image: url("../assets/cuhksz-people-hero.webp");
  --hero-image-mobile: url("../assets/cuhksz-people-hero-mobile.webp");
  --hero-position: 50% 48%;
}

.page-awards {
  --hero-image: url("../assets/cuhksz-awards-hero.webp");
  --hero-image-mobile: url("../assets/cuhksz-awards-hero-mobile.webp");
  --hero-position: center center;
}

.page-join {
  --hero-image: url("../assets/cuhksz-join-hero.webp");
  --hero-image-mobile: url("../assets/cuhksz-join-hero-mobile.webp");
  --hero-position: 58% center;
}

.fm-page .hero {
  min-height: 62vh;
  align-items: flex-end;
  padding: 140px 0 72px;
}

.fm-page .hero h1 {
  max-width: 980px;
}

.home-page .hero h1 {
  max-width: 1180px;
}

.fm-page .hero p {
  max-width: 760px;
}

.fm-main {
  background: #fff;
}

.fm-section {
  padding: 92px 0;
}

.fm-section.is-soft {
  background: var(--neutral-20);
}

.fm-section.is-dark {
  background: var(--neutral-100);
  color: #fff;
}

.fm-section-head {
  max-width: 820px;
  margin-bottom: 42px;
}

.fm-section-head-wide {
  max-width: 1120px;
}

.fm-section-head.is-centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.fm-eyebrow {
  margin-bottom: 14px;
  color: var(--cuhk-gold);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fm-section h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

html[lang="zh-CN"] .fm-section h2 {
  letter-spacing: 0;
}

html[lang="zh-CN"] .fm-collaborators-title {
  max-width: none;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  font-size: clamp(15px, 4vw, 40px);
}

.fm-section-head p,
.fm-lead {
  margin-top: 18px;
  color: var(--neutral-80);
  font-size: var(--fs-lead);
  line-height: 1.65;
}

.is-dark .fm-section-head p,
.is-dark .fm-lead {
  color: rgba(255, 255, 255, 0.76);
}

.fm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.fm-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 34px 32px;
  border: 1px solid var(--tint-line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.fm-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cuhk-gold), var(--cuhk-purple) 60%, var(--cuhk-purple-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.fm-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.fm-card:hover::before {
  transform: scaleX(1);
}

.is-dark .fm-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.is-dark .fm-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Card icon / index badge */
.fm-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(143, 35, 135, 0.12), rgba(63, 0, 63, 0.08));
  color: var(--cuhk-purple);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
  flex-shrink: 0;
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease;
}

.fm-card-badge img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.fm-card:hover .fm-card-badge {
  background: var(--gradient-soft);
  color: #fff;
  transform: scale(1.05);
}

.is-dark .fm-card-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.fm-card h3 {
  margin-bottom: 12px;
  font-size: var(--fs-h3);
  line-height: 1.25;
}

.fm-card p,
.fm-card li {
  color: var(--neutral-70);
  font-size: 16px;
  line-height: 1.65;
}

.is-dark .fm-card p,
.is-dark .fm-card li {
  color: rgba(255, 255, 255, 0.75);
}

.fm-card ul {
  display: grid;
  gap: 9px;
  margin-top: 8px;
}

/* Optional 'learn more' affordance inside cards */
.fm-card-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--cuhk-purple);
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.fm-card:hover .fm-card-more {
  opacity: 1;
  transform: translateX(0);
}

.is-dark .fm-card-more {
  color: var(--cuhk-purple-light);
}

.fm-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--neutral-30);
}

.fm-stat {
  padding: 30px;
  background: #fff;
}

.fm-stat strong {
  display: block;
  color: var(--cuhk-purple);
  font-size: 42px;
  line-height: 1;
}

.fm-stat span {
  display: block;
  margin-top: 10px;
  color: var(--neutral-70);
  font-weight: 700;
}

.fm-list {
  display: grid;
  gap: 16px;
}

.fm-item {
  position: relative;
  padding: 22px 26px 22px 28px;
  border: 1px solid var(--tint-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease, border-color 0.32s ease;
}

.fm-item::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--cuhk-gold), var(--cuhk-purple));
  opacity: 0;
  transition: opacity 0.32s ease;
}

.fm-item:hover {
  transform: translateX(4px);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.fm-item:hover::before {
  opacity: 1;
}

.fm-pub-top {
  margin-bottom: 10px;
}

.fm-item h3 {
  max-width: 940px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--neutral-100);
}

.fm-citation {
  margin-top: 7px;
  color: var(--neutral-70);
  font-size: 14px;
  line-height: 1.55;
}

.fm-au-self {
  color: inherit;
  font-weight: inherit;
}

.fm-pub-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
}

.fm-meta {
  color: var(--neutral-60);
  font-size: 13px;
  line-height: 1.5;
}

.fm-pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid rgba(117, 15, 109, 0.28);
  border-radius: 999px;
  color: var(--cuhk-purple);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.fm-pub-link:hover {
  background: var(--cuhk-purple);
  color: #fff;
}

/* Venue badge color system */
.fm-venue {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fm-venue.is-top { background: #efe1ee; color: #6a0d63; }
.fm-venue.is-conf { background: #e3edf7; color: #1f5d8c; }
.fm-venue.is-journal { background: #e7f3ec; color: #1c7a4f; }
.fm-venue.is-preprint { background: #f3eede; color: #876a12; }
.fm-venue.is-other { background: #ece9ef; color: #5c5160; }

.fm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fm-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(117, 15, 109, 0.2);
  border-radius: 999px;
  color: var(--cuhk-purple);
  font-size: 12px;
  font-weight: 800;
}

/* ---- PI feature card ---- */
.fm-pi-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 38px;
  align-items: center;
  padding: 36px;
  margin-bottom: 18px;
  border: 1px solid var(--tint-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(117, 15, 109, 0.06), transparent 55%),
    #fff;
  box-shadow: var(--shadow-md);
}

.fm-pi-photo img {
  width: 220px;
  height: 260px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.fm-pi-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--neutral-100);
}

.fm-pi-zh {
  margin-left: 8px;
  font-size: 19px;
  font-weight: 600;
  color: var(--neutral-60);
}

.fm-pi-role {
  margin-top: 8px;
  color: var(--cuhk-purple);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.fm-pi-bio {
  margin-top: 14px;
  max-width: 760px;
  color: var(--neutral-70);
  font-size: 15px;
  line-height: 1.7;
}

.fm-pi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.fm-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(117, 15, 109, 0.07);
  color: var(--cuhk-purple);
  font-size: 13px;
  font-weight: 700;
}

/* ---- People sections ---- */
.fm-people-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 52px 0 22px;
}

.fm-people-divider h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--neutral-100);
}

.fm-people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ---- Member card ---- */
.fm-person {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--tint-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease, border-color 0.32s ease;
}

.fm-person::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.fm-person:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.fm-person:hover::after {
  opacity: 1;
}

.fm-person-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fm-person-photo {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(117, 15, 109, 0.18);
}

.fm-initials {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.fm-person h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--neutral-100);
}

.fm-role {
  margin-top: 4px;
  color: var(--cuhk-purple);
  font-size: 13px;
  font-weight: 700;
}

.fm-degree {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--neutral-30);
  color: var(--neutral-70);
  font-size: 13px;
  line-height: 1.5;
}

.fm-person-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.fm-chip-sm {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--neutral-20);
  color: var(--neutral-80);
  font-size: 12px;
  font-weight: 600;
}

.fm-person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.fm-person-links a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--tint-line);
  border-radius: 999px;
  color: var(--neutral-80);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.fm-person-links a:hover {
  border-color: var(--cuhk-purple);
  background: var(--cuhk-purple);
  color: #fff;
}

/* ---- Rich member card ---- */
.fm-people-grid-rich {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.fm-person-rich {
  display: flex;
  flex-direction: row;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--tint-line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease;
}

.fm-person-rich:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.fm-person-rich-photo {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}

.fm-person-rich-photo img {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.fm-person-rich-photo .fm-initials {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  font-size: 24px;
}

.fm-person-rich-body {
  flex: 1;
  min-width: 0;
}

.fm-person-rich-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-100);
  margin: 0;
}

.fm-person-rich-body .fm-role {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cuhk-purple);
}

.fm-person-detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--neutral-30);
}

.fm-detail-section {
  margin-bottom: 10px;
}

.fm-detail-section:last-child {
  margin-bottom: 0;
}

.fm-detail-section h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--neutral-60);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}

.fm-detail-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fm-detail-section li {
  font-size: 13px;
  color: var(--neutral-80);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}

.fm-detail-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cuhk-purple);
  opacity: 0.5;
}

@media (max-width: 991px) {
  .fm-people-grid-rich {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .fm-person-rich {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .fm-detail-section li {
    padding-left: 0;
  }
  .fm-detail-section li::before {
    display: none;
  }
}

.fm-pub-section {
  margin-top: 46px;
}

.fm-pub-section:first-of-type {
  margin-top: 0;
}

.fm-year {
  position: sticky;
  top: 76px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 0;
  background: linear-gradient(180deg, var(--neutral-20) 70%, rgba(247, 245, 248, 0));
  color: var(--neutral-100);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.fm-year .fm-tag {
  border-color: rgba(117, 15, 109, 0.22);
  background: rgba(117, 15, 109, 0.07);
}

/* Publications filter bar */
.fm-year-nav {
  position: sticky;
  top: 76px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  padding: 10px 12px;
  border: 1px solid var(--tint-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-xs);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .fm-year-nav {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
  }
}

.fm-year-nav a {
  flex: none;
  min-width: 56px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--neutral-70);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

.fm-year-nav a:hover {
  background: var(--tint-soft);
  color: var(--cuhk-purple);
}

.fm-year-nav a.is-active {
  background: var(--gradient-soft);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.fm-item.is-hidden {
  display: none;
}

.fm-pub-section.is-empty {
  display: none;
}

.fm-actions {
  margin-top: 28px;
}

.fm-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--cuhk-purple);
  border-radius: 999px;
  color: var(--cuhk-purple);
  font-weight: 800;
}

.fm-button:hover {
  background: var(--cuhk-purple);
  color: #fff;
}

.fm-footer {
  padding: 36px 0;
  background: var(--neutral-100);
  color: rgba(255, 255, 255, 0.66);
}

.fm-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.fm-footer strong {
  color: #fff;
}

@media (max-width: 991px) {
  .fm-page .hero {
    min-height: 56vh;
    padding: 112px 0 60px;
  }

  .fm-grid,
  .fm-grid.two,
  .fm-stat-row,
  .fm-people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fm-pi-card {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
    justify-items: center;
    padding: 28px;
  }

  .fm-pi-photo img {
    width: 160px;
    height: 190px;
  }

  .fm-pi-tags,
  .fm-person-links {
    justify-content: center;
  }

  .fm-pi-bio {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .fm-page {
    --hero-image: var(--hero-image-mobile);
  }

  .fm-page .hero {
    min-height: 64vh;
    padding-top: 116px;
  }

  .fm-section-head-wide {
    max-width: 100%;
  }

  .fm-page .hero h1,
  .fm-section h2 {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  html[lang="zh-CN"] .fm-collaborators-title {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    font-size: clamp(14px, 4.4vw, 24px);
    line-height: 1.24;
  }

  html[lang="zh-CN"] .fm-page .hero h1 {
    max-width: 11em;
  }

  .fm-section {
    padding: 64px 0;
  }

  .fm-section h2 {
    font-size: 31px;
  }

  .fm-grid,
  .fm-grid.two,
  .fm-stat-row,
  .fm-people-grid {
    grid-template-columns: 1fr;
  }

  .fm-footer .container {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== Homepage enriched components ===== */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 16px rgba(21, 19, 26, 0.32);
  animation: fadeUp 0.8s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--cuhk-gold);
  border-radius: 2px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-btn.primary {
  background: #fff;
  color: var(--cuhk-purple);
  box-shadow: var(--shadow-sm);
}

.hero-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}

.hero-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

/* Stat row lifted card */
.fm-stat-lift {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 64px;
  padding: 14px 10px;
  border: 1px solid var(--tint-line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.fm-stat-lift .fm-stat {
  position: relative;
  padding: 18px 20px;
  text-align: center;
  background: transparent;
}

.fm-stat-lift .fm-stat + .fm-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 46px;
  background: var(--tint-line);
}

.fm-stat-lift .fm-stat strong {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
}

.fm-stat-lift .fm-stat span {
  font-size: 14px;
}

@media (max-width: 640px) {
  .fm-stat-lift { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-stat-lift .fm-stat:nth-child(odd)::before { display: none; }
  .fm-stat-lift .fm-stat:nth-child(3)::after,
  .fm-stat-lift .fm-stat:nth-child(4)::after {
    content: "";
    position: absolute;
    top: 0;
    left: 14%;
    width: 72%;
    height: 1px;
    background: var(--tint-line);
  }
}

/* Section head row with side link */
.fm-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  max-width: none;
}

.fm-head-link {
  flex: none;
  color: var(--cuhk-purple);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.fm-head-link:hover { opacity: 0.7; }

/* Selected publications list on homepage */
.fm-list {
  display: grid;
  gap: 14px;
}

/* Partners */
.fm-partners {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.fm-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  padding: 0 18px;
  border: 1px solid var(--tint-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  color: var(--neutral-80);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.fm-partner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  color: var(--cuhk-purple);
}

.fm-partners-logo .fm-partner {
  padding: 32px 24px 28px;
  min-height: 200px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  position: relative;
  overflow: visible;
}
.fm-partners-logo .fm-partner img {
  max-height: 80px;
  max-width: 180px;
  width: auto;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}
.fm-partner-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-80);
  text-align: center;
  line-height: 1.3;
  margin-top: auto;
  padding-top: 24px;
  flex-shrink: 0;
}
/* Individual logo adjustments */
.fm-partner:nth-child(1) img {
  transform: scale(1.3);
}
.fm-partner:nth-child(2) img {
  transform: scale(1.6);
  position: relative;
  z-index: 2;
}
.fm-partner:nth-child(4) img {
  transform: scale(1.15) translateY(4px);
}
.fm-partner:nth-child(5) img {
  transform: translateY(-6px);
}

/* Minimal footer */
.fm-footer-minimal {
  padding: 32px 0;
}
.fm-footer-minimal-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.fm-footer-left {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.fm-footer-right {
  display: flex;
  gap: 24px;
  align-items: center;
}
.fm-footer-right a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.fm-footer-right a:hover {
  color: #fff;
}

/* Rich footer (legacy) */
.fm-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.fm-footer-brand p {
  margin-top: 10px;
  max-width: 360px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.6;
}

.fm-footer-col h4 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fm-footer-col a {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  transition: color 0.2s ease;
}

.fm-footer-col a:hover { color: #fff; }

.fm-footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

@media (max-width: 991px) {
  .fm-partners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-footer-grid { grid-template-columns: 1fr 1fr; }
  .fm-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .fm-head-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fm-partners { grid-template-columns: 1fr 1fr; }
  .fm-footer-grid { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-btn { flex: 1; justify-content: center; }
}

/* ===== Join Us page ===== */
.fm-prose {
  max-width: 880px;
  padding: 30px 34px;
  border-left: 4px solid var(--cuhk-purple);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--tint-soft);
}

.fm-prose p {
  margin-top: 10px;
  color: var(--neutral-80);
  font-size: 16px;
  line-height: 1.75;
}

.fm-mt { margin-top: 64px; }

.fm-apply {
  margin-top: 0;
  padding: 44px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(217, 163, 0, 0.12), transparent 55%),
    var(--gradient-soft);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.fm-apply .fm-eyebrow { color: var(--gold-soft); }

.fm-apply-head h2 { color: #fff; }

.fm-apply-mails {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 28px;
}

.fm-mail {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.fm-mail:hover { background: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }

.fm-steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.fm-steps li {
  position: relative;
  padding: 2px 0 2px 46px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.65;
  counter-increment: step;
}

.fm-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: var(--cuhk-purple);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

.fm-apply-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

@media (max-width: 640px) {
  .fm-prose { padding: 22px; }
  .fm-apply { padding: 28px 22px; }
}


/* ===== Research Translation: left-image right-text cards ===== */
.fm-award-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.fm-award {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--tint-line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(21, 19, 26, 0.04), 0 10px 26px rgba(21, 19, 26, 0.05);
  overflow: hidden;
  min-height: 200px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}
.fm-award::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--cuhk-purple), var(--cuhk-gold));
  opacity: 0.55;
  transition: opacity 0.28s ease;
}
.fm-award:hover {
  transform: translateY(-4px);
  border-color: rgba(117, 15, 109, 0.22);
  box-shadow: 0 6px 16px rgba(21, 19, 26, 0.06), 0 22px 48px rgba(117, 15, 109, 0.12);
}
.fm-award:hover::before { opacity: 1; }

.fm-award-img {
  flex: 0 0 45%;
  height: 200px;
  overflow: hidden;
  border-radius: 18px 0 0 18px;
}
.fm-award-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fm-award-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #fff;
}
.fm-award-contain-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: #fff;
}
.fm-award-contain-panel img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.fm-award-logo-panel .fm-partner-logo {
  max-width: 100%;
  width: min(92%, 360px);
  height: auto;
  max-height: 180px;
  object-fit: contain;
  display: block;
}
.fm-award-img.fm-award-logo-panel .fm-partner-logo-square {
  width: min(68%, 164px);
  height: auto;
  max-height: 164px;
  object-fit: contain;
}
.fm-award-img.fm-award-logo-panel .fm-partner-logo-csg {
  width: min(92%, 504px);
  max-height: 252px;
}
.fm-award-img.fm-award-logo-panel .fm-award-logo-wide {
  width: min(88%, 300px);
  max-height: 96px;
}
.fm-award-body {
  min-width: 0;
  flex: 1;
  min-height: 200px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fm-award-year {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cuhk-purple);
  background: rgba(117, 15, 109, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  width: fit-content;
}
.fm-award-body h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.4;
  font-weight: 700;
  color: var(--neutral-90);
  margin: 0 0 8px;
}
.fm-award-body p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--neutral-60);
  margin: 0;
}

@media (max-width: 900px) {
  .fm-award-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .fm-award {
    flex-direction: column;
  }
  .fm-award-img {
    flex: none;
    width: 100%;
    min-height: 160px;
    height: 200px;
    max-height: 200px;
    border-radius: 18px 18px 0 0;
  }
  .fm-award-body {
    min-height: auto;
    padding: 20px 18px;
  }
}


/* ===== Mission section reduced spacing ===== */
.fm-section-mission {
  padding: 56px 0;
}

/* ===== Mission head full-width + stat row below ===== */
.fm-mission-head {
  max-width: none;
  margin-bottom: 40px;
}
.fm-mission-head h2 {
  max-width: 1100px;
}
.fm-mission-head p {
  max-width: 1100px;
}


/* ===== Batch refinements (round 4) ===== */

/* Stat row: 3 items, pushed further down */
.fm-stat-lower {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-top: 56px;
}

/* Research-direction grid: force a single row of 4 cards */
.fm-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* No-wrap heading (desktop) */
.fm-nowrap-h {
  white-space: nowrap;
}

/* Partners: single non-wrapping row */
.fm-partners-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
}
.fm-partners-row .fm-partner {
  flex: 1 1 0;
  min-width: 0;
  font-size: 15px;
  padding: 40px 24px 36px;
}

/* ---- Mobile adaptation for these blocks ---- */
@media (max-width: 900px) {
  .fm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-partners-row { flex-wrap: wrap; }
  .fm-partners-row .fm-partner { flex: 1 1 30%; }
  .fm-nowrap-h { white-space: normal; }
}

@media (max-width: 600px) {
  .fm-grid-4 { grid-template-columns: 1fr; }
  .fm-stat-lower { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .fm-partners-row .fm-partner { flex: 1 1 45%; font-size: 14px; }
}


/* ===== Round 4: consolidated mobile polish ===== */
@media (max-width: 600px) {
  /* Hero scales down on phones */
  .hero h1 { font-size: clamp(1.7rem, 8.5vw, 2.4rem); line-height: 1.22; }
  .hero p, .hero-sub { font-size: 15px; line-height: 1.65; }
  .hero-eyebrow { font-size: 13px; }

  /* Stat row: two-up on phones reads better than cramped 3-up */
  .fm-stat-lower { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px; }
  .fm-stat-lower .fm-stat:last-child { grid-column: 1 / -1; }
  .fm-stat .fm-stat-num, .fm-stat-num { font-size: 30px; }

  /* Section headings tighten */
  .fm-section h2, .fm-mission-head h2 { font-size: clamp(1.4rem, 6.6vw, 1.9rem); line-height: 1.28; }
  .fm-section .fm-head p, .fm-mission-head p { font-size: 15px; }

  /* Partners: allow comfortable wrapping */
  .fm-partners-row { flex-wrap: wrap; gap: 10px 14px; }
  .fm-partners-row .fm-partner { flex: 1 1 40%; font-size: 13px; padding: 18px 10px 14px; text-align: center; min-height: auto; }

  /* Apply mails full width */
  .fm-apply-mails { flex-direction: column; }
  .fm-mail { width: 100%; justify-content: center; }

  /* Publications year-nav tighter */
  .fm-year-nav { padding: 8px 10px; gap: 6px; border-radius: 18px; }
  .fm-year-nav a { font-size: 13px; padding: 5px 10px; min-width: 44px; height: 30px; }

  /* Cards padding tighten */
  .fm-card { padding: 22px 20px; }

  /* Footer single column already handled; tighten gaps */
  .fm-footer-grid { gap: 26px; }
}

@media (max-width: 400px) {
  .fm-stat-lower { grid-template-columns: 1fr !important; }
  .fm-stat-lower .fm-stat:last-child { grid-column: auto; }
}

/* ===== Final mobile polish (2026-06-20) ===== */

/* Partners logo cards: prevent overflow on small screens */
@media (max-width: 640px) {
  .fm-partners-logo .fm-partner {
    padding: 20px 12px 18px;
    min-height: 140px;
  }
  .fm-partners-logo .fm-partner img {
    max-height: 70px;
    height: 70px;
    max-width: 100%;
  }
  /* Reset individual scale transforms on mobile */
  .fm-partner:nth-child(1) img,
  .fm-partner:nth-child(2) img {
    transform: scale(1);
  }
  .fm-partner:nth-child(4) img {
    transform: scale(1);
  }
  .fm-partner:nth-child(5) img {
    transform: none;
  }
  .fm-partner-name {
    font-size: 13px;
    padding-top: 10px;
  }
}

/* Footer: stack vertically on narrow screens */
@media (max-width: 640px) {
  .fm-footer-minimal-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .fm-footer-right {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
  .fm-footer-right a {
    font-size: 13px;
    word-break: break-all;
  }
}

/* ===== Visitor statistics bar ===== */
/* Visitor statistics bar - above footer */
.fm-visitor-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--neutral-20);
  color: var(--neutral-70);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  border-top: 1px solid var(--tint-line);
}
.fm-visitor-bar .fm-visitor-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fm-visitor-bar .fm-visitor-item svg {
  opacity: 0.6;
  flex-shrink: 0;
}
.fm-visitor-bar .fm-visitor-sep {
  color: #999;
  margin: 0 4px;
}
@media (max-width: 480px) {
  .fm-visitor-bar {
    font-size: 0.78rem;
    padding: 4px 12px;
    gap: 4px;
  }
  .fm-visitor-bar .fm-visitor-sep {
    display: none;
  }
  .fm-visitor-bar .fm-visitor-item {
    margin: 0 4px;
  }
}

/* ===== Alternate section background ===== */
.fm-section-alt {
  background: linear-gradient(180deg, #faf8fc 0%, #fff 100%);
  border-top: 1px solid rgba(117, 15, 109, 0.06);
}

/* ===== Team Intro Section ===== */
.fm-team-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.fm-team-intro-left .fm-eyebrow {
  margin-bottom: 12px;
}
.fm-team-intro-left h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--neutral-100);
}
/* Team photo carousel */
.fm-team-carousel {
  width: 100%;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.fm-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.fm-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.fm-carousel-slide.active {
  opacity: 1;
}
.fm-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.fm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}
.fm-dot.active {
  background: #fff;
}
.fm-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.2s, transform 0.2s;
  z-index: 3;
}
.fm-carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}
.fm-carousel-arrow.prev {
  left: 12px;
}
.fm-carousel-arrow.next {
  right: 12px;
}
.fm-carousel-arrow svg {
  width: 18px;
  height: 18px;
  stroke: #333;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fm-team-intro-right {
  padding-top: 0;
}
.fm-team-intro-right p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--neutral-80);
  margin-bottom: 24px;
}
.fm-team-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-100);
  text-decoration: none;
  transition: color 0.2s;
}
.fm-team-link:hover {
  color: var(--cuhk-purple);
}

@media (max-width: 768px) {
  .fm-team-intro {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .fm-team-intro-right {
    padding-top: 0;
  }
}
