/*
  Futuristic Light Theme for MVSI lab
  Content is preserved. This file upgrades the visual style only.
*/

:root {
  --bg: #f7fbff;
  --bg-2: #ffffff;
  --text: #102033;
  --muted: #5c6f83;
  --faint: rgba(230, 244, 255, 0.58);
  --line: rgba(41, 113, 186, 0.15);
  --line-strong: rgba(0, 143, 255, 0.28);
  --dark: #0c2540;
  --dark-2: #17466f;
  --blue: #0b6efb;
  --blue-2: #0047d7;
  --teal: #00c8c8;
  --cyan: #00b7ff;
  --purple: #7b61ff;
  --pink: #ff5ab7;
  --gold: #f4a91f;
  --green: #22c78f;
  --card: rgba(255, 255, 255, 0.78);
  --max: 1180px;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow: 0 24px 70px rgba(35, 84, 135, 0.14);
  --shadow-soft: 0 14px 42px rgba(35, 84, 135, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 7% 8%, rgba(0, 183, 255, 0.16), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(123, 97, 255, 0.12), transparent 28%),
    radial-gradient(circle at 74% 55%, rgba(0, 200, 200, 0.10), transparent 34%),
    linear-gradient(180deg, #f8fcff 0%, #f2f8ff 44%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans", sans-serif;
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(rgba(11, 110, 251, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 110, 251, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.16));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 25%), rgba(0, 183, 255, .13), transparent 24%);
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-2); text-decoration: underline; }

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

.topbar {
  color: #37536d;
  background: rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  font-size: 0.88rem;
}

.topbar-inner {
  height: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.topbar a { color: var(--blue); font-weight: 750; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 10px 36px rgba(32, 84, 135, 0.08);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  background:
    linear-gradient(135deg, rgba(255,255,255,.24), transparent),
    linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 16px 34px rgba(0, 143, 255, .24), inset 0 1px 0 rgba(255,255,255,.32);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 20px;
  border: 1px solid rgba(0, 183, 255, .28);
  transform: rotate(10deg);
}

.brand-text { display: grid; line-height: 1.16; }
.brand-text strong { font-size: 1.04rem; letter-spacing: -0.02em; }
.brand-text span { color: var(--muted); font-size: 0.82rem; }

.nav-links { display: flex; align-items: center; gap: 18px; font-size: 0.94rem; }
.nav-links a { color: #38536d; font-weight: 780; position: relative; }
.nav-links a.active,
.nav-links a:hover { color: var(--blue); text-decoration: none; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a.active::after,
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.72);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  color: var(--dark);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(255,255,255,.92), rgba(234,247,255,.72)),
    radial-gradient(circle at 10% 16%, rgba(0, 183, 255, .22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(123, 97, 255, .18), transparent 26%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,183,255,.12), transparent 20%, transparent 80%, rgba(123,97,255,.10)),
    repeating-linear-gradient(90deg, rgba(11,110,251,.04) 0 1px, transparent 1px 90px);
}

.hero-inner {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 54px;
  align-items: center;
  padding: 92px 0 86px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 950;
}

.hero h1 {
  margin: 0 0 24px;
  max-width: 820px;
  font-size: clamp(2.9rem, 6.1vw, 5.45rem);
  line-height: .93;
  letter-spacing: -0.068em;
  background: linear-gradient(115deg, #102033 0%, #0b6efb 52%, #00a7c2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 760px;
  color: #486176;
  font-size: 1.16rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 880;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  box-shadow: 0 18px 42px rgba(11, 110, 251, .24);
}

.btn-secondary {
  color: var(--blue);
  border-color: rgba(11, 110, 251, .22);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 30px rgba(35, 84, 135, .08);
}

.btn:hover { transform: translateY(-2px); text-decoration: none; }

.hero-visual { perspective: 1200px; }

.future-visual-card {
  position: relative;
  padding: 18px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.58)),
    radial-gradient(circle at 80% 0%, rgba(0,183,255,.18), transparent 36%);
  border: 1px solid rgba(0, 143, 255, .18);
  box-shadow: var(--shadow);
  transform: rotateX(2deg) rotateY(-4deg);
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,100% { transform: rotateX(2deg) rotateY(-4deg) translateY(0); }
  50% { transform: rotateX(0deg) rotateY(-2deg) translateY(-12px); }
}

.visual-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 16px;
  color: #3f5f7a;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
  animation: statusPulse 1.8s ease-in-out infinite;
}

@keyframes statusPulse { 50% { transform: scale(1.35); opacity: .55; } }

.robotic-animation {
  display: block;
  width: 100%;
  border-radius: 26px;
  border: 1px solid rgba(0, 143, 255, .16);
  background: #fff;
  box-shadow: inset 0 0 50px rgba(0, 183, 255, .06);
}

.bridge-card { display: none; }
.bridge-deck, .bridge-pier, .bridge-foundation, .ai-box { display: none; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-top: 14px;
}

.hero-stats div {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(0, 143, 255, .15);
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 28px rgba(35,84,135,.08);
}

.hero-stats strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--blue);
}

.hero-stats span { color: var(--muted); font-size: .84rem; }

.section { padding: 88px 0; position: relative; }
.section-sm { padding: 58px 0; }
.section-muted {
  background:
    radial-gradient(circle at 12% 15%, rgba(0,183,255,.10), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.68), rgba(238,247,255,.52));
  border-top: 1px solid rgba(0,143,255,.08);
  border-bottom: 1px solid rgba(0,143,255,.08);
}
.section-dark { background: var(--dark); color: #fff; }

.section-head { max-width: 790px; margin-bottom: 36px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 950;
}
.section-dark .section-eyebrow { color: #91e2dc; }

h1,h2,h3,h4,p { margin-top: 0; }
h2 {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin-bottom: 14px;
}
h3 { line-height: 1.22; letter-spacing: -0.025em; }

.section-head p,
.muted-text,
.card p,
.news-card p,
.project p,
.publication .meta,
.member p,
.feature p,
.page-hero p { color: var(--muted); }
.section-dark .section-head p,
.section-dark .muted-text { color: rgba(255,255,255,.76); }

.two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: 62px; align-items: start; }
.about-panel {
  position: relative;
  border: 1px solid rgba(0,143,255,.14);
  border-radius: var(--radius-lg);
  padding: 28px 30px 28px 34px;
  background: rgba(255,255,255,.74);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.about-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(var(--blue), var(--teal));
}
.about-panel strong { color: var(--dark); }

.quick-facts { display: grid; gap: 12px; }
.fact,
.card,
.feature,
.project,
.member {
  background: var(--card);
  border: 1px solid rgba(0, 143, 255, .14);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}
.fact { padding: 18px 20px; border-radius: var(--radius); }
.fact strong { display: block; margin-bottom: 4px; }

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

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card::before,
.project::before,
.member::before,
.publication::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 15% 0%, rgba(0, 183, 255, .16), transparent 34%);
}
.card:hover,
.project:hover,
.member:hover { transform: translateY(-6px); box-shadow: 0 28px 80px rgba(35,84,135,.16); border-color: rgba(0,143,255,.28); }
.card-number {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  font-weight: 950;
  margin-bottom: 20px;
  box-shadow: 0 14px 30px rgba(0,143,255,.18);
}

.feature { border-top: 3px solid var(--teal); padding: 22px; border-radius: 0 0 var(--radius) var(--radius); }

.news-list { display: grid; gap: 14px; }
.news-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.news-card time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  height: 34px;
  padding: 0 12px;
  color: var(--blue);
  background: rgba(11,110,251,.08);
  border: 1px solid rgba(11,110,251,.14);
  border-radius: 999px;
  font-weight: 900;
  font-size: .88rem;
}
.news-card h3 { margin-bottom: 5px; }

