/* Publications page: profile links, type filters (pill style from blog-index.css), paper rows. */

.pub-intro {
  margin: 0 0 12px;
}

.pub-profiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 20px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-family: "Concourse T2", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

.pub-profiles li {
  margin: 0;
}

.pub-profiles a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--main-text-color);
}

.pub-profiles img {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  object-fit: contain;
}

/* The filters are buttons here; give them the look of the blog's link pills. */
.pub-filters button.blog-filter {
  background: none;
  cursor: pointer;
}

/* ---------- Papers ---------- */

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

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

.pub {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--panel-border-color);
}

.pub:last-child {
  border-bottom: 0;
}

.pub p {
  margin: 0;
}

.pub-title {
  font-family: "Concourse T6 Tab", "Concourse T4", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.pub-type {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border: 1px solid var(--accent-soft-border, var(--panel-border-color));
  border-radius: 999px;
  background: var(--accent-soft, transparent);
  color: var(--accent-text, var(--main-text-color));
  font-family: "Concourse T4", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 2px;
}

.pub-type--thesis,
.pub-type--other {
  background: transparent;
}

.pub-authors,
.pub-venue {
  margin-top: 4px !important;
  font-size: 17px;
  line-height: 1.45;
}

.pub-venue {
  color: var(--post-meta-index-color);
}

.pub-award {
  margin-top: 6px !important;
  font-family: "Concourse T4", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.pub-award .fa-award {
  margin-right: 4px;
  color: #b8860b;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.pub-links li {
  margin: 0;
}

/* `li a[href]` outranks main.css's per-URL icon rules, whose background icon is replaced by ::before below. */
/* Plain links with an icon (no button frame); the label is underlined on hover. */
.pub-links li a[href] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background-image: none;
  color: var(--main-text-color);
  font-family: "Concourse T4", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  text-decoration: none;
}

/* Icons: full-color logos use background-image; one-color logos use a mask filled with currentColor
   (or a brand color), so they stay visible in dark mode. Generic link icon is the fallback. */
.pub-links a::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url(/img/icons/link.svg) center / contain no-repeat;
  mask: url(/img/icons/link.svg) center / contain no-repeat;
}

.pub-links a[href^="https://github.com/"]::before {
  -webkit-mask-image: url(/img/icons/github.svg);
  mask-image: url(/img/icons/github.svg);
}

.pub-links a[href^="https://medium.com/"]::before {
  -webkit-mask-image: url(/img/icons/medium.svg);
  mask-image: url(/img/icons/medium.svg);
}

.pub-links a[href^="https://arxiv.org/"]::before {
  background: #b31b1b;
  -webkit-mask-image: url(/img/icons/academicons-1.9.4/svg/arxiv.svg);
  mask-image: url(/img/icons/academicons-1.9.4/svg/arxiv.svg);
}

.pub-links a[href*="doi.org/"]::before,
.pub-links a[href*="zenodo.org/"]::before {
  width: 18px;
  height: 18px;
  background: url(/img/icons/DOI_logo.svg) center / contain no-repeat;
  -webkit-mask: none;
  mask: none;
}

/* Files and videos: the same solid icons as the rest of the site. */
.pub-links a[href$=".pdf"]::before {
  -webkit-mask-image: url(/img/icons/solid/file-pdf.svg);
  mask-image: url(/img/icons/solid/file-pdf.svg);
}

.pub-links a:is([href$=".pptx"], [href^="https://docs.google.com/"])::before {
  -webkit-mask-image: url(/img/icons/solid/file-powerpoint.svg);
  mask-image: url(/img/icons/solid/file-powerpoint.svg);
}

.pub-links a[href^="https://youtu.be/"]::before {
  -webkit-mask-image: url(/img/icons/solid/youtube.svg);
  mask-image: url(/img/icons/solid/youtube.svg);
}

/* Zenodo records and Zenodo DOIs (10.5281/zenodo.*). */
.pub-links a[href*="zenodo.org/"]::before,
.pub-links a[href*="10.5281/zenodo"]::before {
  background-image: url(/img/icons/zenodo.svg);
}

.pub-links li a[href]:hover,
.pub-links li a[href]:focus-visible {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: currentColor;
}
