/* ===== PDLG site stylesheet (all pages) =====
   Colours: navy accent, see README. */
:root {
  --accent: #1e3a8a;
  --accent-hover: #2563eb;
  --accent-soft: #eaf0fb;
  --accent-line: #c7d5f2;
  --ink: #14161a;
  --muted: #5b6270;
  --line: #e6e8ec;
  --soft: #f6f7f9;
  --teaser-accent: #ec6608;   /* teaser animations only, see .claude/skills/paper-teaser */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }   /* lets JS hide elements that set their own display (e.g. the hiring pill) */
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--soft); color: var(--ink); line-height: 1.4; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; }

/* ----- Header ----- */
.nav { background: #fff; border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; padding: 14px 32px; font-size: 14px; }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 700; }
.brand img { height: 34px; }
.brand .sep { width: 1px; height: 26px; background: var(--line); }
.join-pill { margin-left: 14px; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 5px 11px; border-radius: 999px; }
.join-pill:hover { border-color: var(--accent); }
.join-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(30, 58, 138, .18); }
.nav .right { margin-left: auto; display: flex; gap: 18px; color: var(--muted); font-size: 13.5px; }
.nav .right a:hover { color: var(--ink); }

/* ----- Homepage intro ----- */
.hero { background: #fff; border-bottom: 1px solid var(--line); }
.hero .wrap { padding: 36px 32px 30px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.hero .photo { width: 108px; height: 108px; border-radius: 50%; overflow: hidden; border: 3px solid var(--accent); }
.hero .photo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: 34px; letter-spacing: -.02em; line-height: 1.15; }
.hero p { color: var(--muted); margin-top: 6px; max-width: 760px; line-height: 1.5; font-size: 15px; }
.themes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.themes span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; background: #fff; }

/* ----- Homepage body: feed + sidebar ----- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 26px 32px 34px; }
h3 { font-size: 15px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.more { color: var(--accent); font-size: 13px; font-weight: 600; }
.more:hover { color: var(--accent-hover); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters button { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 6px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.filters button .n { color: var(--muted); font-weight: 500; font-size: 12px; }
.filters button:hover { border-color: #cdd1d8; }
.filters button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters button.on .n { color: #b7bdc8; }
.filters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seeall { font-size: 13px; color: var(--muted); margin: -4px 0 12px; min-height: 18px; }
.seeall a { color: var(--accent); font-weight: 600; }

.feed { display: flex; flex-direction: column; gap: 10px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.item.withimg { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; align-items: center; }
.item.withimg img { width: 120px; height: 72px; object-fit: cover; border-radius: 6px; }
.item .top { display: flex; gap: 6px; align-items: center; margin-bottom: 5px; flex-wrap: wrap; }
.item .body, .item .t, .item .s { display: block; }
.item .t { font-weight: 600; font-size: 15px; line-height: 1.35; }
.item .s { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.tag.Publications { background: var(--accent-soft); color: var(--accent); }
.tag.Projects { background: #eef1f5; color: #3b4352; }
.tag.Team { background: #f1edf8; color: #6a4aa8; }
.tag.Teaching { background: #eaf3ec; color: #2f7a45; }
.tag.Thesis { background: #eef6e0; color: #4d7a12; }
.tag.Events { background: #e8f5f6; color: #1d7480; }
.tag.Recognition { background: #fbf4e3; color: #9a6a00; }

/* clickable (paper) cards */
a.item { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 14px; align-items: center; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.item.withimg { grid-template-columns: minmax(0, 1fr) 120px 28px; }
a.item:hover { border-color: var(--accent-line); box-shadow: 0 6px 18px rgba(20, 22, 26, .08); transform: translateY(-1px); }
a.item:hover .t { color: var(--accent); }
a.item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.go { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #9aa1ad; background: var(--soft); transition: background .15s, color .15s, transform .15s; }
.go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
a.item:hover .go { background: var(--accent); color: #fff; transform: translateX(2px); }

/* expandable (news) cards: the whole head is a button, the text opens below it */
.item.expandable { padding: 0; transition: border-color .15s, box-shadow .15s; }
.item.expandable .head { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 14px; align-items: center; width: 100%; padding: 14px 16px; font: inherit; color: inherit; text-align: left; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.item.expandable:hover { border-color: var(--accent-line); box-shadow: 0 6px 18px rgba(20, 22, 26, .08); }
.item.expandable:hover .t { color: var(--accent); }
.item.expandable .head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.go.down svg { transition: transform .2s; }
.item.expandable:hover .go { background: var(--accent); color: #fff; }
.item.expandable.open .go.down svg { transform: rotate(180deg); }
.details { padding: 0 60px 16px 16px; font-size: 14px; line-height: 1.6; color: #2b2f36; }
.details .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.details .pics { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.details .pics img { height: 140px; width: auto; max-width: 100%; object-fit: cover; border-radius: 6px; cursor: zoom-in; transition: opacity .15s; }
.details .pics img:hover { opacity: .85; }
.details .pics img:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* enlarged photo (home.js zoom): click anywhere or Esc to close */
.zoom { position: fixed; inset: 0; z-index: 100; background: rgba(15, 17, 21, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: zoom-in .15s ease-out; }
.zoom img { width: auto; height: auto; max-width: min(1200px, calc(100vw - 48px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); object-fit: contain; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
@keyframes zoom-in { from { opacity: 0; } to { opacity: 1; } }
.details .more { display: inline-block; margin-top: 10px; }

.showmore { width: 100%; margin-top: 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; border: 1px dashed #cdd1d8; border-radius: 10px; padding: 10px; cursor: pointer; }
.showmore:hover { color: var(--ink); border-color: var(--muted); }
.load-error { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; color: var(--muted); font-size: 14px; }

/* sidebar */
.box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.box p { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.proj { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.35; }
.proj:first-of-type { border-top: 0; padding-top: 0; }
.proj b { display: block; font-size: 13.5px; }
.proj span { color: var(--muted); }
.proj .when { font-size: 12px; color: var(--muted); margin-top: 3px; }
.proj .run { color: #2f7a45; font-weight: 700; margin-right: 4px; }
.proj .closed { color: var(--muted); font-weight: 700; margin-right: 4px; }
.picon { width: 56px; height: 42px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.picon svg { width: 26px; height: 26px; }
.proj.past .picon { background: #eef0f3; color: #8a919e; }
.faces { display: flex; gap: 8px; }
.faces img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.plabel { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 10px 0 6px; }
.plabel:first-of-type { margin-top: 0; }
.partners { display: flex; flex-wrap: wrap; gap: 6px; }
.partners span { font-size: 12.5px; border: 1px solid var(--line); background: var(--soft); border-radius: 6px; padding: 4px 8px; }
.join-box { background: var(--ink); color: #fff; border: 0; }
.join-box p { color: #b7bdc8; }
.join-box a { color: #9cb7ef; font-weight: 600; font-size: 13px; display: inline-block; margin-top: 8px; }
.join-box a:hover { color: #fff; }

/* ----- Footer ----- */
.footer { background: #121417; color: #b7bdc8; }
.footer .wrap { padding: 26px 32px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; font-size: 13.5px; line-height: 1.6; }
.footer b { color: #fff; display: block; margin-bottom: 4px; }
.footer img { height: 30px; filter: brightness(0) invert(1); margin-bottom: 10px; }
.footer a:hover { color: #fff; }

@media (max-width: 900px) {
  .home, .footer .wrap { grid-template-columns: 1fr; }
  .nav .wrap, .hero .wrap, .home, .footer .wrap { padding-left: 16px; padding-right: 16px; }
  .join-pill { display: none; }
}
@media (max-width: 560px) {
  .details { padding-right: 16px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 16px; }
  .hero h1 { font-size: 27px; }
  .item.withimg, a.item.withimg { grid-template-columns: minmax(0, 1fr) 28px; }
  .item.withimg img { display: none; }
  .item.withimg:not(a) { grid-template-columns: 1fr; }
}

/* ===== Subpages: paper.html, team.html, people-magda.html ===== */
body.paper-page { background: #fff; }
.page { max-width: 800px; margin: 0 auto; padding: 40px 24px 64px; }
.page .back { font-size: 13.5px; color: var(--muted); display: inline-block; margin-bottom: 28px; }
.page .back:hover { color: var(--ink); }
.page .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.page .venue { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12.5px; letter-spacing: .03em; padding: 4px 10px; border-radius: 6px; }
.page a.venue:hover { background: var(--accent-line); }
.page .when { color: var(--muted); font-size: 13.5px; }
.page h1.title { font-size: 36px; line-height: 1.15; letter-spacing: -.02em; }
.page .authors { margin-top: 14px; font-size: 16px; color: var(--muted); }
.page .authors b { color: var(--ink); font-weight: 600; }
.page h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 40px 0 12px; }
.page .abstract { font-size: 17px; line-height: 1.7; color: #2b2f36; }
.page .lead { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.page .prose p { font-size: 16px; line-height: 1.7; color: #2b2f36; }
.page .prose p + p { margin-top: 12px; }
.page .prose a, .profile .role a, .cv a, .member p a, .member .mail { color: var(--accent); }
.page .prose a:hover, .profile .role a:hover, .cv a:hover, .member p a:hover, .member .mail:hover { color: var(--accent-hover); }
.page .notfound p { margin-top: 12px; color: var(--muted); }
.page .notfound a, .page .load-error a { color: var(--accent); font-weight: 600; }

.bib { margin-top: 26px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.bib-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px 9px 16px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.copy { font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px; cursor: pointer; color: var(--ink); }
.copy:hover { border-color: var(--muted); }
.copy.done { color: #2f7a45; border-color: #cfe5d6; background: #eaf3ec; }
.bib-wrap { overflow-x: auto; }
.bib pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; padding: 14px 16px; color: #2b2f36; }

.figure { margin-top: 36px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; aspect-ratio: 16/9; position: relative; }
.figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 18px; }

.links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14.5px; padding: 11px 18px; border-radius: 8px; border: 1px solid var(--line); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn svg { width: 17px; height: 17px; }

.related { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; }
.rel { display: flex; gap: 10px; flex-wrap: wrap; }
.rel a { font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; flex: 1 1 220px; }
.rel a:hover { border-color: var(--accent-line); color: var(--accent); }
.rel a span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* Magda's profile (people-magda.html) */
.profile { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 28px; align-items: center; }
.profile > img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.profile .role { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.profile .links { margin-top: 18px; }
.page h3.sub { display: block; font-size: 15px; margin: 22px 0 6px; }
.cv li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.cv li:first-child { border-top: 0; }
.cv-date { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.cv .place { color: var(--muted); }

/* Team page (team.html, filled from team.json) */
.members { display: flex; flex-direction: column; gap: 10px; }
.member { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.member.linked { grid-template-columns: 64px minmax(0, 1fr) 28px; align-items: center; }
.member.linked:hover { border-color: var(--accent-line); }
.member .face { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.member .initials { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 19px; }
.member .name { font-weight: 600; font-size: 16px; }
.member .name a:hover { color: var(--accent); }
.member .mrole { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.member p { font-size: 14px; line-height: 1.55; margin-top: 6px; color: #2b2f36; }
.member .mlinks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.member .mail { font-size: 13.5px; }
.member.linked:hover .go { background: var(--accent); color: #fff; }
.former { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.former li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 16px; }
.former li + li { border-top: 1px solid var(--line); }
.former .name { font-weight: 600; font-size: 15px; }
.former .mrole { color: var(--muted); font-size: 13.5px; }
.join-card { background: var(--ink); color: #fff; border-radius: 12px; padding: 22px 24px; }
.join-card p { color: #d3d7de; font-size: 15px; line-height: 1.6; }
.join-card p + p { margin-top: 8px; }
.join-card .links { margin-top: 18px; }
.join-card .btn { color: #fff; border-color: #4a505b; }
.join-card .btn:hover { border-color: #fff; }
.join-card .btn.primary { background: #fff; color: var(--ink); border-color: #fff; }
.join-card .btn.primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); }

/* ===== Teaser player (teasers/teaser-player.js) — same on every paper ===== */
.teaser { margin-top: 36px; border-radius: 12px; overflow: hidden; background: #0f1115; aspect-ratio: 16/9; position: relative; }
.teaser canvas { width: 100%; height: 100%; display: block; }
.teaser-cap { position: absolute; left: 18px; right: 170px; bottom: 14px; font-size: 14px; line-height: 1.4; color: #e6e8ec; }
.teaser-cap b { color: var(--teaser-accent); font-weight: 700; margin-right: 6px; }
.teaser-cap i { font-family: Georgia, 'Times New Roman', serif; font-style: italic; }
.teaser-ui { position: absolute; right: 16px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.teaser-ctrl { display: flex; gap: 4px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; padding: 2px; }
.teaser-ctrl button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: #cfd3da; cursor: pointer; display: grid; place-items: center; }
.teaser-ctrl button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.teaser-ctrl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.teaser-ctrl svg .fill { fill: currentColor; stroke: none; }
.teaser-dots { display: flex; gap: 5px; }
.teaser-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #3a3f48; cursor: pointer; }
.teaser-dots button.on { background: #8a4a1c; }
.teaser-dots button.cur { background: var(--teaser-accent); }
.teaser-ctrl button:focus-visible, .teaser-dots button:focus-visible { outline: 2px solid var(--teaser-accent); outline-offset: 2px; }

@media (max-width: 700px) {
  .page { padding: 28px 16px 48px; }
  .page h1.title { font-size: 28px; }
  .profile { grid-template-columns: 1fr; gap: 16px; }
  .profile > img { width: 104px; height: 104px; }
  .cv li { grid-template-columns: 1fr; gap: 2px; }
  /* phones: caption and controls move below the animation so nothing covers it */
  .teaser { aspect-ratio: auto; }
  .teaser canvas { height: auto; aspect-ratio: 16/9; }
  .teaser-cap { position: static; padding: 10px 14px 2px; font-size: 13px; }
  .teaser-ui { position: static; flex-direction: row-reverse; justify-content: space-between; align-items: center; padding: 6px 14px 12px; }
}
