/* Publication card layout — inspired by jaehong31.github.io */

.pub-year {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 1.6rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e6e6e6;
  letter-spacing: 0.02em;
}

.pub-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  color: #444;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-bottom: 2.5rem;
}

.pub-card {
  display: flex;
  gap: 1.2rem;
  padding: 1rem;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pub-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}

.pub-card__thumb {
  flex: 0 0 200px;
  max-width: 200px;
}

.pub-card__thumb img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.pub-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 130px;
  border-radius: 6px;
  background: linear-gradient(135deg, #6e7b8b 0%, #2c3e50 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  padding: 0.4rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.pub-card__placeholder:hover {
  text-decoration: none;
  color: #fff;
  opacity: 0.92;
}

.pub-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.pub-card__badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #1f6feb;
  color: #fff;
  border-radius: 4px;
  margin-right: 0.4rem;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Venue-specific badge colors */
.pub-card__badge--cvpr     { background: #d62828; }
.pub-card__badge--iccv     { background: #b5179e; }
.pub-card__badge--eccv     { background: #7209b7; }
.pub-card__badge--neurips  { background: #2a9d8f; }
.pub-card__badge--icml     { background: #f77f00; }
.pub-card__badge--iclr     { background: #003566; }
.pub-card__badge--aaai     { background: #283618; }
.pub-card__badge--ieee-access      { background: #00629b; }
.pub-card__badge--scientific-reports { background: #5f6caf; }
.pub-card__badge--electronics-letters { background: #4a4e69; }
.pub-card__badge--eaai     { background: #355c7d; }
.pub-card__badge--under-review     { background: #6c757d; }

.pub-card__note {
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
}

.pub-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.35rem 0 0.25rem;
  line-height: 1.35;
}

.pub-card__title a {
  color: #1a1a1a;
  text-decoration: none;
}

.pub-card__title a:hover {
  color: #1f6feb;
  text-decoration: none;
}

.pub-card__authors {
  margin: 0.15rem 0;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.45;
}

.pub-card__authors .self {
  font-weight: 700;
  text-decoration: underline;
}

.pub-card__venue {
  margin: 0.1rem 0 0.55rem;
  font-size: 0.88rem;
  color: #666;
}

.pub-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pub-card__btn {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
}

.pub-card__btn:hover { text-decoration: none; opacity: 0.85; }

.pub-card__btn--paper   { background: #e63946; color: #fff; }
.pub-card__btn--arxiv   { background: #b31b1b; color: #fff; }
.pub-card__btn--code    { background: #24292e; color: #fff; }
.pub-card__btn--doi     { background: #0077b6; color: #fff; }
.pub-card__btn--project { background: #2a9d8f; color: #fff; }
.pub-card__btn--slides  { background: #f4a261; color: #fff; }
.pub-card__btn--bibtex  { background: #6c757d; color: #fff; cursor: pointer; }

.pub-card__bibtex {
  margin: 0;
  min-width: 0;
}
.pub-card__bibtex[open] {
  flex-basis: 100%;
  width: 100%;
  min-width: 0;
}
.pub-card__bibtex > summary {
  display: inline-block;
  list-style: none;
}
.pub-card__bibtex > summary::-webkit-details-marker {
  display: none;
}
.pub-card__bibtex[open] > summary {
  background: #495057;
}
.pub-card__bibtex > pre {
  display: block;
  margin: 0.5rem 0 0;
  padding: 0.7rem 0.9rem;
  background: #f6f8fa;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #1a1a1a;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  white-space: pre;
  word-wrap: normal;
  overflow-wrap: normal;
}
.pub-card__bibtex > pre > code {
  display: block;
  background: transparent;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", "Liberation Mono", Consolas, monospace;
  white-space: inherit;
}

@media (max-width: 600px) {
  .pub-card { flex-direction: column; }
  .pub-card__thumb { flex-basis: auto; max-width: 100%; }
  .pub-card__thumb img,
  .pub-card__placeholder { height: 160px; }
}
