/* ═══════════════════════════════════════════════════════
   UNSW-NLP - Custom Theme
   Clancy (headings) · Roboto (body) · Roboto Mono (code)
   ═══════════════════════════════════════════════════════ */

/* ── 1. Font Faces ── */

@font-face {
  font-family: 'Clancy';
  src: url('/fonts/clancy/Clancy-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Clancy';
  src: url('/fonts/clancy/Clancy-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Clancy';
  src: url('/fonts/clancy/Clancy-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto/Roboto-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto/Roboto-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto/Roboto-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto/Roboto-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto/Roboto-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto/Roboto-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Roboto Mono';
  src: url('/fonts/roboto-mono/RobotoMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Roboto Mono';
  src: url('/fonts/roboto-mono/RobotoMono-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── 2. Variables ── */

:root {
  /* Site is light-only by design - stop browsers from applying their own
     auto-dark styling (e.g. to <pre>/<code>) when the OS is in dark mode. */
  color-scheme: light;

  /* Brand */
  --navy:        #002060;   /* UNSW navy - header/footer */
  --yellow:      #FFD100;   /* UNSW yellow - active nav, accents */
  --yellow-dim:  #c9a500;   /* hover state on dark bg */
  --purple:      #74348C;   /* links, accents: logo purple, deepened (8:1 on white) */
  --purple-light:#5E2A72;   /* link hover */

  /* The four colours of the UNSW-NLP logo. Pastels are for fills, bars and
     underlines; the -ink variants are dark enough to use as text. */
  --logo-teal:   #4CC3C6;
  --logo-yellow: #F7DC3E;
  --logo-purple: #C77BD6;
  --logo-coral:  #F2758B;
  --ink-teal:    #0B7378;
  --ink-yellow:  #806400;
  --ink-purple:  #8A3DA3;
  --ink-coral:   #B0364F;
  --tint-teal:   #DCF1F2;
  --tint-yellow: #FCF3C4;
  --tint-purple: #F1E2F6;
  --tint-coral:  #FCE2E6;

  /* Neutrals */
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --border:      #e2e8f0;
  --text-primary:#000000;
  --text-body:   #111111;
  --text-muted:  #555555;
  --text-faint:  #888888;


  /* Spacing */
  --gap:    24px;
  --radius: 8px;

  /* Links: underlined in the accent colour; on hover they get a highlighter
     fill in the same colour (like unsw.edu.au). Nothing changes width, so text never reflows. */
  --link-ul: #C9A6D6;   /* softened logo purple */
  --hl-bg:   #F1E3F6;   /* light tint of the logo purple */

  /* Layout */
  --max-width:     960px;
  --nav-height:    54px;
  --footer-height: 60px;

  /* Fonts */
  --font-display: 'Clancy', Georgia, serif;
  --font-body:    'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'Roboto Mono', 'Courier New', monospace;
}

/* ── 3. Reset ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }  /* reserve the scrollbar's width so pages never shift sideways when content grows */
img, video { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }
ul[role='list'], ol[role='list'] { list-style: none; }

/* ── 4. Base ── */

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
  color: var(--purple);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: var(--link-ul);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--text-primary);
  background: var(--hl-bg);
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* No color here - strong inside a link must not override the link's coral */
strong { font-weight: 700; }
em     { font-style: italic; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li     { margin-bottom: 0.35rem; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

pre {
  font-family: var(--font-mono);
  font-size: 1rem;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

blockquote {
  border-left: 3px solid var(--yellow);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 500;
  color: var(--text-primary);
}

/* ── 5. Layout scaffold ── */

.main {
  flex: 1;
  max-width: calc(var(--max-width) + var(--gap) * 2);
  margin: 0 auto;
  padding: var(--gap);
  width: 100%;
}

/* ── 6. Header & nav ── */

.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header::after {
  content: '';
  display: block;
  height: 2px;
  /* Colour follows scroll position: purple, teal, yellow, coral (set in header.html) */
  background: var(--scroll-colour, var(--logo-purple));
}

.site-nav {
  max-width: calc(var(--max-width) + var(--gap) * 2);
  margin: 0 auto;
  padding: 0 var(--gap);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo-mark { width: 28px; height: 28px; object-fit: contain; }
.site-logo { flex-shrink: 0; }
/* Phones: the nav menu needs the room, so show only the logo mark */
@media (max-width: 640px) {
  .site-logo-bar, .site-logo-text { display: none; }
}
.site-logo-bar { width: 2px; height: 1.15em; background: currentColor; }
.site-logo:hover { color: var(--purple); text-decoration: none; background: none; }

.nav-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-menu li a {
  display: block;
  padding: 6px 11px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
  position: relative;
}

.nav-menu li a:hover {
  color: var(--purple);
  text-decoration: none;
}
/* Hover bar: a thin rule that grows from the centre of the word */
.nav-menu li a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: calc(100% - 22px);
  height: 1.5px;
  border-radius: 2px;
  background: var(--purple);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-menu li a:hover::after { transform: translateX(-50%) scaleX(1); }

.nav-menu li a.active {
  color: var(--purple);
}


/* ── 7. Footer ── */

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 1.25rem var(--gap);
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: calc(var(--max-width) + var(--gap) * 2);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.footer-sep { color: var(--text-faint); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-primary); }

/* ── 8. Homepage - hero ── */

.hero {
  display: flex;
  align-items: center;
  gap: calc(var(--gap) * 1.75);
  padding: calc(var(--gap) * 1.5) 0;
}

/* Logo | UNSW-NLP lockup on the left, description on the right */
.hero-lockup {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hero-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.lockup-bar {
  flex: none;
  width: 2.5px;
  height: 2.1rem;
  background: var(--text-primary);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

.hero-subtitle { flex: 1; min-width: 0; }

@media (max-width: 760px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .hero-logo { width: 72px; height: 72px; }
  .lockup-bar { height: 1.9rem; }
  .hero-title { font-size: 1.6rem; }
}

/* Research areas, each keyed to one colour of the logo */
.topic-word {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.22em;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: none;
}
.topic-word.topic-foundational   { text-decoration-color: var(--logo-teal); }
.topic-word.topic-applied { text-decoration-color: var(--logo-yellow); }
.topic-word.topic-inclusive    { text-decoration-color: var(--logo-coral); }
.topic-word.topic-foundational:hover   { background: var(--tint-teal); }
.topic-word.topic-applied:hover { background: var(--tint-yellow); }
.topic-word.topic-inclusive:hover    { background: var(--tint-coral); }
.topic-tip.topic-foundational .topic-bubble   { border-top: 3px solid var(--logo-teal); }
.topic-tip.topic-applied .topic-bubble { border-top: 3px solid var(--logo-yellow); }
.topic-tip.topic-inclusive .topic-bubble    { border-top: 3px solid var(--logo-coral); }

/* Join Us (home page) */
.home-join {
  width: 100%;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
}
.join-intro { margin-bottom: 1rem; max-width: 46rem; }
.join-email { font-weight: 600; }
.join-subject {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}
.join-types {
  margin: 0;
  border-top: 1px solid var(--border);
}
.join-types > div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.join-types dt { font-weight: 600; color: var(--text-primary); }
.join-types dd { margin: 0; color: var(--text-body); }
.join-types dd a { margin-left: 0.35rem; white-space: nowrap; }
.join-sep { color: var(--text-faint); margin-left: 0.35rem; }
.join-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
@media (max-width: 540px) {
  .join-types > div { grid-template-columns: 1fr; gap: 0.1rem; }
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
}

.hero-subtitle p,
.hero-subtitle .hero-subtitle-line { margin-bottom: 0.55rem; }
.hero-subtitle p:last-child,
.hero-subtitle .hero-subtitle-line:last-child { margin-bottom: 0; }

.join-type {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.88em;
  letter-spacing: 0.01em;
}

.join-link {
  color: var(--purple);
}
.join-link:hover {
  color: var(--purple-light);
}

/* ── 10. Homepage - news table ── */

.home-news { width: 100%; margin-top: 2rem; }

/* section-label - shared with selected pubs and personal site style */
.section-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #2b2b2b;
  margin-bottom: 1.25rem;
}

/* Selected publications on homepage */
.home-selected-pubs {
  width: 100%;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.selected-pubs-more {
  margin-top: 1rem;
  font-size: 1rem;
}

.home-section-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #2b2b2b;
  line-height: 1.25;
  margin-bottom: 1.1rem;
}

.home-news-table {
  width: 100%;
  border-collapse: collapse;
}

.home-news-table tr + tr td {
  border-top: 1px solid var(--border);
}

.news-date {
  vertical-align: top;
  padding: 0.6em 1.4em 0.6em 0;
  width: 7em;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.news-content {
  vertical-align: top;
  padding: 0.6em 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

.news-content p { margin: 0; }
.news-content a { color: var(--text-primary); }
.news-content a:hover { color: var(--text-primary); }
.news-content strong { font-weight: 600; color: var(--text-primary); }

/* Hover/focus "i" icon that reveals an image below the news item */
.news-content { position: relative; }
.news-preview { vertical-align: -0.1em; cursor: help; }
.news-preview-img {
  position: absolute; z-index: 20; left: 0; top: 100%;
  width: min(480px, 100%); height: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  background: var(--white);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
}
.news-preview:hover .news-preview-img,
.news-preview:focus .news-preview-img { opacity: 1; visibility: visible; transform: none; }

.news-more {
  text-align: right;
  margin-top: 0.9rem;
  font-size: 1rem;
  color: var(--text-faint);
}
.news-more a { color: var(--text-muted); }
.news-more a:hover { color: var(--purple); }

/* ── Funding (home page cards) and Grants page ── */

.home-funding {
  width: 100%;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.funding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 0.25rem;
}

/* Shared: "NHMRC Ideas Grant · Government · 2025" */
.grant-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.grant-meta-sep { color: var(--text-faint); }

/* Shared: "Aditya Joshi  CI" */
.grant-pi {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-body);
}
.grant-pi-role {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.grant-pi-role::before { content: '\00B7'; margin-right: 0.5rem; color: var(--text-faint); }

.funding-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem 1.25rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.funding-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.funding-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}
.funding-card-program {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.funding-card-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.funding-card-more { font-size: 0.9rem; white-space: nowrap; }
.funding-card-type { font-size: 0.8rem; color: var(--text-faint); white-space: nowrap; }
.grant-pi { flex-wrap: nowrap; white-space: nowrap; }

/* Grants page: expandable banners */
.grant-banner-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.grant-banner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.grant-banner:hover { border-color: #cbd5e1; }
.grant-banner[open] { box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06); }

.grant-banner-summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 3rem 1.25rem 1.4rem;
}
.grant-banner-summary::-webkit-details-marker { display: none; }

.grant-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  max-width: 48rem;
}

.grant-banner-toggle {
  position: absolute;
  top: 1.45rem;
  right: 1.4rem;
  width: 9px;
  height: 9px;
  pointer-events: none;
}
.grant-banner-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.grant-banner[open] .grant-banner-toggle::before { transform: rotate(-135deg); }

.grant-banner-detail {
  padding: 0.25rem 1.4rem 1.4rem;
}
.grant-banner-detail > *:first-child { margin-top: 0; }

.grant-detail-section { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.grant-detail-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}
.grant-detail-members { font-size: 0.95rem; line-height: 1.7; color: var(--text-body); margin: 0; }

.grant-detail-partners,
.funding-card-deliverables ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.grant-detail-partners li,
.funding-card-deliverables li { font-size: 0.95rem; color: var(--text-body); }
.grant-partner-link,
.funding-card-deliverables li a { color: var(--text-primary); }

/* Papers funded by the grant: full titles, no truncation */
.grant-papers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.grant-papers li { font-size: 0.98rem; line-height: 1.45; }
.grant-papers li > a { color: var(--text-primary); font-weight: 500; }
.grant-paper-meta { display: flex; flex-wrap: wrap; gap: 0.1rem 0.6rem; margin-top: 0.2rem; font-size: 0.88rem; color: var(--text-muted); }
.grant-paper-venue { color: var(--purple); font-weight: 500; }

.grant-detail-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.grant-detail-links a { font-size: 0.95rem; }

/* ── 11. Side-by-side photo galleries ── */

.photo-galleries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: 2.5rem;
}

.gallery-panel { display: flex; flex-direction: column; gap: 0.75rem; }

/* The slideshow stage - fixed landscape frame */
.gallery-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--radius) * 1.5);
  overflow: hidden;
  background: #0d1520;
  border: 1px solid var(--border);
}

/* Slides */
.gslide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
}
.gslide.active { opacity: 1; }

.gslide img {
  width: 100%;
  height: 100%;
  display: block;
  /* contain: portrait images zoom out to fit height, no cropping */
  object-fit: contain;
  object-position: center;
}

.gslide-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 0.85rem 0.65rem;
  background: linear-gradient(transparent, rgba(0,20,60,0.78));
  color: #f1f5f9;
  font-size: 0.85rem;
  line-height: 1.35;
}

/* Controls row - sits below the stage */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.35rem 0 0.1rem;
}

/* Prev / Next - thin SVG chevrons, no background */
.gallery-prev,
.gallery-next {
  background: none;
  border: none;
  padding: 4px 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  line-height: 1;
  transition: color 0.15s;
}
.gallery-prev:hover,
.gallery-next:hover { color: var(--text-primary); }

/* Dot indicators */
.gallery-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.dot.active {
  background: var(--purple);
  transform: scale(1.3);
}

/* Empty state */
.gallery-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-faint);
  font-style: italic;
}

