:root {
  /* Brand */
  --cuhk-purple: #750f6d;
  --cuhk-purple-dark: #3f003f;
  --cuhk-purple-mid: #8f2387;
  --cuhk-purple-light: #c08abd;
  --cuhk-gold: #d9a300;
  --gold-soft: #f6e9b5;

  /* Modern-tech accent system (restrained) */
  --accent: #7c2d83;
  --accent-2: #b1318f;
  --accent-ink: #2a0f33;
  --tint-soft: #faf7fb;
  --tint-line: #ede7f0;

  /* Neutrals */
  --neutral-10: #ffffff;
  --neutral-20: #f7f5f8;
  --neutral-30: #ece7ef;
  --neutral-40: #d9cbdc;
  --neutral-60: #a79aaa;
  --neutral-70: #786d7b;
  --neutral-80: #5c5160;
  --neutral-100: #15131a;

  --gradient: linear-gradient(221deg, #d9a300 0%, #750f6d 52%, #3f003f 100%);
  --gradient-soft: linear-gradient(135deg, #8f2387 0%, #750f6d 60%, #3f003f 100%);

  /* Typography */
  --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", Georgia, "Songti SC", serif;

  /* Type scale */
  --fs-h1: clamp(40px, 5.4vw, 62px);
  --fs-h2: clamp(30px, 3.4vw, 44px);
  --fs-h3: clamp(19px, 1.5vw, 24px);
  --fs-lead: clamp(18px, 1.4vw, 21px);
  --fs-body: 16px;
  --fs-small: 13px;

  /* Radius */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Layered soft shadows */
  --shadow-xs: 0 1px 2px rgba(21, 19, 26, 0.04), 0 2px 6px rgba(21, 19, 26, 0.05);
  --shadow-sm: 0 2px 6px rgba(21, 19, 26, 0.05), 0 10px 24px rgba(63, 0, 63, 0.06);
  --shadow-md: 0 6px 16px rgba(21, 19, 26, 0.08), 0 22px 48px rgba(63, 0, 63, 0.12);
  --shadow-lg: 0 18px 50px rgba(63, 0, 63, 0.2);
  --shadow: 0 18px 50px rgba(63, 0, 63, 0.2);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--neutral-100);
  background: var(--neutral-10);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

.fm-nowrap {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3 {
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

button {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1370px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--neutral-60);
  margin-bottom: 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: 120px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(to bottom, rgba(21, 19, 26, 0.42), rgba(21, 19, 26, 0));
  transition: background 0.35s ease, height 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

.site-nav.scrolled {
  height: 76px;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--tint-line);
  box-shadow: 0 6px 24px rgba(21, 19, 26, 0.07);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-nav.scrolled {
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
  }
}

.site-nav.scrolled .nav-links-wrap {
  top: 50%;
  transform: translate(-50%, -50%);
}

.site-nav.scrolled .nav-links a {
  color: var(--neutral-80);
}

.site-nav.scrolled .nav-links a:hover,
.site-nav.scrolled .nav-links a.active {
  color: var(--cuhk-purple);
}

.site-nav.scrolled .logo.frontmind-logo img {
  filter: brightness(0) saturate(100%) invert(11%) sepia(64%) saturate(2600%) hue-rotate(290deg) brightness(70%) contrast(96%);
}

.site-nav.scrolled .lang-toggle {
  border-color: rgba(117, 15, 109, 0.32);
  color: var(--cuhk-purple-dark);
  background: rgba(117, 15, 109, 0.06);
}

.site-nav.scrolled .lang-toggle.is-zh .lang-option-zh,
.site-nav.scrolled .lang-toggle.is-en .lang-option-en {
  color: #fff;
  background: var(--cuhk-purple);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-nav .logo.frontmind-logo {
  display: inline-flex;
  align-items: center;
  width: clamp(270px, 22vw, 320px);
  height: clamp(76px, 5.9vw, 88px);
  opacity: 0.96;
  transition: opacity 0.25s ease;
}

.site-nav .logo.frontmind-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transition: opacity 0.25s ease;
}

.site-nav .logo.frontmind-logo:hover {
  opacity: 0.78;
}

.nav-links-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: top 0.35s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.site-nav .nav-links a {
  display: block;
  font-weight: 700;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.25s ease;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  color: #fff;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 10001;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 92px;
  height: 38px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(63, 0, 63, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 30px rgba(63, 0, 63, 0.16);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .lang-toggle {
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}

.lang-toggle:hover {
  background: rgba(63, 0, 63, 0.28);
  border-color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 14px 32px rgba(63, 0, 63, 0.22);
}

.lang-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 30px;
  border-radius: 999px;
  opacity: 0.7;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.lang-divider {
  display: none;
}

.lang-toggle.is-zh .lang-option-zh,
.lang-toggle.is-en .lang-option-en {
  color: var(--cuhk-purple-dark);
  background: #fff;
  opacity: 1;
  box-shadow: 0 6px 16px rgba(63, 0, 63, 0.2);
}

.nav-toggle {
  display: none;
  width: 35px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 10002;
}

.nav-toggle span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease, background 0.25s ease;
}

.nav-toggle span:nth-child(1) {
  top: 2px;
}

.nav-toggle span:nth-child(2) {
  top: 11px;
}

.nav-toggle span:nth-child(3) {
  top: 20px;
}

.nav-toggle.open span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
  background: var(--neutral-100);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
  background: var(--neutral-100);
}

.nav-drawer {
  display: none;
}

.drawer-actions {
  display: none;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 120px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(221deg, rgba(217, 163, 0, 0.30) 0%, rgba(117, 15, 109, 0.78) 48%, rgba(63, 0, 63, 0.92) 100%),
    var(--hero-image, url("../assets/cuhksz-main-campus-hero.webp"));
  background-size: cover;
  background-position: var(--hero-position, center center);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.34), transparent);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 860px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(21, 19, 26, 0.35);
}

html[lang="zh-CN"] .hero h1 {
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  margin-top: 26px;
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 18px rgba(21, 19, 26, 0.3);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  animation: fadeIn 1s 0.9s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.62), transparent);
}

