/* Mathematics and AI seminar. Accent: IMPAN navy. */
:root {
  --bg: #ffffff;
  --panel: #f5f7fa;
  --text: #1d232b;
  --muted: #5d6773;
  --faint: #8a939e;
  --rule: #e2e6eb;
  --accent: #1b365d;
  --link: #1f5fa8;
  --mark: #fff4c2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d;
    --panel: #1c2229;
    --text: #e4e8ed;
    --muted: #a3adb8;
    --faint: #76808b;
    --rule: #2c343d;
    --accent: #8fb3e3;
    --link: #8fb8ee;
    --mark: #3a3418;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
.wrap { max-width: 50rem; margin: 0 auto; padding: 0 16px; }

/* Header */
header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem;
  padding-top: 1.6rem; padding-bottom: 1rem;
}
header.site .name {
  font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--accent); text-decoration: none;
}
header.site .tagline { color: var(--muted); }
header.site nav { margin-left: auto; display: flex; gap: 1.25rem; }
header.site nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
header.site nav a:hover { color: var(--text); }
header.site nav a[aria-current] { color: var(--accent); box-shadow: 0 2px 0 var(--accent); }

main.wrap { padding-top: 2.25rem; padding-bottom: 3rem; }
h2 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 600;
  margin: 2.5rem 0 .75rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule);
}
.lead { font-size: 1.12rem; margin: 0 0 1.25rem; }

/* When / where / calendar */
ul.facts { list-style: none; margin: 0; padding: 0; color: var(--muted); }
ul.facts li { padding: .1rem 0; display: grid; grid-template-columns: 6.5rem 1fr; }
ul.facts strong { color: var(--text); font-weight: 600; }

/* Talks: one markup, styled by section */
ul.talks { list-style: none; margin: 0; padding: 0; }
li.talk {
  display: grid; grid-template-columns: 15.5rem 1fr; gap: .2rem 1.25rem;
  padding: .9rem 0; border-bottom: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}
li.talk:last-child { border-bottom: 0; }
li.talk p { margin: 0; }
.when .date { display: block; font-weight: 600; }
.when .meta { display: block; color: var(--muted); font-size: .9rem; }
.who .speaker { font-weight: 600; }
.who .aff { color: var(--muted); }
.title { font-style: italic; }
.tba { color: var(--faint); font-style: italic; font-weight: 400; }
li.talk.is-tba { padding: .5rem 0; }
li.talk.is-tba .date { font-weight: 500; color: var(--muted); }

details.abstract { margin-top: .35rem; }
details.abstract summary {
  cursor: pointer; color: var(--link); font-size: .9rem; width: max-content;
}
details.abstract p { margin: .5rem 0 0; font-size: .95rem; }
.actions { margin-top: .4rem !important; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.actions a { color: var(--muted); }
.actions a:hover { color: var(--link); }

/* The next talk: a card */
#next-talk li.talk {
  display: block; background: var(--panel); border: 0; border-left: 4px solid var(--accent);
  border-radius: 6px; padding: 1.2rem 1.4rem;
}
#next-talk .when { margin-bottom: .6rem; }
#next-talk .date { font-size: 1.15rem; color: var(--accent); }
#next-talk .meta { font-size: 1rem; }
#next-talk .who { font-size: 1.1rem; }
#next-talk .title { display: block; font-size: 1.3rem; line-height: 1.35; margin-top: .25rem; font-style: normal; font-weight: 600; }
#next-talk details.abstract summary { display: none; }
#next-talk details.abstract p { font-size: 1rem; }

/* A talk opened by mathandai.impan.pl/#YYYY-MM-DD */
li.talk:target { background: var(--mark); box-shadow: 0 0 0 .6rem var(--mark); border-radius: 2px; }
#next-talk li.talk:target { background: var(--mark); box-shadow: none; }

/* Resources */
ul.links { padding-left: 1.2rem; }
ul.links li + li { margin-top: .75rem; }

footer.site { border-top: 1px solid var(--rule); color: var(--faint); font-size: .85rem; }
footer.site .wrap { padding-top: 1.25rem; padding-bottom: 2rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  header.site nav { margin-left: 0; width: 100%; }
  li.talk { grid-template-columns: 1fr; }
  #next-talk li.talk { padding: 1rem; }
  ul.facts li { display: block; }
  ul.facts strong { display: block; }
  ul.facts li + li { margin-top: .35rem; }
}

ul.facts code {
  font: .85em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel); padding: .1em .35em; border-radius: 3px;
  overflow-wrap: anywhere; user-select: all;
}
.actions a.copied { color: var(--accent); text-decoration: none; }