@media (max-width: 540px) {
  .photo-galleries { grid-template-columns: 1fr; }
}

/* ── 12. People section ── */

.people-directory { width: 100%; }

.people-section-row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0 3rem;
  align-items: start;
  margin-bottom: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.people-section-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.people-col-label {
  position: sticky;
  top: 4rem;
  padding-top: 0.4rem;
}

.people-role {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #2b2b2b;
  display: block;
}

.people-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 1.25rem;
  margin-bottom: 0.5rem;
}

.person-card-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 210px;
  width: 210px;
}

.person-card-small img {
  width: 165px;
  height: 165px;
  object-fit: cover;
  border-radius: 8%;
  margin-bottom: 0.65rem;
  display: block;
}

.person-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.person-comment {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  line-height: 1.4;
}

/* Info icon + tooltip bubble */
.person-comment-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tip-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text-faint);
  cursor: default;
  transition: color 0.15s;
  outline: none;
}

.tip-icon:hover,
.tip-icon:focus {
  color: var(--purple);
}

.tip-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-body);
  white-space: nowrap;
  z-index: 10;
  pointer-events: auto;
}

.tip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border);
}

.tip-bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #fff;
  z-index: 1;
}

.person-comment-tip:hover .tip-bubble,
.tip-icon:focus + .tip-bubble {
  display: block;
}

