@import url('https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,400;0,500;0,600;0,700;1,600;1,700&family=Open+Sans:wght@400;500;600&display=swap');

/* Design tokens (:root) live in tokens.css and the shared top nav lives in
   site-header.css — both are also loaded by the Kubio homepage, which cannot
   load this file. See CLAUDE.md "Two design systems".
   Load order: tokens.css -> site-header.css -> styles.css. */

* { box-sizing: border-box; }
/* min-height, not height: a fixed `height:100%` caps the <body> box at one
   viewport, which silently broke `position:sticky` on .site-header — it could
   only stick while the body box was on screen, then scrolled away. */
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .875em;
  background: var(--navy-lt);
  color: var(--teal);
  padding: .1rem .32rem;
  border-radius: 4px;
  border: 1px solid #c5dff0;
}

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

.muted  { color: var(--muted); }
.tiny   { font-size: .875rem; }
.center { display: flex; justify-content: center; padding-top: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--navy); color: #fff;
  padding: 10px 14px; border-radius: 6px;
}
.skip-link:focus { left: 12px; z-index: 1000; }

/* ── HERO ────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy-dk) 0%, var(--navy) 50%, var(--teal) 100%);
  padding: 64px 0 52px;
  position: relative;
  overflow: hidden;
}
/* Subtle diagonal texture overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 60px,
    rgba(255,255,255,.02) 60px,
    rgba(255,255,255,.02) 61px
  );
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: stretch;
  position: relative;
}

.hero-copy {
  padding: 32px 36px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
}
.eyebrow {
  margin: 0 0 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold);
}
.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}
.lead {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 22px;
  color: rgba(255,255,255,.82);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.stat {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}
.stat-num   { font-family: var(--font-head); font-weight: 700; color: var(--gold); font-size: .95rem; }
.stat-label { color: rgba(255,255,255,.72); font-size: .82rem; margin-top: 2px; }

.hero-card {
  border-radius: var(--radius2);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-card-top h2 {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--navy);
}
.hero-card-top .muted { font-size: .875rem; }
.hero-card-bottom {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ── SECTIONS ────────────────────────────── */
.section { padding: 52px 0; }
.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.65rem;
  color: var(--navy);
}

/* ── CARDS ───────────────────────────────── */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  transition: box-shadow .18s, transform .18s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card h3, .card h2 {
  font-family: var(--font-head);
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--navy);
}
.h3 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; }

.badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--navy-lt);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid #c5dff0;
}

.notice {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #fffbeb;
  border-left: 4px solid var(--gold);
}
.notice strong { color: var(--navy); font-family: var(--font-head); }

.list {
  margin: 10px 0 0;
  padding-left: 18px;
}
.list li { margin-bottom: 5px; }
.list a { color: var(--teal); font-size: .95rem; }
.list a:hover { color: var(--navy); }

/* ── EVENTS ──────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.event .event-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.event-top { margin-bottom: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--navy-lt);
  border: 1px solid #c5dff0;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  width: fit-content;
  margin-bottom: 8px;
}
.next-event h3 { margin: 0 0 6px; }

/* ── BUTTONS ─────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 7px;
  border: 2px solid transparent;
  background: var(--surface);
  color: var(--navy);
  border-color: var(--navy);
  text-decoration: none !important;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s, color .15s;
}
.button:hover {
  background: var(--navy-lt);
  text-decoration: none;
}
.button.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy-dk);
}
.button.primary:hover {
  background: var(--navy-dk);
  border-color: var(--navy-dk);
}
/* Gold "hero" CTA */
.hero .button.primary {
  background: var(--gold);
  color: #1a1a1a;
  border-color: var(--gold-dk);
}
.hero .button.primary:hover {
  background: var(--gold-dk);
  border-color: var(--gold-dk);
}
.button.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.button.secondary:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}
/* secondary outside hero stays navy-outlined */
.section .button.secondary,
.hero-card .button.secondary,
.hero-card-bottom a {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--navy);
}
.section .button.secondary:hover,
.hero-card .button.secondary:hover,
.hero-card-bottom a:hover {
  background: var(--navy-lt);
}
.button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.button.small { padding: 8px 14px; font-size: .875rem; }

/* ── PAGE INNER ──────────────────────────── */
.page-hero {
  padding: 44px 0 26px;
  background: linear-gradient(135deg, var(--navy-dk) 0%, var(--teal) 100%);
  border-bottom: 1px solid var(--navy-dk);
}
.page-hero h1 {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  color: #fff;
}
.page-hero .lead { color: rgba(255,255,255,.78); margin: 0; }
.page { min-height: 65vh; }

