/* ---------- Purdue palette ---------- */
:root{
  /* One tonal family, all on hue 41 deg, derived from the theme gold #CBBA96.
     Softer and less brassy than Purdue's #CFB991 (34% vs 39% saturation). */
  --gold:#CBBA96;        /* theme gold - strokes, markers, badge outlines */
  --rush:#C2983D;        /* richer gold - hover / active accents */
  --field:#C5A663;       /* mid gold - gradient partner */
  --aged:#846B33;        /* gold text on white          (5.08:1) */
  --aged-deep:#6C5628;   /* gold text on a tinted ground (6.33:1) */
  --dust:#EBDEC2;        /* panel gold */
  --on-gold:#2E240E;     /* text sitting on a gold fill  (8.00:1) */
  --steel:#555960;       /* Steel */
  --cool:#6F727B;        /* Cool Gray */
  --ink:#1c1c1e;
  --bg:#ffffff;
  --surface:#FDFCFA;
  --surface2:#F7F3EB;
  --card-bg:#FFFFFF;
  --border:#E9E2D3;
  --nav-h:52px;
  /* --content is THE column everything aligns to: cards, panels, nav.
     --maxw is that column plus the 20px side gutters. */
  --content:920px;
  --maxw:960px;
  color-scheme: light;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',sans-serif;
  font-size:15px;
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%}
a{color:var(--aged);text-decoration:none}
a:hover{text-decoration:underline}
p{margin:0 0 .85em}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px}

/* ---------- Sticky nav ---------- */
.topnav{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.90);
  -webkit-backdrop-filter:saturate(180%) blur(12px);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--border);
  transition:box-shadow .3s ease, border-color .3s ease;
}
.topnav.stuck{box-shadow:0 2px 16px rgba(28,28,30,.07);border-bottom-color:var(--gold)}
.navwrap{
  max-width:var(--maxw);margin:0 auto;padding:0 9px;
  height:var(--nav-h);
  display:flex;align-items:center;gap:1px;
  overflow-x:auto;overscroll-behavior-x:contain;
  scrollbar-width:none;-ms-overflow-style:none;
}
.navwrap::-webkit-scrollbar{display:none}
.navwrap a{
  position:relative;flex:0 0 auto;
  padding:8px 11px;border-radius:5px;
  color:var(--steel);font-size:13.5px;font-weight:500;white-space:nowrap;
  transition:color .2s ease, background-color .2s ease;
}
.navwrap a:hover{color:var(--ink);background:var(--surface2);text-decoration:none}
.navwrap a::after{
  content:"";position:absolute;left:11px;right:11px;bottom:3px;height:2px;border-radius:2px;
  background:var(--rush);transform:scaleX(0);transform-origin:left;
  transition:transform .28s cubic-bezier(.4,0,.2,1);
}
.navwrap a:hover::after,.navwrap a.active::after{transform:scaleX(1)}
.navwrap a.active{color:var(--aged);font-weight:600}
/* scroll progress, pinned to the nav's own baseline */
#prog{
  position:absolute;left:0;bottom:-1px;height:2px;width:0;
  background:linear-gradient(90deg,var(--gold),var(--rush));
  transition:width .08s linear;
}

/* ---------- Section frame ---------- */
section{scroll-margin-top:calc(var(--nav-h) + 14px)}
.sec{padding-top:24px;padding-bottom:8px}   /* longhands: keep .wrap's side gutters */
.sec-tight{padding-top:16px}   /* short sections, e.g. on the Life page */
.sec-tight .sec-title{margin-bottom:10px}
.sec-title{
  display:flex;align-items:center;gap:12px;
  margin:0 0 18px;
  font-size:21px;font-weight:700;letter-spacing:-.015em;color:var(--ink);
}
.sec-title::before{
  content:"";flex:0 0 auto;width:4px;height:20px;border-radius:2px;
  background:linear-gradient(var(--gold),var(--rush));
}

/* ---------- Reveal on scroll ---------- */
html.js .reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s cubic-bezier(.22,1,.36,1)}
html.js .reveal.in{opacity:1;transform:none}

