/* =========================================================
   Publications page  ·  matches site palette
   background  #FBFAF4   primary teal  #20808D
   hover       #20B8CD   card border   #2CA0AB
   soft accent #BADFDE
   ========================================================= */

/* ---------- Hero ---------- */
.pub-hero {
  margin: 0.5rem 0 2.5rem 0;
}
.pub-eyebrow {
  color: #20808D !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
}
.pub-hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: #1c2b30;
  margin: 0 0 0.6rem 0;
  line-height: 1.1;
  border: none;
}
.pub-hero-sub {
  color: #6c757d;
  font-size: 1.02rem;
  max-width: 46rem;
  margin: 0;
}

/* ---------- Section heading (## in the .qmd) ---------- */
.pub-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c2b30;
  border-bottom: 2px solid #BADFDE;
  padding-bottom: 0.45rem;
  margin-top: 2.75rem;
  margin-bottom: 1.5rem;
}

/* ---------- Card ---------- */
.pub-card {
  background-color: #FBFAF4;
  border: 1px solid #2CA0AB;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(32, 128, 141, 0.14);
  background-color: #ffffff;
}

.pub-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.pub-card-info { flex: 1 1 22rem; min-width: 0; }

.pub-title {
  font-size: 1.16rem;
  font-weight: 700;
  color: #1c2b30;
  margin: 0 0 0.4rem 0;
  line-height: 1.4;
  border: none;
}
.pub-meta {
  color: #6c757d;
  font-size: 0.95rem;
  margin: 0;
}
.pub-journal { font-style: italic; color: #495057; }

.pub-status {
  display: inline-block;
  background-color: #BADFDE;
  color: #0f5b63;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 11px;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ---------- Buttons ---------- */
.pub-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 7px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

/* Active — filled (use for "Read paper" once published) */
.pub-btn-primary {
  background-color: #20808D;
  color: #FBFAF4 !important;
  border-color: #20808D;
}
.pub-btn-primary:hover,
.pub-btn-primary:focus {
  background-color: #20B8CD;
  border-color: #20B8CD;
  color: #FBFAF4 !important;
}

/* Active — outline (use for "View code" once released) */
.pub-btn-outline {
  background-color: #FBFAF4;
  color: #20808D !important;
  border: 1px solid #20808D;
}
.pub-btn-outline:hover,
.pub-btn-outline:focus {
  background-color: #20B8CD;
  color: #FBFAF4 !important;
  border-color: #20B8CD;
}

/* Forthcoming — non-clickable variants */
.pub-btn-soon { cursor: not-allowed; pointer-events: none; }
.pub-btn-soon.pub-btn-primary {
  background-color: #cfe3e3;
  color: #6d8a8e !important;
  border-color: #cfe3e3;
}
.pub-btn-soon.pub-btn-outline {
  background-color: #FBFAF4;
  color: #9aa8ab !important;
  border: 1px dashed #b7c4c6;
}

/* ---------- Collapsible abstract ---------- */
.pub-abstract {
  margin-top: 1.1rem;
  border-top: 1px solid #e6e6df;
  padding-top: 0.9rem;
}
.pub-abstract > summary {
  cursor: pointer;
  font-weight: 600;
  color: #20808D;
  list-style: none;
  user-select: none;
}
.pub-abstract > summary:hover { color: #20B8CD; }
.pub-abstract > summary::-webkit-details-marker { display: none; }
.pub-abstract > summary::before {
  content: "\25B8";              /* ▸ */
  display: inline-block;
  margin-right: 0.45rem;
  transition: transform 0.2s ease;
}
.pub-abstract[open] > summary::before { transform: rotate(90deg); }
.pub-abstract p {
  margin: 0.8rem 0 0 0;
  color: #2a2a2a;
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: justify;
}

/* ---------- Small screens ---------- */
@media (max-width: 575px) {
  .pub-hero-title { font-size: 2rem; }
  .pub-card { padding: 1.25rem 1.25rem; }
  .pub-actions { width: 100%; }
}

/* ---------- Inline note: appears on click when a button has no link yet ---------- */
.pub-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0 0.95rem;
  color: #0f5b63;
  background: #eaf6f4;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.25s ease, padding 0.25s ease;
}
.pub-note::before {           /* small info glyph, no icon font needed */
  content: "\24D8";
  font-weight: 700;
  flex-shrink: 0;
}
.pub-note.is-visible {
  opacity: 1;
  max-height: 8rem;
  margin-top: 1rem;
  padding: 0.6rem 0.95rem;
}