.project-list { display: grid; gap: 24px; }
.project {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 24px;
  border-radius: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project-thumb {
  min-height: 172px;
  border-radius: 22px;
  border: 1px solid rgba(0,143,255,.14);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.thumb-damage {
  background:
    radial-gradient(circle at 34% 32%, rgba(255,255,255,.95) 0 8%, transparent 9%),
    radial-gradient(circle at 70% 58%, rgba(255,255,255,.88) 0 7%, transparent 8%),
    linear-gradient(135deg, rgba(0,183,255,.48), rgba(123,97,255,.22)),
    repeating-linear-gradient(45deg, #eef8ff 0, #eef8ff 18px, #dbeeff 19px, #dbeeff 36px);
}
.thumb-drawing {
  background:
    linear-gradient(135deg, rgba(11,110,251,.18), rgba(0,200,200,.18)),
    repeating-linear-gradient(0deg, #f6fbff 0, #f6fbff 22px, #dbeeff 23px),
    repeating-linear-gradient(90deg, transparent 0, transparent 22px, rgba(16,32,51,.08) 23px);
}
.thumb-modular {
  background:
    linear-gradient(90deg, transparent 0 15%, rgba(11,110,251,.42) 16% 19%, transparent 20% 40%, rgba(0,200,200,.42) 41% 44%, transparent 45% 100%),
    linear-gradient(0deg, #fbfdff 0 34%, #d7eaff 35% 42%, #fbfdff 43% 100%);
}
.thumb-robot {
  background:
    radial-gradient(circle at 75% 22%, rgba(255,90,183,.30), transparent 23%),
    linear-gradient(135deg, rgba(11,110,251,.24), rgba(0,200,200,.22)),
    repeating-linear-gradient(45deg, #f4faff 0, #f4faff 16px, #dceeff 17px, #dceeff 32px);
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 900;
  color: #075d70;
  background: rgba(0, 200, 200, .12);
  border: 1px solid rgba(0, 200, 200, .18);
}

.member-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.member {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.member-photo {
  width: 100px;
  height: 100px;
  margin: 0 auto 14px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--purple) 52%, var(--teal));
  box-shadow: 0 20px 46px rgba(11,110,251,.22);
}
.member h3 { margin-bottom: 2px; }
.member p { margin-bottom: 8px; font-size: .93rem; }
.role { color: var(--blue) !important; font-weight: 900; }

.publication-list { list-style: none; padding: 0; margin: 0; counter-reset: pubs; }
.publication {
  position: relative;
  padding: 22px 0 22px 58px;
  border-bottom: 1px solid var(--line);
  counter-increment: pubs;
  overflow: hidden;
}
.publication::before {
  content: counter(pubs);
  position: absolute;
  left: 0;
  top: 23px;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(11,110,251,.12), rgba(0,200,200,.16));
  color: var(--blue);
  font-weight: 950;
  border: 1px solid rgba(11,110,251,.14);
}
.publication::after { opacity: .25; }
.publication h3 { margin-bottom: 4px; }
.pub-links { margin-top: 6px; font-size: .92rem; }
.pub-links a { font-weight: 850; }

.callout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  border-radius: 30px;
  padding: 36px;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(0,200,200,.22), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(232,246,255,.78));
  border: 1px solid rgba(0,143,255,.18);
  box-shadow: var(--shadow);
}
.callout p { color: var(--muted); margin-bottom: 0; }
.callout .btn-primary { color: #fff; }

.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--text);
  padding: 80px 0;
  background:
    radial-gradient(circle at 85% 12%, rgba(123,97,255,.14), transparent 28%),
    radial-gradient(circle at 14% 30%, rgba(0,183,255,.18), transparent 30%),
    linear-gradient(135deg, #ffffff, #eef8ff);
  border-bottom: 1px solid rgba(0,143,255,.12);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11,110,251,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,110,251,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  letter-spacing: -0.055em;
  line-height: 1.04;
  background: linear-gradient(115deg, #102033, #0b6efb 70%, #00a7c2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero p { max-width: 850px; font-size: 1.08rem; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 28px; }
.filter {
  border: 1px solid rgba(11,110,251,.16);
  background: rgba(255,255,255,.72);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 15px;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 8px 24px rgba(35,84,135,.06);
}
.filter.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-color: transparent;
}

.footer {
  padding: 40px 0;
  background: linear-gradient(135deg, #061a2f, #0c2540);
  color: rgba(255,255,255,.74);
}
.footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: start; }
.footer p { margin-bottom: 4px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1020px) {
  .hero-inner,
  .two-col { grid-template-columns: 1fr; }
  .grid-4,
  .member-grid { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .project { grid-template-columns: 220px 1fr; }
  .hero-visual { max-width: 760px; }
}

@media (max-width: 820px) {
  .topbar { display: none; }
  .nav { height: auto; padding: 12px 0; align-items: flex-start; }
  .nav-toggle { display: block; margin-top: 4px; }
  .nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(35,84,135,.12);
  }
  .nav-links.open { display: flex; }
  .hero-inner { min-height: auto; padding: 66px 0; }
  .hero-stats { grid-template-columns: 1fr; }
  .callout { grid-template-columns: 1fr; }
  .future-visual-card { transform: none; animation: none; }
}

@media (max-width: 660px) {
  .container { width: min(calc(100% - 26px), var(--max)); }
  .brand-text strong { font-size: .94rem; }
  .brand-text span { display: none; }
  .section { padding: 62px 0; }
  .grid-4,
  .grid-3,
  .member-grid { grid-template-columns: 1fr; }
  .news-card,
  .project,
  .footer-grid { grid-template-columns: 1fr; }
  .project-thumb { min-height: 150px; }
  .publication { padding-left: 0; }
  .publication::before { display: none; }
}


/* Project layout refinement - image-aware cards and detail pages */
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.project-card-grid .project {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-height: 100%;
  border-radius: 30px;
}

.project-card-grid .project::before { opacity: .55; }

.project-card-grid .project-thumb {
  display: grid;
  place-items: center;
  min-height: 0;
  aspect-ratio: 16 / 10;
  width: 100%;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid rgba(0,143,255,.12);
  border-radius: 30px 30px 0 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 183, 255, .13), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(231,246,255,.75));
}

.project-card-grid .project-thumb:hover { text-decoration: none; }

.project-card-grid .project-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
}

.project-card-grid .project > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 26px 28px;
}

.project-card-grid .project h3 {
  margin-bottom: 10px;
  font-size: clamp(1.16rem, 1.6vw, 1.42rem);
}

.project-card-grid .project p { margin-bottom: 18px; }
.project-card-grid .project .text-link { margin-top: auto; font-weight: 900; }

.project-detail-hero { padding: 68px 0; }

.project-detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr);
  gap: 44px;
  align-items: center;
}

.project-detail-hero h1 {
  max-width: 920px;
  font-size: clamp(2.15rem, 4.4vw, 4rem);
}

.project-hero-image {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  padding: 14px;
  border-radius: 30px;
  border: 1px solid rgba(0,143,255,.16);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}

.project-detail-list {
  display: grid;
  gap: 34px;
}

.topic-block {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: 32px;
  align-items: start;
  padding: 30px;
  border-radius: 30px;
  border: 1px solid rgba(0,143,255,.14);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
}

.topic-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 12% 0%, rgba(0,183,255,.12), transparent 34%);
}

.topic-media,
.topic-content {
  position: relative;
  z-index: 1;
}

.topic-media {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(0,143,255,.14);
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(240,248,255,.72)),
    radial-gradient(circle at 75% 20%, rgba(0,200,200,.12), transparent 28%);
}

.topic-media img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  border-radius: 18px;
}

.topic-wide {
  grid-template-columns: 1fr;
}

.topic-wide .topic-media img {
  max-height: 560px;
}

.topic-portrait {
  grid-template-columns: minmax(220px, .56fr) minmax(0, 1.44fr);
}

.topic-portrait .topic-media img {
  width: auto;
  max-height: 620px;
}

.topic-square {
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
}

.media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.media-grid img {
  height: 100%;
  min-height: 230px;
  max-height: 420px;
  object-fit: contain;
  background: rgba(255,255,255,.55);
}

.topic-drawing .media-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-drawing .media-grid img {
  min-height: 250px;
  max-height: 360px;
}

.topic-content h3 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.15vw, 2rem);
}

.topic-content h4 {
  margin: 18px 0 8px;
  color: var(--blue);
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.topic-content p { color: var(--muted); }

.references {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,143,255,.12);
}

.references ol {
  margin: 0;
  padding-left: 1.15rem;
}

.references li {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .95rem;
}

.references li:last-child { margin-bottom: 0; }

.topic-missing-image .topic-media {
  min-height: 220px;
}

.topic-missing-image .topic-media img { display: none; }

.topic-missing-image .topic-media::after {
  content: "Image asset missing: assets/img/steel_damage.png";
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1020px) {
  .project-detail-hero-inner,
  .topic-block,
  .topic-portrait,
  .topic-square {
    grid-template-columns: 1fr;
  }

  .project-hero-image { max-height: 380px; }
  .topic-portrait .topic-media img { width: 100%; }
}

@media (max-width: 820px) {
  .project-card-grid { grid-template-columns: 1fr; }
  .topic-drawing .media-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  .project-card-grid .project-thumb { aspect-ratio: 4 / 3; }
  .topic-block { padding: 20px; border-radius: 24px; }
  .topic-media { border-radius: 20px; }
  .topic-media img,
  .topic-wide .topic-media img,
  .topic-portrait .topic-media img { max-height: none; }
}

/* Follow-up project detail refinements: larger image-first layouts for dense research figures */
.project-detail-list {
  gap: 42px;
}

.topic-featured {
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 34px;
}

.topic-featured .topic-media {
  min-height: 0;
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 14% 12%, rgba(0,183,255,.13), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(236,247,255,.72));
}

.topic-featured .topic-media img {
  width: 100%;
  max-width: 1000px;
  max-height: 620px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 20px;
}

.topic-featured .topic-content {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.topic-featured .topic-content h3 {
  max-width: 900px;
  margin-bottom: 10px;
}

.topic-featured .topic-content p {
  max-width: 980px;
  font-size: 1.02rem;
  line-height: 1.72;
}

.topic-featured .references {
  margin-top: 22px;
  padding-top: 18px;
}

.topic-featured .references ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 34px;
  padding-left: 1.25rem;
}

.topic-featured .references li {
  margin-bottom: 0;
}

.topic-steel .topic-media img {
  max-height: 560px;
}

.topic-tall {
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
  gap: 38px;
  align-items: start;
}

.topic-tall .topic-media {
  padding: 16px;
  align-self: start;
}

.topic-tall .topic-media img {
  width: auto;
  max-width: 100%;
  max-height: 760px;
}

.topic-tall .topic-content p {
  font-size: 1rem;
  line-height: 1.72;
}

