/* =========================================================
   PolyU VCLab — Visual Computing Lab
   Brand color: #8F1329 (PolyU brick red)
   ========================================================= */

:root {
  --polyu-red:        #8F1329;
  --polyu-red-dark:   #6E0E20;
  --polyu-red-soft:   #C8193D;
  --gold:             #D4A24C;
  --gold-soft:        #E8C685;
  --ink:              #1A1A1A;
  --ink-soft:         #333;
  --muted:            #6B6B6B;
  --muted-2:          #9A9A9A;
  --bg:               #FAFAF8;
  --bg-alt:           #F3EFEA;
  --surface:          #FFFFFF;
  --line:             #E6E2DD;
  --line-strong:      #CFC8BF;
  --shadow-sm:        0 1px 2px rgba(20,10,10,.04), 0 2px 8px rgba(20,10,10,.04);
  --shadow-md:        0 4px 14px rgba(30,10,15,.08), 0 12px 30px rgba(30,10,15,.06);
  --shadow-lg:        0 20px 50px rgba(30,10,15,.14);
  --radius:           12px;
  --radius-sm:        8px;
  --sidebar-w:        260px;
  --container:        1180px;
  --font-serif:       "Playfair Display", "Source Serif Pro", "Georgia", "Times New Roman", serif;
  --font-sans:        "Inter", "Helvetica Neue", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--polyu-red); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--polyu-red-dark); }

h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); margin: 0 0 1.25rem; }
h3 { font-size: 1.25rem; margin: 0 0 .5rem; }

p { margin: 0 0 1rem; color: var(--ink-soft); }

/* ============ Layout ============ */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ============ Sidebar ============ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #FFFFFF;
  border-right: 1px solid var(--line);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 50;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.brand__logo {
  width: 46px; height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  padding: 3px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(143,19,41,.12);
}
.brand__text { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; color: var(--polyu-red); letter-spacing: .02em; }
.brand__sub  { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin-top: 2px; }

.sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar__nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .75rem;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  border-left: 3px solid transparent;
}
.sidebar__nav a:hover { background: var(--bg-alt); color: var(--polyu-red); transform: translateX(2px); }
.sidebar__nav a.active { background: #FBF2F3; color: var(--polyu-red); border-left-color: var(--polyu-red); }
.sidebar__nav .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.sidebar__nav a.active .dot, .sidebar__nav a:hover .dot { background: var(--polyu-red); }

.sidebar__footer { margin-top: auto; font-size: .72rem; color: var(--muted-2); line-height: 1.55; border-top: 1px solid var(--line); padding-top: 1rem; letter-spacing: .01em; }
.sidebar__footer strong { color: var(--ink-soft); font-weight: 600; display: block; font-size: .78rem; margin-bottom: .15rem; }
.sidebar__socials { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.sidebar__socials a {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
  transition: all .2s ease;
}
.sidebar__socials a:hover { color: var(--polyu-red); border-color: var(--polyu-red); background: #FBF2F3; transform: translateY(-1px); }
.sidebar__socials-red { font-weight: 900; }
.sidebar__socials-red svg text { fill: currentColor; }

/* ============ Main ============ */
.main { grid-column: 2; padding: 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 2.5rem; }

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--ink);
  background: #FDF8F2;
  padding: 5.5rem 0 5rem;
  border-bottom: 1px solid var(--line);
}

/* Layered image background — light, airy, watermark-style */
.hero__bg { position: absolute; inset: 0; z-index: -3; pointer-events: none; }
.hero__bg-img {
  position: absolute; inset: -4% -2% -4% -2%;
  background-image: url('../images/polyu-innovation-tower.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: saturate(.85) brightness(1.15) contrast(.95);
  opacity: .55;
  transform: scale(1.06);
  animation: heroZoom 32s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  0%   { transform: scale(1.06) translate3d(0,0,0); }
  100% { transform: scale(1.14) translate3d(-1%,-1%,0); }
}
.hero__bg-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 560px at 88% -5%, rgba(143,19,41,.22), transparent 58%),
    radial-gradient(800px 500px at 5% 110%, rgba(212,162,76,.28), transparent 60%),
    linear-gradient(160deg,
      rgba(253,248,242,.55) 0%,
      rgba(253,244,232,.72) 35%,
      rgba(253,240,228,.82) 65%,
      rgba(253,244,236,.95) 100%);
}
.hero__bg-noise {
  position: absolute; inset: 0; opacity: .28; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.56  0 0 0 0 0.08  0 0 0 0 0.16  0 0 0 0.25 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.hero__grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .45; z-index: -1;
  background-image:
    linear-gradient(rgba(143,19,41,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,19,41,.07) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(1000px 500px at 30% 30%, #000 30%, transparent 75%);
}

.hero__inner { position: relative; display: grid; grid-template-columns: 1.4fr .95fr; gap: 3rem; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 700; color: var(--polyu-red);
  text-transform: uppercase; letter-spacing: .18em;
  padding: .4rem .85rem;
  background: rgba(255,255,255,.8); border: 1px solid rgba(143,19,41,.18);
  border-radius: 999px; backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(143,19,41,.08);
}
.hero__eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--polyu-red);
  box-shadow: 0 0 0 4px rgba(143,19,41,.15);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 0 4px rgba(143,19,41,.15); }
  50%     { box-shadow: 0 0 0 7px rgba(143,19,41,0); }
}
.hero h1 {
  margin-top: 1.25rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #8F1329 55%, #C8193D 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__tagline { font-size: 1.12rem; color: var(--ink-soft); max-width: 620px; }
.hero__tagline strong { color: var(--ink); }
.hero__mission {
  margin-top: 1.75rem; padding: 1.1rem 1.25rem;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(143,19,41,.14);
  border-left: 4px solid var(--polyu-red);
  border-radius: 0 12px 12px 0;
  font-family: var(--font-serif); font-style: italic; color: var(--ink-soft);
  box-shadow: 0 8px 24px rgba(143,19,41,.08);
}
.hero__mission small { display:block; margin-top:.3rem; font-style: normal; font-family: var(--font-sans); color: var(--muted-2); font-size:.75rem; letter-spacing:.14em; text-transform: uppercase;}
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: .92rem;
  transition: all .2s ease; cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--polyu-red); color: #fff; }
