/* News timeline on the home page (same look as the itinerary cards on the Talks page). */

.nw-wrap {
  --nw-ink: #2b3b55;
  --nw-muted: #66758a;
  --nw-body: #5d6b7c;
  --nw-line: #e6eaef;
  --nw-card: #fff;
  --nw-page: #fff;
  --nw-coral: #ff6b57;
  --nw-mint: #2fb992;
  --nw-violet: #8b7cf6;
  margin: 1.2em 0 0;
}

.page__content .nw { position: relative; margin: 0; padding: 0 0 0 46px; list-style: none; }
.nw::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; border-left: 2px dotted var(--nw-coral); opacity: 0.65; }

.page__content .nw-year { position: relative; margin: 18px 0 10px -46px; }
.page__content .nw-year:first-child { margin-top: 0; }
.nw-year span {
  display: inline-block; padding: 0.12em 0.8em; border-radius: 999px;
  background: #ffefea; color: #d63c2c; font-size: 0.78em; font-weight: 800; letter-spacing: 0.03em;
  box-shadow: 0 0 0 4px var(--nw-page);
}

.page__content .nw-item { position: relative; margin: 0 0 12px; }
.nw-dot {
  position: absolute; left: -46px; top: 10px; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--dot, var(--nw-coral)); color: #fff; font-size: 0.74em;
  box-shadow: 0 0 0 4px var(--nw-page), 0 6px 12px -6px var(--dot, var(--nw-coral));
  transition: transform 0.25s ease;
}
.nw-item--journal { --dot: var(--nw-mint); }
.nw-item--milestone { --dot: var(--nw-violet); }
.nw-item:hover .nw-dot { transform: scale(1.12) rotate(-8deg); }

.nw-card {
  padding: 11px 15px 12px; border: 1px solid var(--nw-line); border-radius: 14px; background: var(--nw-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.nw-item:hover .nw-card { transform: translateY(-1px); border-color: #ffc4bb; box-shadow: 0 14px 26px -20px rgba(214, 60, 48, 0.75); }
.nw-item--journal:hover .nw-card { border-color: #a9e2d0; box-shadow: 0 14px 26px -20px rgba(27, 130, 102, 0.75); }
.nw-item--milestone .nw-card { border-color: #dcd3f7; background: linear-gradient(135deg, #fff8e6, #f4f0ff); }
.nw-item--milestone:hover .nw-card { border-color: #b9a9f5; box-shadow: 0 14px 26px -20px rgba(105, 86, 214, 0.75); }

.page__content .nw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 5px; font-size: 0.74em; line-height: 1.5; color: var(--nw-muted); }
.nw-meta time { font-weight: 700; color: var(--nw-ink); }
.page__content .nw-venue { padding: 0.05em 0.7em; border-radius: 999px; background: #e7f3ff; color: #1c6cb3; font-weight: 700; text-decoration: none; }
.page__content .nw-item--journal .nw-venue { background: #e1f6ef; color: #1b8266; }
.page__content a.nw-venue:hover { text-decoration: underline; }
.nw-new {
  display: none; padding: 0.05em 0.65em; border-radius: 999px; background: var(--nw-coral); color: #fff;
  font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.nw-item.is-new .nw-new { display: inline-block; }

.page__content .nw-title { margin: 0; font-size: 0.92em; font-weight: 700; line-height: 1.4; color: #222; }
.page__content .nw-authors { margin: 4px 0 0; font-size: 0.78em; line-height: 1.5; color: var(--nw-muted); }
.nw-me { font-weight: 700; color: var(--nw-ink); text-decoration: underline; text-underline-offset: 2px; }
.page__content .nw-note { margin: 4px 0 0; font-size: 0.8em; line-height: 1.5; color: var(--nw-body); }

.nw.is-collapsed .nw-old { display: none; }
.nw-more {
  display: block; margin: 10px auto 0; padding: 0.45em 1.3em; border: 1px solid #d5dde6; border-radius: 999px;
  background: var(--nw-card); color: var(--nw-ink); font: inherit; font-size: 0.8em; font-weight: 700; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.nw-more[hidden] { display: none; }
.nw-more:hover { border-color: var(--nw-coral); color: #d63c2c; }
.nw-more:active { transform: translateY(1px); }
.nw-more:focus-visible { outline: 2px solid #52adc8; outline-offset: 3px; }

@media (max-width: 640px) {
  .page__content .nw { padding-left: 40px; }
  .page__content .nw-year { margin-left: -40px; }
  .nw-dot { left: -40px; width: 32px; height: 32px; }
  .nw::before { left: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .nw-dot, .nw-card, .nw-more { transition: none; }
}
