/* ==========================================================================
   publications.css
   Styles used only on the Publications page (publications/index.html).
   The collapsible sections themselves are styled in disclosure.css.

   Contents
     1. Profile links (top of the page)
     2. Section labels
     3. Publication entries
     4. Link tags ([PDF], [DOI, www] …)
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Profile links
   -------------------------------------------------------------------------- */

.pub-profiles {
  max-width: var(--content-max);
  margin: -0.5rem 0 2.5rem;            /* close to the title, clear of the shortcuts */
  padding-left: 1.1rem;
}

.pub-profiles li {
  padding: .25rem 0;
}

/* Two per row on wider screens */
@media (min-width: 641px) {
  .pub-profiles {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 4rem;
  }
}

.pub-profiles li::marker {
  color: var(--ink-soft);
}


/* --------------------------------------------------------------------------
   2. Section labels
   Same yellow label as on every page (size: --label-size in base.css).
   -------------------------------------------------------------------------- */

/* A little more room on each side of the "|" between the parts of a label */
.disclosure-title .sep {
  margin: 0 .2em;
}


/* --------------------------------------------------------------------------
   3. Publication entries
   Numbered continuously across sections (each <ol> has start="…").
   Numbers hang in the left margin so the text forms a clean column.
   -------------------------------------------------------------------------- */

.pub-list {
  margin: 0;
  padding-left: 2.75rem;
}

.pub-list li {
  padding: var(--item-space) max(0px, calc(100% - var(--measure))) var(--item-space) .25rem;   /* text keeps to --measure (no dividing lines between entries) */
  color: var(--ink);
}

.pub-list li:first-child {
  padding-top: .25rem;
}

.pub-list li::marker {
  font-family: var(--heading);
  font-size: var(--fs-label);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

/* Your name and titles stand out from the rest of the reference */
.pub-list strong {
  font-weight: 700;
  color: var(--ink);
}

.pub-list i {
  color: var(--ink);
}

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

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


/* --------------------------------------------------------------------------
   4. Link tags
   Groups of links such as "[DOI, PDF]" are shown as small uniform tags.
   The brackets and commas (.pub-punct) are only hidden visually: they stay
   in the page text for copy-paste, screen readers and printing.
   -------------------------------------------------------------------------- */

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

.pub-links a {
  display: inline-block;
  padding: .05rem .5rem;
  font-family: var(--heading);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .01em;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-tint);
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
}

.pub-links a:hover {
  color: var(--paper);
  background: var(--accent);
}

/* Visually hidden, still part of the text */
.pub-punct {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (forced-colors: active) {
  .pub-links a {
    border: 1px solid LinkText;
  }
}

/* Print: back to plain bracketed links */
@media print {
  .pub-links {
    display: inline;
  }

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

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