.topic-tall .references li {
  font-size: .93rem;
}

@media (max-width: 1020px) {
  .topic-tall {
    grid-template-columns: 1fr;
  }

  .topic-tall .topic-media img {
    width: 100%;
    max-height: 720px;
  }
}

@media (max-width: 760px) {
  .topic-featured {
    padding: 22px;
  }

  .topic-featured .topic-media {
    padding: 12px;
  }

  .topic-featured .references ol {
    grid-template-columns: 1fr;
  }

  .topic-featured .topic-content p {
    font-size: 1rem;
  }
}



/* Team page and member profile layouts */
.team-section .section-head.center {
  max-width: 860px;
  margin-bottom: 34px;
}

.team-pi-card,
.team-member-card,
.member-profile-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(0, 143, 255, .14);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.team-pi-card {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
  gap: 42px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
  color: var(--text);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.team-pi-card:hover,
.team-member-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 80px rgba(35,84,135,.16);
  border-color: rgba(0,143,255,.28);
  text-decoration: none;
}

.team-pi-card::before,
.team-member-card::before,
.member-profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(0,183,255,.16), transparent 30%),
    radial-gradient(circle at 95% 12%, rgba(123,97,255,.10), transparent 26%);
}

.team-pi-photo,
.member-profile-photo {
  position: relative;
  z-index: 1;
}

.team-pi-copy,
.member-profile-copy,
.team-member-card h3,
.team-member-card p,
.team-member-card .team-card-link {
  position: relative;
  z-index: 1;
}

.team-pi-copy h3 {
  margin-bottom: 6px;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.team-pi-copy p:not(.role) {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.78;
}

.team-photo-slot {
  position: relative;
  width: 132px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 34px;
  color: #fff;
  font-weight: 950;
  font-size: 1.75rem;
  letter-spacing: -.04em;
  background:
    linear-gradient(135deg, rgba(255,255,255,.26), transparent),
    linear-gradient(135deg, var(--blue), var(--purple) 52%, var(--teal));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 22px 54px rgba(11,110,251,.24);
}

.team-photo-slot::after {
  content: "Photo";
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.86);
  background: rgba(16,32,51,.18);
  backdrop-filter: blur(10px);
}

.team-photo-slot img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo-slot img + span { position: relative; z-index: 1; }
.team-photo-slot:has(img)::after { display: none; }

.team-photo-large {
  width: min(100%, 340px);
  border-radius: 38px;
  font-size: 3.2rem;
}

.team-photo-profile {
  width: min(100%, 360px);
  border-radius: 42px;
  font-size: 3.4rem;
}

.team-group-head {
  margin: 68px 0 24px;
}

.team-group-head h2 {
  margin-bottom: 0;
}

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

.team-ra-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-member-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 18px 22px;
  border-radius: 30px;
  color: var(--text);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.team-member-card h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
}

.team-member-card .role {
  margin-bottom: 14px;
  font-size: .92rem;
  line-height: 1.48;
}

.team-card-link {
  margin-top: auto;
  color: var(--blue);
  font-weight: 900;
  font-size: .9rem;
}

.member-profile-card {
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
  gap: 46px;
  align-items: start;
  padding: 38px;
  border-radius: 36px;
}

.member-profile-copy h2 {
  margin-bottom: 8px;
}

.profile-title {
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 900;
  font-size: 1.08rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 30px;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 900;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(11,110,251,.18);
  box-shadow: 0 10px 28px rgba(35,84,135,.08);
}

.profile-link:hover { text-decoration: none; transform: translateY(-1px); }
.profile-link.muted-link { color: var(--muted); }

.profile-bio {
  margin-bottom: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,143,255,.13);
}

.profile-bio h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1.45rem;
}

.profile-bio p {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.78;
}

@media (max-width: 1080px) {
  .team-card-grid,
  .team-ra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .team-pi-card,
  .member-profile-card {
    grid-template-columns: 1fr;
  }

  .team-pi-card {
    padding: 26px;
    text-align: center;
  }

  .member-profile-card {
    padding: 28px;
  }

  .team-photo-large,
  .team-photo-profile {
    width: min(100%, 300px);
  }
}

@media (max-width: 620px) {
  .team-card-grid,
  .team-ra-grid {
    grid-template-columns: 1fr;
  }

  .team-pi-card,
  .member-profile-card {
    padding: 22px;
    border-radius: 28px;
  }

  .team-group-head {
    margin-top: 52px;
  }
}


/* Updated profile links, publications, recruitment, and news layouts */
.profile-links-iconic .profile-link { gap: 9px; }
.profile-link img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex: 0 0 auto;
}
.profile-link.muted-link img { opacity: .72; }
.member-profile-card-wide {
  grid-template-columns: minmax(280px, .55fr) minmax(0, 1.45fr);
}
.profile-bio-structured p,
.profile-bio-structured li {
  color: var(--muted);
  line-height: 1.72;
}
.profile-bio-structured ul { margin: 0; padding-left: 1.15rem; }
.profile-bio-structured li { margin: 6px 0; }
.bio-block {
  padding: 22px 0;
  border-bottom: 1px solid rgba(0,143,255,.11);
}
.bio-block:first-of-type { padding-top: 8px; }
.bio-block:last-of-type { border-bottom: 0; padding-bottom: 0; }
.bio-block h4 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  letter-spacing: -.025em;
}
.bio-block h5 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: .95rem;
  letter-spacing: -.01em;
}
.bio-service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.bio-service-grid > div {
  padding: 20px 22px;
  border: 1px solid rgba(0,143,255,.12);
  border-radius: 22px;
  background: rgba(255,255,255,.58);
}

.scholar-callout,
.recruitment-hero-card,
.legacy-news-card,
.legacy-news-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,143,255,.14);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}
.scholar-callout {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 28px;
  margin-bottom: 48px;
}
.scholar-callout img {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(11,110,251,.18);
}
.scholar-callout h2,
.recruitment-hero-card h2,
.legacy-news-card h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); margin-bottom: 6px; }
.scholar-callout p { margin: 0; color: var(--muted); }
.publications-head { margin-top: 6px; }
.publication-list-polished .publication h3 { font-size: 1.18rem; }
.publication-rich .meta { margin-bottom: 4px; }

.recruitment-section code {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(11,110,251,.08);
  color: var(--blue);
  font-weight: 800;
}
.recruitment-hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 34px;
  margin-bottom: 28px;
}
.recruitment-hero-card p { color: var(--muted); margin-bottom: 0; }
.recruitment-grid {
  display: grid;
  grid-template-columns: 1.15fr .925fr .925fr;
  gap: 22px;
}
.recruitment-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid rgba(0,143,255,.14);
  box-shadow: var(--shadow-soft);
}
.recruitment-card::before,
.scholar-callout::before,
.recruitment-hero-card::before,
.legacy-news-card::before,
.legacy-news-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 10% 0%, rgba(0,183,255,.13), transparent 32%);
}
.recruitment-card h3,
.recruitment-card p,
.recruitment-card .resource-links,
.recruitment-hero-card > *,
.scholar-callout > *,
.legacy-news-card > *,
.legacy-news-panel > * { position: relative; z-index: 1; }
.recruitment-card p { color: var(--muted); line-height: 1.7; }
.resource-links { display: grid; gap: 8px; margin-top: 16px; }

.news-list-rich { gap: 0; }
.news-card-rich {
  padding: 26px 0;
  grid-template-columns: 150px 1fr;
}
.news-card-rich p { margin: 0; line-height: 1.72; color: var(--muted); }
.news-card-rich a { font-weight: 850; }
.legacy-news-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px;
  margin-top: 26px;
  color: var(--text);
}
.legacy-news-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 24px 70px rgba(35,84,135,.14); }
.legacy-news-card p { margin-bottom: 0; color: var(--muted); }
.legacy-news-card span { color: var(--blue); font-weight: 950; white-space: nowrap; }
.legacy-news-panel { padding: 34px; }
.legacy-news-panel ol { margin: 0 0 28px; padding-left: 1.2rem; }
.legacy-news-panel li { margin: 12px 0; color: var(--muted); line-height: 1.72; }
.legacy-note {
  margin: 24px 0 28px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(11,110,251,.06);
  border: 1px solid rgba(11,110,251,.12);
}
.legacy-note p { margin: 0; color: var(--muted); line-height: 1.68; }

@media (max-width: 1020px) {
  .bio-service-grid,
  .recruitment-grid { grid-template-columns: 1fr; }
  .scholar-callout,
  .recruitment-hero-card,
  .legacy-news-card { grid-template-columns: 1fr; }
  .scholar-callout { text-align: left; }
}
@media (max-width: 760px) {
  .news-card-rich { grid-template-columns: 1fr; gap: 10px; }
  .scholar-callout,
  .recruitment-hero-card,
  .legacy-news-card,
  .legacy-news-panel { padding: 22px; border-radius: 24px; }
}

