/* ==========================================================================
   Multimodal AI Lab (EdUHK) — Frontier AI Lab Design System
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent: #236bfe;
  --accent-deep: #1d4ed8;
  --accent-cyan: #06b6d4;
  --accent-soft: rgba(35, 107, 254, 0.09);
  --accent-border: rgba(35, 107, 254, 0.26);

  --amber: #b45309;
  --amber-soft: rgba(217, 119, 6, 0.13);
  --teal: #0f766e;
  --teal-soft: rgba(15, 118, 110, 0.11);

  --header-bg: rgba(248, 250, 252, 0.85);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 28px -8px rgba(15, 23, 42, 0.09), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 52px -14px rgba(15, 23, 42, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-display: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;

  --container: 1200px;
  --header-h: 72px;
  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #070b14;
  --bg-alt: #0c1222;
  --surface: #11192c;
  --surface-subtle: #0d1424;
  --border: #1e2942;
  --border-strong: #2d3d61;

  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent: #60a5fa;
  --accent-deep: #93c5fd;
  --accent-cyan: #22d3ee;
  --accent-soft: rgba(96, 165, 250, 0.14);
  --accent-border: rgba(96, 165, 250, 0.32);

  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.15);
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.14);

  --header-bg: rgba(7, 11, 20, 0.86);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 28px 60px -14px rgba(0, 0, 0, 0.7);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input {
  font: inherit;
  color: inherit;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-link.active {
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  gap: 2px;
}

.lang-btn {
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .lang-btn.active {
  color: #070b14;
}

.icon-pill,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.icon-pill {
  padding: 0 11px;
  font-family: var(--font-mono);
  font-size: 0.77rem;
  font-weight: 600;
}

.icon-btn {
  width: 36px;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-pill:hover,
.icon-btn:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

.mobile-menu-btn {
  display: none;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  gap: 4px;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-xs {
  padding: 0 13px;
  height: 36px;
  font-size: 0.82rem;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.84rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px -6px rgba(35, 107, 254, 0.55);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  color: #070b14;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-white {
  background: #ffffff;
  color: #0f172a;
}

.btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   Hero Section (Frontier AI Lab Aesthetic)
   ========================================================================== */

.hero-section {
  position: relative;
  padding: 64px 0 78px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.36;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 15%, #000 30%, transparent 100%);
  pointer-events: none;
}

.hero-ambient-glow {
  position: absolute;
  top: -160px;
  right: -80px;
  width: 620px;
  height: 520px;
  background: radial-gradient(circle, rgba(35, 107, 254, 0.16) 0%, rgba(6, 182, 212, 0.08) 45%, transparent 72%);
  filter: blur(28px);
  pointer-events: none;
}

[data-theme="dark"] .hero-ambient-glow {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.24) 0%, rgba(34, 211, 238, 0.1) 45%, transparent 72%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: center;
}

.affiliation-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}

.hero-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.032em;
  color: var(--text);
}

.hero-subtitle {
  margin: 0 0 28px;
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 58ch;
  line-height: 1.72;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text) 35%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Interactive AI System Console Card */
.hero-console-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.console-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.console-tab {
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.console-tab:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.console-tab.active {
  background: var(--surface);
  border-color: var(--accent-border);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.console-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--teal);
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.console-stage {
  position: relative;
  background: #ffffff;
  aspect-ratio: 16 / 11;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: zoom-in;
  overflow: hidden;
}

.console-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 240ms ease;
}

.console-stage:hover .console-img {
  transform: scale(1.02);
}

.zoom-pill {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  backdrop-filter: blur(8px);
}

