/* ============================================
   PUBLICATIONS PAGE — scoped dark navy theme
   Palette: bg #0B1220, card #131C2E, border #24324A
   Primary blue #2563EB, accent cyan #38BDF8
   Everything here is scoped under .pubs-page so it
   never affects the rest of the site's teal/copper theme.
   ============================================ */

.pubs-page {
  --pub-bg: #0B1220;
  --pub-card: #131C2E;
  --pub-border: #24324A;
  --pub-blue: #2563EB;
  --pub-cyan: #38BDF8;
  background: var(--pub-bg);
}

/* ===== Stats strip ===== */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  background: linear-gradient(135deg, #0B1220, #131C2E 60%, #0d1730);
  border: 1px solid var(--pub-border);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
}

@media (min-width: 768px) {
  .stats-strip { grid-template-columns: repeat(4, 1fr); }
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.5rem;
}

.stat-icon {
  color: var(--pub-cyan);
  font-size: 22px !important;
  margin-bottom: 0.15rem;
}

.stat-number {
  font-family: "Bodoni Moda", serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.stat-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: #8fa3c4;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* ===== Tabs ===== */
.pubs-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--pub-border);
}

.pubs-tab {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #8fa3c4;
  background: none;
  border: none;
  padding: 0.85rem 0.25rem;
  margin-right: 1.75rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pubs-tab:hover { color: #cdd9ee; }

.pubs-tab.active {
  color: var(--pub-cyan);
  border-bottom-color: var(--pub-cyan);
}

.tab-count { opacity: 0.65; }

.tab-panel.hidden { display: none; }

/* ===== Section label (Featured Publications) ===== */
.section-label {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label .star { color: #f5c542; font-size: 1rem; }

/* ===== Year grouping ===== */
.year-group { margin-bottom: 2.75rem; }

.year-heading {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.year-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pub-cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  display: inline-block;
}

.year-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #8fa3c4;
  font-weight: 400;
}

/* ===== Publication grid ===== */
.pub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .pub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .pub-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Featured horizontal scroll (mobile carousel, desktop 3-col) ===== */
.featured-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.featured-scroll::-webkit-scrollbar { height: 6px; }
.featured-scroll::-webkit-scrollbar-thumb { background: var(--pub-border); border-radius: 3px; }

.featured-scroll .pub-card {
  flex: 0 0 85%;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .featured-scroll {
    overflow-x: visible;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .featured-scroll .pub-card { flex: none; }
}

/* ===== Publication card ===== */
.pub-card {
  background: var(--pub-card);
  border: 1px solid var(--pub-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.pub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
}

.pub-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.4s ease;
}
.pub-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pub-card:hover .pub-cover { transform: scale(1.035); }

.pub-cover-abbr {
  font-family: "Bodoni Moda", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
}

.pub-publisher-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.pub-publisher-badge img {
  height: 16px;
  max-width: 88px;
  object-fit: contain;
  display: block;
}

.pub-card-body {
   padding: 0.55rem 0.55rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pub-title {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5fb;
  line-height: 1.35;
  margin-bottom: 0.50rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-authors {
  font-size: 0.78rem;
  color: #9fb0cc;
  line-height: 1.5;
  margin-bottom: 0.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  color: #7488a8;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
}

.pub-journal {
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pub-year {
  font-family: "JetBrains Mono", monospace;
  flex-shrink: 0;
}

.pub-read-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--pub-cyan);
  text-decoration: none;
  padding: 0.45rem 0;
  border-top: 1px solid var(--pub-border);
  transition: color 0.2s ease, gap 0.2s ease;
}

.pub-read-btn .arrow { transition: transform 0.2s ease; }

.pub-card:hover .pub-read-btn {
  color: #ffffff;
}

.pub-card:hover .pub-read-btn .arrow {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .pub-card, .pub-cover, .pub-read-btn, .arrow { transition: none !important; }
}