/* ── FORMS ───────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 14px 0 16px;
}
.field label {
  display: block;
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: .925rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,77,128,.1);
}
.field textarea { resize: vertical; }
.field.full { grid-column: 1 / -1; }

.toolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .field { min-width: 220px; }

/* ── RESOURCE GRID ───────────────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 920px) {
  .hero-grid     { grid-template-columns: 1fr; }
  .hero-stats    { grid-template-columns: repeat(2, 1fr); }
  .cards-3       { grid-template-columns: repeat(2, 1fr); }
  .events-grid   { grid-template-columns: repeat(2, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid     { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .cards-3       { grid-template-columns: 1fr; }
  .events-grid   { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .hero-stats    { grid-template-columns: 1fr; }
  .form-grid     { grid-template-columns: 1fr; }
}


/* ============================================================
   Page-specific styles (moved out of inline <style> blocks
   during the Jekyll migration; selectors are unique per page)
   ============================================================ */

/* ----- conferences ----- */
.conf-card {
  border-radius: var(--radius2);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 28px;
  align-items: start;
  transition: box-shadow .18s, transform .18s;
}
.conf-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
@media (max-width: 640px) { .conf-card { grid-template-columns: 1fr; } }

.conf-list { display: grid; gap: 16px; }

.conf-date {
  text-align: right;
  min-width: 110px;
}
@media (max-width: 640px) { .conf-date { text-align: left; } }

.conf-month {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.conf-day {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.conf-year {
  font-family: var(--font-head);
  font-size: .82rem;
  color: var(--muted);
}
.conf-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}
.conf-meta {
  font-size: .875rem;
  color: var(--muted);
  margin: 0 0 10px;
}
.conf-desc { font-size: .9rem; margin: 0 0 14px; line-height: 1.65; }
.conf-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ----- core-team ----- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 920px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .18s, transform .18s;
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}
.team-avatar.teal  { background: var(--teal); }
.team-avatar.gold  { background: var(--gold); color: #1a1a1a; }
.team-avatar.green { background: #1a6b2a; }

.team-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0;
}
.team-role {
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.team-bio { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.6; }
.team-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.team-links a {
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}
.team-links a:hover { color: var(--navy); text-decoration: underline; }

/* ----- dictac ----- */
/* search */
.dic-tools { margin-bottom: 26px; }
.dic-search {
  width: 100%;
  max-width: 460px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.dic-search:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,77,128,.1);
}
.dic-count { font-size: .875rem; color: var(--muted); margin: 8px 2px 0; }

/* glossary grid */
.dic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .dic-grid { grid-template-columns: 1fr; } }

.dic-term {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  transition: box-shadow .18s, transform .18s;
}
.dic-term:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.dic-name {
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.dic-tac { color: var(--teal); }
.dic-expand {
  display: block;
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  margin: 3px 0 10px;
}
.dic-def { margin: 0; font-size: .925rem; line-height: 1.6; }
.dic-def + .dic-def { margin-top: 8px; }
.dic-ref { display: inline-block; margin-top: 6px; font-size: .8rem; color: var(--teal, #0077a8); text-decoration: none; margin-right: 8px; }
.dic-ref:hover { text-decoration: underline; }

.dic-empty {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px dashed var(--line);
  color: var(--muted);
}

/* ----- meetups ----- */
.meetup-list { display: grid; gap: 14px; }

.meetup-row {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 8px 20px;
  align-items: center;
  transition: box-shadow .18s, transform .18s;
}
.meetup-row:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
@media (max-width: 640px) {
  .meetup-row { grid-template-columns: 1fr; }
  .meetup-row-date { display: flex; gap: 6px; align-items: baseline; }
}

.meetup-row-date {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 20px;
}
@media (max-width: 640px) {
  .meetup-row-date { border-right: none; padding-right: 0; text-align: left; }
}

.mr-month {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.mr-day {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.mr-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 3px;
}
.mr-meta { font-size: .85rem; color: var(--muted); margin: 0; }
.mr-action { white-space: nowrap; }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 920px) { .chapter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .chapter-grid { grid-template-columns: 1fr; } }

/* ----- photo-gallery ----- */
.gallery-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 920px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .photo-grid { grid-template-columns: 1fr; } }

.photo-tile {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s;
  cursor: pointer;
}
.photo-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Real winner photos: show the full image (never crop). Landscape shots fill
   the tile edge-to-edge; very tall portraits are capped so card heights stay
   reasonable, with the tile surface matting the sides. */
.photo-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  background: var(--surface);
}
.photo-tile.wide .photo-img { max-height: none; }

.photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
}
.photo-placeholder .ph-icon {
  font-size: 2rem;
  opacity: .4;
}
.photo-placeholder .ph-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .5;
}