.person-research {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.person-social {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.2rem;
}

.person-social a { display: inline-flex; color: var(--text-muted); }
.person-social a:hover { color: var(--purple); text-decoration: none; background: none; }

.person-social svg {
  width: 15px;
  height: 15px;
}

.alumni-list {
  list-style: disc;
  margin: 0 0 1.5rem 1.5rem;
  padding: 0;
}
.alumni-list li { text-align: left; margin-bottom: 0.4rem; font-size: 1rem; }

/* ── Member list (rest / alumni pages) ── */

.people-page-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2rem;
}

.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-body);
}

.member-name {
  color: var(--text-primary);
}

.member-tip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── 13. Publications section ── */

/* Featured grid */
.featured-pubs { margin-bottom: 0.5rem; }
.featured-pubs h2 { margin-bottom: 1rem; }

.featured-pub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 0.5rem;
}

@media (max-width: 860px) {
  .featured-pub-grid { grid-template-columns: repeat(2, 1fr); }
}

.featured-pub-card {
  height: 168px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--off-white);
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.featured-pub-card:hover {
  box-shadow: 0 4px 14px rgba(0,32,96,0.08);
  border-color: var(--purple);
}

.featured-pub-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-pub-venue {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--purple);
}

.featured-pub-authors {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-pub-links {
  margin-top: auto;
  padding-top: 0.3rem;
  display: flex;
  gap: 0.75rem;
  font-size: 1rem;
  flex-wrap: wrap;
}

.pub-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* Pub list */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.pub-list li {
  margin-bottom: 1rem;
  line-height: 1.55;
}


.pub-award {
  font-weight: 600;
  font-size: 1rem;
  color: #b8860b;
}

/* ── 14. Single content pages ── */

.content-page { width: 100%; }

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 400;
}

