/* ===========================
   FORTY PUBLICATIONS
   Dark-themed pubs list style
============================ */

/* ---------- Banner variant ---------- */
.forty-banner-pubs {
  min-height: 40vh;
  padding-top: 80px;
  padding-bottom: 60px;
}
.forty-banner-pubs::after {
  background: rgba(43, 45, 51, 0.6);
}

/* ---------- Content wrapper ---------- */
.forty-pubs-wrap {
  background: #2b2d33;
  padding: 60px 50px 80px;
}
@media (max-width: 768px) {
  .forty-pubs-wrap { padding: 40px 20px 60px; }
}

/* ---------- Featured Section ---------- */
.featured-section {
  margin-bottom: 50px;
}
.featured-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin: 0 0 18px;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1200px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .featured-grid { grid-template-columns: 1fr; }
}

/* Featured card */
.feat-card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #24262b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  height: 330px;
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.feat-card .feat-img {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: #1e2024;
  flex-shrink: 0;
}
.feat-card .feat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.feat-card:hover .feat-img img {
  transform: scale(1.05);
}
.feat-card .feat-img .year-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.feat-card .feat-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
.feat-card .feat-title {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  line-height: 1.35;
  margin: 0 0 6px;
}
.feat-card .feat-journal {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  margin: 0 0 12px;
}
.feat-card .feat-journal em { color: rgba(255,255,255,0.6); }
.feat-card .feat-links {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.feat-card .feat-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  text-decoration: none;
  border-bottom: none;
  transition: all 0.2s ease;
}
.feat-card .feat-links a:hover {
  background: #d4899b;
  color: #fff;
}

/* Featured overlay */
.feat-overlay {
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  background: rgba(30, 32, 40, 0.94);
  padding: 18px 16px 14px;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  pointer-events: none;
  border-radius: 6px;
}
.feat-card:hover .feat-overlay {
  opacity: 1;
  pointer-events: auto;
}
.feat-overlay-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.feat-overlay-title {
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin: 0 0 4px;
  flex-shrink: 0;
}
.feat-overlay-journal {
  font-size: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  margin: 0 0 10px;
  flex-shrink: 0;
}
.feat-overlay-abstract {
  font-size: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
  margin: 0 0 14px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.feat-overlay-abstract:empty { display: none; }
.feat-overlay-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.feat-overlay-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  border-bottom: none;
  transition: background 0.25s ease, transform 0.2s ease;
}
.feat-overlay-links a:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.12);
}

/* ---------- Two-column layout ---------- */
.pubs-columns {
  display: flex;
  gap: 50px;
}
.pubs-main {
  flex: 1;
  min-width: 0;
}
.pubs-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 70px;
  align-self: flex-start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
@media (max-width: 991px) {
  .pubs-columns { flex-direction: column; gap: 40px; }
  .pubs-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
}

/* ---------- Year groups ---------- */
.year-group {
  margin-bottom: 36px;
}
.year-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6bafc4;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Publication row ---------- */
.pub-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  align-items: flex-start;
  transition: background 0.2s ease;
}
.pub-row:last-child { border-bottom: none; }
.pub-row:hover {
  background: rgba(255,255,255,0.03);
  margin-left: -12px;
  margin-right: -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 6px;
}

.pub-row .pub-thumb {
  width: 80px;
  height: 58px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1e2024;
}
.pub-row .pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) brightness(0.8);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.pub-row:hover .pub-thumb img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

.pub-row .pub-info { flex: 1; min-width: 0; }
.pub-row .pub-info .pub-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
  margin: 0 0 3px;
  transition: color 0.2s ease;
}
.pub-row:hover .pub-info .pub-title {
  color: #fff;
}
.pub-row .pub-info .pub-venue {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  margin: 0;
  line-height: 1.4;
}
.pub-row .pub-info .pub-venue em { color: rgba(255,255,255,0.55); }

.pub-row .pub-row-links {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-self: center;
}
.pub-row .pub-row-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(255,255,255,0.35);
  font-size: 18px;
  text-decoration: none;
  border-bottom: none;
  transition: all 0.2s ease;
}
.pub-row .pub-row-links a:hover {
  color: #d4899b;
  background: rgba(212, 137, 155, 0.1);
}

/* ---------- Sidebar ---------- */
.sidebar-section {
  margin-bottom: 28px;
}
.sidebar-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-item {
  margin-bottom: 12px;
}
.sidebar-item .sidebar-source {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.25);
  margin: 0;
}
.sidebar-item a {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  line-height: 1.45;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sidebar-item a:hover {
  color: #6bafc4;
  border-bottom-color: rgba(107, 175, 196, 0.3);
}

/* ---------- Forthcoming / Archive (hide or restyle) ---------- */
.forthcoming-section {
  background: #24262b;
  padding: 60px 0;
  color: rgba(255,255,255,0.5);
}
.forthcoming-section h2 {
  color: rgba(255,255,255,0.6);
}
.forthcoming-section .btn-papes {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
}
.forthcoming-section .btn-papes:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

/* ---------- Resource card variant ---------- */

/* Left teal stripe instead of full border */
.feat-card--resource {
  border-left: 3px solid #6bafc4;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.feat-card--resource:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* "Project Resources" badge in image corner */
.resource-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #6bafc4;
  color: #0d2530;
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 2;
}

/* Larger, more prominent title — no journal line below to compete */
.feat-card--resource .feat-title {
  font-size: 15px;
  margin: 0 0 10px;
}

/* People pills row */
.feat-people {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.feat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 500;
  border-radius: 20px;
  padding: 3px 9px 3px 7px;
  line-height: 1;
  white-space: nowrap;
}
/* Lead scientist — solid teal fill */
.feat-pill--lead {
  background: rgba(107, 175, 196, 0.15);
  color: #6bafc4;
  border: 1px solid rgba(107, 175, 196, 0.3);
}
.feat-pill--lead::before {
  content: '★';
  font-size: 8px;
  opacity: 0.8;
}
/* Contributor — subtle ghost pill */
.feat-pill--contributor {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.1);
}
.feat-pill--contributor::before {
  content: '·';
  font-size: 14px;
  line-height: 0;
  vertical-align: -1px;
  opacity: 0.5;
  margin-right: 1px;
}

/* Overlay: full-card clickable link, no abstract needed */
.feat-overlay--resource {
  text-decoration: none;
  border-bottom: none;
  cursor: pointer;
  background: rgba(20, 28, 32, 0.95);
}
/* CTA at bottom of overlay */
.resource-overlay-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #6bafc4;
  letter-spacing: 0.5px;
}
.resource-overlay-cta i { font-size: 15px; }
