/* Extra styles to support existing about.md components (papers/news/buttons)
 * while using the Jon Barron template as the base page layout.
 */

/* Anchors: offset for in-page navigation */
.anchor:before {
  content: "";
  display: block;
  position: relative;
  width: 0;
  height: 2em;
  margin-top: -2em;
}

/* News box (scrollable, compact) */
.news-box {
  margin: 0.6rem 0 1.2rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(23, 114, 208, 0.18);
  background: rgba(23, 114, 208, 0.04);
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.news-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-box li {
  position: relative;
  padding-left: 0.9rem;
  margin: 0.35rem 0;
}

.news-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 114, 208, 0.55);
}

/* Scrollbar styling */
.news-box::-webkit-scrollbar {
  width: 8px;
}

.news-box::-webkit-scrollbar-thumb {
  background: rgba(23, 114, 208, 0.25);
  border-radius: 999px;
}

.news-box::-webkit-scrollbar-thumb:hover {
  background: rgba(23, 114, 208, 0.35);
}

/* Publication/project cards */
.pub-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.6rem;
}

.paper-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.85rem;
  padding: clamp(0.9rem, 1.7vw, 1.2rem);
  margin-bottom: clamp(0.75rem, 1.5vw, 1.05rem);
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(23, 114, 208, 0.14);
  box-shadow: 0 10px 22px rgba(12, 22, 41, 0.06);
  position: relative;
  overflow: hidden;
}

.paper-box:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23, 114, 208, 0.06), transparent 55%);
  pointer-events: none;
}

.paper-box-image {
  justify-content: center;
  display: flex;
  width: 100%;
  order: 2;
}

.paper-box-image img {
  width: 100%;
  max-width: 640px;
  border-radius: 12px;
  object-fit: cover;
}

.paper-box-text {
  max-width: 100%;
  order: 1;
  line-height: 1.52;
}

@media (min-width: 48em) {
  .paper-box {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.6rem;
  }

  .paper-box-image {
    justify-content: flex-start;
    flex: 0 0 45%;
    max-width: 45%;
    order: 1;
    margin-top: 0;
  }

  .paper-box-text {
    flex: 1;
    padding-left: 0.6rem;
    max-width: none;
    order: 2;
  }
}

.pub-grid-2 .paper-box {
  flex-direction: column;
  gap: 0.7rem;
}

.pub-grid-2 .paper-box-image {
  order: 0;
  justify-content: center;
  max-width: 100%;
}

.pub-grid-2 .paper-box-text {
  order: 0;
  padding-left: 0;
  max-width: 100%;
  margin-top: 0.15rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  position: absolute;
  margin-top: 0.5em;
  margin-left: -0.5em;
  color: #fff;
  background-color: #1772d0;
  font-size: 0.75em;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.resource-link,
.fakelink {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.8rem;
  margin-right: 0.55rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(23, 114, 208, 0.22);
  color: #0e1a2a;
  background: rgba(23, 114, 208, 0.03);
  cursor: pointer;
}

.resource-link:hover,
.fakelink:hover {
  border-color: rgba(23, 114, 208, 0.35);
  background: rgba(23, 114, 208, 0.08);
}