/* Homepage redesign: consistent with project/team/publication pages */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 86px;
  border-bottom: 1px solid rgba(0,143,255,.12);
  background:
    radial-gradient(circle at 12% 18%, rgba(0,183,255,.18), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(123,97,255,.14), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,248,255,.74));
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11,110,251,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,110,251,.045) 1px, transparent 1px);
  background-size: 48px 48px;
}
.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, .98fr);
  gap: 54px;
  align-items: center;
}
.home-hero-copy h1 {
  margin: 0 0 24px;
  max-width: 820px;
  font-size: clamp(3rem, 6vw, 5.35rem);
  line-height: .94;
  letter-spacing: -0.068em;
  background: linear-gradient(115deg, #102033 0%, #0b6efb 55%, #00a7c2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-hero-panel {
  position: relative;
  padding: 18px;
  border-radius: 34px;
  border: 1px solid rgba(0,143,255,.18);
  background:
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.66)),
    radial-gradient(circle at 80% 0%, rgba(0,183,255,.18), transparent 36%);
  box-shadow: var(--shadow);
}
.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.home-metric-grid a {
  display: block;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(0,143,255,.15);
  background: rgba(255,255,255,.74);
  box-shadow: 0 10px 28px rgba(35,84,135,.08);
  color: var(--text);
}
.home-metric-grid a:hover { text-decoration: none; transform: translateY(-2px); }
.home-metric-grid strong {
  display: block;
  font-size: 1.78rem;
  line-height: 1;
  color: var(--blue);
}
.home-metric-grid span { color: var(--muted); font-size: .84rem; }

.home-overview-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 58px;
  align-items: start;
}
.home-overview-card,
.home-profile-card,
.home-resource-card,
.home-project-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(0,143,255,.14);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}
.home-overview-card {
  border-radius: 30px;
  padding: 30px;
}
.home-overview-card::before,
.home-profile-card::before,
.home-resource-card::before,
.home-project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 14% 0%, rgba(0,183,255,.13), transparent 34%);
}
.home-overview-card > *,
.home-profile-card > *,
.home-resource-card > *,
.home-project-card > * { position: relative; z-index: 1; }
.home-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-top: 24px;
}
.home-focus-grid a {
  min-height: 104px;
  padding: 18px;
  border-radius: 20px;
  color: var(--text);
  font-weight: 850;
  line-height: 1.38;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,143,255,.12);
}
.home-focus-grid a:hover { text-decoration: none; transform: translateY(-3px); }
.home-focus-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-weight: 950;
  letter-spacing: .08em;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
}
.home-project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 28px;
  color: var(--text);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.home-project-card:hover {
  text-decoration: none;
  transform: translateY(-6px);
  box-shadow: 0 28px 80px rgba(35,84,135,.16);
  border-color: rgba(0,143,255,.28);
}
.home-project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: 14px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(231,246,255,.76));
  border-bottom: 1px solid rgba(0,143,255,.1);
}
.home-project-card div { padding: 22px 22px 24px; }
.home-project-card h3 {
  margin-bottom: 10px;
  font-size: 1.03rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.home-project-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .94rem;
}

.home-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 38px;
  align-items: start;
}
.home-news-list { display: grid; gap: 14px; }
.home-news-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px;
  border-radius: 24px;
  color: var(--text);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(0,143,255,.12);
  box-shadow: var(--shadow-soft);
}
.home-news-item:hover { text-decoration: none; transform: translateY(-3px); }
.home-news-item time {
  display: inline-flex;
  justify-content: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(11,110,251,.08);
  border: 1px solid rgba(11,110,251,.14);
  font-weight: 900;
  font-size: .86rem;
}
.home-news-item span { color: var(--muted); }
.home-section-link { display: inline-flex; margin-top: 20px; font-weight: 900; }

.home-profile-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 30px;
}
.home-profile-card h3 {
  margin-bottom: 4px;
  font-size: 1.72rem;
}
.home-profile-card p { color: var(--muted); }
.home-profile-card .role { color: var(--blue) !important; }

.home-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 24px;
}
.home-resource-card {
  border-radius: 30px;
  padding: 32px;
}
.home-resource-card h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}
.home-resource-card p { color: var(--muted); }
.home-resource-card .btn { margin-top: 10px; }
.home-resource-accent {
  background:
    radial-gradient(circle at 88% 0%, rgba(0,200,200,.18), transparent 32%),
    rgba(255,255,255,.78);
}

@media (max-width: 1120px) {
  .home-project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1020px) {
  .home-hero-grid,
  .home-overview-grid,
  .home-split-grid { grid-template-columns: 1fr; }
  .home-hero-panel { max-width: 760px; }
}
@media (max-width: 760px) {
  .home-hero { padding: 64px 0 58px; }
  .home-metric-grid,
  .home-focus-grid,
  .home-project-grid,
  .home-resource-grid { grid-template-columns: 1fr; }
  .home-news-item,
  .home-profile-card { grid-template-columns: 1fr; }
  .home-profile-card .team-photo-slot { margin: 0; }
  .home-hero-copy h1 { font-size: clamp(2.55rem, 13vw, 3.4rem); }
}


/* Current refinement: home research projects module and vertical recruitment layout */
.home-about-projects {
  background:
    radial-gradient(circle at 8% 8%, rgba(0,183,255,.14), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(123,97,255,.1), transparent 30%),
    linear-gradient(135deg, rgba(239,249,255,.82), rgba(255,255,255,.72));
}
.home-research-head {
  max-width: 760px;
  margin-bottom: 28px;
}
.home-research-head p:last-child {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.home-focus-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
  margin: 0 0 28px;
}
.home-focus-strip a {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 22px;
  border-radius: 26px;
  color: var(--text);
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(0,143,255,.14);
  box-shadow: var(--shadow-soft);
  font-weight: 850;
  line-height: 1.35;
}
.home-focus-strip a::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 12% 0%, rgba(0,183,255,.14), transparent 34%);
}
.home-focus-strip a:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: rgba(0,143,255,.26);
  box-shadow: 0 24px 70px rgba(35,84,135,.14);
}
.home-focus-strip span {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  font-weight: 950;
}
.home-focus-strip a {
  position: relative;
  z-index: 1;
}
.home-project-grid-balanced {
  grid-template-columns: repeat(4, minmax(0,1fr));
}
.home-news-wide {
  max-width: 980px;
}
.home-news-list-wide {
  gap: 16px;
}
.home-news-action {
  margin-top: 24px;
  text-align: center;
}
.home-resource-grid-three {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.home-resource-grid-three .home-resource-card h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
}

.recruitment-hero-card-polished {
  margin-bottom: 32px;
  background:
    radial-gradient(circle at 86% 12%, rgba(0,200,200,.14), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(238,249,255,.72));
}
.recruitment-stack {
  display: grid;
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}
.recruitment-card-wide {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 24px;
  padding: 30px;
  border-radius: 30px;
}
.recruitment-card-marker {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  display: inline-grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  font-weight: 950;
  letter-spacing: .08em;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 16px 34px rgba(11,110,251,.2);
}
.recruitment-card-body {
  position: relative;
  z-index: 1;
}
.recruitment-card-wide h3 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}
.resource-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.resource-links-inline .text-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11,110,251,.07);
  border: 1px solid rgba(11,110,251,.12);
}