/* ---------- Hero ---------- */
.hero{padding:18px 20px 0}
.hero-in{
  position:relative;overflow:hidden;
  max-width:var(--content);margin:0 auto;
  display:flex;gap:30px;align-items:flex-start;
  padding:30px 24px 16px;
  background:
    radial-gradient(1000px 320px at 88% -30%, rgba(218,170,0,.13), transparent 62%),
    linear-gradient(160deg, var(--dust) 0%, var(--surface) 55%, #fff 100%);
}
.hero-txt{flex:1 1 auto;min-width:0}
.hero + main > .sec:first-child{padding-top:20px}   /* less air between the contact block and About me */
.hero-pic{flex:0 0 auto;margin-top:-14px}   /* sit higher, so the banner below it is shorter */
.hero-pic img{
  width:178px;height:222px;object-fit:cover;border-radius:10px;
  box-shadow:0 12px 30px rgba(143,111,62,.20);
  transition:transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease;
}
.hero-pic img:hover{transform:translateY(-4px) scale(1.015);box-shadow:0 18px 40px rgba(143,111,62,.28)}
.hero h1{
  margin:0;
  font-size:32px;font-weight:400;letter-spacing:normal;line-height:1.3;
}
.hero h1 a{color:var(--ink)}
.hero h1 a:hover{text-decoration:none}
.name-zh{font-size:21px;color:var(--ink);margin:3px 0 0}
.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;border-radius:50%;vertical-align:6px;margin-left:9px;
  background:#fff;border:1px solid var(--border);
  transition:border-color .2s, transform .2s, box-shadow .2s;
}
.icon-btn:hover{border-color:var(--rush);transform:scale(1.1);box-shadow:0 2px 8px rgba(218,170,0,.3)}
.icon-btn img{height:14px;display:block}
.flag{height:15px;vertical-align:5px;margin-left:6px;border-radius:2px}
.meta{margin-top:14px;line-height:1.85;font-size:14.5px}
.meta .row{display:flex;gap:8px;align-items:flex-start}
.meta .row img{width:15px;margin-top:5px;flex:0 0 auto;opacity:.75}
.meta a{color:var(--ink)}
.meta a:hover{color:var(--aged)}
.meta b{font-weight:600}

/* ---------- Cards ---------- */
.card{
  position:relative;
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:8px;
  padding:13px 16px 13px 18px;
  margin-bottom:11px;
  transition:transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease, border-color .28s ease;
}
.card::before{
  content:"";position:absolute;left:-1px;top:-1px;bottom:-1px;width:3px;
  border-radius:8px 0 0 8px;
  background:linear-gradient(var(--gold),var(--rush));
  transform:scaleY(0);transform-origin:top;
  transition:transform .32s cubic-bezier(.22,1,.36,1);
}
.card:hover::before{transform:scaleY(1)}
.card:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(143,111,62,.13);border-color:var(--gold)}
.card .ttl{font-weight:600;color:var(--ink);display:flow-root;margin-bottom:3px;line-height:1.45}
.card .authors{font-size:14px;color:var(--ink);display:block;margin-bottom:3px}
.card .authors a{color:var(--ink)}
.card .authors a:hover{color:var(--aged)}
.card .authors b{color:var(--ink);font-weight:600}
.card .venue{font-size:13.5px;color:var(--ink);font-style:italic;display:block}
.card .sub{font-size:14px;color:var(--ink);display:block}

