/* =====================================================================
   ASI Lab — People/Team section stylesheet
   /people/people.css — used by /people/index.html (listing) and every
   /people/<slug>/index.html (profile). Pairs with /common.css (chrome).
   Design: BRIGHT but not too colorful, full of ENERGY + AI.
   Two brand hues (CityU purple #6b2c91 + teal #0f8f8f) do the talking;
   energy comes from motion + a living "neural" motif, not color noise.
   ===================================================================== */

:root {
  --cityu: #6b2c91;
  --cityu-dark: #4a1e66;
  --accent: #0f8f8f;
  --accent2: #38b2b2;
  --energy: #38d5c8;
  --indigo: #3b5bd6;
  --plum: #7a4fb0;
  --deep: #2a1140;
  --ink: #14202e;
  --muted: #5b6673;
  --bg: #f7f9fb;
  --card: #ffffff;
  --border: #e4e9ef;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(20,32,46,.08);
  --shadow-lg: 0 18px 48px rgba(20,32,46,.16);
  --max: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang HK", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--cityu); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Chinese native names — correct lang for screen readers + font fallback */
.zh, .zh-hant { font-family: "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", "Heiti TC", sans-serif; }
.zh-hans { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }

/* Eyebrow */
.eyebrow { display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; letter-spacing: 2.2px; text-transform: uppercase;
  font-weight: 800; color: var(--cityu); margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--energy); box-shadow: 0 0 12px var(--energy); }

h1, h2 { font-weight: 800; letter-spacing: -.4px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.muted-note { color: var(--muted); font-size: .95rem; }

/* ---------- People hero ---------- */
.people-hero { position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1100px 480px at 18% -12%, rgba(56,213,200,.22), transparent 60%),
    radial-gradient(900px 480px at 92% 4%, rgba(107,44,145,.6), transparent 66%),
    linear-gradient(150deg, #2a1140 0%, #3d1c63 42%, #12508f 100%);
  padding: 64px 0 40px; }
.people-hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); line-height: 1.05; margin: 14px 0 12px; }
.hero-sub { font-size: 1.05rem; opacity: .92; max-width: 720px; }

/* Stat strip */
.stat-strip { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 28px;
  padding: 26px 0 6px; border-top: 1px solid rgba(255,255,255,.16); }
.stat-strip .stat b { display: block;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 2rem; font-weight: 700; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.stat-strip .stat span { display: block; font-size: .82rem; opacity: .82; margin-top: 6px; }

/* ---------- PI feature (the boss) ---------- */
.pi-feature { padding: 36px 0 8px; }
.pi-card { position: relative; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); display: grid; grid-template-columns: 280px 1fr; gap: 30px;
  padding: 30px; transition: transform .18s, box-shadow .18s; }
.pi-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--cityu), var(--accent), var(--energy)); }
.pi-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
@media (max-width: 760px) { .pi-card { grid-template-columns: 1fr; gap: 20px; } }

.pi-avatar { position: relative; width: 100%; aspect-ratio: 4/5; border-radius: 22px;
  display: grid; place-items: center; }
.halo { position: relative; }
.halo::before { content: ""; position: absolute; inset: -4px; border-radius: 26px;
  background: conic-gradient(from 0deg, var(--cityu), var(--accent), var(--energy), var(--accent2), var(--cityu));
  filter: blur(1px); z-index: 0; }
.avatar-large { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 22px;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  font-size: 3.2rem; text-shadow: 0 2px 16px rgba(0,0,0,.2);
  background: linear-gradient(160deg, var(--cityu), var(--accent)); }
.avatar-large img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }

.pi-info { display: flex; flex-direction: column; min-width: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge { font-size: .76rem; font-weight: 700; color: var(--cityu-dark);
  background: #f1e8f8; border: 1px solid #e0cdef; padding: 5px 11px; border-radius: 999px; }
.badge.star { color: #0b5f5f; background: #e4f5f4; border-color: #bce3e1; }
.pi-name { font-size: 1.7rem; font-weight: 800; letter-spacing: -.3px; line-height: 1.15; }
.pi-role { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 700;
  color: #fff; background: var(--cityu); padding: 6px 12px; border-radius: 999px; margin: 6px 0 14px; align-self: flex-start; }
.pi-bio { color: var(--muted); font-size: .96rem; }
.pi-topics, .ptopics-lg { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.ptopics-lg { margin: 10px 0 22px; }
.pill, .ptopic { font-size: .76rem; font-weight: 600; color: var(--cityu-dark);
  background: #f1e8f8; border: 1px solid #e6d8f1; padding: 5px 11px; border-radius: 999px; }
a.pill:hover { background: var(--cityu); color: #fff; border-color: var(--cityu); text-decoration: none; }
.pill .pct, .ptopic .pct { color: var(--muted); font-weight: 500; margin-left: 3px; }
a.pill:hover .pct { color: rgba(255,255,255,.8); }

.recruit { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px;
  font-size: .9rem; font-weight: 700; color: #0b5f5f; background: linear-gradient(90deg, #e4f5f4, #f0fbfb);
  border: 1px solid #bce3e1; border-radius: 999px; padding: 9px 16px; align-self: flex-start; }
.dotpulse { width: 10px; height: 10px; border-radius: 50%; background: var(--energy);
  box-shadow: 0 0 0 0 rgba(56,213,200,.7); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56,213,200,.6); }
  70% { box-shadow: 0 0 0 10px rgba(56,213,200,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,213,200,0); }
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.pill-btn { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .92rem;
  padding: 11px 18px; border-radius: 999px; text-decoration: none; transition: transform .16s, box-shadow .16s, background .16s; }
.pill-btn:hover { text-decoration: none; transform: translateY(-2px); }
.pill-btn.solid { background: var(--cityu); color: #fff; box-shadow: 0 8px 20px rgba(107,44,145,.28); }
.pill-btn.solid:hover { background: var(--cityu-dark); }
.pill-btn.ghost { color: var(--accent); border: 2px solid #bfe6e4; background: #f3fbfa; }
.pill-btn.ghost:hover { border-color: var(--accent); }

/* ---------- Team grid ---------- */
.team { padding: 56px 0; }
.pgrid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 26px; }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.pcard::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--cityu), var(--accent)); opacity: 0; transition: opacity .18s; }
.pcard:hover { text-decoration: none; transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #cdd9e4; }
.pcard:hover::after { opacity: 1; }
.pcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.avatar { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1/1; margin-bottom: 14px;
  background: linear-gradient(160deg, var(--g1, var(--cityu)), var(--g2, var(--accent)));
  display: grid; place-items: center; color: #fff; }
.avatar .mono { position: relative; z-index: 1; font-weight: 800; font-size: 2.2rem; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pcard:hover .avatar { transform: scale(1.02); transition: transform .2s; }

.pinfo { display: flex; flex-direction: column; min-width: 0; }
.pname { font-size: 1.05rem; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; }
.pnative { font-size: .9rem; font-weight: 600; color: var(--muted); margin: 2px 0 6px; }
.prole { font-size: .74rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.ptopics { display: flex; flex-wrap: wrap; gap: 6px; }
.ptopic { font-size: .72rem; font-weight: 600; color: var(--cityu-dark);
  background: #f1e8f8; border: 1px solid #e6d8f1; padding: 4px 9px; border-radius: 999px; }
.paffil { font-size: .82rem; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.psite { font-size: .78rem; margin-bottom: 8px; }
.psite a { color: var(--cityu); font-weight: 600; }
.psite a:hover { text-decoration: underline; }
.ppubs { font-size: .78rem; font-weight: 700; color: var(--cityu); background: #f1e8f8;
  border: 1px solid #e0cdef; padding: 2px 9px; border-radius: 999px; }
.pthesis { font-size: .74rem; font-weight: 700; color: #8a4a12; background: #fdf0e3;
  border: 1px solid #f3d7b8; padding: 4px 9px; border-radius: 999px; text-decoration: none; }
a.pthesis:hover { background: #f7dfbe; text-decoration: none; }
.pmeta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.grp-count { font-size: .8rem; font-weight: 700; color: #fff; background: var(--accent);
  padding: 2px 10px; border-radius: 999px; vertical-align: middle; }
.sec-note { color: var(--muted); font-size: .92rem; margin-top: -2px; }
.cur-affil { font-size: .9rem; font-weight: 600; color: #b8f0f0; margin: 4px 0 8px; }
.pgo { margin-left: auto; font-weight: 700; color: var(--accent); font-size: .82rem; }

/* Alumni: distinct + faded */
.team.alumni .pcard { opacity: .8; border-style: dashed; background: #fbfcfd; }

/* Recruit band */
.recruit-band { background: linear-gradient(150deg, #2a1140, #3d1c63 55%, #12508f); color: #fff;
  padding: 56px 0; text-align: center; }
.recruit-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 10px; }
.recruit-band p { opacity: .9; max-width: 640px; margin: 0 auto 24px; }
.recruit-band .cta-row { justify-content: center; }

/* ---------- Profile page ---------- */
.profile-hero { position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(56,213,200,.2), transparent 60%),
    linear-gradient(150deg, #2a1140, #3d1c63 45%, #12508f);
  padding: 40px 0 44px; }
.crumb { font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; color: #b8b0c9; margin-bottom: 18px; }
.crumb a { color: #b8f0f0; }
.profile-hero-flex { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: center; }
@media (max-width: 760px) { .profile-hero-flex { grid-template-columns: 1fr; } }
.profile-hero-flex .avatar-large { font-size: 2.6rem; }
.profile-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.pnative-lg { display: block; font-size: 1.15rem; font-weight: 600; color: #b8f0f0; margin: 4px 0 8px; }
.profile-head .pi-role { margin: 6px 0 14px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 10px; }
/* badges/recruit on the dark profile hero */
.profile-head .badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.profile-head .badge { color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); }
.profile-head .badge.star { color: #aef7e9; background: rgba(56,213,200,.18); border-color: rgba(56,213,200,.5); }
.profile-head .recruit { margin: 10px 0 4px; }

.profile-body { padding: 48px 0; }
.profile-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-main h2 { margin-top: 6px; }
.about-text p { color: var(--muted); font-size: 1rem; margin-bottom: 14px; }
.pub-list { list-style: none; margin-top: 12px; }
.pub-list li { margin-bottom: 12px; }
.pub-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; transition: border-color .16s, box-shadow .16s; }
.pub-item:hover { border-color: #c4d7e2; box-shadow: var(--shadow); }
.pub-pubtitle { font-weight: 650; line-height: 1.4; color: var(--ink); margin-bottom: 6px; }
.pub-pubmeta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .82rem; }
.pubyr { color: var(--muted); font-weight: 700; }
.pubactions { display: inline-flex; gap: 8px; }
.pubactions a { font-weight: 700; display: inline; }
.pubactions a.pdoi { color: var(--accent); }
.pubactions a.ppdf { color: #c0392b; }
.pubactions a:hover { text-decoration: underline; }
.pub-list a { display: block; color: var(--ink); font-weight: 600; line-height: 1.4; }
.pub-list a:hover { color: var(--cityu); }
.vchip { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .3px;
  color: #0b5f5f; background: #e4f5f4; border: 1px solid #c6ece8; padding: 2px 9px; border-radius: 999px; margin-right: 8px; vertical-align: 2px; }
.pauth { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin-top: 3px; }

.profile-side .side-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; }
.profile-side h3 { font-size: .78rem; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 800; color: var(--cityu); margin-bottom: 14px; }
.profile-side dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; font-size: .9rem; }
.profile-side dt { color: var(--muted); }
.profile-side dd { font-weight: 600; }
.thesis-card { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.thesis-card .pill-btn.solid { margin-top: 10px; font-size: .84rem; }