.btn--primary:hover { background: var(--polyu-red-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(143,19,41,.25); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--polyu-red); color: var(--polyu-red); }

/* ============ Hero logo stage (light theme) ============ */
.hero__visual { position: relative; height: 420px; }
.hero__logo-stage {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.hero__logo-glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,230,205,.85) 0%, rgba(244,205,155,.55) 30%, rgba(212,162,76,.2) 55%, transparent 75%);
  filter: blur(22px);
  animation: pulseGlow 6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.08); opacity: 1; }
}
.hero__logo-orbit {
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 1px dashed rgba(143,19,41,.35);
  animation: spin 34s linear infinite;
}
.hero__logo-orbit::before, .hero__logo-orbit::after {
  content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}
.hero__logo-orbit::before { top: -5px; left: 50%; background: var(--gold); color: var(--gold); }
.hero__logo-orbit::after  { bottom: -5px; left: 50%; background: var(--polyu-red); color: var(--polyu-red); }
.hero__logo-orbit--2 {
  width: 380px; height: 380px;
  border: 1px solid rgba(143,19,41,.18);
  animation: spin 60s linear infinite reverse;
}
.hero__logo-orbit--2::before, .hero__logo-orbit--2::after { display: none; }

.hero__logo-card {
  position: relative;
  width: 230px; height: 230px;
  border-radius: 28px;
  padding: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.95) 0%, rgba(255,250,245,.8) 100%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow:
    0 30px 60px rgba(143,19,41,.18),
    0 4px 14px rgba(143,19,41,.10),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.hero__logo-card:hover { transform: translateY(-4px) rotate(-1deg); }