@media (max-width: 1120px) {
  .home-focus-strip,
  .home-project-grid-balanced,
  .home-resource-grid-three { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .home-focus-strip,
  .home-project-grid-balanced,
  .home-resource-grid-three { grid-template-columns: 1fr; }
  .recruitment-card-wide { grid-template-columns: 1fr; padding: 24px; }
  .recruitment-card-marker { width: 56px; height: 56px; border-radius: 18px; }
  .resource-links-inline { display: grid; }
}


/* =====================================================
   Premium minimalist redesign override
   ===================================================== */
:root {
  --bg: #f5f2ec;
  --bg-2: #fcfbf8;
  --surface: #ffffff;
  --surface-2: #f8f6f1;
  --text: #101827;
  --muted: #5f6778;
  --line: rgba(16, 24, 39, 0.08);
  --line-strong: rgba(16, 24, 39, 0.14);
  --blue: #ca1736;
  --blue-2: #a90f2d;
  --teal: #1e3558;
  --dark: #101827;
  --dark-2: #22324f;
  --card: rgba(255, 255, 255, 0.92);
  --radius: 24px;
  --radius-lg: 34px;
  --shadow: 0 22px 70px rgba(16, 24, 39, 0.08);
  --shadow-soft: 0 14px 42px rgba(16, 24, 39, 0.06);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(202, 23, 54, 0.05), transparent 24%),
    radial-gradient(circle at 100% 0, rgba(30, 53, 88, 0.05), transparent 26%),
    linear-gradient(180deg, #f6f3ee 0%, #fbfaf8 32%, #ffffff 100%);
}
body::before,
body::after {
  display: none;
}

a {
  color: var(--blue);
}
a:hover {
  color: var(--blue-2);
}

.container {
  width: min(calc(100% - 48px), 1220px);
}

.topbar {
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(16,24,39,0.06);
  backdrop-filter: blur(20px);
  color: var(--muted);
}
.topbar a { color: var(--dark); }

.header {
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(16,24,39,0.06);
  box-shadow: 0 10px 28px rgba(16,24,39,0.04);
}

.nav { height: 84px; }
.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(145deg, #111827, #22324f 62%, #ca1736 140%);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}
.brand-mark::after {
  inset: -4px;
  border-color: rgba(202, 23, 54, 0.20);
  transform: rotate(0deg);
}
.brand-text strong {
  font-size: 1.08rem;
}
.brand-text span {
  font-size: 0.8rem;
  color: #7b8190;
}
.nav-links { gap: 22px; }
.nav-links a {
  color: var(--dark);
  font-weight: 700;
}
.nav-links a::after {
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #ef7a8d);
}
.nav-links a.active,
.nav-links a:hover { color: var(--blue); }

.kicker,
.section-eyebrow,
.visual-status-bar {
  letter-spacing: 0.18em;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.btn {
  padding: 13px 22px;
  font-weight: 800;
}
.btn-primary {
  background: linear-gradient(135deg, #111827, #ca1736);
  box-shadow: 0 14px 30px rgba(202, 23, 54, 0.18);
}
.btn-secondary {
  background: #fff;
  border: 1px solid rgba(16,24,39,0.10);
  color: var(--dark);
  box-shadow: none;
}
.btn-secondary:hover {
  border-color: rgba(202,23,54,0.22);
  color: var(--blue);
}

.section {
  padding: 88px 0;
}
.section-muted {
  background: transparent;
}
.section-head.center,
.page-hero .container,
.home-news-wide,
.publications-head,
.team-group-head {
  max-width: 1120px;
}
.section-head h2,
.page-hero h1,
.home-hero h1,
.home-resource-card h2,
.member-profile-copy h2,
.project-overview-card h3,
.topic-content h2,
.topic-content h3,
.recruitment-card h3,
.publication h3,
.news-card h3 {
  letter-spacing: -0.04em;
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 42px;
  background: transparent;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 22px auto 24px 24px;
  width: min(42vw, 560px);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(202,23,54,0.08), rgba(17,24,39,0.03));
  filter: blur(8px);
  z-index: 0;
}
.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 42px;
  align-items: center;
}
.home-hero-copy {
  padding: 26px 0 26px;
}
.home-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.92;
  color: var(--dark);
  background: none;
  -webkit-text-fill-color: initial;
}
.hero-lead {
  max-width: 660px;
  font-size: 1.14rem;
  color: var(--muted);
}
.hero-actions { margin-top: 30px; }
.home-hero-panel {
  position: relative;
  padding: 18px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.86));
  border: 1px solid rgba(16,24,39,0.08);
  box-shadow: var(--shadow);
}
.home-hero-panel::after {
  content: "";
  position: absolute;
  inset: auto 18px -18px 18px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(17,24,39,0.12), transparent 70%);
  filter: blur(14px);
  z-index: -1;
}
.visual-status-bar {
  color: var(--muted);
  padding: 8px 8px 14px;
}
.status-dot {
  background: #17b26a;
  box-shadow: 0 0 0 6px rgba(23,178,106,0.12);
}
.robotic-animation {
  border: 0;
  border-radius: 24px;
  background: #f7f5f0;
  box-shadow: inset 0 0 0 1px rgba(16,24,39,0.06);
}
.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.home-metric-grid a {
  padding: 16px 14px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid rgba(16,24,39,0.06);
  color: var(--dark);
  text-decoration: none;
}
.home-metric-grid a strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}
.home-metric-grid a span {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.hkust-showcase-section {
  padding-top: 24px;
}
.hkust-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
}
.hkust-showcase-copy {
  padding: 8px 8px 8px 0;
}
.hkust-showcase-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
}
.hkust-showcase-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.04rem;
}
.hkust-fact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.hkust-fact-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text);
}
.hkust-fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #ef7a8d);
}
.hkust-campus-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #fff;
  border: 1px solid rgba(16,24,39,0.08);
  box-shadow: var(--shadow);
}
.hkust-campus-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hkust-campus-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.68);
  color: var(--dark);
}
.hkust-campus-caption span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 4px;
}

.home-about-projects .section-head.center,
.home-news-section .section-head.center {
  margin-bottom: 26px;
}
.home-project-grid,
.project-card-grid,
.team-card-grid,
.home-resource-grid-three {
  display: grid;
  gap: 24px;
}
.home-project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-project-card,
.project-overview-card,
.team-member-card,
.home-resource-card,
.publication,
.news-card,
.recruitment-card,
.recruitment-hero-card,
.member-profile-card,
.team-pi-card,
.topic-block,
.project-detail-hero-inner,
.home-news-item {
  border-radius: 28px;
  border: 1px solid rgba(16,24,39,0.08);
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow-soft);
}
.home-project-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: stretch;
  color: var(--text);
  text-decoration: none;
}
.home-project-card:hover,
.project-overview-card:hover,
.team-member-card:hover,
.team-pi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(16,24,39,0.10);
  text-decoration: none;
}
.home-project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
  background: #f3f0ea;
}
.home-project-card > div {
  padding: 24px;
}
.home-project-card h3,
.project-overview-card h3,
.team-member-card h3,
.home-resource-card h2,
.team-pi-copy h3 {
  margin: 0 0 12px;
  font-size: 1.65rem;
  line-height: 1.12;
  color: var(--dark);
}
.home-project-card p,
.project-overview-card p,
.home-resource-card p,
.team-pi-copy p,
.team-member-card p,
.news-card p,
.publication p,
.recruitment-card p,
.page-hero p,
.topic-content p,
.profile-bio p,
.profile-bio li {
  color: var(--muted);
}

.page-hero {
  padding: 68px 0 26px;
  background: transparent;
}
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.96;
  color: var(--dark);
}
.page-hero p {
  max-width: 820px;
  font-size: 1.02rem;
}

.project-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.project-overview-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
.project-overview-card > div:last-child {
  padding: 24px;
}
.project-thumb-img img,
.project-thumb img {
  display: block;
  width: 100%;
  height: 270px;
  object-fit: cover;
  background: #f4f2ec;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 14px;
}
.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f5f3ef;
  border: 1px solid rgba(16,24,39,0.08);
  color: var(--dark);
  font-size: 0.82rem;
  font-weight: 700;
}
.text-link,
.muted-link {
  font-weight: 750;
}

.project-detail-hero-inner {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
}
.project-hero-image img,
.project-hero-image {
  display: block;
  width: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 24px;
  background: #f4f1ea;
}
.project-detail-list {
  margin: 14px 0 0;
  padding-left: 18px;
}
.topic-block {
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 24px;
}
.topic-media {
  min-width: 0;
}
.topic-media img,
.media-grid img {
  display: block;
  width: 100%;
  border-radius: 20px;
  background: #f4f1ea;
  object-fit: contain;
}
.topic-content h2,
.topic-content h3 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}
.topic-content .references {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(16,24,39,0.08);
}
.media-grid {
  display: grid;
  gap: 14px;
}
.topic-wide,
.topic-featured {
  grid-template-columns: 1fr;
}
.topic-portrait {
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.38fr);
}

.team-pi-card,
.member-profile-card,
.project-overview-card,
.publication,
.news-card,
.recruitment-hero-card,
.recruitment-card {
  padding: 24px;
}
.team-pi-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}
.team-pi-photo,
.member-profile-photo {
  min-width: 0;
}
.team-photo-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: linear-gradient(145deg, #141d2e, #ca1736);
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
  overflow: hidden;
}
.team-photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-photo-large { aspect-ratio: 4 / 4.5; }
.team-photo-profile { aspect-ratio: 4 / 4.6; }
.team-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.team-ra-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.team-member-card {
  padding: 20px;
  color: var(--text);
  text-decoration: none;
}
.team-member-card .team-photo-slot {
  margin-bottom: 18px;
  aspect-ratio: 4 / 4.2;
  font-size: 1.6rem;
}
.role,
.meta {
  color: var(--muted);
  font-size: 0.96rem;
}
.team-card-link,
.profile-title {
  color: var(--blue);
  font-weight: 800;
}
.member-profile-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 18px;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid rgba(16,24,39,0.08);
  color: var(--dark);
  text-decoration: none;
}
.profile-link img {
  width: 18px;
  height: 18px;
}
.profile-link:hover { color: var(--blue); text-decoration: none; }
.profile-bio {
  display: grid;
  gap: 18px;
}
.bio-block {
  padding: 20px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid rgba(16,24,39,0.06);
}
.bio-block h3 {
  margin: 0 0 12px;
  font-size: 1.18rem;
}
.bio-block ul {
  margin: 0;
  padding-left: 18px;
}
.bio-service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.publications-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.scholar-callout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid rgba(16,24,39,0.08);
  color: var(--dark);
  text-decoration: none;
}
.scholar-callout img { width: 20px; height: 20px; }
.publication-list,
.news-list,
.recruitment-stack {
  display: grid;
  gap: 22px;
}
.publication h3,
.news-card h3,
.recruitment-card h3 {
  font-size: 1.4rem;
  margin: 0 0 10px;
}
.pub-links { margin-top: 14px; }
.pub-links a { font-weight: 700; }

