/* ==========================================================================
   publications.css
   Styles used only on the Publications page (select-papers/index.html).
   Reference style as on mehulbhatt.org: the name in bold, the title in
   italics, numbers in the left margin, links as small tags.
   The folding categories, buttons and Expand / Collapse All: components.css.
   ========================================================================== */

.publications {
  padding-top: .5rem;
}

.pub-intro {
  max-width: 44rem;
  margin: 0;
  font-size: var(--fs-sub);
  line-height: 1.5;
}

/* The four categories: boxes of one size, two per row, each leading to its category
   (as the years on the Initiatives page) */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;                 /* all boxes as tall as the tallest */
  gap: .6rem;
  max-width: 52rem;
  margin: 1.25rem 0 2.25rem;
  padding: 0;
  list-style: none;
}

.topic-grid li {
  display: flex;
}

.topic-jump {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  padding: .75rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  color: var(--timeline-year);
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.topic-jump:hover,
.topic-jump:focus-visible {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 560px) {
  .topic-jump {
    min-height: 4.75rem;
    padding: .6rem .75rem;
    font-size: .95rem;
  }
}

@media print {
  .topic-grid {
    display: none;
  }
}

/* the category's long heading, under its title */
.pub-heading {
  max-width: 52rem;
  margin: -.5rem 0 1.5rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Entries: a bulleted list, the bullets hanging in the margin (no numbers — Mehul, 7 October 2026)
   -------------------------------------------------------------------------- */

.pub-list {
  max-width: 52rem;
  margin: 0;
  padding-left: 1.4rem;
}

.pub-list li {
  padding: .65rem 0 .65rem .35rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.pub-list li::marker {
  color: var(--accent);
}

/* the title stands out from the rest of the reference, quietly: upright (not italic), same size and weight as the
   rest, in the brand green (Mehul, 7 October 2026) */
.pub-list i {
  font-style: normal;
  font-size: inherit;
  font-weight: inherit;
  color: var(--accent);
}

.pub-award {
  color: var(--accent) !important;
}

/* the note under an entry (e.g. the German edition) */
.pub-note {
  display: block;
  margin-top: .3rem;
  font-size: var(--fs-small);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Link tags: [PDF, DOI] shown as small uniform tags. The brackets and
   commas (.pub-punct) are hidden only on screen: they stay in the text for
   copying, screen readers and printing.
   -------------------------------------------------------------------------- */

.pub-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-left: .25rem;
  vertical-align: baseline;
}

.pub-links a,
.pub-bib-button {
  display: inline-block;
  padding: .05rem .6rem;
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.6;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--pill);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}


.pub-links a:hover,
.pub-links a:focus-visible,
.pub-bib-button:hover,
.pub-bib-button:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: var(--accent);
}

/* the BibTeX viewer: a card like the figure viewer (components.css section 8) */
.bib-viewer-title {
  margin: 0 2rem .75rem 0;
  font-size: var(--fs-small);
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
}

.bib-viewer-entry {
  height: min(55vh, 26rem);            /* one height for every entry: the card keeps its size */
  margin: 0;
  padding: .9rem 1rem;
  overflow: auto;
  font: .8rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: var(--tray-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.bib-viewer-actions {
  margin: .75rem 0 0;
  text-align: right;
}

.bib-viewer-copy {
  padding: .3rem 1rem;
  font: 600 var(--fs-label) var(--font);
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: var(--pill);
  cursor: pointer;
}

.pub-punct {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .pub-list {
    padding-left: 1.2rem;
  }
}

@media print {
  .pub-list li {
    break-inside: avoid;
  }

  .pub-bib-button {
    display: none;
  }

  .pub-links {
    display: inline;
  }

  .pub-links a {
    padding: 0;
    font: inherit;
    border: 0;
  }

  .pub-punct {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}
