/* Site styles: al-folio-style academic homepage. Tokens are documented in DESIGN.md. */

@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/source-sans-3-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/source-sans-3-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --ink: #1b1f24;
  --ink-2: #4a525c;
  --ink-3: #5f6873;
  --rule: #e3e6ea;
  --accent: #1f5fa8;
  --accent-ink: #ffffff;
  --accent-soft: #eaf1fa;
  --select: #cfe0f5;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
  --page: 64rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121519; --surface: #1a1e23; --ink: #e6e9ed; --ink-2: #b9c0c8; --ink-3: #a0a8b2;
    --rule: #2b3138; --accent: #86b4ec; --accent-ink: #0f1420; --accent-soft: #1c2735; --select: #2c4566;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121519; --surface: #1a1e23; --ink: #e6e9ed; --ink-2: #b9c0c8; --ink-3: #a0a8b2;
  --rule: #2b3138; --accent: #86b4ec; --accent-ink: #0f1420; --accent-soft: #1c2735; --select: #2c4566;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--select); color: var(--ink); }
a { color: var(--accent); text-decoration: none; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1rem; }
h1, h2, h3 { text-wrap: balance; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--bg); padding: .5rem 1rem; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner { max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; height: 3.75rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { font: 300 1.25rem/1 var(--serif); color: var(--ink); margin-right: auto; white-space: nowrap; }
.brand span { font-weight: 600; }
.brand:hover { text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; }
.nav-wide { display: flex; gap: 1.25rem; font-size: .9375rem; }
.nav-wide a, .menu a { color: var(--ink-2); }
.nav-wide a[aria-current="page"], .menu a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.menu { display: none; position: relative; }
.menu summary { display: flex; list-style: none; cursor: pointer; padding: .5rem; color: var(--ink-2); font-size: 1.125rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu ul { position: absolute; right: 0; top: 2.75rem; min-width: 12rem; background: var(--bg); border: 1px solid var(--rule); border-radius: 6px; padding: .5rem 0; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.menu li a { display: block; padding: .4rem 1rem; }
.theme { display: inline-flex; background: none; border: 0; color: var(--ink-2); font-size: 1rem; padding: .5rem; cursor: pointer; border-radius: 4px; }
.theme:hover { color: var(--accent); }

/* home intro */
main.wrap { padding-top: 3.5rem; padding-bottom: 4rem; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; grid-template-rows: auto 1fr; grid-template-areas: "head profile" "text profile"; column-gap: 3.5rem; align-items: start; }
.home-head { grid-area: head; }
.intro-text { grid-area: text; }
.profile { grid-area: profile; }
.name { font: 300 3rem/1.08 var(--serif); letter-spacing: -.015em; margin: 0 0 .75rem; }
.name span { font-weight: 600; }
.role { color: var(--ink-2); margin-bottom: 1.75rem; }
.focus { margin: 0 0 2rem; padding-left: 1.15rem; }
.focus li { margin-bottom: .25rem; padding-left: .25rem; }
.focus li::marker { color: var(--accent); }

.notice {
  display: grid; grid-template-columns: auto 1fr; gap: .875rem;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 6px; padding: 1rem 1.25rem; max-width: var(--measure);
}
.notice > .ico { color: var(--accent); margin-top: .3rem; width: 1.125rem; height: 1.125rem; }
.notice p { margin: 0; font-size: 1rem; }
.notice .notice-title { font-weight: 600; margin-bottom: .2rem; }

.profile { margin: .5rem 0 0; }
.profile img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule); background: var(--surface); }
.profile figcaption { margin-top: 1rem; font-size: .9375rem; color: var(--ink-2); }
.profile figcaption p { margin-bottom: .75rem; }
.profile-links { list-style: none; margin: 0; padding: 0; }
.profile-links li { margin: .2rem 0; }

/* sections */
section { margin-top: 3.5rem; }
h2 { font: 600 1.5rem/1.25 var(--serif); margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule); margin-bottom: 1rem; }
.section-head h2 { border: 0; margin: 0; }
.section-head a { font-size: .9375rem; white-space: nowrap; }
.section-head .ico { width: .8em; margin-left: .25rem; }

.news { border-collapse: collapse; width: 100%; max-width: 47rem; }
.news th { text-align: left; vertical-align: top; font-weight: 600; color: var(--ink-3); white-space: nowrap; padding: .5rem 1.5rem .5rem 0; width: 7rem; font-size: .9375rem; }
.news td { padding: .5rem 0; }
.news tr + tr th, .news tr + tr td { border-top: 1px solid var(--rule); }

