/* keithjlee.com: plain HTML, one stylesheet.
   IBM Plex Mono, uppercase: the frame (site name, nav, footer) and each page's title (h1).
   IBM Plex Sans, normal case: everything else, including section headings (h2, h3). */

:root {
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ink: #111;
  --muted: #666;
  --rule: #ccc;
  --link: #2559f5;          /* same blue as the CV */
  --visited: #551a8b;
  --bg: #fff;

  --measure: 36em;          /* max width of text: ~70 characters a line */
  --wide: 64rem;            /* max width of the page; figures can use all of it */
  --gutter: 1rem;           /* side margin on phones; grows on bigger screens */
}

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

body {
  margin: 0 auto;
  padding: 0 var(--gutter);
  max-width: var(--wide);
  font: 400 1.0625rem/1.6 var(--sans);   /* 17px */
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;              /* long URLs wrap instead of widening the page */
}

@media (min-width: 40em) {
  :root { --gutter: 2rem; }
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:visited { color: var(--visited); }
a:hover { text-decoration-thickness: 2px; }

/* ---- the mono, all-caps voice ---- */

.site-header, .site-footer, h1 {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- header ---- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5em 2em;
  padding: 1.5rem 0 0.75rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.875rem;
}
.site-header a { color: var(--ink); text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.site-name { font-weight: 500; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.5em 1.5em; }
.site-header nav a[aria-current="page"] { text-decoration: underline; }

/* ---- page body ----
   Text is held to --measure; figures and videos may run the full page width. */

main { padding: 2rem 0 3rem; }
main > * { max-width: var(--measure); }
main > figure, main > .wide { max-width: 100%; }

h1 { font-size: 0.875rem; font-weight: 500; margin: 0 0 2rem; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 2.5rem 0 0.5rem; }
h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; margin: 2rem 0 0.5rem; }
h2 a, h3 a, h2 a:visited, h3 a:visited { color: var(--link); }

p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* ---- figures, images, animations ---- */

img, video { display: block; max-width: 100%; height: auto; }

figure { margin: 0 0 2.5rem; }
figure img, figure video { margin: 0 auto; }
figcaption {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.75em;
  max-width: var(--measure);
}

/* ---- a row of links (About) ---- */

.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25em 1.25em; }

/* ---- publications ---- */

.pubs { list-style: none; padding: 0; }
.pubs li { margin: 0 0 1.5em; }
.pubs p { margin: 0; }
.pub-title { font-weight: 600; }
.pub-authors, .pub-venue { color: var(--muted); font-size: 0.9375rem; }
.pub-authors strong { color: var(--ink); }
.year, .status { font-family: var(--mono); text-transform: uppercase; font-size: 0.8125rem; letter-spacing: 0.04em; }
.status::before { content: "· "; }

/* ---- footer ---- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.5em;
  padding: 0.75rem 0 2rem;
  border-top: 1px solid var(--ink);
  font-size: 0.75rem;
  color: var(--muted);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---- About portrait: not full width ---- */

main > figure.portrait { max-width: 22rem; }
h2 + .pubs { margin-top: 1.25rem; }