.content { line-height: 1.7; color: var(--text-body); }
.content h2 { margin: 2rem 0 0.75rem; }
.content h3 { margin: 1.5rem 0 0.5rem; }
.content p  { margin-bottom: 1rem; }
.content ul, .content ol { margin-bottom: 1rem; }
.content li { margin-bottom: 0.35rem; }

.content a { color: var(--purple); }

.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.content strong { color: var(--text-primary); }

.content blockquote {
  border-left: 3px solid var(--yellow);
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

/* ── 15. Section label (shared heading style) ── */

.section-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── 16. Responsive ── */

@media (max-width: 640px) {
  :root { --gap: 16px; }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.25rem; }

  .nav-menu li a { padding: 6px 8px; font-size: 1rem; }

  .hero { padding: var(--gap) 0; }
  .featured-pub-grid { grid-template-columns: 1fr; }

  .person-card-small img { width: 110px; height: 110px; }
  .person-card-small { flex: 0 0 160px; width: 160px; }
  .people-section-row { grid-template-columns: 1fr; }
  .people-col-label { position: static; margin-bottom: 0.75rem; }
}

@media (max-width: 420px) {
  .photo-deck { grid-template-columns: 1fr; }
  .nav-menu { gap: 0; }
}

/* ── 17. Topic hover tooltips (hero subtitle) ── */