/* Color per album */
.ph-annual    { background: linear-gradient(135deg, #e8f2f9 0%, #c5dff0 100%); color: var(--navy); }
.ph-workshop  { background: linear-gradient(135deg, #e6f7f0 0%, #b3e8d2 100%); color: #1a6b2a; }
.ph-meetup    { background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%); color: #7a5800; }
.ph-virtual   { background: linear-gradient(135deg, #f3e8ff 0%, #d4a8ff 100%); color: #5b21b6; }

.photo-caption {
  padding: 12px 14px;
}
.photo-caption strong {
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
  margin-bottom: 2px;
}
.photo-caption span {
  font-size: .8rem;
  color: var(--muted);
}

.photo-tile.wide { grid-column: span 2; }
.photo-tile.wide .photo-placeholder { aspect-ratio: 8/3; }
@media (max-width: 920px) { .photo-tile.wide { grid-column: span 1; } .photo-tile.wide .photo-placeholder { aspect-ratio: 4/3; } }

/* ----- publications ----- */
/* Each card is outlined in its category colour. A category supplies three
   values: --pc (the accent/outline), --pcd (a text-safe dark variant, ≥4.5:1
   on white and on the tint) and --pcl (the tint used behind chips). They are
   set on [data-cat] so every descendant can just reference var(--pc). */
.pub-card[data-cat~="degraders"],
.pub-filter-btn[data-cat="degraders"] { --pc: #0a4f80; --pcd: #00426b; --pcl: #e6f1f8; }
.pub-card[data-cat~="induced-proximity"],
.pub-filter-btn[data-cat="induced-proximity"] { --pc: #12916a; --pcd: #0a6b4e; --pcl: #e4f5ef; }
.pub-card[data-cat~="stabilizers"],
.pub-filter-btn[data-cat="stabilizers"] { --pc: #0d97a8; --pcd: #0a6b76; --pcl: #e2f4f6; }
.pub-card[data-cat~="novel-e3s"],
.pub-filter-btn[data-cat="novel-e3s"] { --pc: #d1660f; --pcd: #9a4a06; --pcl: #fdefe2; }
.pub-card[data-cat~="structural"],
.pub-filter-btn[data-cat="structural"] { --pc: #c99a00; --pcd: #856400; --pcl: #fbf3dc; }
.pub-card[data-cat~="clinical"],
.pub-filter-btn[data-cat="clinical"] { --pc: #b3243c; --pcd: #8c1a2e; --pcl: #fbe9ec; }

/* toolbar: search + category filter */
.pub-tools { margin-bottom: 26px; }

.pub-search-wrap { position: relative; }
.pub-search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.pub-search {
  width: 100%;
  padding: 13px 16px 13px 46px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.pub-search:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 77, 128, .14);
}

.pub-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.pub-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pub-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pc, var(--muted));
  flex: none;
}
.pub-filter-btn:hover {
  border-color: var(--pc, var(--navy));
  color: var(--pcd, var(--navy));
}
.pub-filter-btn[aria-pressed="true"] {
  background: var(--pc, var(--navy));
  border-color: var(--pc, var(--navy));
  color: #fff;
}
.pub-filter-btn[aria-pressed="true"] .pub-dot { background: #fff; }

.pub-count { font-size: .875rem; color: var(--muted); margin: 14px 2px 0; }

/* the list */
.pub-list { display: grid; gap: 16px; }

.pub-card {
  position: relative;
  border-radius: var(--radius2);
  background: var(--surface);
  border: 1px solid var(--pc);
  border-left-width: 5px;
  box-shadow: var(--shadow-sm);
  padding: 22px 26px 24px;
  transition: box-shadow .18s, transform .18s;
}
.pub-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pub-card[hidden] { display: none; }

.pub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.pub-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pub-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--pcl);
  border: 1px solid var(--pc);
  color: var(--pcd);
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
/* a card in two categories tints its second chip with that category's colour */
.pub-chip[data-chip="degraders"]         { --pc: #0a4f80; --pcd: #00426b; --pcl: #e6f1f8; }
.pub-chip[data-chip="induced-proximity"] { --pc: #12916a; --pcd: #0a6b4e; --pcl: #e4f5ef; }
.pub-chip[data-chip="stabilizers"]       { --pc: #0d97a8; --pcd: #0a6b76; --pcl: #e2f4f6; }
.pub-chip[data-chip="novel-e3s"]         { --pc: #d1660f; --pcd: #9a4a06; --pcl: #fdefe2; }
.pub-chip[data-chip="structural"]        { --pc: #c99a00; --pcd: #856400; --pcl: #fbf3dc; }
.pub-chip[data-chip="clinical"]          { --pc: #b3243c; --pcd: #8c1a2e; --pcl: #fbe9ec; }

.pub-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--pc);
  background: var(--surface);
  color: var(--pcd);
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.pub-link:hover,
.pub-link:focus-visible { background: var(--pc); color: #fff; }
.pub-link svg { flex: none; }

.pub-title {
  font-family: var(--font-head);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin: 0 0 6px;
}
.pub-authors {
  font-size: .9rem;
  color: var(--text);
  margin: 0 0 4px;
}
.pub-affil { color: var(--muted); }
.pub-source {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 16px;
}
.pub-journal { font-style: italic; }
.pub-source svg { flex: none; opacity: .8; }

.pub-notes { display: grid; gap: 12px; margin: 0 0 16px; }
.pub-note-k {
  display: block;
  font-family: var(--font-head);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.pub-note-v { margin: 0; font-size: .92rem; line-height: 1.6; }

.pub-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pub-tags li {
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
}

.pub-empty {
  margin: 28px 0 0;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  .pub-card { padding: 20px; }
  /* keep the chip/button row intact — they still fit side by side; only wrap
     when a card carries two categories or two links */
  .pub-head { flex-wrap: wrap; }
  .pub-link { padding: 6px 12px; }
}

/* ------------------------------------------------------------------ */
/* Shared image viewer (lightbox) — enhances .photo-tile via           */
/* assets/js/lightbox.js on photo-gallery.html and scholarship.html.   */
/* ------------------------------------------------------------------ */

/* Keyboard focus affordance for the now-clickable tiles */
.photo-tile:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
/* Zoom hint badge on the image (tile made clickable by JS) */
.js-lightbox .photo-tile { position: relative; }
.js-lightbox .photo-tile .photo-img { transition: transform .25s ease; }
.js-lightbox .photo-tile:hover .photo-img,
.js-lightbox .photo-tile:focus-visible .photo-img { transform: scale(1.02); }
.js-lightbox .photo-tile::after {
  content: "\2922"; /* diagonal expand arrows */
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #fff;
  background: rgba(0, 53, 96, .72);
  border-radius: 50%;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.js-lightbox .photo-tile:hover::after,
.js-lightbox .photo-tile:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

/* Lock background scroll while the viewer is open */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(0, 20, 40, .88);
  backdrop-filter: blur(3px);
  animation: lightbox-fade .18s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  background: #fff;
}
.lightbox-caption {
  max-width: 62ch;
  text-align: center;
  color: #f2f4f7;
  font-family: var(--font-head);
  font-size: .95rem;
  line-height: 1.4;
}
.lightbox-caption strong {
  display: block;
  font-weight: 700;
  color: #fff;
}
.lightbox-caption span { color: #c7d2dc; font-size: .85rem; }
.lightbox-caption[hidden] { display: none; }

/* Controls */
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .15s ease, transform .15s ease;
  line-height: 1;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
}
.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-nav[hidden] { display: none; }

.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #d6dee6;
  font-size: .8rem;
  letter-spacing: .04em;
  background: rgba(0, 0, 0, .35);
  padding: 4px 12px;
  border-radius: 999px;
}
.lightbox-counter[hidden] { display: none; }

@media (max-width: 640px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-img { max-height: 72vh; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox { animation: none; }
  .js-lightbox .photo-tile .photo-img,
  .js-lightbox .photo-tile::after,
  .lightbox-close,
  .lightbox-nav { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════ */
/* Shared sort control — enhances any list via assets/js/sort.js.      */
/* Used by publications, conferences, photo-gallery, core-team,        */
/* scholarship and dictac. Hidden until the script runs, so a no-JS    */
/* visitor never meets a dead control (the authored markup order is    */
/* already the sensible default everywhere).                           */
/* ═══════════════════════════════════════════════════════════════════ */
.sort-bar { display: none; }
.js-sort .sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.sort-bar--end { justify-content: flex-end; }

.sort-label {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.sort-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 38px 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.sort-select:hover { border-color: var(--navy); }
.sort-select:focus-visible {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 77, 128, .14);
}
.sort-caret {
  position: absolute;
  right: 14px;
  color: var(--muted);
  pointer-events: none;
}

/* Where the bar shares a row with an existing heading or status line. */
.section-head .sort-bar { align-self: center; margin-bottom: 0; }

/* publications — count on the left, sort on the right */
.pub-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.pub-meta .pub-count { margin-top: 0; }
.pub-meta .sort-bar { margin-bottom: 0; }

/* dictac — same pattern under the search box */
.dic-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.dic-meta .dic-count { margin-top: 0; }
.dic-meta .sort-bar { margin-bottom: 0; }

/* photo-gallery — sort sits beside the filter tabs */
.gallery-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.gallery-tools .gallery-filter { margin-bottom: 0; }
.gallery-tools .sort-bar { margin-bottom: 0; }

/* Narrow screens: give the bar its own row (so it wraps below the count or
   filter tabs) but leave the select at its natural width. */
@media (max-width: 560px) {
  .js-sort .sort-bar { width: 100%; justify-content: flex-start; }
}
