/* News timeline, gallery grid, lightbox. */

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.dot--conference { color: var(--t-conference); } .dot--expo { color: var(--t-expo); } .dot--award { color: var(--t-award); } .dot--rlrc { color: var(--t-rlrc); } .dot--iitp { color: var(--t-iitp); } .dot--contest { color: var(--t-contest); }
.dot--graduation { color: var(--t-graduation); } .dot--lab { color: var(--t-lab); } .dot--field { color: var(--t-field); }
.pill.is-active .dot { color: var(--bg); }

/* ---- News ---------------------------------------------------------------- */
.news-year { margin-bottom: 30px; }
.news-year__label { position: sticky; top: var(--header-h); z-index: 4; margin: 0 0 6px; padding: 10px 0; background: var(--bg); font-size: 1.4rem; color: var(--brand); }
.news-items { list-style: none; margin: 0; padding: 0; }
.news-item { display: grid; grid-template-columns: 70px 26px 1fr; gap: 10px; align-items: stretch; scroll-margin-top: calc(var(--header-h) + 60px); }
.news-item__date { padding-top: 18px; font-size: .8rem; color: var(--muted); text-align: right; }
.news-item__rail { position: relative; display: flex; justify-content: center; }
.news-item__rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--line); }
.news-item__rail .dot { position: relative; margin-top: 21px; width: 12px; height: 12px; box-shadow: 0 0 0 4px var(--bg); }
.news-item__body { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; padding: 10px; margin: 6px 0; transition: transform .15s, box-shadow .15s; }
.news-item__body:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.news-item__text p strong { font-weight: 700; } /* names in captions */
.news-item__link { display: inline-flex; margin-top: 6px; font-size: .86rem; }
.news-item__body--text { grid-template-columns: 1fr; padding: 14px 16px; } /* news entry with no photo */
.news-item:target .news-item__body { box-shadow: 0 0 0 3px var(--brand), var(--shadow); }
.news-item__photo { display: block; border-radius: 10px; overflow: hidden; }
.news-item__photo img { width: 180px; height: 120px; object-fit: cover; transition: transform .35s; }
.news-item__photo:hover img { transform: scale(1.05); }
.news-item__carousel { position: relative; width: 180px; height: 120px; border-radius: 10px; overflow: hidden; }
.news-item__slides { position: relative; width: 100%; height: 100%; }
.news-item__slide { display: none; width: 100%; height: 100%; }
.news-item__slide.is-active { display: block; }
.news-carousel__btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(6, 13, 22, .68); color: #fff; padding: 0; cursor: pointer; opacity: .88; transition: background .15s, opacity .15s; }
.news-carousel__btn:hover { background: rgba(6, 13, 22, .9); opacity: 1; }
.news-carousel__btn--prev { left: 6px; }
.news-carousel__btn--next { right: 6px; }
.news-carousel__badge { position: absolute; right: 6px; bottom: 6px; z-index: 2; padding: 2px 6px; border-radius: 6px; background: rgba(6, 13, 22, .72); color: #fff; font-size: .68rem; line-height: 1.2; pointer-events: none; }
.news-item__text p { margin: 6px 0 0; font-weight: 400; color: var(--ink); line-height: 1.5; }
.news-item__text .news-item__when { margin-top: 4px; font-weight: 500; font-size: .76rem; }

/* ---- Gallery ------------------------------------------------------------- */
.masonry { columns: 4 260px; column-gap: 14px; }
.shot { position: relative; display: block; margin: 0 0 14px; border-radius: 12px; overflow: hidden; break-inside: avoid; background: var(--surface-2); }
.shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.shot:nth-child(5n+2) img { aspect-ratio: 4 / 5; }
.shot:nth-child(7n+4) img { aspect-ratio: 1 / 1; }
.shot:hover img, .shot:focus-visible img { transform: scale(1.05); }
.shot__cap { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 2px; padding: 34px 12px 10px; background: linear-gradient(transparent, rgba(4, 12, 22, .85)); color: #fff; }
.shot__when { font-size: .68rem; opacity: .8; }
.shot__text { font-size: .86rem; font-weight: 600; line-height: 1.35; }
.shot:hover { text-decoration: none; }

/* ---- Lightbox ------------------------------------------------------------ */
.lightbox { position: fixed; inset: 0; z-index: 85; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; background: rgba(3, 8, 15, .94); }
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100vh; padding: 24px 0; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lightbox__cap { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 760px; text-align: center; color: #e6eef7; }
.lightbox__meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: #93a6ba; }
.lightbox__text { font-size: 1rem; font-weight: 600; }
.lightbox__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; }
.lightbox__nav { justify-self: center; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
.lightbox .i { width: 22px; height: 22px; }

@media (max-width: 720px) {
  .news-item { grid-template-columns: 0 18px 1fr; gap: 8px; }
  .news-item__date { display: none; }
  /* pin rail and card to their columns: with the date hidden, auto-placement put the card in the 18px rail column */
  .news-item__rail { grid-column: 2; }
  .news-item__body { grid-column: 3; }
  .news-item__body { grid-template-columns: 1fr; }
  .news-item__photo img { width: 100%; height: 170px; }
  .news-item__carousel { width: 100%; height: 170px; }
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 18px; }
  .lightbox__nav--prev { left: 18px; } .lightbox__nav--next { right: 18px; }
  .lightbox__figure { padding: 60px 10px 90px; }
}