.console-footer {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-caption {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.console-meta {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* Dedicated Subpage Hero (Publications & Team) */
.page-hero {
  position: relative;
  padding: 56px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.page-hero-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.page-hero-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-hero-subtitle {
  margin: 0;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.68;
}

.page-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.page-stat-card {
  min-width: 118px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.page-stat-card .stat-value {
  font-size: 1.4rem;
}

/* ==========================================================================
   Sections & Shared Headers
   ========================================================================== */

.section {
  padding: 76px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.section-header {
  margin-bottom: 34px;
  max-width: 720px;
}

.section-header-row .section-header {
  margin-bottom: 0;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.7vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.subsection-title {
  margin: 0 0 16px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Filter Pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-pill:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .filter-pill.active {
  color: #070b14;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge-teal {
  background: var(--teal-soft);
  color: var(--teal);
}

/* ==========================================================================
   News & Highlights Grid
   ========================================================================== */

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

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.77rem;
  color: var(--text-muted);
}

.news-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.news-card-summary {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.58;
  flex: 1;
}

.news-card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.section-footer-action {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   Flagship AI Systems (MAPLE & GIVE)
   ========================================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-cyan) 100%);
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.product-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.product-fullname {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.product-summary {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

.product-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.product-list li::marker {
  color: var(--accent);
}

.product-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Research Offerings & Architecture Deep Dive
   ========================================================================== */

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 44px;
}

.offering-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.offering-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.offering-img-wrap {
  aspect-ratio: 16 / 10;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: zoom-in;
}

.offering-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.offering-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offering-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.offering-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.offering-desc {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tech-deepdive {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: start;
}

.capabilities-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.capability-card {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition);
}

.capability-card:hover {
  border-color: var(--accent-border);
  transform: translateX(3px);
}

.capability-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.capability-title {
  margin: 0 0 5px;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.38;
}

.capability-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.diagrams-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.diagram-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.diagram-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.diagram-img-box {
  background: #ffffff;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-img-box img {
  max-height: 230px;
  width: auto;
  object-fit: contain;
}

.diagram-caption {
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.diagram-caption span:last-child {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
}

/* ==========================================================================
   Publications Explorer
   ========================================================================== */

.pub-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 11px 38px 11px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.93rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-clear {
  position: absolute;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 50%;
}

.search-clear:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.pub-filter-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.pub-meta-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.pub-count {
  font-weight: 600;
  color: var(--text-secondary);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pub-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.pub-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.venue-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pub-title {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.pub-authors {
  margin: 0 0 14px;
  font-size: 0.89rem;
  color: var(--text-secondary);
}

.author-lab {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pub-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.pub-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.pub-abstract {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border-left: 3px solid var(--accent);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.pub-empty {
  text-align: center;
  padding: 46px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

/* ==========================================================================
   Team Section (Real Portraits)
   ========================================================================== */

.director-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition);
}

.director-card:hover {
  border-color: var(--accent-border);
}

.portrait-frame {
  width: 168px;
  height: 196px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  flex-shrink: 0;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.member-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.member-name {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.member-role {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
}

.member-bio {
  margin: 0 0 14px;
  font-size: 0.91rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag-chip {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.member-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.84rem;
  font-weight: 600;
}

.member-links a,
.member-links button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.member-links a:hover,
.member-links button:hover {
  text-decoration: underline;
}

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

.researcher-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.researcher-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.researcher-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 14px;
}

.portrait-sm {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  flex-shrink: 0;
}

.portrait-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.researcher-top .member-name {
  font-size: 1.04rem;
}

.researcher-top .member-role {
  margin: 3px 0 0;
  font-size: 0.8rem;
}

.researcher-body {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.researcher-body .member-bio {
  font-size: 0.86rem;
  flex: 1;
}

/* ==========================================================================
   Partner Schools & Collaboration CTA
   ========================================================================== */

.impact-banner {
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.impact-banner-text {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.68;
}

.partners-caption {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.partners-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.partner-logo-tile {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  height: 82px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition);
}

.partner-logo-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
}

.partner-logo-tile img {
  max-height: 54px;
  max-width: 100%;
  object-fit: contain;
}

.partners-named-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.partner-named-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.partner-crest {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 3px;
  object-fit: contain;
  flex-shrink: 0;
}

.partner-crest-fallback {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.partner-named-zh {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.partner-named-en {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Collaboration Banner */
.collab-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 58%, #236bfe 100%);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}

.collab-copy {
  max-width: 640px;
}

.collab-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #93c5fd;
  margin-bottom: 8px;
}

.collab-title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.collab-desc {
  margin: 0;
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.collab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 52px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr 1.25fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-platforms {
  margin-top: 16px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.footer-platforms p {
  margin: 5px 0;
}

.footer-entity {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px !important;
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

.footer-links,
.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-email-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  cursor: pointer;
}

.footer-email-btn:hover {
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Modal & Lightbox & Toast
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: min(100%, 720px);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 180ms ease-out;
}

.modal-dialog.modal-wide {
  width: min(100%, 920px);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

.modal-close {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-body pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.81rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--text);
}

.lightbox-img {
  max-height: 70vh;
  margin-inline: auto;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 8px;
}

.workshop-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.workshop-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.modal-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

.toast[hidden] {
  display: none;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1080px) {
  .hero-grid,
  .tech-deepdive {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .news-grid,
  .offerings-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .header-cta {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .director-card {
    grid-template-columns: 1fr;
  }

  .portrait-frame {
    width: 140px;
    height: 164px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .hero-section {
    padding: 40px 0 54px;
  }

  .section {
    padding: 54px 0;
  }

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

  .news-grid,
  .offerings-grid,
  .team-grid,
  .footer-grid,
  .workshop-gallery {
    grid-template-columns: 1fr;
  }

  .collab-banner {
    padding: 26px 22px;
  }
}