.home-news-list,
.news-list-rich {
  display: grid;
  gap: 18px;
}
.home-news-item {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: start;
  color: var(--text);
  text-decoration: none;
}
.home-news-item time,
.news-card time {
  color: var(--blue);
  font-weight: 800;
}
.home-news-item span {
  color: var(--muted);
}
.home-news-action { margin-top: 20px; }
.news-card {
  display: grid;
  gap: 12px;
}
.legacy-news-panel {
  margin-top: 26px;
  padding: 26px;
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #22324f);
  color: #fff;
}
.legacy-news-panel p,
.legacy-news-panel a { color: rgba(255,255,255,0.86); }
.legacy-news-panel a.btn { color: #fff; }

.home-resource-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.home-resource-card {
  padding: 28px;
}
.home-resource-accent {
  background: linear-gradient(135deg, #111827, #ca1736);
}
.home-resource-accent .section-eyebrow,
.home-resource-accent h2,
.home-resource-accent p { color: #fff; }

.recruitment-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.recruitment-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
}
.recruitment-card-marker {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #111827, #ca1736);
  color: #fff;
  font-weight: 800;
}
.resource-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}
code {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f4f1ea;
  border: 1px solid rgba(16,24,39,0.06);
}

.footer {
  margin-top: 10px;
  padding: 34px 0 48px;
  border-top: 1px solid rgba(16,24,39,0.08);
  background: transparent;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.footer p {
  margin: 0;
  color: var(--muted);
}
.footer p strong { color: var(--dark); }

@media (max-width: 1080px) {
  .home-hero-grid,
  .hkust-showcase-grid,
  .project-detail-hero-inner,
  .team-pi-card,
  .member-profile-card,
  .topic-block,
  .topic-portrait {
    grid-template-columns: 1fr;
  }
  .home-project-grid,
  .project-card-grid,
  .home-resource-grid-three,
  .team-card-grid,
  .team-ra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-project-card {
    grid-template-columns: 1fr;
  }
  .home-project-card img {
    min-height: 240px;
    max-height: 280px;
  }
}

@media (max-width: 800px) {
  .topbar-inner {
    flex-direction: column;
    justify-content: center;
    height: auto;
    padding: 8px 0;
  }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 24px;
    right: 24px;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(16,24,39,0.08);
    box-shadow: var(--shadow-soft);
  }
  .nav-links.open { display: flex; }
  .nav {
    position: relative;
    height: 76px;
  }
  .home-hero h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
  .home-metric-grid,
  .home-resource-grid-three,
  .home-project-grid,
  .project-card-grid,
  .team-card-grid,
  .team-ra-grid {
    grid-template-columns: 1fr;
  }
  .home-news-item,
  .recruitment-hero-card,
  .recruitment-card {
    grid-template-columns: 1fr;
    display: grid;
  }
  .home-news-item time {
    margin-bottom: -8px;
  }
  .recruitment-card-marker { width: 52px; height: 52px; }
  .footer-grid {
    flex-direction: column;
  }
}


/* =====================================================
   Requested layout refinements: full-image project cards,
   aligned project overview cards, publication numbering,
   and HKUST recruitment element.
   ===================================================== */
.home-research-head .section-eyebrow {
  display: none !important;
}
.home-research-head {
  margin-bottom: 32px !important;
}
.home-research-head h2 {
  margin-top: 0;
}
.home-project-grid-balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 32px !important;
  align-items: stretch;
}
.home-project-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
  min-height: 100%;
  border-radius: 32px;
  background: rgba(255,255,255,0.94);
}
.home-project-card img {
  display: block;
  width: 100%;
  height: 340px !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
  padding: 18px;
  background: linear-gradient(145deg, #f9f7f2, #fffdf8);
  border-bottom: 1px solid rgba(16,24,39,0.07);
}
.home-project-card > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 28px 30px !important;
}
.home-project-card h3 {
  font-size: clamp(1.45rem, 2vw, 2rem) !important;
  max-width: 92%;
}
.home-project-card p {
  margin-top: auto;
  font-size: 1rem;
}

.project-card-grid {
  align-items: stretch !important;
}
.project-card-grid .project-overview-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
  padding: 0 !important;
}
.project-card-grid .project-overview-card .project-thumb,
.project-card-grid .project-overview-card .project-thumb-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: linear-gradient(145deg, #f9f7f2, #fffdf8);
  border-bottom: 1px solid rgba(16,24,39,0.07);
  border-radius: 32px 32px 0 0;
}
.project-card-grid .project-overview-card .project-thumb img,
.project-card-grid .project-overview-card .project-thumb-img img {
  width: 100%;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 20px;
  background: transparent;
}
.project-card-grid .project-overview-card > div:last-child {
  display: flex !important;
  flex-direction: column !important;
  flex: 1;
  padding: 26px 28px 30px !important;
}
.project-card-grid .project-overview-card p {
  margin-bottom: 18px;
}
.project-card-grid .project-overview-card .text-link {
  margin-top: auto !important;
  align-self: flex-start;
}

.publication-list-polished {
  counter-reset: pubs;
}
.publication-list-polished .publication {
  position: relative;
  padding: 32px 36px 32px 108px !important;
  overflow: visible;
}
.publication-list-polished .publication::before {
  left: 34px !important;
  top: 34px !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 16px !important;
  z-index: 2;
}
.publication-list-polished .publication h3,
.publication-list-polished .publication p {
  position: relative;
  z-index: 1;
}
.publication-list-polished .publication h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.recruitment-hkust-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,246,241,0.94));
  border: 1px solid rgba(16,24,39,0.08);
  box-shadow: var(--shadow-soft);
}
.recruitment-hkust-image {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  min-height: 310px;
  background: #f4f1ea;
}
.recruitment-hkust-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
}
.recruitment-hkust-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.recruitment-hkust-copy p {
  color: var(--muted);
  font-size: 1.04rem;
}
.recruitment-hkust-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.recruitment-hkust-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f5f3ef;
  border: 1px solid rgba(16,24,39,0.08);
  color: var(--dark);
  font-size: 0.86rem;
  font-weight: 750;
}

@media (max-width: 1080px) {
  .home-project-grid-balanced,
  .recruitment-hkust-panel {
    grid-template-columns: 1fr !important;
  }
  .home-project-card img {
    height: 380px !important;
  }
}
@media (max-width: 700px) {
  .home-project-card img {
    height: 280px !important;
    padding: 12px;
  }
  .publication-list-polished .publication {
    padding: 82px 24px 28px 24px !important;
  }
  .publication-list-polished .publication::before {
    left: 24px !important;
    top: 24px !important;
  }
  .recruitment-hkust-panel {
    padding: 18px;
  }
  .recruitment-hkust-image,
  .recruitment-hkust-image img {
    min-height: 230px;
  }
}

/* =====================================================
   Bug fix: center Project detail content cards
   -----------------------------------------------------
   The detail-list is used together with `.container` in
   project1–project4.html. A later rule set `margin: 14px 0 0`
   and `padding-left: 18px`, which overrode `.container { margin:
   0 auto; }` and pushed every Projects detail module to the left.
   Keep the card list inside the same centered page container as the
   hero section.
   ===================================================== */
.container.project-detail-list {
  width: min(calc(100% - 48px), 1220px);
  max-width: 1220px;
  margin: 14px auto 0;
  padding-left: 0;
}

.container.project-detail-list .topic-block {
  width: 100%;
}

@media (max-width: 660px) {
  .container.project-detail-list {
    width: min(calc(100% - 26px), 1220px);
  }
}


/* MVSI lab update: animated logo and cleaned homepage hero */
.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 18px;
  display: block;
  box-shadow: 0 14px 32px rgba(11, 110, 251, 0.16);
}

.brand-text strong {
  font-size: 1.08rem;
}

.brand-text span {
  max-width: 360px;
}

.home-hero {
  padding: 78px 0 74px;
  border-bottom: 1px solid rgba(16,24,39,0.06);
  background:
    radial-gradient(circle at 18% 20%, rgba(11,110,251,0.08), transparent 30%),
    radial-gradient(circle at 82% 24%, rgba(0,183,216,0.11), transparent 32%),
    linear-gradient(180deg, #fffdf9 0%, #f7fbff 100%);
}

.home-hero::before {
  inset: 28px 24px 28px 24px;
  width: auto;
  border-radius: 42px;
  background:
    linear-gradient(120deg, rgba(11,110,251,0.07), transparent 44%),
    linear-gradient(240deg, rgba(0,183,216,0.08), transparent 42%);
  filter: none;
}

.home-hero-grid {
  grid-template-columns: minmax(0, 940px) !important;
  justify-content: center;
  text-align: center;
  gap: 0;
}

.home-hero-copy {
  padding: 42px 0 44px;
  margin: 0 auto;
}

.home-hero h1 {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2.65rem, 6.1vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.04rem, 1.55vw, 1.24rem);
  line-height: 1.75;
}

.hero-actions {
  justify-content: center;
}

.home-hero-panel,
.home-metric-grid,
.robotic-animation,
.visual-status-bar {
  display: none !important;
}

.project-directions-list {
  max-width: 920px;
  margin: 18px auto 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  text-align: left;
}

.project-directions-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.65;
}

.project-directions-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

@media (max-width: 760px) {
  .brand-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
  .brand-text span {
    display: none;
  }
  .home-hero {
    padding: 52px 0 48px;
  }
  .home-hero-copy {
    padding: 18px 0 20px;
  }
  .home-hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }
}


/* =====================================================
   Gallery module and project2 construction-control layout
   ===================================================== */
.gallery-section .section-head p:last-child,
.home-gallery-section .section-head p:last-child {
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.gallery-card,
.home-gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(16,24,39,0.08);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-soft);
}

.gallery-featured-card {
  grid-column: span 2;
}

.gallery-image-wrap {
  overflow: hidden;
  background: #f4f1ea;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 330px;
  object-fit: cover;
  transition: transform .35s ease;
}