.section-intro,
.section-approach {
  padding: 140px 0;
}

.intro-grid,
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.intro-left h2,
.values-header h2,
.approach-visual-col h2,
.featured-header h2,
.updates-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--neutral-100);
  letter-spacing: 0;
}

.intro-left h2 {
  font-size: 44px;
  line-height: 1.05;
}

.intro-right {
  padding-top: 12px;
}

.intro-right p,
.approach-text p {
  margin-bottom: 24px;
  font-size: 21px;
  line-height: 1.65;
  color: var(--neutral-100);
}

.intro-right p:last-of-type,
.approach-text p:last-of-type {
  margin-bottom: 34px;
}

.video-frame {
  margin-top: 32px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--neutral-100);
  box-shadow: 0 18px 45px rgba(17, 16, 20, 0.16);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.text-link,
.values-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--neutral-100);
  transition: color 0.25s ease;
}

.text-link span,
.values-link span {
  font-size: 24px;
  line-height: 1;
  transition: transform 0.25s ease;
}

.text-link:hover,
.values-link:hover {
  color: var(--cuhk-purple);
}

.text-link:hover span,
.values-link:hover span {
  transform: translateX(4px);
}

.section-values {
  position: relative;
  overflow: hidden;
  padding: 120px 0;
  background: var(--neutral-100);
}

.values-header {
  max-width: 700px;
  margin: 0 auto 80px;
  text-align: center;
}

.values-header h2 {
  font-size: 44px;
  line-height: 1.05;
  color: #fff;
}

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

.value-card {
  position: relative;
  min-height: 320px;
  padding: 40px 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.value-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(233deg, rgba(217, 163, 0, 0.95) 0%, rgba(117, 15, 109, 0.96) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
}

.value-card:hover::before {
  opacity: 1;
}

.value-card > * {
  position: relative;
  z-index: 1;
}

.value-number {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 64px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.12);
}

.value-card h3 {
  margin-bottom: 16px;
  font-size: 24px;
  line-height: 1.25;
  color: #fff;
}

.value-card p {
  font-size: 16px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.66);
  transition: color 0.3s ease;
}

.value-card:hover p {
  color: rgba(255, 255, 255, 0.94);
}

.values-cta {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.values-link {
  color: rgba(255, 255, 255, 0.76);
}

.values-link:hover {
  color: #fff;
}

.approach-grid {
  align-items: center;
}

.approach-visual-col h2 {
  margin-bottom: 32px;
  font-size: 36px;
  line-height: 1.16;
}

.section-stats {
  padding: 64px 0;
  background: var(--gradient);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-number {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  color: #fff;
}

.stat-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
}

.section-featured {
  padding: 100px 0;
  background: #fff;
}

.featured-header {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.featured-header h2 {
  font-size: 38px;
  line-height: 1.15;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.featured-project-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--neutral-30);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--neutral-40);
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.featured-project-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow);
}

