/* ====================================
   RESEARCH — publication-list layout
   ==================================== */
body.research {
  --page-max: clamp(960px, 88vw, 1440px);
  --rule: rgba(255, 255, 255, 0.12);
  --tile-bg: #17181b;
}

/* Per-entry accent: each item gets its own shadow color */
.pub          { --pub-accent: #d946a8; }
.pub--magenta { --pub-accent: #d946a8; }
.pub--teal    { --pub-accent: #5eead4; }
.pub--yellow  { --pub-accent: #ffe45c; }
.pub--coral   { --pub-accent: #ff6f61; }
.pub--sky     { --pub-accent: #38bdf8; }
.pub--lime    { --pub-accent: #a3e635; }
.pub--orange  { --pub-accent: #fb923c; }
.pub--emerald { --pub-accent: #34d399; }
.pub--pink    { --pub-accent: #f472b6; }
.pub { --pub-accent-soft: color-mix(in srgb, var(--pub-accent) 10%, transparent); }

.research-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 18px 20px;
}

/* —— Section labels (NEWS / PUBLICATIONS / …) —— */
.section-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin: 5rem 0 2rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

/* —— Entry row: thumbnail left, text right —— */
.pub {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 44px;
  align-items: start;
  padding: 36px 0;
}

.pub + .pub {
  border-top: 1px dashed var(--rule);
}

.pub-thumb {
  display: block;
  text-decoration: none;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid var(--rule);
  box-shadow: -5px 5px 0 var(--pub-accent);
  background: var(--tile-bg);
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Typographic tile for entries without an image */
.pub-thumb--type {
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255,255,255,0.035) 23px 24px),
    var(--tile-bg);
}

.pub-thumb--type b {
  display: block;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pub-accent);
  margin-bottom: 4px;
}

.pub-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.35;
  margin: 0 0 12px;
}

.pub-title a {
  color: var(--text);
  text-decoration: none;
}


.pub-authors {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.pub-authors .me {
  color: var(--pub-accent);
  font-weight: 600;
}

.pub-authors a {
  color: inherit;
  text-underline-offset: 3px;
}

/* Venue as metadata: upright mono instead of italic */
.pub-venue {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  letter-spacing: 0.2px;
  margin: 0 0 6px;
}

.pub-venue .rank {
  font-style: normal;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  color: var(--pub-accent);
  background: var(--pub-accent-soft);
  border: 1px solid var(--pub-accent);
  border-radius: 0;
  padding: 0 5px;
  margin-left: 6px;
  vertical-align: 1px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.pub-links a {
  color: var(--pub-accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.pub-links a:hover { opacity: 0.75; }

.pub-links a::before { content: "["; color: var(--text-muted); display: inline-block; }
.pub-links a::after  { content: "]"; color: var(--text-muted); display: inline-block; }

/* Keep the venue on one line where there's room; the rank never splits off */
.pub-venue .rank { white-space: nowrap; }

/* —— Mobile: stack —— */
@media (max-width: 700px) {
  .pub {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 0;
  }
}


/* Embedded slides spanning the full row */
.pub-embed {
  grid-column: 1 / -1;
  margin-top: 8px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: 0;
  overflow: hidden;
  background: var(--tile-bg);
}

.pub-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.research-page > .section-label:first-child { margin-top: 3rem; }


/* Figure thumbnails on white */
.pub-thumb--fig { background: #fff; }
.pub-thumb--fig img { object-fit: contain; }


/* Descriptions, shown by default */
.pub-desc p,
.section-intro {
  font-family: "Karla", system-ui, sans-serif;
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--text);
  margin: 16px 0 0;
}

.section-intro { margin: 0 0 12px; color: var(--text-muted); }

.research .chip { border-radius: 0; }

.pub-venue a { color: inherit; text-underline-offset: 3px; }

.pub-desc a { color: inherit; text-underline-offset: 3px; }