/* ---------- Buttons & embedded PDF (CV page) ---------- */
.pdf-actions{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 16px}
.btn{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 16px;border-radius:6px;
  font-family:inherit;font-size:14px;font-weight:600;line-height:1.2;
  border:1px solid var(--border);background:#fff;color:var(--aged);
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.btn:hover{
  border-color:var(--gold);background:var(--surface);color:var(--aged);
  transform:translateY(-1px);box-shadow:0 4px 12px rgba(143,111,62,.13);
  text-decoration:none;
}
.btn-primary{background:var(--gold);border-color:var(--gold);color:var(--on-gold)}
.btn-primary:hover{background:var(--rush);border-color:var(--rush);color:var(--on-gold)}

.pdf-frame{
  border:1px solid var(--border);border-radius:8px;overflow:hidden;
  background:var(--surface);
  /* tall enough to read a Letter page, still short enough to fit a laptop screen */
  height:clamp(460px, 78vh, 920px);
}
.pdf-frame iframe{display:block;width:100%;height:100%;border:0}
.pdf-frame:fullscreen{height:100%;width:100%;border:0;border-radius:0;background:#fff}
.pdf-frame:-webkit-full-screen{height:100%;width:100%;border:0;border-radius:0;background:#fff}
.pdf-note{margin:10px 0 0;font-size:12.5px;color:var(--steel)}
.pdf-note b{color:var(--steel);font-weight:600}

/* ---------- Plain list (work with no citation yet) ---------- */
.plainlist{list-style:none;margin:0;padding:0}
.plainlist li{
  position:relative;padding:6px 0 6px 19px;
  line-height:1.55;font-weight:500;color:var(--ink);
}
.plainlist li::before{
  content:"";position:absolute;left:3px;top:.95em;
  width:5px;height:5px;border-radius:50%;background:var(--gold);
}

/* ---------- Badges & links ---------- */
/* Floated right so a long title wraps beside them instead of pushing
   them onto a line of their own. */
.card .badges,
.grant .badges{
  float:right;display:flex;flex-wrap:wrap;justify-content:flex-end;
  gap:6px;margin:1px 0 3px 14px;max-width:58%;
}
.card .badges .badge,
.grant .badges .badge{margin-left:0;vertical-align:baseline}
/* variant: badges share the author line, pushed to the right edge */
.authors-row{
  display:flex;align-items:center;justify-content:space-between;
  gap:6px 16px;flex-wrap:wrap;margin-bottom:3px;
}
.authors-row .authors{flex:1 1 auto;min-width:0;margin-bottom:0}
.authors-row .badges{float:none;flex:0 0 auto;margin:0;max-width:none}

.badge{
  display:inline-block;padding:2.5px 9px;border-radius:4px;
  font-size:11.5px;font-weight:600;letter-spacing:.03em;
  background:var(--dust);color:#6a5228;border:0;
  vertical-align:2px;margin-left:7px;white-space:nowrap;
}
/* venue text on the left, link buttons on the right of the same line */
.venue-row{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px 16px;flex-wrap:wrap;
}
.venue-row .venue,.venue-row .td,.venue-row .sub{flex:1 1 auto;min-width:0}
.venue-row .links{flex:0 0 auto;margin-top:0}
.links{margin-top:6px;display:flex;flex-wrap:wrap;gap:6px}

/* ---------- Outcomes: inline citation disclosure ---------- */
/* A count in an Outcomes line is a button, styled as a dotted link; clicking it
   expands the full citation below the card body instead of leaving the page. */
.reflink{
  font:inherit;color:var(--aged-deep);background:none;border:0;padding:0;
  cursor:pointer;border-bottom:1px dotted var(--field);
}
.reflink:hover,.reflink:focus-visible{color:var(--ink);border-bottom-style:solid}
.reflink[aria-expanded="true"]{color:var(--ink);border-bottom-style:solid}
.reflink::after{content:" \25BE";font-size:11px;letter-spacing:0}
.reflink[aria-expanded="true"]::after{content:" \25B4"}
.refbox{
  margin:8px 0 2px;padding:10px 13px;
  background:var(--surface2);border-left:3px solid var(--gold);border-radius:0 6px 6px 0;
}
.refbox .rt{display:block;font-weight:600;font-size:13.5px;line-height:1.45;color:var(--ink)}
.refbox .ra{display:block;font-size:13px;line-height:1.5;margin-top:2px;color:var(--ink)}
.refbox .rv,.refbox .venue{font-size:13px;color:var(--steel)}
.refbox .rv{display:block;margin-top:2px}
.refbox .venue-row{margin-top:3px}
.links a{
  font-size:12.5px;padding:2.5px 9px;border-radius:4px;
  border:1px solid var(--border);background:#fff;color:var(--aged);
  transition:all .2s ease;
}
.links a:hover{background:var(--gold);color:var(--on-gold);border-color:var(--gold);text-decoration:none}

/* ---------- Tabs & filters ---------- */
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px;border-bottom:1px solid var(--border);padding-bottom:10px}
.tab{
  padding:6px 14px;border-radius:999px;font-size:13.5px;font-weight:500;
  border:1px solid var(--border);background:#fff;color:var(--steel);cursor:pointer;
  font-family:inherit;transition:all .22s ease;
}
.tab:hover{border-color:var(--gold);color:var(--aged);background:var(--surface)}
.tab[aria-selected="true"]{background:var(--gold);border-color:var(--gold);color:var(--on-gold);font-weight:600}
.tab .n{opacity:.7;font-size:12px;margin-left:3px}
.filters{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 14px;font-size:13px;color:var(--steel)}
.filt{
  padding:3px 11px;border-radius:999px;font-size:12.5px;
  border:1px dashed var(--border);background:transparent;color:var(--steel);cursor:pointer;
  font-family:inherit;transition:all .2s ease;
}
.filt:hover{border-color:var(--gold);border-style:solid;color:var(--aged)}
.filt[aria-pressed="true"]{border-style:solid;border-color:var(--aged);background:var(--surface2);color:var(--aged);font-weight:600}
.pane[hidden]{display:none}
.card[data-hidden="1"]{display:none}

/* ---------- News ---------- */
.news-item{
  position:relative;
  background:linear-gradient(90deg,var(--surface2),var(--surface) 70%);
  border:1px solid var(--border);border-left:3px solid var(--gold);
  border-radius:0 7px 7px 0;padding:11px 15px;margin-bottom:10px;
  transition:transform .25s ease, box-shadow .25s ease, border-left-color .25s ease;
}
.news-item:hover{transform:translateX(3px);box-shadow:0 6px 18px rgba(143,111,62,.12);border-left-color:var(--rush)}
.news-date{
  display:inline-block;min-width:78px;font-weight:600;font-size:13px;color:var(--aged-deep);
  letter-spacing:.01em;
}
.dot{
  display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--rush);
  margin-right:7px;vertical-align:1px;
  animation:pulse 2.4s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(218,170,0,.55)}
  50%{box-shadow:0 0 0 6px rgba(218,170,0,0)}
}