.topic-tip {
  position: relative;
  display: inline-block;
}

.topic-bubble {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.8rem 0.6rem;
  width: max-content;
  max-width: 280px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  z-index: 30;
  text-decoration: none;
  cursor: default;
}

.topic-tip:hover .topic-bubble,
.topic-tip:focus-within .topic-bubble { display: block; }

.topic-bubble ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.topic-bubble li {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  padding-left: 0.9rem;
  position: relative;
}

.topic-bubble li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--text-faint);
}

/* ── 18. Location page ── */

.location-page { display: flex; flex-direction: column; gap: 2.5rem; }

.location-address-row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0 3rem;
  align-items: start;
}

.location-label { padding-top: 0.2rem; }

.location-section-heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.location-address { display: flex; flex-direction: column; gap: 0.1rem; }

.location-building {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.location-code {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 400;
}

.location-uni,
.location-suburb {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.location-directions {
  display: inline-block;
  align-self: flex-start;   /* hug the text instead of stretching across the column */
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--purple);
  font-weight: 500;
}

.location-map {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 7;
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .location-address-row { grid-template-columns: 1fr; }
  .location-label { margin-bottom: 0.5rem; }
  .location-map { aspect-ratio: 4 / 3; }
}

/* ── 18. Activities page ── */

.act-section {
  margin-bottom: 0;
}
.act-section--spaced { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.act-col-content .pub-entry:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.act-section--two-col {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0 3rem;
  align-items: start;
}

.act-col-label {
  position: sticky;
  top: 4rem;
  padding-top: 0.2rem;
}

.act-section-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #2b2b2b;
  display: block;
}

/* Course entries: code column, then name and terms (newest first) as plain text rows */
.course-list { display: flex; flex-direction: column; }
.course-entry {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.course-entry:first-child { padding-top: 0.2rem; }
.course-entry:last-child { border-bottom: none; }
.course-code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.course-details { display: flex; flex-direction: column; gap: 0.45rem; }
.course-title { font-size: 1.05rem; font-weight: 500; color: var(--text-primary); line-height: 1.4; }
.course-terms { display: flex; flex-wrap: wrap; align-items: baseline; font-size: 0.92rem; color: var(--text-muted); }
.course-sep { margin: 0 0.55rem; color: var(--text-faint); }
.course-term {
  position: relative;
  font-variant-numeric: tabular-nums;
  cursor: default;
  outline: none;
  border-bottom: 1px dotted transparent;
  transition: color 0.12s, border-color 0.12s;
}
.course-term:not(.course-term--plain):hover,
.course-term:not(.course-term--plain):focus-visible { color: var(--text-primary); border-bottom-color: var(--text-faint); }

/* Who taught the term: small popover, same look as the other tooltips */
.course-term-pop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: max-content;
  max-width: 300px;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-body);
  white-space: normal;
}
.course-term:hover .course-term-pop,
.course-term:focus .course-term-pop { display: flex; }
.course-pop-row { display: flex; flex-direction: column; }
.course-role { font-size: 0.78rem; color: var(--text-faint); }
@media (max-width: 540px) {
  .course-entry { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ── 18. Publications page ── */

/* ── Publications page ── */

.pub-section { margin-bottom: 0; }
.pub-section--spaced { margin-top: 3rem; }

/* Two-column layout: label left, content right */
.pub-section--two-col {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0 3rem;
  align-items: start;
}

.pub-col-label {
  position: sticky;
  top: 4rem;
  padding-top: 0.2rem;
}

.pub-section-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #2b2b2b;
  display: block;
}

/* Preprints toggle button */
.pub-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
}