.featured-project-thumb {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.featured-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-project-card:hover .featured-project-thumb img {
  transform: scale(1.06);
}

.featured-project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(221deg, rgba(217, 163, 0, 0.12) 0%, rgba(117, 15, 109, 0.12) 100%);
}

.featured-project-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.48);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .featured-project-bar {
    background: rgba(255, 255, 255, 0.68);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
  }
}

.featured-project-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.featured-project-title h3 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.25;
  color: var(--neutral-100);
}

.featured-project-title span {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 11px;
  color: var(--neutral-70);
}

.featured-project-tags {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
}

.featured-project-tags img {
  width: 22px;
  height: 22px;
}

.featured-cta {
  margin-top: 44px;
  text-align: center;
}

.inline-cta {
  display: inline-flex;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--neutral-40);
  font-weight: 800;
  font-size: 15px;
  color: var(--neutral-100);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.inline-cta:hover {
  color: var(--cuhk-purple);
  border-color: var(--cuhk-purple);
}

.section-live-activity {
  padding: 18px 0;
  background: var(--neutral-20);
  border-top: 1px solid var(--neutral-30);
  border-bottom: 1px solid var(--neutral-30);
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--neutral-80);
}

.activity-row strong {
  color: var(--neutral-100);
}

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #139a72;
  animation: pulse 2s ease-in-out infinite;
}

.section-updates {
  padding: 56px 0 48px;
  background: var(--neutral-20);
}

.updates-container {
  max-width: 960px;
}

.updates-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.updates-header .section-label {
  margin-bottom: 0;
}

.updates-header h2 {
  font-size: 22px;
  line-height: 1.2;
}

.updates-feed {
  display: block;
}

.update-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  transition: background 0.2s ease;
}

.update-row + .update-row {
  border-top: 1px solid var(--neutral-30);
}

.update-row:hover {
  background: var(--neutral-30);
}

.update-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: var(--gradient);
}

.update-thumb.is-news {
  background: linear-gradient(135deg, var(--cuhk-purple) 0%, var(--cuhk-gold) 100%);
}

.update-thumb.is-award {
  background: linear-gradient(135deg, var(--cuhk-purple-dark) 0%, var(--cuhk-purple-light) 100%);
}

.update-thumb.is-video {
  background: linear-gradient(135deg, #4d2457 0%, var(--cuhk-purple-mid) 100%);
}

.update-body {
  flex: 1 1 auto;
  min-width: 0;
}

.update-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--neutral-70);
}

.update-kind,
.update-status {
  display: inline-block;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: uppercase;
}

.update-kind {
  background: #efe3ee;
  color: var(--cuhk-purple-dark);
}

.update-status {
  border-radius: 999px;
  background: var(--gold-soft);
  color: #785700;
}

.update-row h3 {
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.3;
  color: var(--neutral-100);
}

.update-row:hover h3 {
  color: var(--cuhk-purple);
}

.update-loc {
  display: block;
  font-size: 12px;
  color: var(--neutral-70);
}

