/* ==========================================================================
   Expandable Triangle "Cite" Trigger + Standout Mac-Note LaTeX/BibTeX Card
   Shared across index.html (Selected Publications) & research/index.html
   ========================================================================== */

.article-entry .paper-cite-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 0 2px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #5c5549;
  user-select: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.article-entry .paper-cite-btn::before {
  content: "\25B8";
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  color: #8C1515;
  transition: transform 0.15s ease;
}

.article-entry .paper-cite-btn[aria-expanded="true"] {
  color: #8C1515;
}

.article-entry .paper-cite-btn[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.article-entry .paper-cite-btn:hover,
.article-entry .paper-cite-btn:focus-visible {
  color: #8C1515;
}

.article-entry .paper-cite-btn:focus-visible {
  outline: 2px solid #0645ad;
  outline-offset: 2px;
  border-radius: 0;
}

/* Allow paper-item on index.html to host a full-width standout note underneath */
#post-index .article-entry .paper-item {
  flex-wrap: wrap;
  row-gap: 12px;
}

#post-index .article-entry .paper-content {
  flex: 1 1 0;
  min-width: 0;
}

#post-index .article-entry .paper-item > .paper-cite-note {
  margin: 0 0 2px;
}

/* Standout Mac-Note BibTeX Card */
.article-entry .paper-cite-note {
  flex: 0 0 100%;
  width: 100%;
  margin: 12px 0 4px;
  background: linear-gradient(180deg, #fffef9 0%, #fcf6e6 100%);
  border: 1px solid #dfd2b2;
  border-top: 3px solid #d4a63a;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(34, 28, 16, 0.09), 0 2px 6px rgba(34, 28, 16, 0.05);
  overflow: hidden;
  box-sizing: border-box;
  animation: paperCiteReveal 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-entry .paper-cite-note[hidden] {
  display: none;
}

@keyframes paperCiteReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-entry .paper-cite-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #faf1d6 0%, #f4e6c1 100%);
  border-bottom: 1px solid #e5d6ae;
}

.article-entry .paper-cite-note-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b5626;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-entry .paper-cite-note-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4a63a;
  box-shadow: inset 0 0 0 1px rgba(107, 86, 38, 0.28);
  flex-shrink: 0;
}

.article-entry .paper-cite-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid #cbb888;
  border-radius: 4px;
  background: #fffdf7;
  color: #2a241b;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgba(34, 28, 16, 0.05);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.article-entry .paper-cite-copy-btn:hover,
.article-entry .paper-cite-copy-btn:focus-visible {
  border-color: #8C1515;
  color: #8C1515;
  background: #ffffff;
}

.article-entry .paper-cite-copy-btn:focus-visible {
  outline: 2px solid #0645ad;
  outline-offset: 2px;
}

.article-entry .paper-cite-copy-btn.is-copied {
  border-color: #1d6b52;
  background: #eef7f3;
  color: #1d6b52;
}

.article-entry .paper-cite-copy-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  display: inline-block;
}

.article-entry .paper-cite-note-body {
  padding: 12px 14px 13px;
  background: transparent;
}

.article-entry .paper-cite-note pre.paper-cite-code {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #231f1a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  tab-size: 2;
}

@media (max-width: 640px) {
  #post-index .article-entry .paper-cite-btn,
  .research-page .article-entry .paper-cite-btn {
    font-size: 12px;
  }

  .article-entry .paper-cite-note {
    margin-top: 10px;
  }

  .article-entry .paper-cite-note-head {
    padding: 7px 10px;
  }

  .article-entry .paper-cite-note-body {
    padding: 10px 11px 11px;
  }

  .article-entry .paper-cite-note pre.paper-cite-code {
    font-size: 11.5px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-entry .paper-cite-btn::before,
  .article-entry .paper-cite-note {
    transition: none;
    animation: none;
  }
}
