/* Joanna Wiaterek: site styles.
   Colours and fonts are set once, in the block below. */
 
:root {
  --navy: #0f3d2e;
  --navy-2: #1d5a45;
  --paper: #faf9f6;
  --ink: #000000;
  --muted: #55645b;
  --rule: #d9ded9;
  --red: #8a3b12;
  --gold: #faf9f6;
  --on-navy: #f4f1e8;
  --on-navy-muted: #b9cbc0;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 68rem;
  --link-on-dark: #b9cbc0;
}
 
*, *::before, *::after { box-sizing: border-box; }
 
html { -webkit-text-size-adjust: 100%; }
 
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
 
a { color: var(--red); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
 
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.stage :focus-visible, .foot :focus-visible { outline-color: var(--gold); }
 
.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
 
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--navy);
  padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }
 
/* ---------- Navy "stage": header, hero, page titles ---------- */
 
.stage { background: var(--navy); color: var(--on-navy); }
.stage a { color: var(--link-on-dark); }
.stage a:hover { color: #fff; }
 
.bar {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.6rem 2rem;
  padding-block: 1.4rem;
}
 
.stage .brand {
  font-family: var(--display); font-weight: 600; font-size: 1.7rem;
  color: var(--on-navy); text-decoration: none; letter-spacing: 0.01em;
}
 
.nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; margin: 0; padding: 0; list-style: none; }
.stage .nav a {
  color: var(--on-navy); text-decoration: none;
  padding-block: 0.25rem; border-bottom: 2px solid transparent;
}
.stage .nav a:hover { border-bottom-color: var(--on-navy-muted); }
.stage .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
 
.pagehead { padding-block: 2rem 3.5rem; }
.pagehead h1 {
  font-family: var(--display); font-weight: 500; color: #fff;
  font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 0.6rem;
}
.pagehead p { margin: 0; max-width: 40rem; color: var(--on-navy-muted); font-size: 1.1rem; }
 
/* ---------- Hero: bio next to a round photo ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 34rem) auto;
  justify-content: center;
  align-items: center;
  gap: 2rem 4rem;
  padding-block: 2.5rem 3rem;
}
.hero-text { padding: 0; }
.hero-text p { margin: 0 0 1rem; max-width: none; }
.hero-text p:last-child { margin-bottom: 0; }
.photo {
  width: 17rem; height: 17rem; border-radius: 50%;
  overflow: hidden; background: var(--navy-2);
}
.photo img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 50% 25%; border-radius: 50%;
}
@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 2rem 2.5rem; }
  .photo { order: -1; justify-self: center; width: 9.5rem; height: 9.5rem; }
}
 
/* ---------- Lists ---------- */
 
.latest {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem 5rem; padding-block: 4rem 5rem;
}
.latest h2, .year-group h2 {
  font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.1;
}
.latest h2 { font-size: 2rem; margin-bottom: 1rem; }
 
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.25rem 1.25rem; padding-block: 1.1rem; border-top: 1px solid var(--rule);
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.when { font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--muted); line-height: 1.5; }
.row h3, .entry h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; }
.row h3 a, .entry h3 a { color: var(--ink); text-decoration: none; }
.row h3 a:hover, .entry h3 a:hover { color: var(--red); text-decoration: underline; }
.row p {
  margin: 0.35rem 0 0; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.more { display: inline-block; margin-top: 1.2rem; font-weight: 500; }
 
.section { padding-block: 3.5rem 5rem; }
 
.year-group { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem 1.5rem; margin-bottom: 3rem; }
.year-group > h2 { font-size: 2.4rem; font-weight: 500; position: sticky; top: 1rem; align-self: start; }
 
.entry { padding-block: 1.2rem; border-top: 1px solid var(--rule); }
.entry:first-child { padding-top: 0; border-top: 0; }
.entry p { margin: 0.3rem 0 0; }
.entry .meta, .post .meta { color: var(--muted); font-size: 0.95rem; }
.venue { font-style: italic; }
.tags { margin-left: 1rem; }
.tags a { color: var(--muted); }
.tags a:hover { color: var(--red); }
 
.filters { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; list-style: none; margin: 0 0 2.5rem; padding: 0; }
.filters a { color: var(--muted); text-decoration: none; padding-block: 0.2rem; border-bottom: 2px solid transparent; }
.filters a:hover { color: var(--red); }
.filters a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--gold); }
 
.notice { color: var(--muted); }
.notice small { display: block; font-size: 0.85rem; }
 
/* ---------- A single blog post ---------- */
 
.post { width: min(100% - 3rem, 42rem); margin-inline: auto; padding-block: 2.5rem 5rem; }
.post .back { margin: 0 0 2rem; font-size: 0.95rem; }
.post h1 {
  font-family: var(--display); font-weight: 500; line-height: 1.08;
  font-size: clamp(2.3rem, 5.5vw, 3.4rem); margin: 0 0 0.8rem;
}
.post .meta { margin: 0 0 2.5rem; }
 
.prose { font-size: 1.125rem; line-height: 1.75; }
.prose p { margin: 0 0 1.25rem; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 1.95rem; line-height: 1.2; margin: 2.6rem 0 0.7rem; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.25; margin: 2rem 0 0.5rem; }
.prose blockquote {
  margin: 1.8rem 0; padding: 0.2rem 0 0.2rem 1.4rem; border-left: 3px solid var(--gold);
  color: var(--muted); font-family: var(--display); font-size: 1.35rem; line-height: 1.45;
}
.prose blockquote p { margin: 0 0 0.8rem; }
.prose img { max-width: 100%; height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose pre { overflow-x: auto; background: #eef0f2; padding: 1rem; font-size: 0.95rem; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 1.25rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 0.4rem 0.7rem; text-align: left; }
 
/* ---------- Footer ---------- */
 
.foot { background: var(--navy); color: var(--on-navy-muted); }
.foot .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 0.8rem 2rem; padding-block: 2rem; font-size: 0.95rem;
}
.foot p { margin: 0; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.foot a { color: var(--link-on-dark); }
.foot a:hover { color: #fff; }
 
/* ---------- Small screens ---------- */
 
@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding-block: 2rem 2.5rem; }
  .photo { order: -1; justify-self: center; width: 12rem; height: 12rem; }
  .latest { grid-template-columns: 1fr; padding-block: 3rem 3.5rem; }
  .year-group { grid-template-columns: 1fr; gap: 0.8rem; }
  .year-group > h2 { position: static; font-size: 2rem; }
  .row { grid-template-columns: 1fr; }
}

/* ---------- Instrument Serif: one weight, so headings stay regular ---------- */
.stage .brand,
.pagehead h1,
.latest h2, .year-group h2,
.row h3, .entry h3,
.post h1,
.prose h2, .prose h3 { font-weight: 400; }

/* Instrument Serif is slim, so headings get a little larger */
.stage .brand { font-size: 2rem; }
.pagehead h1 { font-size: clamp(3rem, 7vw, 4.6rem); }
.latest h2 { font-size: 2.4rem; }
.year-group > h2 { font-size: 2.8rem; }
.row h3, .entry h3 { font-size: 1.65rem; }
.when { font-size: 1.3rem; }
.post h1 { font-size: clamp(2.6rem, 6vw, 3.8rem); }
.prose h2 { font-size: 2.2rem; }
.prose h3 { font-size: 1.7rem; }
.prose blockquote { font-size: 1.5rem; }

@media (max-width: 52rem) {
  .year-group > h2 { font-size: 2.2rem; }
}
