/* jeremyhawkins.com — one sans-serif typeface, a small type scale, black on white.
   To change the typeface, edit --font only. System fonts, no third-party requests.

   Scale
     --s-1  small: dates, labels, footer
     --s0   body
     --s1   ledes, opening stanzas
     --s2   page titles
     --s3   opening line on the home page
   Weight: 400 for text, 700 for names, titles and labels. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --s-1: 0.8125rem;
  --s0: 1rem;
  --s1: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --s2: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --s3: clamp(2.25rem, 1.6rem + 3.2vw, 4rem);

  --paper: #fff;
  --ink: #000;
  --muted: #6f6f6f;
  --rule: #000;

  --draft: #b26a00;
  --draft-bg: #fff4dc;

  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --date-col: 7rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000;
    --ink: #fff;
    --muted: #8f8f8f;
    --rule: #fff;
    --draft: #f0b552;
    --draft-bg: #2e2412;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--s0) / 1.5 var(--font);
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-size: inherit; font-weight: 700; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover, a:focus-visible { text-decoration: none; }
a[aria-current="page"] { text-decoration: none; }
cite, em, i { font-style: italic; }

.meta, .summary, .links, .doi, .muted { color: var(--muted); }
.links a, .doi { font-size: var(--s-1); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 0.5rem; background: var(--paper); padding: 0.25rem 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.masthead, main, .colophon, .devbar {
  max-width: 64rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
main > * { max-width: var(--measure); }

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.masthead .name { font-weight: 700; text-decoration: none; }
.masthead nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.masthead nav a { text-decoration: none; color: var(--muted); }
.masthead nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.masthead nav a:hover { color: var(--ink); }

/* page title + lede */
.section-head { margin-top: 3.5rem; }
.section-head h1 { font-size: var(--s2); line-height: 1.1; letter-spacing: -0.015em; }
.lede { margin-top: 1.25rem; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.5; }
.cv-links { margin-top: 1rem; font-size: var(--s-1); }

/* section labels: small, bold, uppercase, on a rule */
section { margin-top: 3.5rem; }
h2 {
  font-size: var(--s-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  margin-bottom: 1.25rem;
}
h3 { margin-top: 1.75rem; margin-bottom: 0.5rem; }
p + p { margin-top: 1em; }

/* ---------- home ---------- */
.intro {
  display: grid;
  gap: 2rem;
  max-width: none;
  margin-top: 2.5rem;
}
@media (min-width: 48rem) {
  .intro { grid-template-columns: minmax(0, 1fr) 13rem; column-gap: 3rem; align-items: start; }
}
.intro picture, .intro > img { display: block; max-width: 13rem; }
.intro img { width: 100%; height: auto; display: block; filter: grayscale(1); }

.positioning .lead {
  font-size: var(--s3);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 12em;
}
.positioning .stanza {
  margin-top: 1.25rem;
  font-size: var(--s1);
  line-height: 1.3;
}
.positioning .lead + .stanza { margin-top: 2rem; }
.positioning .coda {
  margin-top: 2rem;
  font-size: var(--s-1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dated, .section-index { list-style: none; padding: 0; }
.dated li, .section-index li { display: grid; grid-template-columns: var(--date-col) 1fr; gap: 1rem; }
.dated li + li { margin-top: 0.75rem; }
.dated .date { color: var(--muted); font-size: var(--s-1); line-height: 1.85; font-variant-numeric: tabular-nums; }

.section-index { margin-top: 3.5rem; border-top: 1px solid var(--rule); }
.section-index li { display: block; padding: 0.9rem 0 1rem; border-bottom: 1px solid var(--muted); }
.section-index li > span { display: block; margin-top: 0.4rem; }
.section-index a { font-size: var(--s1); font-weight: 700; text-decoration: none; }
.section-index a:hover { text-decoration: underline; }
.section-index span { color: var(--muted); }

/* ---------- lists of entries ---------- */
.entries, .plain, .venues, .projects { list-style: none; padding: 0; }
/* year in the left column, text in the right; the year is positioned so inline text flows normally */
.entries li { position: relative; padding-left: calc(var(--date-col) + 1rem); }
.entries li > .year {
  position: absolute; left: 0; top: 0;
  color: var(--muted);
  font-size: var(--s-1);
  line-height: 1.85;
  font-variant-numeric: tabular-nums;
}
.entries li + li { margin-top: 0.75rem; }
.plain li + li { margin-top: 0.35rem; }

.venues { columns: 2 14rem; column-gap: 2rem; }
.venues li { break-inside: avoid; }

/* ---------- projects ---------- */
.projects { display: grid; gap: 2.5rem; margin-top: 1rem; }
.project-card { display: grid; gap: 0.15rem; }
.project-card img { width: 100%; height: auto; display: block; margin-bottom: 0.75rem; }
.project-link { text-decoration: none; }
.project-title { font-size: var(--s1); font-weight: 700; line-height: 1.25; }
.project-link:hover .project-title { text-decoration: underline; }
.project-card .meta { font-size: var(--s-1); }
.empty { color: var(--muted); }

.facts { display: grid; grid-template-columns: var(--date-col) 1fr; gap: 0.25rem 1rem; margin-top: 1.25rem; }
.facts dt { color: var(--muted); font-size: var(--s-1); line-height: 1.85; }
.crumb { font-size: var(--s-1); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.cover { margin: 2rem 0; max-width: 44rem; }
.cover img { width: 100%; height: auto; display: block; }
.prose { margin-top: 2rem; }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }

/* ---------- footer ---------- */
.colophon {
  margin-top: 6rem;
  padding-top: 0.75rem;
  padding-bottom: 3rem;
  font-size: var(--s-1);
  color: var(--muted);
}
.colophon::before { content: ""; display: block; border-top: 1px solid var(--rule); margin-bottom: 0.75rem; }
.colophon p + p { margin-top: 0.15rem; }
.colophon .small { margin-top: 1rem; }

/* ---------- preview-only draft markers ---------- */
.devbar { color: var(--draft); font-size: var(--s-1); }
.draft-tag {
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--draft);
  border: 1px solid currentColor;
  padding: 0 0.3em;
  vertical-align: 0.15em;
}
.draft-note { display: block; color: var(--draft); background: var(--draft-bg); padding: 0.2rem 0.5rem; margin-top: 0.2rem; font-size: var(--s-1); }

@media (max-width: 34rem) {
  .dated li, .facts { grid-template-columns: 1fr; gap: 0; }
  .entries li { padding-left: 0; }
  .entries li > .year { position: static; display: block; line-height: 1.4; }
}

@media print {
  .masthead nav, .devbar, .skip { display: none; }
  body { background: #fff; color: #000; }
}
