/* ─────────────────────────────────────────────────────────────────────────
   publications.css — page-local styles for /publications.html ONLY.

   This file is intentionally narrow: it carries the filter bar, the
   publication list / venue tiles / citation badges, the metrics stamp,
   the RSS subscribe pill, and the small homepage-pub-list helpers
   (.pub-item, .cite-panel*, .pub-abstract, .pub-links svg sizing) used by
   /index.html. Every other concern — typography, body, links, the
   <header class="nav">, <footer class="coda">, the dossier (.ldos-*)
   manifest header — is owned by styles.css.

   Past versions of this file redefined nav, body, .container, .btn,
   :root tokens, and the entire design system in parallel; that was
   ripped out during the publications-page dossier rebuild to stop the
   navbar from visually drifting on this page. If you need a global
   token, add it to styles.css's :root.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Page-local accents not present in the global token set. */
  --gold: #b45309;
  --gold-tint: #fef3c7;
  --gold-soft: #fde68a;
  --accent-soft: rgba(21, 128, 61, 0.22);
  --pubs-mono: ui-monospace, "JetBrains Mono", "SF Mono", Consolas, monospace;
}

/* ── FILTER BAR ───────────────────────────────────────── */
.pub-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
  padding: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.pf-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pf-label {
  font-family: var(--pubs-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  padding: 0 8px 0 6px;
  user-select: none;
}
.pf-div {
  width: 1px;
  height: 22px;
  background: var(--line-soft);
  margin: 0 6px;
}
.pub-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  font-family: inherit;
}
.pub-filter:hover { color: var(--ink); background: rgba(10,10,10,0.04); }
.pub-filter .pf-count {
  font-family: var(--pubs-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-faint);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
  min-width: 22px;
  text-align: center;
  transition: all .15s ease;
}
.pub-filter:hover .pf-count { color: var(--ink-mute); }
.pub-filter.active {
  background: var(--ink);
  color: #fff;
}
.pub-filter.active .pf-count {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: transparent;
}
.pub-filter.pf-award {
  color: var(--gold);
}
.pub-filter.pf-award i { width: 14px; height: 14px; color: var(--gold); }
.pub-filter.pf-award:hover { background: var(--gold-tint); color: var(--gold); }
.pub-filter.pf-award.active {
  background: var(--gold);
  color: #fff;
}
.pub-filter.pf-award.active i { color: #fff; }
.pub-filter.pf-award.active .pf-count { background: rgba(255,255,255,0.22); }
/* De-emphasized tail tags (magazine, preprints): muted until hovered/active. */
.pub-filter.pf-secondary {
  color: var(--ink-faint);
  border: 1px dashed var(--line-soft);
  background: transparent;
}
.pub-filter.pf-secondary:hover { color: var(--ink-mute); background: rgba(10,10,10,0.03); }
.pub-filter.pf-secondary.active {
  background: var(--ink-mute);
  color: #fff;
  border-style: solid;
  border-color: transparent;
}
.pub-filter.pf-secondary.active .pf-count { background: rgba(255,255,255,0.18); color: #fff; }
@media (max-width: 720px) {
  .pf-label { display: none; }
  .pf-div { margin: 0 2px; }
}

/* ── CATEGORY SECTIONS ───────────────────────────────── */
.pub-cat { display: flex; flex-direction: column; }
.pub-cat[hidden] { display: none; }
.pub-cat-head {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin: 0 0 6px;
}
.pub-cat-head b { color: var(--ink); font-weight: 700; }
.pub-cat-tail { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.pub-cat-head-muted { color: var(--ink-faint); }
.pub-cat-note {
  font-family: var(--pubs-mono);
  font-size: 0.66rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-faint);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid var(--line-soft);
  margin-left: 8px;
}

/* ── PUBLICATION LIST ────────────────────────────────── */
.pub-list {
  display: flex;
  flex-direction: column;
}
.pub-year-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 18px;
}
.pub-year-head:first-child { margin-top: 0; }
.pub-year-num {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.pub-year-line {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.pub-year-count {
  font-family: var(--pubs-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  background: var(--bg-soft);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
}
.pub {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.pub:first-of-type { border-top: none; padding-top: 8px; }
.pub-venue-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.venue {
  display: inline-flex;
  align-items: center;
  font-family: var(--pubs-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid;
}
.venue.icse    { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.venue.fse     { background: #fdf4ff; color: #a21caf; border-color: #f5d0fe; }
.venue.ase     { background: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-soft); }
.venue.msr     { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.venue.icpc    { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.venue.icsme   { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.venue.saner   { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.venue.tse     { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.venue.tosem   { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.venue.emse    { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.venue.jss     { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.venue.icssp   { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.venue.forge   { background: #f0fdfa; color: #0d9488; border-color: #99f6e4; }
.venue.aisdlc  { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.venue.se2030  { background: #f5f5f4; color: #57534e; border-color: #e7e5e4; }
.venue.ieeec   { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.venue.ease    { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.venue.icail   { background: #fefce8; color: #854d0e; border-color: #fde68a; }
.venue.nl4ai   { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.pub-year {
  font-family: var(--pubs-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-weight: 500;
}
.pub-content { min-width: 0; }
.pub-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.pub-authors {
  font-size: 0.88rem;
  color: var(--ink-mute);
  line-height: 1.55;
  margin: 0 0 10px;
}
.pub-authors b { color: var(--ink); font-weight: 600; background: var(--accent-tint); padding: 0 3px; border-radius: 2px; }
.pub-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.pub-meta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-mute);
  font-weight: 500;
}
.pub-meta a:hover { color: var(--accent-deep); text-decoration: none; }
.pub-meta i { width: 13px; height: 13px; }
.pub-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pub-award {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-tint);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--gold-soft);
}
.pub-award i { width: 12px; height: 12px; }
.pub-cite {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-tint);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--accent-soft);
  font-family: var(--pubs-mono);
}
.pub-cite i { width: 11px; height: 11px; }

/* ── METRICS / VERIFICATION META-ROW ─────────────────── */
.pub-verified {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--pubs-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
  padding: 4px 0;
}
.pub-verified i { width: 13px; height: 13px; color: var(--accent-deep); }

.metrics-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pubs-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
  padding: 4px 0;
}
.metrics-stamp i { width: 12px; height: 12px; color: var(--accent-deep); }

.pub-feed-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pubs-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s ease;
}
.pub-feed-link:hover { color: var(--accent); text-decoration: none; }
.pub-feed-link i { width: 13px; height: 13px; }

/* Container for the verification + metrics + RSS meta-row */
.pubs-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 12px 0 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 22px;
}
.pubs-meta-row .meta-sep {
  width: 1px;
  height: 14px;
  background: var(--line-soft);
}
.pubs-visible-line {
  font-family: var(--pubs-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.pubs-visible-line b { color: var(--ink); font-weight: 600; }

/* ── VENUE LOGO PILLS ────────────────────────────────── */
.venue-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f5ef;
  border: 1px solid rgba(15, 23, 19, 0.10);
  border-radius: 8px;
  padding: 6px 12px;
  height: 36px;
  min-width: 64px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 19, 0.04);
}
.venue-logo-wrap:hover {
  border-color: rgba(15, 23, 19, 0.22);
  background: #fff;
}
.venue-logo-wrap img {
  display: block;
  height: 22px;
  width: auto;
  max-width: 84px;
}
/* arXiv: the SVG is already a self-contained red pill with the wordmark,
   so the wrapper stays transparent and just frames + rounds it (no second
   red box, no stretch-to-fill that clipped the logo). */
.venue-logo-wrap.is-arxiv {
  background: transparent;
  border: none;
  padding: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: none;
}
.venue-logo-wrap.is-arxiv:hover {
  background: transparent;
  border: none;
}
.venue-logo-wrap.is-arxiv img {
  height: 30px;
  width: auto;
  max-width: none;
  padding: 0;
  display: block;
  border-radius: 6px;
}
.pub-venue-col .venue-sub {
  font-family: var(--pubs-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ── HOMEPAGE RECENT-PUBLICATIONS WIDGET ─────────────── */
/* These rules drive the .pub-item cards on /index.html (Abstract / Cite
   toggles, expandable bibtex panel, Copy button). They were lost during
   the multi-page restructure and recovered from commit 9ccf84b. */

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.pub-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pub-item:last-child { border-bottom: none; }

.pub-year-label {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* Generic IEEE-Computer venue pill used on the homepage list. */
.venue-ieee-computer {
  background: #1d4ed8;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--pubs-mono);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.pub-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}
.pub-links a,
.pub-links button {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-deep);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pub-links a:hover,
.pub-links button:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}
.pub-links svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.abstract-chevron { transition: transform 0.2s ease; }
.abstract-toggle-btn.open .abstract-chevron { transform: rotate(180deg); }

.cite-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  margin-top: 0;
}
.cite-panel.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 10px;
}
.cite-panel-inner {
  border-left: 2px solid var(--accent-deep);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--ink-mute);
  line-height: 1.6;
  background: var(--bg-soft);
  border-radius: 0 6px 6px 0;
}
.cite-panel-inner pre {
  margin: 0 0 8px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.cite-panel-inner code {
  font-family: var(--pubs-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.cite-panel-actions {
  display: flex;
  justify-content: flex-end;
}
.cite-copy-btn {
  background: var(--accent-deep);
  color: #fff;
  border: none;
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s ease;
}
.cite-copy-btn:hover { filter: brightness(0.92); }

.pub-abstract {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  margin-top: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.pub-abstract.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 10px;
}

/* ── ABSTRACT BUTTON + MODAL ─────────────────────────── */
.pub-abstract-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-mute);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 2px 9px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.pub-abstract-btn:hover { color: var(--accent-deep); border-color: var(--accent-soft); background: var(--accent-tint); }
.pub-abstract-btn i { width: 13px; height: 13px; }

.pub-modal[hidden] { display: none; }
.pub-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pub-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.46);
  backdrop-filter: blur(2px);
}
.pub-modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg, #fff);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(10, 10, 12, 0.28);
  padding: 28px 30px 30px;
  animation: pubModalIn 0.18s ease;
}
@keyframes pubModalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.pub-modal-x {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.pub-modal-x:hover { color: var(--ink); background: var(--bg-soft); }
.pub-modal-eyebrow {
  font-family: var(--pubs-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 0 0 8px;
}
.pub-modal-title {
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--ink);
  margin: 0 32px 6px 0;
}
.pub-modal-venue {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 0 0 16px;
}
.pub-modal-body {
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0;
  white-space: pre-line;
}
body.pub-modal-open { overflow: hidden; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 920px) {
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .pub-venue-col { flex-direction: row; align-items: center; }
}