/* publications */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.25rem; padding: 1rem 0; }
.pub + .pub { border-top: 1px solid var(--rule); }
.abbr span {
  display: block; text-align: center; padding: .2rem .4rem; border-radius: 3px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 .8125rem/1.4 var(--sans); letter-spacing: .02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pub-title { font: 600 1.0625rem/1.4 var(--sans); margin: 0 0 .25rem; max-width: var(--measure); }
.pub-authors, .pub-venue { margin: 0; font-size: .9688rem; color: var(--ink-2); max-width: var(--measure); }
.pub-authors .me { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--rule); }
.pub-links { margin-top: .125rem; }
.pub-links .btn { margin: .5rem .5rem 0 0; vertical-align: top; }
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .8125rem/1 var(--sans); color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 4px; padding: .4rem .65rem;
  transition: color .15s ease-out, border-color .15s ease-out, background-color .15s ease-out;
}
.btn .ico { width: .9em; height: .9em; }
.btn:hover { text-decoration: none; color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* inline BibTeX */
.bib { display: inline; }
.bib summary { display: inline-flex; list-style: none; cursor: pointer; }
.bib summary::-webkit-details-marker { display: none; }
.bib[open] summary { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.bib-body { display: flex; flex-direction: column; max-width: var(--measure); margin-top: .5rem; }
.bib pre { margin: 0; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; overflow-x: auto; font: .8125rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink-2); }
.pub-links .bib .copy { align-self: flex-end; margin: 0 0 .375rem; background: var(--bg); cursor: pointer; }

/* publications page */
.page-head h1 { font: 600 2.5rem/1.1 var(--serif); letter-spacing: -.01em; margin: 0 0 .75rem; }
.lede { color: var(--ink-2); max-width: var(--measure); }
.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.toc a { display: inline-flex; gap: .5rem; align-items: baseline; padding: .35rem .75rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); font-size: .9375rem; }
.toc a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.toc .count { color: var(--ink-3); font-size: .875rem; }
.year-group { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.5rem; }
.year-group + .year-group { margin-top: .5rem; }
.year { font: 300 1.75rem/1 var(--serif); color: var(--ink-3); margin: 1.1rem 0 0; position: sticky; top: 5rem; align-self: start; }

/* footer */
.foot { border-top: 1px solid var(--rule); padding: 2rem 0 2.5rem; }
.foot-inner { text-align: center; }
.foot .social { display: flex; justify-content: center; gap: 1.25rem; font-size: 1.375rem; margin-bottom: .75rem; }
.foot .social a { color: var(--ink-2); }
.foot .social a:hover { color: var(--accent); }
.foot p { margin: 0; font-size: .875rem; color: var(--ink-3); }

/* responsive */
@media (max-width: 62rem) {
  .nav-wide { display: none; }
  .menu { display: block; }
}
@media (max-width: 48rem) {
  .wrap, .topbar-inner { padding-left: 1rem; padding-right: 1rem; }
  main.wrap { padding-top: 2rem; }
  .intro { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "head" "profile" "text"; row-gap: 1.5rem; }
  .home-head { margin-bottom: 0; }
  .profile { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: center; margin: 0; }
  .profile figcaption { margin: 0; }
  .profile-links { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
  .profile-links li { margin: 0; }
  .name { font-size: 2.25rem; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .abbr span { display: inline-block; min-width: 4.5rem; }
  .year-group { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .year { position: static; margin: 1.5rem 0 0; font-size: 1.5rem; }
  .news th { width: auto; padding-right: 1rem; }
  .page-head h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.ico { width: 1em; height: 1em; vertical-align: -.125em; flex: none; }
.profile-links .ico { width: 1.25rem; margin-right: .5rem; }
.home-head { margin-bottom: 1.75rem; }
.home-head .role { margin-bottom: 0; }
.intro .profile { margin-top: .5rem; }
@media (max-width: 48rem) { .intro .profile { margin-top: 0; } }

/* content pages (Markdown) */
.prose { max-width: 46rem; }
.prose.wide { max-width: none; }
.prose > h2 { margin-top: 3rem; }
.prose > h2:first-child { margin-top: 2rem; }
.prose h3:not([class]) { font: 600 1.125rem/1.35 var(--sans); margin: 2rem 0 .5rem; }
.prose h2 + h3:not([class]) { margin-top: 1.25rem; }
.prose :is(ul, ol):not([class]) { padding-left: 1.15rem; margin: 0 0 1rem; }
.prose :is(ul, ol):not([class]) > li { margin-bottom: .5rem; padding-left: .25rem; }
.prose :is(ul, ol):not([class]) > li::marker { color: var(--accent); }
.prose hr { border: 0; margin: 0; }
.prose .notice { margin: 0 0 1.5rem; }
.prose .btn { margin-right: .5rem; }
.prose img, .prose embed { max-width: 100%; }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.prose th, .prose td { text-align: left; padding: .5rem 1rem .5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }

/* posters */
.posters { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.5rem; }
.poster a { display: block; color: var(--ink); }
.poster a:hover { text-decoration: none; }
.poster img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); transition: border-color .15s ease-out; }
.poster a:hover img { border-color: var(--accent); }
.poster-title { display: block; font-weight: 600; line-height: 1.35; margin-top: .75rem; }
.poster a:hover .poster-title { color: var(--accent); }
.poster-meta { display: block; font-size: .9375rem; color: var(--ink-2); margin-top: .25rem; }
