/* ============================================================
   publications.css
   ============================================================ */

/* ── LIST ── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── CARD (collapsed) ── */
.pub-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  grid-template-rows: auto 0fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    grid-template-rows 0.35s ease;
}

.pub-card:hover {
  border-color: #b8b0a5;
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
}

/* ── THUMBNAIL ── */
.pub-thumb {
  grid-column: 1;
  grid-row: 1;
  width: 130px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  flex-shrink: 0;
  overflow: hidden;
  min-height: 100px;
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0px;
}

/* ── BODY ── */
.pub-body {
  grid-column: 2;
  grid-row: 1;
  padding: 0.9rem 2.8rem 0.9rem 1.1rem; /* right padding leaves room for chevron */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  position: relative;
}

/* ── VENUE ── */
.pub-venue {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.pub-venue .award-badge,
.award-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  padding: 0.1em 0.5em;
  border-radius: 2px;
  margin-left: 0.4em;
  letter-spacing: 0.04em;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ── TITLE ── */
.pub-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}

/* ── AUTHORS ── */
.pub-authors {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── TAGS ── */
.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.pub-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.12em 0.55em;
}

/* ── ACTION LINKS ── */
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.pub-link {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent2);
  text-decoration: none;
  border: 1px solid var(--accent2);
  padding: 0.18em 0.55em;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.pub-link:hover {
  background: var(--accent2);
  color: white;
}

/* ── CHEVRON ── */
.pub-chevron {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s;
  flex-shrink: 0;
}

.pub-card.expanded .pub-chevron {
  transform: rotate(180deg);
  color: var(--accent2);
}

/* ── EXPANDED DETAIL PANEL ── */
.pub-detail {
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  min-height: 0;
}

.pub-card.expanded {
  grid-template-rows: auto 1fr;
  border-color: var(--accent2);
  box-shadow: 0 6px 28px rgba(0,0,0,0.09);
}

.pub-detail-inner {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1rem 1.4rem 1.4rem;
  border-top: 1px solid var(--border);
}

.pub-detail-abstract-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.pub-detail-abstract {
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.75;
  text-align: justify;
}

.pub-detail-image {
  width: 100%;
  max-width: 580px;
  align-self: center;
  border-radius: 4px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.pub-detail-image img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .pub-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 0fr;
  }
  .pub-thumb {
    width: 100%;
    height: 120px;
    grid-column: 1;
    grid-row: 1;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .pub-body {
    grid-column: 1;
    grid-row: 2;
    padding: 0.8rem 2.4rem 0.8rem 0.9rem;
  }
  .pub-detail {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .pub-card.expanded {
    grid-template-rows: auto auto 1fr;
  }
}