/* Publications list */
/* Timeline */
.pub-timeline { display: grid; gap: 1.25rem; }
.pub-year-block { position: relative; padding-left: 44px; }
.pub-year-header { display: flex; align-items: baseline; gap: 0.6rem; }
.pub-year { display: inline-block; font-weight: 700; font-size: 1.25rem; }
.pub-count { color: var(--muted); font-size: 0.95rem; }
/* Vertical timeline line */
.pub-year-block::before { content: ""; position: absolute; left: 22px; top: 2.2rem; bottom: 0; width: 2px; background: linear-gradient(to bottom,
  color-mix(in srgb, var(--accent) 35%, transparent) 0%,
  var(--border) 40%,
  color-mix(in srgb, var(--accent) 35%, transparent) 100%);
  border-radius: 999px; transform: scaleY(0); transform-origin: top; transition: transform 700ms ease; }
.pub-year-block.in-view::before { transform: scaleY(1); }

/* Cards */
.pub-card-list { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.pub-card-list .pub-card { width: 100%; }
.pub-card { position: relative; border: 1px solid var(--border); border-radius: 16px; padding: 1rem; background: var(--card); overflow: visible; transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, opacity 280ms ease; opacity: 0; transform: translateY(8px);
  /* Draw an inner left stripe that overlaps the inner edge so only one border is visible */
  box-shadow:
    inset 4px 0 0 var(--pub-accent, var(--accent)),
    inset 0 0 0 1.5px color-mix(in srgb, var(--pub-accent, var(--accent)) 28%, transparent);
}
.pub-card.in-view { opacity: 1; transform: translateY(0); }
.pub-card::before { content: ""; position: absolute; left: -28px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--border); z-index: 2; }
/* Dot pulse */
.pub-card.in-view::after { content: ""; position: absolute; left: -30px; top: 16px; width: 16px; height: 16px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 0 rgba(179,0,45,0.25); animation: pulse 2.4s ease-out infinite; }
.pub-card:hover {
  transform: translateY(-2px);
  /* Intensify inner accent ring and keep inner left stripe consistent */
  box-shadow:
    inset 4px 0 0 color-mix(in srgb, var(--pub-accent, var(--accent)) 60%, transparent),
    inset 0 0 0 2px color-mix(in srgb, var(--pub-accent, var(--accent)) 42%, transparent),
    0 10px 24px rgba(0,0,0,0.08);
}
.pub-spine { display: none; }
/* Per-type accent colors */
.pub-card.journal { --pub-accent: #b3002d; }
.pub-card.chapter { --pub-accent: #7c3aed; }
.pub-card.journal::before { background: #b3002d; }
.pub-card.chapter::before { background: #7c3aed; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(179,0,45,0.25); }
  70%  { box-shadow: 0 0 0 10px rgba(179,0,45,0); }
  100% { box-shadow: 0 0 0 0 rgba(179,0,45,0); }
}

@media (prefers-reduced-motion: reduce) {
  .pub-year-block::before { transition: none; transform: scaleY(1); }
  .pub-card { transition: none; opacity: 1; transform: none; }
  .pub-card.in-view::after { animation: none; }
}
.pub-card-head { display: flex; gap: 0.5rem; align-items: center; color: var(--muted); }
.pub-type { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.1rem 0.45rem; border: 1px solid var(--border); border-radius: 999px; background: #f8fafc; color: var(--muted); }
.pub-venue { font-size: 0.95rem; }
.pub-meta { color: var(--muted); }
.pub-title { margin: 0.25rem 0; }
.pub-title a { color: var(--text); text-decoration: none; }
.pub-title a:hover { text-decoration: underline; }
.pub-authors { color: var(--muted); }
.pub-authors .author-highlight { font-weight: 700; color: var(--text); background: #f1f5f9; padding: 0 3px; border-radius: 4px; }
.pub-summary { color: var(--muted); }
.pub-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.35rem; }
.pub-keywords { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.pub-chip { font-size: 0.75rem; padding: 0.1rem 0.45rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--card); }
