/* Self-hosted variable fonts. */
@font-face {
  font-family: "Source Serif";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-var-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Source Serif";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-var-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02FF, U+1E00-1EFF, U+2020, U+2113;
}
@font-face {
  font-family: "Source Sans";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-var-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Source Sans";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-var-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02FF, U+1E00-1EFF, U+2020, U+2113;
}

:root {
  --accent: #1c4a6b;
  --accent-dim: #4d7590;
  --ink: #1a1a18;
  --ink-soft: #4a4842;
  --paper: #faf8f4;
  --paper-raised: #f2efe8;
  --rule: #ddd7cb;
  --measure: 70ch;
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Source Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

h1 { font-size: 2rem; margin: 0 0 var(--space-1); }
h2 { font-size: 1.4rem; margin: var(--space-4) 0 var(--space-2); border-top: 1px solid var(--rule); padding-top: var(--space-3); }
h3 { font-size: 1.1rem; margin: var(--space-3) 0 var(--space-1); }

p { margin: 0 0 var(--space-2); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-dim); }

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  padding: var(--space-3) 0 var(--space-2);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-4);
}

.site-nav a.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  margin-right: auto;
  text-decoration: none;
}

.site-nav .menu {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.site-nav .menu a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav .menu a.active,
.site-nav .menu a:hover {
  color: var(--accent);
}

main {
  padding-bottom: var(--space-5);
}

.tagline {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin: var(--space-2) 0 var(--space-3);
}

.header-block {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.header-block img.portrait {
  width: 200px;
  height: 200px;
  /* Offsets the h1's half-leading so the top edge lines up with the cap
     height of the name rather than with its line box. */
  margin-top: 6px;
  object-fit: cover;
  border-radius: 3px;
  flex: none;
}

.role-line {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 0.15em;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  font-size: 0.9rem;
  margin: var(--space-2) 0 var(--space-4);
  color: var(--ink-soft);
}

.threads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.threads h3 { margin-top: 0; font-size: 1rem; }
.threads p { font-size: 0.95rem; color: var(--ink-soft); }

.entry-list { list-style: none; padding: 0; }
.entry-list > li {
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--rule);
}
.entry-list > li:last-child { border-bottom: none; }

.pub-list { list-style: none; padding: 0; }
.pub-list > li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
}
.pub-list > li:last-child { border-bottom: none; }
.pub-authors { display: block; }
.pub-title { display: block; font-style: italic; }
.pub-venue { display: block; color: var(--ink-soft); font-size: 0.95rem; }
.pub-links { display: block; font-size: 0.9rem; margin-top: 0.2em; }
.entry-date {
  font-family: var(--serif);
  font-variant-numeric: oldstyle-nums;
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: block;
}

/* Shared two-column entry component (layouts/partials/entries.html): date
   range left, entry right. Used by every dated CV-style list on the site so
   they scan identically. Collapses to one column on narrow viewports. */
.entries { margin: var(--space-2) 0; }
.entries .entry {
  display: grid;
  /* Wide enough for the longest date range ("January 2025 – March 2025")
     to sit on one line at the default font size. */
  grid-template-columns: 12.5rem 1fr;
  gap: 0 var(--space-2);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--rule);
}
.entries .entry:last-child { border-bottom: none; }
.entry-period {
  font-family: var(--serif);
  font-variant-numeric: oldstyle-nums;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding-top: 0.2em;
}
.entry-body { margin: 0; }
.entry-title { display: block; font-weight: 600; }
.entry-org { display: block; }
.entry-detail {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.lede {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: var(--space-1);
}

/* Long reference tables are collapsed behind a <details>; no JavaScript
   involved, the element is natively expandable. */
.disclosure { margin: var(--space-1) 0 var(--space-3); }
.disclosure > summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--accent);
  padding: var(--space-1) 0;
}
.disclosure > summary:hover { color: var(--accent-dim); }
.disclosure > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-2) 0 var(--space-3);
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.4em 0.6em 0.4em 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
td.role-lead {
  font-weight: 600;
  color: var(--accent);
}
th { font-family: var(--serif); font-weight: 600; color: var(--ink-soft); }

.pdf-cta {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  padding: 0.5em 1em;
  border-radius: 3px;
  font-size: 0.95rem;
  margin: var(--space-2) 0;
}
.pdf-cta:hover { background: var(--accent); color: var(--paper); }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--space-3) 0 var(--space-4);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); margin-bottom: var(--space-1); }

.count-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* BibBase relabeling: own.bib's pubtype field is prefixed 1..5 purely to
   force BibBase's group order (it has no native group-ordering option),
   so we hide the raw key and print the human label instead. */
#group_1-journal-articles > i,
#group_2-conference-papers > i,
#group_3-workshop-papers > i,
#group_4-theses > i,
#group_5-posters-and-invited-talks > i {
  font-size: 0;
}
#group_1-journal-articles > i::after { font-size: 1rem; content: "Journal Articles"; }
#group_2-conference-papers > i::after { font-size: 1rem; content: "Conference Papers"; }
#group_3-workshop-papers > i::after { font-size: 1rem; content: "Workshop Papers"; }
#group_4-theses > i::after { font-size: 1rem; content: "Theses"; }
#group_5-posters-and-invited-talks > i::after { font-size: 1rem; content: "Posters and Invited Talks"; }

@media (max-width: 600px) {
  .threads { grid-template-columns: 1fr; }
  .header-block { flex-direction: column; }
  .header-block img.portrait { margin-top: 0; }
  .entries .entry { grid-template-columns: 1fr; }
  .entry-period { padding-top: 0; }
  body { font-size: 17px; }
}

@media print {
  .site-nav .menu, .pdf-cta, .site-footer { display: none; }
  /* Collapsed tables should still appear on paper. */
  .disclosure > summary { display: none; }
  .disclosure::details-content { content-visibility: visible; }
  body { background: #fff; color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  .wrap { max-width: 100%; }
}