.pub-toggle-btn:hover .pub-section-heading { color: var(--purple); }

.pub-toggle-chevron {
  font-size: 0.6rem;
  color: var(--text-faint);
  transition: transform 0.2s;
  display: inline-block;
}

.pub-toggle-btn[aria-expanded="true"] .pub-toggle-chevron {
  transform: rotate(90deg);
}

/* Label-column hint */
.pub-expand-hint {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
  display: block;
  padding-top: 0.2rem;
}

.pub-collapsible { display: none; }

.pub-toggle-btn[aria-expanded="true"] + .pub-expand-hint { display: none; }
#preprints-body.is-open .pub-collapsible { display: block; }

/* Featured grid */
.pub-featured { margin-bottom: 1rem; }

.pub-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.pub-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 2px solid var(--purple);
  border-radius: 4px;
  padding: 1.1rem 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: box-shadow 0.15s, border-left-color 0.15s;
}

.pub-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
}

.pub-card-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

.pub-card-title a { color: var(--text-primary); font-weight: 500; }
.pub-card-title a:hover { color: var(--text-primary); font-weight: 500; }

.pub-card-authors {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.pub-card-venue {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pub-card-links {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Year groups */
.pub-year-group + .pub-year-group { margin-top: 0; }

.pub-year-heading {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

.pub-year-group:first-child .pub-year-heading {
  border-top: none;
  padding-top: 0.75rem;
}

/* Entry list */
.pub-list {
  display: flex;
  flex-direction: column;
}

.pub-entry {
  padding: 1.1rem 0 1.1rem 0.9rem;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  transition: border-left-color 0.15s;
}

.pub-entry:last-child { border-bottom: none; }

.pub-section--preprint .pub-entry { border-left-color: var(--border); }

.pub-entry:hover,
.pub-section--preprint .pub-entry:hover {
  border-left-color: var(--purple);
}

.pub-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.pub-title a { color: var(--text-primary); font-weight: 500; }
.pub-title a:hover { color: var(--text-primary); font-weight: 500; }

.pub-authors {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.pub-author-ul {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a.pub-author-ul:hover { color: var(--text-primary); text-decoration-color: var(--purple); }

.pub-venue {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.venue-name { color: var(--purple); font-weight: 500; }

.pub-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  align-items: center;
  position: relative;
}

.pub-link {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: color 0.12s, border-color 0.12s;
}

.pub-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  font-weight: 400;
}

.pub-note {
  font-size: 1rem;
  font-weight: 600;
  color: #b8860b;
  margin: 0.2rem 0 0;
}

/* BibTeX cite box */
.pub-cite { display: inline-block; position: relative; }

.pub-cite > summary {
  list-style: none;
  cursor: pointer;
}

.pub-cite > summary::-webkit-details-marker { display: none; }

.pub-cite-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.1rem 1.25rem;
  width: max-content;
  max-width: min(480px, 90vw);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pub-cite-box:hover {
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 2px 12px rgba(224,82,106,0.07);
}

.pub-cite-pre {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
}

.pub-cite-toast {
  position: absolute;
  bottom: 0.65rem;
  right: 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--purple);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.pub-cite-toast--show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .pub-featured-grid { grid-template-columns: 1fr; }
  .pub-section--two-col { grid-template-columns: 1fr; }
  .pub-col-label { position: static; margin-bottom: 0.75rem; }
  .act-section--two-col { grid-template-columns: 1fr; }
  .act-col-label { position: static; margin-bottom: 0.75rem; }
}

/* ── 404 page ── */

.notfound-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 1rem 3rem;
  gap: 0;
}

.notfound-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8%;
  margin-bottom: 2rem;
  filter: grayscale(15%);
}

.notfound-heading {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.notfound-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-faint);
  margin: 0 0 2rem;
}

.notfound-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--purple);
  letter-spacing: 0.01em;
}