/* ---------- Timeline ---------- */
.tl{list-style:none;margin:0;padding:0 0 0 26px;position:relative}
.tl>li{position:relative;margin-bottom:20px}
.tl>li:last-child{margin-bottom:6px}
.tl>li::before{
  content:"";position:absolute;left:-26px;top:7px;width:12px;height:12px;border-radius:50%;
  background:#fff;border:2.5px solid var(--gold);
  transition:background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tl>li:hover::before{background:var(--rush);border-color:var(--rush);box-shadow:0 0 0 5px rgba(218,170,0,.16)}
.tl .hd{font-weight:600;color:var(--ink);line-height:1.45}
.tl .when{font-size:13px;color:var(--ink);font-weight:400;margin-left:4px}
.tl .ln{font-size:14px;color:var(--ink);display:block}
.tl .ln a{color:var(--ink)}
.tl .ln a:hover{color:var(--aged)}
.tl .ln img{width:17px;vertical-align:-3px;margin-right:3px}

/* ---------- Service chips ---------- */
.svc{margin-bottom:22px}
.svc h4{
  margin:0 0 9px;font-size:14px;font-weight:600;color:var(--ink);
}
.chips{display:flex;flex-wrap:wrap;gap:7px}
.chip{
  display:inline-flex;align-items:baseline;gap:6px;
  padding:5px 12px;border-radius:999px;font-size:13px;
  border:1px solid var(--border);background:#fff;color:var(--ink);
  transition:transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.chip:hover{
  transform:translateY(-2px);border-color:var(--gold);background:var(--surface);
  box-shadow:0 4px 12px rgba(143,111,62,.14);text-decoration:none;color:var(--aged);
}
.chip .yr{font-size:11.5px;color:var(--steel);font-variant-numeric:tabular-nums}
.chip .full{font-size:11.5px;color:var(--steel)}
.chip.starred{border-color:var(--gold);background:linear-gradient(135deg,var(--dust),#fff)}
.chip.starred::before{content:"\2605";color:var(--rush);font-size:12px}

/* visually hidden, still read by search engines and screen readers */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* ---------- Others ---------- */
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:11px}

/* ---------- Footer ---------- */
.footer{margin-top:46px;padding:0 20px}
.fpanel{
  max-width:var(--content);margin:0 auto;
}
.footer-in{
  display:flex;flex-wrap:wrap;gap:22px;align-items:center;justify-content:space-between;
  padding:22px 0 20px;
}
.logos{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}
.logos img{display:block;height:50px;width:auto;opacity:.82;transition:opacity .25s ease, transform .25s ease}
/* square marks read heavier than wide ones at the same height */
.logos img.logo-sm{height:44px}
.logos a:hover img{opacity:1;transform:translateY(-2px)}
.social{display:flex;align-items:center;gap:11px;flex-wrap:wrap}
.social img{height:31px;width:auto;border-radius:5px;opacity:.85;transition:opacity .25s ease, transform .25s ease}
.social a:hover img{opacity:1;transform:translateY(-3px) scale(1.06)}
.copy{
  text-align:center;padding:14px 24px 15px;
  color:var(--steel);font-size:13px;
  background:linear-gradient(180deg,var(--surface),var(--dust));
}

.copy .visits{white-space:nowrap;font-variant-numeric:tabular-nums}

/* ---------- Back to top ---------- */
#totop{
  position:fixed;right:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:45;
  width:42px;height:42px;border-radius:50%;cursor:pointer;
  border:1px solid var(--gold);background:rgba(255,255,255,.94);color:var(--aged);
  font-size:17px;line-height:1;
  box-shadow:0 4px 16px rgba(143,111,62,.20);
  opacity:0;visibility:hidden;transform:translateY(10px);
  transition:opacity .3s ease, transform .3s ease, visibility .3s, background-color .2s, color .2s;
}
#totop.show{opacity:1;visibility:visible;transform:none}
#totop:hover{background:var(--gold);color:var(--on-gold)}

/* ---------- Responsive ---------- */
@media (max-width:720px){
  .hero-in{flex-direction:column-reverse;align-items:center;text-align:center;gap:18px;padding:24px 20px 22px}
  .hero-txt{text-align:left;width:100%}
  .hero-pic{margin-top:0}
  .hero-pic img{width:150px;height:188px}
  .hero h1{font-size:27px}
  .name-zh{font-size:18px}
  .meta{font-size:14px}
  .footer-in{flex-direction:column;align-items:flex-start;gap:16px}
  .sec-title{font-size:19px}
  body{font-size:14.5px}
}
@media (max-width:520px){
  /* too narrow to wrap text beside them - sit them above the title instead */
  .card .badges,
  .grant .badges{float:none;max-width:100%;margin:0 0 5px}
}
@media (max-width:420px){
  .wrap{padding:0 16px}
  .hero,.pagehead,.footer{padding-left:16px;padding-right:16px}
  .hero-in{padding:20px 16px 18px}
  .pagehead-in{padding:13px 14px 12px}
  .footer-in{padding:18px 0 14px}
  .copy{padding:12px 16px 15px}
  .navwrap{padding:0 10px}
  .logos img{height:40px}
  .logos img.logo-sm{height:35px}
  .news-date{display:block;min-width:0}
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
  html.js .reveal{opacity:1;transform:none}
}

/* ==================================================================
   Multi-page additions
   ================================================================== */

/* ---------- Sub-page header ---------- */
.pagehead{padding:18px 20px 0}
.pagehead-in{
  position:relative;overflow:hidden;
  max-width:var(--content);margin:0 auto;
  padding:18px 20px 16px;
  background:
    radial-gradient(760px 240px at 84% -40%, rgba(218,170,0,.12), transparent 60%),
    linear-gradient(160deg, var(--dust) 0%, var(--surface) 58%, #fff 100%);
}
.pagehead h1{
  margin:0 0 5px;
  font-size:29px;font-weight:700;letter-spacing:-.025em;line-height:1.25;
}
.pagehead p{margin:0;color:var(--steel);font-size:15px}

/* ---------- In-page sub-navigation ---------- */
.subnav{
  display:flex;flex-wrap:wrap;gap:7px;
  padding:11px 0 0;
}
.subnav a{
  font-size:13px;padding:5px 12px;border-radius:999px;
  border:1px solid var(--border);background:rgba(255,255,255,.72);color:var(--steel);
  transition:all .2s ease;
}
.subnav a:hover{border-color:var(--gold);color:var(--aged);background:#fff;text-decoration:none}
.subnav a.active{border-color:var(--aged);background:var(--surface2);color:var(--aged-deep);font-weight:600}

/* ---------- Home: quick-link cards to sub-pages ---------- */
.quick{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:11px}
.qcard{
  display:block;position:relative;overflow:hidden;
  background:var(--card-bg);border:1px solid var(--border);border-radius:9px;
  padding:15px 16px;color:var(--ink);
  transition:transform .26s cubic-bezier(.22,1,.36,1), box-shadow .26s ease, border-color .26s ease;
}
.qcard::before{
  content:"";position:absolute;left:-1px;top:-1px;bottom:-1px;width:3px;border-radius:9px 0 0 9px;
  background:linear-gradient(var(--gold),var(--rush));
  transform:scaleY(0);transform-origin:top;transition:transform .3s cubic-bezier(.22,1,.36,1);
}
.qcard:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(143,111,62,.14);border-color:var(--gold);text-decoration:none}
.qcard:hover::before{transform:scaleY(1)}
.qcard .qt{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  font-weight:600;font-size:15px;margin-bottom:3px;
}
.qcard .arrow{color:var(--gold);transition:transform .26s ease}
.qcard:hover .arrow{transform:translateX(4px)}
.qcard .qd{font-size:13px;color:var(--ink);line-height:1.5}

/* ---------- Research thrusts ---------- */
/* Framework figure has a transparent background; it sits directly on the white page. */
.areas-fig{display:block;max-width:640px;margin:0 auto 16px;cursor:zoom-in}
.areas-fig img{display:block;width:100%;height:auto}
.thrusts{display:grid;grid-template-columns:repeat(auto-fit,minmax(285px,1fr));gap:12px}
.thrust{
  position:relative;background:var(--card-bg);border:1px solid var(--border);
  border-radius:9px;padding:16px 17px 15px;
  transition:transform .26s cubic-bezier(.22,1,.36,1), box-shadow .26s ease, border-color .26s ease;
}
.thrust:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(143,111,62,.13);border-color:var(--gold)}
.thrust .tn{
  display:inline-flex;align-items:center;justify-content:center;
  width:25px;height:25px;border-radius:50%;margin-bottom:9px;
  background:linear-gradient(135deg,var(--gold),var(--field));
  color:var(--on-gold);font-size:12.5px;font-weight:700;
}
.thrust h3{margin:0 0 6px;font-size:15px;font-weight:600;line-height:1.4}
.thrust p{margin:0;font-size:13.5px;color:var(--ink);line-height:1.58}
.thrust p.sub{margin:-2px 0 8px;font-size:13px;color:var(--steel)}
.thrust .scope{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 10px}
.thrust .scope span{
  padding:1.5px 9px;border-radius:999px;font-size:11.5px;font-weight:500;
  background:var(--surface2);border:1px solid var(--border);color:var(--aged-deep);
}
.subareas{margin:12px 0 0}
.subareas dt{
  padding-top:9px;border-top:1px solid var(--border);
  font-size:13.5px;font-weight:600;color:var(--ink);
}
.subareas dd{margin:2px 0 10px;font-size:13px;line-height:1.56;color:var(--ink)}
.subareas dd:last-child{margin-bottom:0}
/* Venue-year links under each sub-area; manuscripts under review are plain text. */
.subareas .papers{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.subareas .papers a,.subareas .papers .ur{
  padding:1.5px 8px;border-radius:4px;font-size:11.5px;font-weight:600;white-space:nowrap;
}
.subareas .papers a{background:var(--dust);color:var(--aged-deep)}
.subareas .papers a:hover{background:var(--gold);color:var(--on-gold);text-decoration:none}
.subareas .papers a.starred::after{content:" \2605";color:var(--rush)}
.subareas .papers a.starred:hover::after{color:var(--on-gold)}
.subareas .papers .ur{border:1px dashed var(--gold);color:var(--steel);font-weight:500}

/* ---------- Representative publications ---------- */
/* Overview figure on the left in a fixed 16:10 frame, so figures of any
   shape line up; clicking it opens the full-size image. */
.rep{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:center;
  background:var(--card-bg);border:1px solid var(--border);border-radius:9px;
  padding:14px 18px 14px 14px;margin-bottom:12px;
  scroll-margin-top:calc(var(--nav-h) + 14px);
  transition:transform .26s cubic-bezier(.22,1,.36,1), box-shadow .26s ease, border-color .26s ease;
}
/* Reached from a paper link in the Research Areas cards. */
.rep:target{border-color:var(--gold);box-shadow:0 0 0 3px rgba(203,186,150,.35)}
.rep:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(143,111,62,.13);border-color:var(--gold)}
.rep-fig{position:relative;display:block;aspect-ratio:16/10;cursor:zoom-in;background:#fff}
.rep-fig img{position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);object-fit:contain}
.rep-txt .badge{margin-left:0;vertical-align:baseline}
.rep-txt h3{margin:6px 0 6px;font-size:15px;font-weight:600;line-height:1.45;color:var(--ink)}
.rep-txt p{margin:0;font-size:13.5px;line-height:1.6;color:var(--ink)}
.rep-txt .links{margin-top:9px}

/* ---------- Mentoring ---------- */
.mentee-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-bottom:11px}
.mentee-grid .mentee{margin-bottom:0}
.mentee{
  position:relative;display:flex;gap:14px;align-items:flex-start;
  background:var(--card-bg);border:1px solid var(--border);border-radius:9px;
  padding:14px 16px 14px 15px;margin-bottom:11px;
  transition:transform .26s cubic-bezier(.22,1,.36,1), box-shadow .26s ease, border-color .26s ease;
}
.mentee:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(143,111,62,.13);border-color:var(--gold)}
.mentee .mbody{flex:1 1 auto;min-width:0}
.mentee .mname{font-weight:600;font-size:15px;color:var(--ink)}
.mentee .mname a{color:var(--ink)}
.mentee .mname a:hover{color:var(--aged)}
.mentee .mrole{font-size:13px;color:var(--ink);display:block;margin:1px 0 4px}
.mentee .mres{font-size:13.5px;color:var(--ink)}
.mentee .mout{display:block;margin-top:5px;font-size:13.5px;color:var(--ink)}
.now{
  display:inline-block;margin-left:7px;padding:1px 8px;border-radius:999px;
  font-size:11px;font-weight:600;letter-spacing:.02em;
  background:rgba(218,170,0,.15);color:var(--aged);border:1px solid var(--gold);
}

