/* ============================================================
   COLOURS — change these six values to re-theme the whole page.
   ============================================================ */
:root {
  --paper:        #f4f3ee;  /* page background */
  --ink:          #1e1d1b;  /* main text */
  --muted:        #62605a;  /* authors, venue, secondary text */
  --accent:       #2f5a67;  /* links */
  --accent-strong:#234750;  /* link hover / keyboard focus */
  --rule:         #d9d6cd;  /* thin dividing lines */

  /* Fonts. Both are ordinary system fonts, so the page loads
     instantly and makes no outside network requests. */
  --serif: "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Times New Roman", serif;
  --mono:  ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", "Liberation Mono", Menlo, monospace;
}

/* Automatic dark version, only if the reader's system asks for it.
   Delete this whole block if you want the page always light. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #17181a;
    --ink:          #e7e4dd;
    --muted:        #9a968c;
    --accent:       #7fb0bd;
    --accent-strong:#a6cdd7;
    --rule:         #2c2e30;
  }
}

/* ============================================================
   LAYOUT & TYPE — you shouldn't need to touch much below here.
   ============================================================ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.06rem;         /* comfortable reading size */
  line-height: 1.5;
  /* centred column, wide enough for two paper columns on a laptop */
  max-width: 58rem;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 2rem) 5rem;
  margin-inline: auto;
}

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Masthead: name + IDs -------------------------------- */
.masthead h1 {
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

/* Optional one-line descriptor under the name.
   It is commented out in the HTML below; enable it there if wanted. */
.descriptor {
  margin: -0.2rem 0 0.6rem;
  color: var(--muted);
  font-style: italic;
}

.ids {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.ids a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}
.ids a:hover,
.ids a:focus-visible { border-bottom-color: var(--accent); }
.ids .k {              /* the little label, e.g. ORCID */
  color: var(--accent);
  letter-spacing: 0.03em;
}

.divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 2.2rem 0 0.5rem;
}

/* ---- Publications: a two-column bibliography ------------- */
/* The list flows into columns at least 20rem wide, up to two of
   them. On a laptop/desktop that means two columns; when the
   window is too narrow for two (phones, small tablets) it drops
   to one automatically — no fixed breakpoint needed.
   Change "20rem" to flip earlier/later; change "2" to allow more. */
.pubs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  column-gap: 2.5rem;
  align-items: start;   /* rows align at the top, no stretching */
  margin-top: 0.5rem;
}
.year {
  /* the year label spans the full width, above its papers */
  grid-column: 1 / -1;
  margin: 0.3rem 0 0.9rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.articles_group {
  /* the articles_group label spans the full width, above its papers */
  grid-column: 1 / -1;
  margin: 1.9rem 0 0.9rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.pubs > .year:first-child { margin-top: 0; }
.entry {
  /* never split a single paper across the column break */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 1.4rem;
}

.title {
  display: inline;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.05rem;
}
.title:hover,
.title:focus-visible { text-decoration: underline; }

.title .article_note {
  margin: 0.25rem 0 0;
}

.pdf {   /* the small "PDF" marker that says a file will open */
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.05em 0.35em;
  margin-left: 0.35em;
  vertical-align: 0.12em;
  white-space: nowrap;
}

.authors, .venue {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.authors .me { color: var(--ink); }   /* your own name, un-muted */

/* ---- Printing: clean black-on-white, show the file paths -- */
@media print {
  :root {
    --paper: #fff; --ink: #000; --muted: #333;
    --accent: #000; --rule: #999;
  }
  body { max-width: none; }
  .pubs { grid-template-columns: 1fr; }  /* single column on paper */
  .title[href]::after {
    content: " (" attr(href) ")";
    font-family: var(--mono);
    font-size: 0.75em;
    color: var(--muted);
  }
  .pdf { display: none; }
}

/* ============================================================
   PROSE PAGES (start_here.html and any other text page).
   Same column, same colours; headings sized for reading.
   ============================================================ */
.prose h1 {
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
}
.prose h2 {                 /* section label, same voice as the bibliography's group labels */
  margin: 2.6rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose h3 {
  font-weight: 600;
  font-size: 1.25rem;
  margin: 1.8rem 0 0.5rem;
}
.prose h4 {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 1.4rem 0 0.4rem;
}
.prose h4 a { text-decoration: none; }
.prose h4 a:hover, .prose h4 a:focus-visible { text-decoration: underline; }
.prose p  { margin: 0 0 0.9rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose li { margin: 0.25rem 0; }
.prose li::marker { color: var(--muted); }
.prose .lede { font-size: 1.12rem; }
.prose .paths li { margin: 0.35rem 0; }
.prose .paths .t {          /* the "1 minute" label */
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 0.4em;
}
.prose hr {
  height: 1px; border: 0; background: var(--rule);
  margin: 2.4rem 0 1.4rem;
}
.prose .colophon { color: var(--muted); font-size: 0.92rem; }
.crumb {                    /* small line above the title: who, and a way back */
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.crumb a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumb a:hover, .crumb a:focus-visible { border-bottom-color: var(--accent); }
@media print {
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--mono); font-size: 0.75em; color: var(--muted);
  }
  .crumb { display: none; }
}