/* ── Full news page ── */
.news-page { width: 100%; }
.news-year { margin-top: 2rem; }
.back-link {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.back-link:hover { color: var(--purple); }
.back-link--bottom { margin-top: 2.5rem; }

/* Navigation, buttons and titles are not inline text links: no underline, no fill */
.site-logo, .nav-menu li a, .pub-link, .pub-title a, .pub-card-title a,
.person-social a, .docsite-pagenav a { text-decoration: none; }
.site-logo:hover, .nav-menu li a:hover, .person-social a:hover { background: none; }
.docsite a:hover { background: none; }

/* ── Research areas: tags on papers, filter on the Publications page ── */
/* Area label after the venue: "EMNLP 2026 · ● Inclusive" */
.pub-venue { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6rem; }
.area-tag {
  display: inline-flex; align-items: baseline; gap: 0.35em;
  font-size: 0.85rem; font-weight: 400; color: var(--text-muted);
}
.area-tag::before {
  content: ''; width: 0.45em; height: 0.45em; border-radius: 50%;
  transform: translateY(-0.08em);
}
.area-tag.area-foundational::before { background: var(--logo-teal); }
.area-tag.area-applied::before      { background: #E3C21A; }
.area-tag.area-inclusive::before    { background: var(--logo-coral); }

/* Publications page header: title on the left, area tabs on the right; pinned under the navbar */
.pub-toolbar {
  position: sticky;
  top: calc(var(--nav-height) + 2px);
  z-index: 20;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 0.35rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}
.area-tabs { display: flex; flex-wrap: wrap; gap: 0 1.6rem; }
.area-tab {
  font: inherit; font-size: 0.98rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.45em;
  background: none; border: none; color: var(--text-muted);
  padding: 0.6rem 0 0.7rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.area-tab:hover { color: var(--text-primary); }
.area-tab[aria-pressed="true"] { color: var(--text-primary); font-weight: 500; border-bottom-color: var(--purple); }
.area-tab.area-foundational[aria-pressed="true"] { border-bottom-color: var(--logo-teal); }
.area-tab.area-applied[aria-pressed="true"]      { border-bottom-color: var(--logo-yellow); }
.area-tab.area-inclusive[aria-pressed="true"]    { border-bottom-color: var(--logo-coral); }
.area-dot { width: 0.5em; height: 0.5em; border-radius: 50%; }
.area-foundational .area-dot { background: var(--logo-teal); }
.area-applied .area-dot      { background: #E3C21A; }
.area-inclusive .area-dot    { background: var(--logo-coral); }
.area-count { font-size: 0.78em; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.area-blurb { margin: 0.9rem 0 0; font-size: 0.98rem; color: var(--text-muted); }

/* the toolbar is pinned, so section labels stick below it */
.pub-col-label { top: calc(var(--nav-height) + 5rem); }

.pub-entry[hidden], .pub-year-group[hidden] { display: none; }

.person-social .lucide { display: block; }
.pub-toolbar ~ .pub-section:not(.pub-section--spaced) { margin-top: 2rem; }
@media (max-width: 640px) {
  .pub-toolbar { position: static; }
  .area-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 0 1.1rem; scrollbar-width: none; }
  .area-tab { white-space: nowrap; font-size: 0.92rem; }
}

/* Screen-reader-only text (page titles are hidden; the navbar shows where you are) */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Sub-page trail: "People / Past Members" */
.page-trail { font-size: 0.95rem; color: var(--text-muted); margin: 0.25rem 0 1.75rem; }
.page-trail a { color: var(--text-muted); }
.page-trail-sep { margin: 0 0.5rem; color: var(--text-faint); }
.page-trail [aria-current] { color: var(--text-primary); font-weight: 500; }

/* Publications search */
.pub-search {
  display: flex; align-items: center; gap: 0.45rem;
  margin-bottom: 0.45rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-faint);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.pub-search:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px var(--tint-purple); }
.pub-search input {
  border: none; outline: none; background: none;
  font-size: 0.92rem; color: var(--text-body); width: 15rem;
}
.pub-search input::placeholder { color: var(--text-faint); }
.pub-empty { margin: 2rem 0; color: var(--text-muted); }
@media (max-width: 640px) {
  .pub-search { width: 100%; }
  .pub-search input { width: 100%; }
}

/* Home page sections are linkable (#news, #publications, #join, #funding, #photos);
   keep the heading clear of the sticky navbar when jumping to one */
.home-news, .home-selected-pubs, .home-join, .home-funding, .photo-galleries {
  scroll-margin-top: calc(var(--nav-height) + 1.25rem);
}
.hero-join { color: var(--text-muted); }
.hero-join a { font-weight: 500; }

/* ── Home: In the Media ── */
.home-media { width: 100%; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--nav-height) + 1.25rem); }
.media-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem 2rem;
}
.media-item { display: block; padding-top: 0.9rem; border-top: 2px solid var(--text-primary); }
/* headline stays inline so the hover highlight hugs each line of text */
.media-outlet, .media-date { display: block; }
.media-outlet { margin-bottom: 0.3rem; }
.media-date { margin-top: 0.3rem; }
.media-item[hidden] { display: none; }
.media-outlet { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.media-title { font-size: 0.95rem; line-height: 1.5; color: var(--text-body); }
.media-date { font-size: 0.82rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.media-toggle {
  font: inherit; font-size: 0.95rem; background: none; border: none; padding: 0; cursor: pointer;
  color: var(--purple); text-decoration: underline; text-decoration-color: var(--link-ul);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.media-toggle:hover { background: var(--hl-bg); color: var(--text-primary); }
