/* Additions on top of the Minimal Light theme.
   Keeps the theme's palette (navy headings, blue links) and adds structure
   for news, publications, experience and service. */

:root {
  --ink: #3f4652;
  --ink-strong: #043361;
  --muted: #7a808a;
  --rule: #e4e6ea;
  --chip-bg: #f2f4f7;
  --award: #b03a2e;
  --media-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #dadbdf;
    --ink-strong: #e9eaee;
    --muted: #9aa0ab;
    --rule: #33364a;
    --chip-bg: #2a2c3a;
    --award: #ff8a7a;
    --media-bg: #f4f4f4;
  }
}

section h2 { margin-top: 2.2rem; }
section h2:first-child { margin-top: 0; }

/* Sidebar status line */
.status-note {
  margin: 0.6rem auto 0;
  max-width: 200px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink-strong);
  font-weight: 600;
}

/* ---------- News ---------- */
ul.news { list-style: none; padding: 0; margin: 0 0 0.5rem; }
ul.news li {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 0.75rem;
  padding: 0.18rem 0;
  line-height: 1.45;
}
.news-date { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-text strong { color: var(--ink-strong); font-weight: 600; }

/* ---------- Disclosure (Earlier news / All publications) ---------- */
details { margin: 0.4rem 0 1rem; }
details > summary {
  cursor: pointer;
  color: #39c;
  font-weight: 500;
  list-style: none;
  display: inline-block;
  padding: 0.1rem 0;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "+";
  display: inline-block;
  width: 1em;
  font-weight: 600;
}
details[open] > summary::before { content: "\2212"; }
details > summary:focus-visible { outline: 2px solid #39c; outline-offset: 2px; border-radius: 2px; }
@media (prefers-color-scheme: dark) { details > summary { color: rgb(62, 183, 240); } }

/* ---------- Publications ---------- */
ul.pubs { list-style: none; padding: 0; margin: 0 0 0.5rem; }
ul.pubs > li.pub { padding: 0.55rem 0; border-top: 1px solid var(--rule); }
ul.pubs > li.pub:first-child { border-top: 0; }

ul.pubs--selected > li.pub { padding: 1rem 0; }

.pub--teaser {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.1rem;
  align-items: start;
}

.pub-media { position: relative; }
.pub-media img,
.pub-media-empty {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--media-bg);
}
.pub-media img { object-fit: contain; padding: 4px; box-sizing: border-box; }
.pub-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--chip-bg);
  color: var(--ink-strong);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pub-media .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #043361;
  color: #fff;
  font-size: 0.72rem;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  box-shadow: none;
}

.pub-title { font-weight: 600; line-height: 1.3; }
.pub-title a { color: var(--ink-strong); }
.pub-title a:hover { color: #39c; }
@media (prefers-color-scheme: dark) { .pub-title a { color: #e9eaee; } .pub-title a:hover { color: rgb(62, 183, 240); } }

.pub-authors { margin-top: 0.15rem; line-height: 1.4; }
.pub-authors strong { color: var(--ink-strong); font-weight: 600; }

.pub-venue { margin-top: 0.1rem; color: var(--ink); }
.pub-status,
.pub-note {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.45em;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  background: var(--chip-bg);
  border-radius: 3px;
  font-style: normal;
}
.pub-award {
  margin-left: 0.35rem;
  color: var(--award);
  font-weight: 600;
  font-style: italic;
}

.pub-tldr { margin: 0.4rem 0 0.35rem; line-height: 1.45; color: var(--ink); }

.pub-links { margin-top: 0.3rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pub-links a {
  font-size: 0.82rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-strong);
}
.pub-links a:hover { border-color: #39c; color: #39c; }
.pub-links a:focus-visible { outline: 2px solid #39c; outline-offset: 1px; }
@media (prefers-color-scheme: dark) { .pub-links a { color: #dadbdf; } }

h3.pub-year {
  margin: 1.1rem 0 0.2rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Experience / service ---------- */
ul.experience, ul.awards { padding-left: 1.1rem; }
ul.experience li, ul.awards li { margin: 0.15rem 0; }
.exp-org { color: var(--ink-strong); font-weight: 600; }
.exp-when { color: var(--muted); margin-left: 0.3rem; }
.service-line { margin-bottom: 0.6rem; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .pub--teaser { grid-template-columns: 1fr; gap: 0.6rem; }
  .pub-media { max-width: 320px; }
  .pub-media:has(.pub-media-empty) { display: none; }
  ul.news li { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