/* ---------- Talks ---------- */
.talk{
  position:relative;background:var(--card-bg);border:1px solid var(--border);
  border-left:3px solid var(--gold);border-radius:0 8px 8px 0;
  padding:13px 16px;margin-bottom:11px;
  transition:transform .25s ease, box-shadow .25s ease, border-left-color .25s ease;
}
.talk:hover{transform:translateX(3px);box-shadow:0 7px 20px rgba(143,111,62,.12);border-left-color:var(--rush)}
.talk .tt{display:block;font-weight:600;margin-bottom:3px;line-height:1.45}
.talk .tv{display:block;font-size:13.5px;color:var(--ink)}
.talk .td{display:block;font-size:12.5px;color:var(--ink);margin-top:2px;font-variant-numeric:tabular-nums}

/* ---------- Grants ---------- */
.grant{
  position:relative;background:var(--card-bg);border:1px solid var(--border);
  border-radius:9px;padding:15px 16px;margin-bottom:11px;overflow:hidden;
  transition:transform .26s cubic-bezier(.22,1,.36,1), box-shadow .26s ease, border-color .26s ease;
}
.grant::before{
  content:"";position:absolute;left:-1px;top:-1px;bottom:-1px;width:3px;border-radius:9px 0 0 9px;
  background:linear-gradient(var(--gold),var(--rush));
  transform:scaleY(0);transform-origin:top;transition:transform .3s cubic-bezier(.22,1,.36,1);
}
.grant:hover::before{transform:scaleY(1)}
.grant:hover{transform:translateY(-2px);box-shadow:0 9px 24px rgba(143,111,62,.14);border-color:var(--gold)}
.grant .gt{display:flow-root;font-weight:600;font-size:15px;line-height:1.5;margin-bottom:4px}
.grant .gm{display:block;font-size:13.5px;line-height:1.62;color:var(--ink)}
.grant .gm b{font-weight:600}