.gallery-featured-card img {
  height: 430px;
}

.gallery-card:hover img,
.home-gallery-card:hover img {
  transform: scale(1.035);
}

.gallery-card-copy {
  padding: 22px 24px 26px;
}

.gallery-meta,
.home-gallery-card span {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 800;
}

.gallery-card h3 {
  margin: 0 0 10px;
  color: var(--dark);
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.gallery-card p:last-child,
.home-gallery-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

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

.home-gallery-card {
  display: grid;
  grid-template-rows: 210px 1fr;
  color: var(--text);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.home-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(16,24,39,0.10);
  border-color: rgba(202,23,54,0.18);
  text-decoration: none;
}

.home-gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f4f1ea;
  transition: transform .35s ease;
}

.home-gallery-card div {
  padding: 18px 18px 20px;
}

.home-gallery-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 1.08rem;
  line-height: 1.2;
}

.home-gallery-card p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .94rem;
}

.topic-control-story {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.66fr);
  grid-template-areas:
    "head head"
    "overview visual"
    "refs refs";
  gap: 24px 30px;
  align-items: start;
  padding: 32px !important;
}

.topic-control-story .topic-control-header {
  grid-area: head;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(16,24,39,0.08);
}

.topic-control-story .topic-control-header h3 {
  margin: 0;
  max-width: 940px;
  font-size: clamp(2rem, 3.7vw, 3.25rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
  color: var(--dark);
}

.topic-control-overview {
  grid-area: overview;
}

.topic-control-overview h4,
.topic-control-references h4 {
  margin: 0 0 12px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 800;
}

.topic-control-overview p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.topic-control-overview p:last-child {
  margin-bottom: 0;
}

.topic-control-visual {
  grid-area: visual;
  align-self: start;
  padding: 14px !important;
  border-radius: 24px;
  background: #f7f4ee;
  border: 1px solid rgba(16,24,39,0.08);
  box-shadow: none;
}

.topic-control-visual img {
  width: 100% !important;
  max-height: 520px !important;
  object-fit: contain !important;
  border-radius: 18px;
  background: #fff;
}

.topic-control-references {
  grid-area: refs;
  margin-top: 6px !important;
  padding-top: 22px !important;
  border-top: 1px solid rgba(16,24,39,0.08) !important;
}

.topic-control-references ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 42px;
}

.topic-control-references li {
  break-inside: avoid;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.62;
}

@media (max-width: 1080px) {
  .gallery-grid,
  .home-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topic-control-story {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "overview"
      "visual"
      "refs";
  }
  .topic-control-visual img {
    max-height: 640px !important;
  }
}

@media (max-width: 760px) {
  .gallery-grid,
  .home-gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-featured-card {
    grid-column: span 1;
  }
  .gallery-card img,
  .gallery-featured-card img {
    height: 280px;
  }
  .home-gallery-card {
    grid-template-rows: 240px 1fr;
  }
  .topic-control-story {
    padding: 22px !important;
  }
  .topic-control-references ol {
    columns: 1;
  }
}

/* =====================================================
   Apple-inspired Gallery refresh
   ===================================================== */
.gallery-page-main {
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 42%, #ffffff 100%);
}

.gallery-showcase-hero {
  padding: clamp(74px, 9vw, 120px) 0 clamp(34px, 5vw, 64px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(11,110,251,.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(251,251,253,.86));
}

.gallery-showcase-hero-inner {
  max-width: 980px;
}

.gallery-showcase-hero h1 {
  margin: 0 auto 16px;
  max-width: 980px;
  color: #111827;
  font-size: clamp(3.35rem, 8vw, 7.1rem);
  line-height: .9;
  letter-spacing: -0.075em;
}

.gallery-hero-lead {
  max-width: 780px;
  margin: 0 auto;
  color: #667085;
  font-size: clamp(1.06rem, 1.45vw, 1.28rem);
  line-height: 1.65;
}

.gallery-showcase-section {
  padding: 20px 0 110px;
}

.gallery-showcase-wrap {
  display: grid;
  gap: 28px;
}

.gallery-spotlight-card,
.gallery-bento-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(17,24,39,.08);
  background: rgba(255,255,255,.94);
  box-shadow: 0 30px 80px rgba(17,24,39,.09);
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease;
}

.gallery-spotlight-card:hover,
.gallery-bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17,24,39,.12);
  box-shadow: 0 38px 100px rgba(17,24,39,.12);
}

.gallery-spotlight-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr);
  gap: clamp(22px, 3vw, 46px);
  align-items: center;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 44px;
  background:
    radial-gradient(circle at 5% 8%, rgba(11,110,251,.09), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.gallery-spotlight-media {
  overflow: hidden;
  min-height: clamp(420px, 49vw, 610px);
  border-radius: 32px;
  background: #eceff3;
}

.gallery-spotlight-media img,
.gallery-bento-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.gallery-spotlight-card:hover img,
.gallery-bento-card:hover img {
  transform: scale(1.025);
}

.gallery-spotlight-copy {
  padding: clamp(22px, 3vw, 42px) clamp(12px, 2vw, 26px);
}

.gallery-pill {
  display: inline-flex;
  margin: 0 0 13px;
  color: #d10f36;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 950;
}

.gallery-spotlight-copy h2 {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(2.25rem, 4.8vw, 5.15rem);
  line-height: .92;
  letter-spacing: -0.072em;
}

.gallery-spotlight-copy p:last-child,
.gallery-bento-copy p:last-child {
  margin: 0;
  color: #667085;
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 1.7;
}

.gallery-bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr);
  gap: 28px;
  align-items: stretch;
}

.gallery-bento-card {
  display: flex;
  flex-direction: column;
  border-radius: 38px;
  min-height: 455px;
}

.gallery-bento-wide {
  grid-row: span 2;
  min-height: 700px;
}

.gallery-bento-media {
  overflow: hidden;
  height: 275px;
  background: #eceff3;
}

.gallery-bento-wide .gallery-bento-media {
  height: 430px;
}

.gallery-bento-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(24px, 3vw, 38px);
}

.gallery-bento-copy h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: clamp(1.72rem, 3.15vw, 3.6rem);
  line-height: .98;
  letter-spacing: -0.06em;
}

.gallery-bento-card:not(.gallery-bento-wide) .gallery-bento-copy h3 {
  font-size: clamp(1.6rem, 2.2vw, 2.35rem);
  line-height: 1.03;
}

.gallery-bento-dark {
  background: linear-gradient(145deg, #111827 0%, #1f2937 100%);
  border-color: rgba(255,255,255,.08);
}

.gallery-bento-dark .gallery-bento-copy h3 {
  color: #ffffff;
}

.gallery-bento-dark .gallery-bento-copy p:last-child {
  color: rgba(255,255,255,.78);
}

.gallery-bento-dark .gallery-pill {
  color: #80d8ff;
}

@media (max-width: 1060px) {
  .gallery-spotlight-card,
  .gallery-bento-grid {
    grid-template-columns: 1fr;
  }

  .gallery-spotlight-media {
    min-height: 520px;
  }

  .gallery-bento-wide {
    grid-row: auto;
    min-height: 0;
  }

  .gallery-bento-wide .gallery-bento-media,
  .gallery-bento-media {
    height: clamp(300px, 52vw, 500px);
  }
}

@media (max-width: 640px) {
  .gallery-showcase-hero {
    padding-top: 56px;
  }

  .gallery-showcase-section {
    padding-bottom: 72px;
  }

  .gallery-spotlight-card,
  .gallery-bento-card {
    border-radius: 28px;
  }

  .gallery-spotlight-card {
    padding: 12px;
  }

  .gallery-spotlight-media {
    min-height: 330px;
    border-radius: 22px;
  }

  .gallery-spotlight-copy,
  .gallery-bento-copy {
    padding: 22px;
  }

  .gallery-bento-media,
  .gallery-bento-wide .gallery-bento-media {
    height: 255px;
  }
}

/* =====================================================
   MVSI wow-details pass: micro interactions, gallery lightbox,
   scroll progress, and refined motion accents
   ===================================================== */
::selection {
  color: #ffffff;
  background: #ca1736;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1000;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #111827, #ca1736, #0b6efb, #00b7d8);
  box-shadow: 0 0 18px rgba(202, 23, 54, 0.28);
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.42;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(11, 110, 251, 0.18), rgba(202, 23, 54, 0.08) 42%, transparent 68%);
  filter: blur(12px);
  transition: opacity .28s ease;
}

.ambient-orb {
  position: fixed;
  z-index: -2;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.42;
  animation: orbDrift 18s ease-in-out infinite;
}
.ambient-orb.orb-one {
  width: 220px;
  height: 220px;
  left: -70px;
  top: 22vh;
  background: radial-gradient(circle, rgba(11,110,251,.18), transparent 68%);
}
.ambient-orb.orb-two {
  width: 260px;
  height: 260px;
  right: -90px;
  top: 44vh;
  background: radial-gradient(circle, rgba(202,23,54,.16), transparent 68%);
  animation-delay: -6s;
}
.ambient-orb.orb-three {
  width: 180px;
  height: 180px;
  left: 58vw;
  bottom: -64px;
  background: radial-gradient(circle, rgba(0,183,216,.16), transparent 70%);
  animation-delay: -11s;
}
@keyframes orbDrift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(28px,-36px,0) scale(1.08); }
}

