/* ── Filter ──────────────────────────────────────────────────────────── */
.publications-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #d7dee7;
}

.publications-filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
}

.publications-select {
  appearance: none;
  min-width: 16rem;
  padding: 0.6rem 2.25rem 0.6rem 0.85rem;
  font: inherit;
  font-size: 0.9375rem;
  color: #0B2545;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%230B2545' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  border: 1px solid #c6d0dc;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.publications-select:hover {
  border-color: #0B2545;
}

.publications-select:focus-visible {
  outline: none;
  border-color: #0B2545;
  box-shadow: 0 0 0 3px rgba(11, 37, 69, 0.15);
}

.publications-count {
  margin: 0;
  margin-left: auto;          /* pushes count to the right edge */
  font-size: 0.875rem;
  color: white;
}

@media (max-width: 640px) {
  .publications-select { width: 100%; min-width: 0; }
  .publications-count { margin-left: 0; }
}

/* ── Pager (matched to tab styling) ──────────────────────────────────── */
.publications-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 1.5rem 0 0;
}
.publications-page {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.5rem 0.85rem;
  font: inherit;
  color: white;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.publications-page:hover:not(:disabled):not(.is-current) {
  color: #000;
}
.publications-page.is-current {
  color: #000;
  border-bottom-color: currentColor;
  font-weight: 600;
  cursor: default;
}
.publications-page:disabled {
  opacity: 0.35;
  cursor: default;
}
.publications-page:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}

.publication-title {
  min-width: 0;                 /* allows the flex item to shrink so ellipsis works */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* When the row is expanded, show the full (possibly multi-line) title. */
.publication-toggle[aria-expanded="true"] .publication-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Hidden until JS renders the interactive list. */
.publications:not(.is-ready) .view-content {
  visibility: hidden;
}
/* Reserve the height so the page doesn't jump when content appears. */
.publications .view-content {
  min-height: calc(10 * 2.5rem);
}

:root {
  --pub-accent: #0B2545;      /* swap for your brand teal/blue */
  --pub-accent-dark: #071b33;
}

.publication-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-bottom: 0.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pub-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.publication-link:hover,
.publication-link:focus-visible {
  color: var(--pub-accent-dark);
  border-bottom-color: currentColor;
}

.publication-link:focus-visible {
  outline: 2px solid var(--pub-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.publication-link-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.18s ease;
}

.publication-link:hover .publication-link-arrow,
.publication-link:focus-visible .publication-link-arrow {
  transform: translateX(3px);
}

.publication-year, .citation{
  font-style: italic;
}

.citation {
  margin: 1rem 0;
}