/* ---------- Author-mark legend ---------- */
.legend{
  margin:0 0 14px;
  text-align:right;
  font-size:12.5px;color:var(--steel);line-height:1.5;
}
/* The legend sits directly above the first list, so close the usual
   section gap instead of stacking 14px + .sec's 34px. */
.legendbar{padding-top:24px}
.legendbar .legend{margin-bottom:0}
.legendbar + .sec{padding-top:2px}
.legend b{color:var(--aged);font-weight:600}
sup.mk{color:var(--aged);font-weight:700;font-size:.78em;letter-spacing:.02em}

@media (max-width:720px){
  .pagehead h1{font-size:24px}
  .pagehead-in{padding:15px 18px 14px}
  .mentee-grid{grid-template-columns:1fr}
  .rep{grid-template-columns:1fr;gap:12px;padding:12px}
}

/* ---------- Life: footprint map ---------- */
.footprint-map{height:380px;border-radius:9px;margin-bottom:10px;background:var(--surface2);z-index:0}
.fp-legend{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:var(--steel)}
.leaflet-control.fp-legend{
  margin:0 10px 6px 0;padding:7px 11px;flex-direction:column;gap:3px;
  background:rgba(255,255,255,.92);border-radius:6px;box-shadow:0 1px 5px rgba(0,0,0,.18);
  font-size:12px;line-height:1.35;color:var(--ink);
}
.fp-legend li{display:inline-flex;align-items:center;gap:7px}
.fp-dot{width:11px;height:11px;border-radius:50%;border:2px solid var(--gold);box-sizing:border-box;background:var(--dust)}
.footprint-map .fp-tip{
  width:max-content;max-width:300px;white-space:normal;
  font-family:inherit;font-size:12.5px;line-height:1.5;color:var(--ink);
}
@media (max-width:520px){.footprint-map{height:300px}}