.header {
  transition: background .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.header.scrolled {
  background: rgba(255, 253, 249, .82);
  border-bottom-color: rgba(16,24,39,.10);
  box-shadow: 0 18px 50px rgba(16,24,39,.10);
}
.header.scrolled .nav {
  height: 66px;
}

.brand-logo {
  transition: transform .32s ease, box-shadow .32s ease;
}
.brand:hover .brand-logo {
  transform: rotate(-4deg) scale(1.04);
  box-shadow: 0 18px 42px rgba(202, 23, 54, 0.16), 0 10px 28px rgba(11, 110, 251, 0.12);
}
.brand-text strong {
  position: relative;
  width: max-content;
}
.brand-text strong::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ca1736, #0b6efb, #00b7d8);
  transform: scaleX(.42);
  transform-origin: left;
  transition: transform .28s ease;
}
.brand:hover .brand-text strong::after { transform: scaleX(1); }

.nav-links a {
  transition: color .22s ease, transform .22s ease;
}
.nav-links a:hover { transform: translateY(-1px); }

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  inset: -140% -40%;
  z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.44), transparent 58%);
  transform: translateX(-62%);
  transition: transform .65s ease;
}
.btn:hover::before { transform: translateX(62%); }

.section-head h2,
.home-research-head h2,
.gallery-showcase-hero h1,
.home-hero h1 {
  text-wrap: balance;
}
.section-head.center::after,
.home-research-head::after {
  content: "";
  display: block;
  width: 74px;
  height: 3px;
  margin: 20px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ca1736, #0b6efb, #00b7d8);
  opacity: .82;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,.48) 48%, transparent 54% 100%),
    radial-gradient(circle at 50% 10%, rgba(255,255,255,.72), transparent 36%);
  mix-blend-mode: soft-light;
  animation: heroSheen 9s ease-in-out infinite;
}
@keyframes heroSheen {
  0%, 100% { transform: translateX(-16%); opacity: .35; }
  50% { transform: translateX(16%); opacity: .72; }
}
.home-hero-copy { position: relative; z-index: 2; }

.home-signal-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 880px;
  margin: 28px auto 0;
}
.home-signal-strip span {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #182033;
  font-weight: 760;
  font-size: .9rem;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(16,24,39,.08);
  box-shadow: 0 12px 28px rgba(16,24,39,.06);
  backdrop-filter: blur(14px);
  animation: chipFloat 5.8s ease-in-out infinite;
}
.home-signal-strip span:nth-child(2n) { animation-delay: -1.2s; }
.home-signal-strip span:nth-child(3n) { animation-delay: -2.5s; }
.home-signal-strip span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ca1736, #0b6efb);
  box-shadow: 0 0 0 5px rgba(11,110,251,.08);
}
@keyframes chipFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.home-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 26px auto 0;
  color: #667085;
  font-weight: 760;
  font-size: .9rem;
  text-decoration: none;
}
.home-scroll-cue:hover { color: #ca1736; text-decoration: none; }
.home-scroll-cue::before {
  content: "";
  width: 18px;
  height: 28px;
  border-radius: 999px;
  border: 1.6px solid rgba(17,24,39,.28);
  background: linear-gradient(180deg, transparent 0 46%, rgba(202,23,54,.3) 47% 54%, transparent 55%);
  animation: scrollCue 1.7s ease-in-out infinite;
}
@keyframes scrollCue { 50% { transform: translateY(5px); } }

.fx-spotlight {
  --spot-x: 50%;
  --spot-y: 18%;
  position: relative;
  isolation: isolate;
}
.fx-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(255,255,255,.58), rgba(11,110,251,.10) 18%, transparent 42%);
  transition: opacity .28s ease;
}
.fx-spotlight:hover::after { opacity: 1; }

.home-project-card,
.project-overview-card,
.home-gallery-card,
.gallery-spotlight-card,
.gallery-bento-card,
.team-member-card,
.home-news-item,
.home-resource-card,
.recruitment-card,
.hkust-campus-card {
  will-change: transform;
}

.home-project-card img,
.project-thumb img,
.project-thumb-img img,
.home-gallery-card img,
.gallery-bento-media img,
.gallery-spotlight-media img,
.hkust-campus-card img {
  transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .55s ease;
}
.home-project-card:hover img,
.project-overview-card:hover img,
.hkust-campus-card:hover img {
  transform: scale(1.025);
  filter: saturate(1.05) contrast(1.02);
}

.home-news-item,
.home-resource-card,
.recruitment-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.home-news-item:hover,
.home-resource-card:hover,
.recruitment-card:hover {
  transform: translateY(-4px);
  border-color: rgba(202,23,54,.18);
  box-shadow: 0 22px 58px rgba(16,24,39,.10);
  text-decoration: none;
}

.reveal {
  transition-delay: var(--reveal-delay, 0ms);
}

.back-to-top-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(16,24,39,.10);
  background: rgba(255,255,255,.82);
  color: #111827;
  box-shadow: 0 18px 46px rgba(16,24,39,.14);
  backdrop-filter: blur(16px);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  transition: opacity .25s ease, transform .25s ease, background .25s ease;
}
.back-to-top-fab.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.back-to-top-fab:hover {
  background: #111827;
  color: #fff;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(7, 12, 24, .72);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease;
}
.gallery-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.gallery-lightbox-panel {
  width: min(1120px, 100%);
  max-height: min(86vh, 900px);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  border-radius: 34px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 34px 110px rgba(0,0,0,.32);
  transform: translateY(18px) scale(.98);
  transition: transform .26s ease;
}
.gallery-lightbox.open .gallery-lightbox-panel { transform: translateY(0) scale(1); }
.gallery-lightbox-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  background: #0b1220;
}
.gallery-lightbox-copy {
  padding: clamp(24px, 3.5vw, 44px);
  overflow: auto;
}
.gallery-lightbox-copy span {
  display: inline-flex;
  margin-bottom: 12px;
  color: #ca1736;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 900;
}
.gallery-lightbox-copy h3 {
  margin: 0 0 14px;
  color: #111827;
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.055em;
}
.gallery-lightbox-copy p {
  margin: 0;
  color: #667085;
  line-height: 1.72;
}
.gallery-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #111827;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  font-size: 1.4rem;
}
.gallery-spotlight-card,
.gallery-bento-card { cursor: zoom-in; }

@media (max-width: 820px) {
  .header.scrolled .nav { height: 76px; }
  .cursor-glow,
  .ambient-orb { display: none; }
  .gallery-lightbox-panel { grid-template-columns: 1fr; overflow: auto; }
  .gallery-lightbox-img { min-height: 280px; max-height: 52vh; }
  .back-to-top-fab { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .cursor-glow,
  .ambient-orb { display: none; }
}


/* Homepage refinement: remove research chips and redesign the scroll cue */
.home-signal-strip {
  display: none !important;
}

.home-scroll-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(34px, 4vw, 54px);
}

.home-scroll-cue {
  position: relative;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 auto !important;
  padding: 0 20px 4px;
  color: rgba(24, 32, 51, 0.62) !important;
  font-size: 0.72rem !important;
  font-weight: 780 !important;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: color .25s ease, transform .25s ease;
}

.home-scroll-cue::before {
  display: none !important;
  content: none !important;
}

.home-scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 72px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(202,23,54,.55), rgba(11,110,251,.48), transparent);
  opacity: .7;
}

.home-scroll-cue:hover {
  color: #ca1736 !important;
  transform: translateY(-2px);
}

.scroll-line {
  position: relative;
  width: 32px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(16, 24, 39, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.46)),
    radial-gradient(circle at 50% 0%, rgba(11,110,251,.18), transparent 62%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 18px 38px rgba(16, 24, 39, 0.08);
  backdrop-filter: blur(14px);
}

.scroll-line::before,
.scroll-line::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line::before {
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ca1736, #0b6efb);
  box-shadow: 0 0 0 6px rgba(11,110,251,.08);
  animation: scrollDot 1.85s cubic-bezier(.44,.05,.2,.98) infinite;
}

.scroll-line::after {
  bottom: -18px;
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, rgba(16,24,39,.24), transparent);
}

.scroll-label {
  display: block;
  opacity: .86;
}

@keyframes scrollDot {
  0% { transform: translate(-50%, 0); opacity: .2; }
  25% { opacity: 1; }
  75% { transform: translate(-50%, 25px); opacity: 1; }
  100% { transform: translate(-50%, 25px); opacity: 0; }
}

@media (max-width: 760px) {
  .home-scroll-wrap {
    margin-top: 30px;
  }
  .home-scroll-cue {
    font-size: .66rem !important;
    letter-spacing: .18em;
  }
  .scroll-line {
    width: 28px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-line::before {
    animation: none !important;
    top: 22px;
    opacity: .85;
  }
}

/* Layout cleanup after removing the topbar email and non-PI profile email links */
.topbar-inner { justify-content: flex-start; }
.member-profile-copy > .profile-title + .profile-bio { margin-top: 18px; }

/* Profile photo fix: fill the full frame on member detail pages without leaving white gaps. */
.member-profile-card .team-photo-profile {
  background: linear-gradient(145deg, #141d2e, #ca1736);
}

.member-profile-card .team-photo-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
}