.hero__logo-card::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: 28px; padding: 1px;
  background: linear-gradient(135deg, rgba(212,162,76,.55), transparent 45%, rgba(143,19,41,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.hero__logo-card img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 6px;
  filter: drop-shadow(0 6px 18px rgba(143,19,41,.2));
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Social planets orbiting the VC logo (true revolution) ============ */
.hero__planet {
  position: absolute;
  top: 50%; left: 50%;
  width: 68px; height: 68px;
  margin: -34px 0 0 -34px; /* centre on stage centre */
  display: block;
  text-decoration: none;
  z-index: 3;
  animation: planetRevolve 32s linear infinite !important;
  will-change: transform;
  /* Respect reduced motion, but still show static cardinal positions via the delays */
}
/* Hard-coded keyframes per breakpoint — outer rotate sweeps the arm,
   inner counter-rotate keeps planet upright. */
@keyframes planetRevolve {
  0%   { transform: rotate(0deg)   translate(150px) rotate(0deg);   }
  100% { transform: rotate(360deg) translate(150px) rotate(-360deg); }
}
@keyframes planetRevolveMd {
  0%   { transform: rotate(0deg)   translate(132px) rotate(0deg);   }
  100% { transform: rotate(360deg) translate(132px) rotate(-360deg); }
}
@keyframes planetRevolveSm {
  0%   { transform: rotate(0deg)   translate(114px) rotate(0deg);   }
  100% { transform: rotate(360deg) translate(114px) rotate(-360deg); }
}
/* 4 planets spaced 90° apart (8s = 25% of 32s cycle) */
.hero__planet--top    { animation-delay: -24s !important; }  /* 270° -> top */
.hero__planet--right  { animation-delay:   0s !important; }  /* 0°   -> right */
.hero__planet--bottom { animation-delay:  -8s !important; }  /* 90°  -> bottom */
.hero__planet--left   { animation-delay: -16s !important; }  /* 180° -> left */
.hero__planet:hover {
  animation-play-state: paused;
  z-index: 4;
}

.hero__planet-face {
  display: block;
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 14px 28px rgba(143,19,41,.22),
    0 4px 8px rgba(0,0,0,.15),
    inset 0 3px 10px rgba(255,255,255,.45),
    inset 0 -4px 10px rgba(0,0,0,.22);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.hero__planet-face::before {
  content: "";
  position: absolute;
  top: 6%; left: 18%; right: 28%; height: 28%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.65), transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.hero__planet svg {
  position: absolute; inset: 0; margin: auto;
  width: 55%; height: 55%;
  z-index: 1;
}
.hero__planet-label {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  color: var(--polyu-red);
  padding: .28rem .65rem;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(143,19,41,.18);
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(143,19,41,.16);
  transition: opacity .3s ease, translate .3s cubic-bezier(.2,.8,.2,1);
  translate: -50% -4px;
}
.hero__planet:hover .hero__planet-face {
  transform: scale(1.15);
  box-shadow:
    0 22px 44px rgba(143,19,41,.4),
    0 4px 8px rgba(0,0,0,.2),
    inset 0 3px 10px rgba(255,255,255,.5),
    inset 0 -4px 10px rgba(0,0,0,.22);
}
.hero__planet:hover .hero__planet-label {
  opacity: 1;
  translate: -50% 0;
}

/* Per-planet surface color */
.hero__planet--github .hero__planet-face { background: radial-gradient(circle at 34% 28%, #4B5058, #181B22 75%); }
.hero__planet--hf     .hero__planet-face { background: radial-gradient(circle at 34% 28%, #FFE884, #F8C500 78%); }
.hero__planet--red    .hero__planet-face { background: radial-gradient(circle at 34% 28%, #FF5A7A, #E60033 78%); }
.hero__planet--x      .hero__planet-face { background: radial-gradient(circle at 34% 28%, #3C3C3C, #000 78%); }

/* HF emoji fills the whole planet surface */
.hero__planet--hf svg { width: 92%; height: 92%; inset: 4% 0 0 0; }

.hero__chip-hint {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  margin-top: -220px;
  font-size: .64rem; font-weight: 700; letter-spacing: .26em;
  text-transform: uppercase; color: var(--polyu-red);
  padding: .28rem .8rem;
  background: rgba(255,255,255,.82);
  border: 1px dashed rgba(143,19,41,.32);
  border-radius: 999px;
  white-space: nowrap;
  opacity: .8;
  z-index: 3;
}

/* ============ Hero stat cards (adjective form, glass pills) ============ */
.hero__stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem !important;
  margin-top: 5.5rem !important;
  position: relative;
  z-index: 2;
  clear: both;
}
.hero__stats .stat {
  position: relative;
  display: block;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(143,19,41,.14);
  border-radius: var(--radius);
  padding: 1.45rem 1.45rem 1.3rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(143,19,41,.08), 0 2px 6px rgba(143,19,41,.05);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.hero__stats .stat::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--polyu-red), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.hero__stats .stat::after {
  content: "";
  position: absolute; bottom: -50px; right: -50px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,162,76,.22), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
  pointer-events: none;
}
.hero__stats .stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(143,19,41,.16);
  border-color: rgba(143,19,41,.28);
}
.hero__stats .stat:hover::before { transform: scaleX(1); }
.hero__stats .stat:hover::after  { opacity: 1; }

.hero__stats .stat__word {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--polyu-red) 0%, var(--polyu-red-dark) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--polyu-red); /* fallback when background-clip unsupported */
  margin: 0 0 .55rem;
  letter-spacing: -0.01em;
}
.hero__stats .stat__label {
  font-size: .74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 600;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.hero__stats .stat__label::after {
  content: "↗";
  color: var(--polyu-red);
  opacity: .55;
  font-weight: 700;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.hero__stats .stat:hover .stat__label::after {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* ============ (legacy) Hero Highlights cards — kept for backwards compat ============ */
.hero__highlights {
  display: grid;
  grid-template-columns: repeat(3, 0.78fr) 1.4fr;
  gap: .9rem;
  margin-top: 3.2rem;
  position: relative;
}
.hl {
  position: relative;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(143,19,41,.1);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.05rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(143,19,41,.08), 0 2px 6px rgba(143,19,41,.05);
  transition: all .28s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 150px;
  text-decoration: none; color: inherit;
}
.hl::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--polyu-red), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.hl::after {
  content: ""; position: absolute; bottom: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,162,76,.2), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.hl:hover {
  transform: translateY(-3px);
  border-color: rgba(143,19,41,.28);
  box-shadow: 0 18px 40px rgba(143,19,41,.16), 0 3px 10px rgba(143,19,41,.08);
}
.hl:hover::before { transform: scaleX(1); }
.hl:hover::after { opacity: 1; }

.hl__kicker {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--polyu-red);
  margin-bottom: .4rem;
}
.hl__kicker--live { color: #B8891E; }
.hl__pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #D4A24C;
  box-shadow: 0 0 0 0 rgba(212,162,76,.6);
  animation: livePulse 2s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(212,162,76,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(212,162,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,162,76,0); }
}

.hl--link .hl__num {
  font-family: var(--font-serif); font-size: 2.3rem; font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--polyu-red) 0%, var(--polyu-red-dark) 70%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hl--link .hl__num span {
  font-size: 1.4rem; margin-left: 2px; color: var(--gold);
  -webkit-text-fill-color: var(--gold);
}
.hl--link .hl__label {
  font-size: .86rem; color: var(--ink-soft); font-weight: 500;
  margin-top: .5rem; flex: 1;
}
.hl__tick {
  display: inline-block;
  font-size: .82rem;
  color: var(--polyu-red);
  opacity: .55;
  margin-left: .15rem;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
}
.hl--link:hover .hl__tick {
  opacity: 1;
  transform: translate(3px, -3px);
}

/* Rotating spotlight card */
.hl--rotator {
  grid-column: span 1;
  min-height: 190px;
  cursor: default;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(253,244,232,.9) 100%);
  border-color: rgba(212,162,76,.25);
  padding-bottom: .85rem;
}
.hl__slides {
  position: relative;
  flex: 1;
  min-height: 108px;
  overflow: hidden;
}
.hl__slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: .35rem;
  text-decoration: none; color: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease, visibility 0s linear .5s;
  pointer-events: none;
  z-index: 1;
}
.hl__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 2;
  transition: opacity .5s ease, transform .5s ease, visibility 0s linear 0s;
}
.hl__badge {
  display: inline-block; align-self: flex-start;
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #8A6214;
  padding: .2rem .55rem;
  background: rgba(212,162,76,.14);
  border-radius: 6px;
}
.hl__title {
  font-family: var(--font-serif); font-size: 1rem; line-height: 1.35;
  color: var(--ink);
}
.hl__title strong { color: var(--polyu-red); font-weight: 700; }
.hl__cta {
  font-size: .76rem; font-weight: 600; color: var(--polyu-red);
  margin-top: auto;
}
.hl__slide:hover .hl__cta { text-decoration: underline; }

.hl__dots {
  display: flex; gap: .35rem; margin-top: .75rem;
}
.hl__dots button {
  width: 18px; height: 4px; border-radius: 3px;
  background: rgba(143,19,41,.18);
  border: none; padding: 0; cursor: pointer;
  transition: all .3s ease;
}
.hl__dots button.is-active {
  background: linear-gradient(90deg, var(--polyu-red), var(--gold));
  width: 28px;
}
.hl__dots button:hover { background: rgba(143,19,41,.4); }

/* ============ Campus band ============ */
.campus-band {
  position: relative; isolation: isolate;
  padding: 5rem 0 !important;
  overflow: hidden;
  color: #fff;
  border-top: none !important;
}
.campus-band__img {
  position: absolute; inset: 0; z-index: -2;
  background-image: url('../images/polyu-lks-tower.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.05);
}
.campus-band__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(11,3,6,.92) 0%, rgba(143,19,41,.78) 45%, rgba(110,14,32,.55) 75%, rgba(212,162,76,.35) 100%),
    linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45));
}
.campus-band__content { position: relative; max-width: 860px; }
.campus-band__kicker {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold-soft);
  margin-bottom: 1rem;
}
.campus-band__title {
  color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15;
  margin-bottom: 1rem;
}
.campus-band__title span {
  background: linear-gradient(135deg, var(--gold-soft) 0%, #fff 60%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.campus-band__desc { color: rgba(255,255,255,.85); font-size: 1.02rem; max-width: 720px; }
.campus-band__meta {
  display: flex; flex-wrap: wrap; gap: 2.2rem;
  margin-top: 1.8rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.18);
}
.campus-band__meta div {
  display: flex; flex-direction: column;
  font-size: .75rem; color: rgba(255,255,255,.6);
  text-transform: uppercase; letter-spacing: .14em;
}
.campus-band__meta span {
  font-family: var(--font-serif); font-size: 1.4rem;
  color: #fff; text-transform: none; letter-spacing: 0;
  margin-bottom: .15rem; font-weight: 700;
}

/* ============ Section header ============ */
section { padding: 5rem 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.section-head__kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .2em; color: var(--polyu-red); font-weight: 700; margin-bottom: .5rem; display: inline-flex; align-items:center; gap:.5rem;}
.section-head__kicker::before { content:""; width:28px; height:2px; background: var(--polyu-red); display: inline-block; }
.section-head h2 { margin: 0; }
.section-head__desc { max-width: 520px; color: var(--muted); }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: start; }
.about-grid p { font-size: 1.02rem; }
.pi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.pi-card__top { background: linear-gradient(135deg, var(--polyu-red) 0%, var(--polyu-red-dark) 100%); height: 80px; position: relative; }
.pi-card__top::after { content:""; position:absolute; inset:0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 12px, transparent 12px 24px); }
.pi-card__avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--bg-alt); border: 4px solid #fff; margin: -48px auto 0; display: grid; place-items: center; font-family: var(--font-serif); font-size: 2rem; color: var(--polyu-red); font-weight: 700; box-shadow: var(--shadow-sm); position: relative; z-index:1;}
.pi-card__body { padding: .5rem 1.5rem 1.5rem; text-align: center; }
.pi-card__name { font-family: var(--font-serif); font-size: 1.35rem; margin: .5rem 0 .25rem; }
.pi-card__title { color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.pi-card__tags { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-bottom: 1rem; }
.pi-card__tag { font-size: .72rem; padding: .25rem .6rem; background: #FBF2F3; color: var(--polyu-red); border-radius: 999px; font-weight: 500;}
.pi-card__link { display: inline-block; margin-top: .35rem; font-size: .88rem; font-weight: 600; }

/* ============ Research collections ============ */
.collections-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.col-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.5rem;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column;
}
.col-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--polyu-red), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.col-card::after {
  content: "";
  position: absolute; top: -60px; right: -60px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(143,19,41,.08), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.col-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #E8D7DA; }
.col-card:hover::before { transform: scaleX(1); }
.col-card:hover::after { opacity: 1; }

.col-card__icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, #FBF2F3 0%, #F7E4E8 100%);
  color: var(--polyu-red);
  display: grid; place-items: center; margin-bottom: 1rem;
  transition: all .3s ease;
}
.col-card:hover .col-card__icon { background: linear-gradient(135deg, var(--polyu-red), var(--polyu-red-dark)); color:#fff; transform: scale(1.05); }
.col-card__icon svg { width: 30px; height: 30px; }

.col-card__num { position: absolute; top: 1.2rem; right: 1.2rem; font-family: var(--font-serif); font-size: 2rem; color: var(--line-strong); font-weight: 700; line-height:1; transition: color .3s ease; }
.col-card:hover .col-card__num { color: var(--gold); }

.col-card__title { font-family: var(--font-serif); font-size: 1.18rem; margin-bottom: .6rem; line-height: 1.3; }
.col-card__desc { font-size: .9rem; color: var(--muted); line-height: 1.6; flex: 1; }
.col-card__arrow { margin-top: 1rem; font-size: .85rem; font-weight: 600; color: var(--polyu-red); display: inline-flex; align-items: center; gap: .3rem; opacity: .75; transition: all .3s ease; }
.col-card:hover .col-card__arrow { gap: .6rem; opacity: 1; }

/* ============ News ============ */
.news-wrap { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.news-item {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 1rem; align-items: center;
  padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  transition: all .2s ease;
}
.news-item:hover { border-color: #E8D7DA; background: #FDFBFA; transform: translateX(3px); }
.news-date { font-family: var(--font-serif); color: var(--polyu-red); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.news-text { color: var(--ink-soft); font-size: .95rem; }
.news-text strong { color: var(--ink); font-weight: 600; }
.news-badge { font-size: .7rem; padding: .2rem .55rem; border-radius: 999px; background: #FBF2F3; color: var(--polyu-red); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.news-badge--gold { background: #FBF1DE; color: #8A6214; }

/* ============ Publications ============ */
.pub-tabs { display: flex; gap: .25rem; margin-bottom: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.pub-tab { padding: .6rem 1rem; font-size: .88rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 500; transition: all .2s ease; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.pub-tab:hover { color: var(--ink); }
.pub-tab.active { color: var(--polyu-red); border-bottom-color: var(--polyu-red); }

.pub-list { display: grid; gap: .75rem; }
.pub-item {
  padding: 1.1rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  display: grid; grid-template-columns: 60px 1fr; gap: 1.2rem; align-items: start;
  transition: all .2s ease;
}
.pub-item:hover { border-color: #E8D7DA; box-shadow: var(--shadow-sm); }
.pub-venue {
  background: linear-gradient(135deg, var(--polyu-red), var(--polyu-red-dark));
  color: #fff; font-weight: 700; font-size: .7rem;
  padding: .45rem .2rem; border-radius: 6px; text-align: center;
  letter-spacing: .06em;
}
.pub-venue small { display: block; font-size: .65rem; font-weight: 500; opacity: .85; margin-top: 2px; }
.pub-venue--gold { background: linear-gradient(135deg, #C48A2C, #9E6C1B); }
.pub-title { font-weight: 600; font-size: 1rem; color: var(--ink); margin-bottom: .3rem; line-height: 1.4; }
.pub-authors { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.pub-tagline { font-size: .82rem; color: var(--ink-soft); font-style: italic; margin-bottom: .5rem; }
.pub-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.pub-chip { font-size: .72rem; padding: .22rem .55rem; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-weight: 500; transition: all .2s ease; }
.pub-chip:hover { background: var(--polyu-red); color: #fff; border-color: var(--polyu-red); }
.pub-chip--highlight { background: #FBF1DE; color:#8A6214; border-color: #EDD9A7; font-weight: 600; }

/* ============ Team ============ */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; text-align: center; transition: all .25s ease; }
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #E8D7DA; }
.team-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .6rem; background: linear-gradient(135deg, #F5E6E9, #F7D4DA); color: var(--polyu-red); font-family: var(--font-serif); font-weight: 700; display: grid; place-items: center; font-size: 1.3rem; }
.team-name { font-weight: 600; font-size: .95rem; margin-bottom: .2rem; }
.team-role { font-size: .78rem; color: var(--muted); }

.team-group-title { font-family: var(--font-serif); font-size: 1.1rem; margin: 2rem 0 1rem; display: flex; align-items: center; gap: .75rem; color: var(--ink-soft);}
.team-group-title::before, .team-group-title::after { content:""; flex:1; height:1px; background: var(--line); }
.team-group-title::before { flex: 0 0 20px; }

/* ============ Joining / CTA ============ */
.join {
  background:
    linear-gradient(135deg, rgba(143,19,41,.96) 0%, rgba(110,14,32,.96) 55%, rgba(40,6,14,.96) 100%),
    url('../images/polyu-innovation-tower.jpg');
  background-size: cover;
  background-position: right center;
  background-blend-mode: normal;
  color: #fff;
  border-radius: 16px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(143,19,41,.25);
}
.join::before {
  content: ""; position: absolute; inset: 0;
  background-image: url('../images/polyu-innovation-tower.jpg');
  background-size: cover; background-position: right center;
  opacity: .18; mix-blend-mode: luminosity;
  pointer-events: none;
}
.join::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(212,162,76,.4), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.join > * { position: relative; z-index: 1; }
.join h2 { color: #fff; }
.join p { color: rgba(255,255,255,.85); max-width: 700px; }
.join .btn--primary { background: #fff; color: var(--polyu-red); }
.join .btn--primary:hover { background: var(--gold); color: #fff; }
.join .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.join .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

/* ============ Footer ============ */
footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  background: #FDFBFA;
  color: var(--muted);
  font-size: .85rem;
}
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--polyu-red); }

/* ============ Utilities ============ */
.chip-row { display:flex; flex-wrap: wrap; gap:.35rem; }
.chip { font-size: .75rem; padding:.22rem .6rem; background: var(--bg-alt); border-radius: 999px; color: var(--muted); }

/* Reveal animation */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { height: 380px; margin-top: 1.5rem; }
  .hero__logo-card { width: 200px; height: 200px; }
  .hero__logo-orbit { width: 260px; height: 260px; }
  .hero__logo-orbit--2 { width: 340px; height: 340px; }
  .hero__logo-glow { width: 320px; height: 320px; }
  .hero__planet { width: 62px; height: 62px; margin: -31px 0 0 -31px; animation-name: planetRevolveMd !important; }
  .hero__chip-hint { margin-top: -195px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__highlights { grid-template-columns: repeat(2, 1fr); }
  .hero__highlights .hl--rotator { grid-column: span 2; }
  .collections-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .campus-band__meta { gap: 1.4rem; }
}
@media (max-width: 820px) {
  :root { --sidebar-w: 0px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); width: 260px; transition: transform .3s ease; }
  .sidebar.is-open { transform: translateX(0); width: 260px; box-shadow: var(--shadow-lg);}
  .main { grid-column: 1; }
  .container { padding: 0 1.25rem; }
  .hero { padding: 4.5rem 0 3rem; }
  .hero__highlights { grid-template-columns: 1fr; }
  .hero__highlights .hl--rotator { grid-column: span 1; }
  .hero__visual { height: 340px; }
  .hero__logo-card { width: 170px; height: 170px; padding: 14px; }
  .hero__logo-orbit { width: 220px; height: 220px; }
  .hero__logo-orbit--2 { width: 290px; height: 290px; }
  .hero__logo-glow { width: 270px; height: 270px; }
  .hero__planet { width: 52px; height: 52px; margin: -26px 0 0 -26px; animation-name: planetRevolveSm !important; }
  .hero__planet-label { font-size: .62rem; padding: .22rem .55rem; }
  .hero__chip-hint { display: none; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .stat { padding: 1rem 1.1rem; }
  .stat__word { font-size: 1.45rem; }
  .campus-band { padding: 3.5rem 0 !important; }
  .campus-band__meta { gap: 1rem; }
  .campus-band__meta span { font-size: 1.1rem; }
  .collections-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .news-item { grid-template-columns: 1fr; }
  .pub-item { grid-template-columns: 1fr; }
  .pub-venue { justify-self: start; padding: .3rem .6rem; }
  .menu-toggle { display: inline-flex; }
}

.menu-toggle {
  display: none; position: fixed; top: 1rem; left: 1rem; z-index: 100;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--polyu-red); cursor: pointer;
  align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