.site-footer {
  padding: 32px 0;
  background: var(--neutral-100);
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.footer-logos a {
  display: inline-flex;
  align-items: center;
  opacity: 0.86;
  transition: opacity 0.25s ease;
}

.footer-logos a:hover {
  opacity: 1;
}

.footer-logos img {
  width: auto;
  height: 34px;
}

.footer-logos a:nth-child(3) img {
  height: 30px;
}

.footer-copy {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.footer-copy strong {
  color: rgba(255, 255, 255, 0.88);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.footer-social a {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.58);
  transition: color 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.footer-social svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20000;
  width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(17, 16, 20, 0.92);
  color: #fff;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.38;
  }
}

@media (max-width: 1100px) {
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .site-nav {
    height: 64px;
    padding: max(14px, env(safe-area-inset-top, 0px)) 20px 0;
    align-items: center;
    gap: 12px;
  }

  .site-nav .logo.frontmind-logo {
    display: inline-flex;
    width: clamp(154px, 46vw, 190px);
    height: clamp(48px, 14vw, 58px);
  }

  .nav-links-wrap {
    position: static;
    transform: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  }

  .nav-links {
    gap: 24px;
    padding: 0 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links li {
    flex-shrink: 0;
  }

  .site-nav .nav-links a {
    padding: 8px 0;
    font-size: 15px;
    white-space: nowrap;
    opacity: 0.62;
  }

  .site-nav .nav-links a.active {
    opacity: 1;
  }

  .nav-toggle {
    display: block;
  }

  .nav-actions {
    margin-left: 0;
    gap: 8px;
  }

  .lang-toggle {
    min-width: 78px;
    height: 32px;
    padding: 3px;
    font-size: 11px;
  }

  .lang-option {
    width: 34px;
    height: 24px;
  }

  .nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 44%, rgba(255, 255, 255, 0.2) 100%);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  }

  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .nav-drawer {
      background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 44%, rgba(255, 255, 255, 0.1) 100%);
      -webkit-backdrop-filter: saturate(180%) blur(28px);
      backdrop-filter: saturate(180%) blur(28px);
    }
  }

  .nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .drawer-logo {
    display: flex;
    align-items: center;
    min-height: 82px;
    padding: max(18px, calc(env(safe-area-inset-top, 0px) + 18px)) 20px 14px;
    background: linear-gradient(90deg, var(--cuhk-purple) 0%, #8b1c70 54%, var(--cuhk-gold) 100%);
    opacity: 0.94;
  }

  .drawer-logo img {
    width: 220px;
    height: auto;
    filter: none;
  }

  .drawer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 20px;
  }

  .drawer-grid a {
    display: block;
    padding: 16px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
    font-size: 18px;
    color: var(--neutral-100);
  }

  .drawer-grid a:hover {
    color: var(--cuhk-purple);
  }

  .drawer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 16px 20px;
  }

  .drawer-actions img {
    width: 220px;
    height: auto;
    filter: none;
    opacity: 0.86;
  }

  .drawer-actions .lang-toggle {
    border-color: rgba(17, 16, 20, 0.35);
    color: var(--neutral-100);
    background: rgba(255, 255, 255, 0.46);
  }

  .drawer-actions .lang-toggle.is-zh .lang-option-zh,
  .drawer-actions .lang-toggle.is-en .lang-option-en {
    color: #fff;
    background: var(--cuhk-purple);
  }

  body.drawer-open {
    overflow: hidden;
  }

  body.drawer-open .site-nav {
    background: transparent;
  }

  body.drawer-open .nav-links-wrap {
    opacity: 0;
    pointer-events: none;
  }

  body.drawer-open .nav-actions {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding-bottom: 80px;
  }

  .hero h1 {
    font-size: 40px;
    line-height: 1.12;
  }

  .hero p {
    font-size: 19px;
    line-height: 1.5;
  }

  .section-intro,
  .section-approach {
    padding: 80px 0;
  }

  .intro-grid,
  .approach-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .intro-left h2,
  .values-header h2 {
    font-size: 36px;
    line-height: 1.16;
  }

  .approach-visual-col h2 {
    font-size: 32px;
    line-height: 1.18;
  }

  .intro-right p,
  .approach-text p {
    font-size: 19px;
    line-height: 1.5;
  }

  .section-values {
    padding: 80px 0;
  }

  .values-header {
    margin-bottom: 48px;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .value-card {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .site-nav {
    justify-content: flex-start;
  }

  .site-nav .logo.frontmind-logo {
    width: clamp(154px, 46vw, 190px);
    height: clamp(48px, 14vw, 58px);
  }

  .nav-links-wrap {
    display: none;
  }

  .nav-toggle {
    position: absolute;
    top: max(27px, calc(env(safe-area-inset-top, 0px) + 13px));
    right: 112px;
    margin-left: auto;
  }

  .nav-actions {
    position: absolute;
    top: max(23px, calc(env(safe-area-inset-top, 0px) + 9px));
    right: 20px;
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 20px;
  }

  .stat-number {
    font-size: 38px;
  }

  .section-featured {
    padding: 72px 0;
  }

  .featured-header h2 {
    font-size: 28px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-inner {
    justify-content: space-between;
    gap: 18px;
  }

  .footer-copy {
    order: 2;
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    align-items: flex-start;
    padding: 112px 0 64px;
  }

  .hero h1 {
    font-size: 32px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-break: anywhere;
  }

  .hero p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-scroll {
    display: none;
  }

  .section-updates {
    padding: 44px 0 36px;
  }

  .updates-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .updates-header h2 {
    font-size: 19px;
  }

  .update-row {
    gap: 12px;
    padding: 12px 0;
  }

  .update-thumb {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }

  .update-row h3 {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

.hero-btn:focus-visible,
.nav-links a:focus-visible,
.drawer-grid a:focus-visible,
.lang-toggle:focus-visible,
.nav-toggle:focus-visible,
.fm-footer a:focus-visible {
  box-shadow: 0 0 0 4px rgba(117, 15, 109, 0.35);
}