/* ---------- Home: brief publication list ---------- */
.pub-brief{list-style:none;margin:0;padding:0}
.pub-brief li{display:grid;grid-template-columns:104px minmax(0,1fr);gap:12px;align-items:baseline;padding:4px 0;line-height:1.5}
.pub-brief .badge{margin-left:0;justify-self:start}
.pub-brief a{color:var(--ink)}
.pub-brief a:hover{color:var(--aged)}
.pub-brief .award{font-size:12px;font-weight:600;color:var(--rush);white-space:nowrap}
@media (max-width:520px){.pub-brief li{grid-template-columns:1fr;gap:2px;padding:6px 0}}

/* ---------- Service page: full names as a list ---------- */
.svc-list li{font-weight:400;padding:4px 0 4px 19px}
.svc-list a{color:var(--ink)}
.svc-list a:hover{color:var(--aged)}
.svc-list .yr{margin-left:4px;font-size:13px;color:var(--steel);font-variant-numeric:tabular-nums}
.svc-list .award{margin-left:6px;font-size:12px;font-weight:600;color:var(--rush);white-space:nowrap}
.pub-brief .pb-authors,.pub-brief .pb-venue{display:block;font-size:13.5px;line-height:1.5}
.pub-brief .pb-authors{color:var(--ink);margin-top:2px}
.pub-brief .pb-authors a{color:var(--ink)}
.pub-brief .pb-authors a:hover{color:var(--aged)}
.pub-brief .pb-venue{color:var(--steel);font-style:italic}
.pub-brief li{padding:7px 0}

/* ---------- Life: favourite songs ---------- */
.songs-title{margin:4px 0 2px;font-size:14px;font-weight:600;color:var(--ink)}
.songs li{font-weight:400;padding:3px 0 3px 19px}
.songs a{color:var(--ink)}
.songs a:hover{color:var(--aged)}
.songs .by{color:var(--steel)}

/* ---------- Home: brief education & employment ---------- */
.edu-brief li{font-weight:400;padding:5px 0 5px 19px}
.edu-brief .t{display:block;font-weight:600;color:var(--ink)}
.edu-brief .m{display:block;font-size:13.5px;color:var(--steel)}
.songs .icon-btn{width:22px;height:22px;vertical-align:middle;margin-left:8px}
.songs .icon-btn img{height:12px}
.edu-brief .t2{font-weight:400}
