/* Colors and fonts can be changed here without editing the page content. */
:root {
  --paper: #fcfbf8;
  --text: #343b42;
  --heading: #24353e;
  --muted: #737a7c;
  --link: #386778;
  --accent: #ac7d5e;
  --rule: #dfdfd7;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 960px; margin: 38px auto 52px; padding: 0 28px; }
h1, h2 { color: var(--heading); font-family: var(--serif); font-weight: 400; }
h1 { margin: 0; font-size: 40px; line-height: 1.2; letter-spacing: -.025em; }
h2 { margin: 0 0 17px; font-size: 25px; line-height: 1.3; }
nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; }
p { margin: 0 0 16px; }
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: #bccbd0;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: #244d5d; text-decoration-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
nav a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
nav a:hover { border-color: var(--accent); }

/* The name sits above both columns; the portrait is centered beside the bio. */
.introduction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 26px 38px;
  align-items: center;
}
.introduction > header {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.intro-copy { min-width: 0; }
.intro-copy > p:last-child { margin-bottom: 0; }
.portrait {
  width: 235px;
  height: 235px;
  margin: 0;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid white;
  box-shadow: 0 0 0 1px #e4dfd5, 0 6px 20px #41352109;
}

.news {
  margin-top: 28px;
  padding: 17px 20px;
  border-left: 2px solid var(--accent);
  background: #f2f0e9;
}
.news h2 { font-size: 21px; margin-bottom: 10px; }
.dated-list { list-style: none; padding: 0; margin: 0; }
.dated-list li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  font-size: 14px;
}
.dated-list li + li { margin-top: 7px; }
.date, time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Each image fills the entire right-hand side of its card. */
section[aria-labelledby="posts-heading"] { margin-top: 48px; }
.post + .post { margin-top: 14px; }
.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 29%;
  min-height: 136px;
  overflow: hidden;
  border: 1px solid #dfdfd7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 7px #343b4205;
  color: var(--heading);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.post-card:hover {
  color: var(--heading);
  border-color: #b1bdbd;
  box-shadow: 0 4px 14px #343b420b;
}
.post-copy {
  align-self: center;
  min-width: 0;
  padding: 21px 25px;
}
.post-copy time { display: block; margin-bottom: 9px; font-size: 12px; letter-spacing: .04em; }
.post-copy h3 { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.35; font-weight: 400; }
.post-visual { position: relative; min-width: 0; background: #f5f5f0; border-left: 1px solid #ebeae4; }
.post-visual img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.post-visual img { object-position: var(--image-position, 50%) center; }
.post-visual-logo { background: #111; }
.post-visual-logo img { object-fit: contain; padding: 24px; }

@media (max-width: 700px) {
  main { margin: 26px auto 38px; padding: 0 23px; }
  h1 { font-size: 35px; }
  .introduction { grid-template-columns: minmax(0, 1fr) 160px; gap: 24px 20px; }
  .introduction > header { grid-column: 1; grid-row: 1; display: block; border: 0; padding: 0; }
  nav { margin-top: 12px; gap: 8px 16px; }
  .portrait { grid-column: 2; grid-row: 1; width: 160px; height: 160px; }
  .intro-copy { grid-column: 1 / -1; }
  .news { padding: 16px; }
  .dated-list li { grid-template-columns: 69px minmax(0, 1fr); gap: 8px; }
  .post-card { grid-template-columns: minmax(0, 1fr) 32%; min-height: 128px; }
  .post-copy { padding: 18px; }
  .post-visual img { object-position: var(--image-position-mobile, var(--image-position, 50%)) center; }
  .post-visual-logo img { padding: 14px; }
  .post-copy h3 { font-size: 18px; }
}
@media (max-width: 370px) {
  main { padding: 0 18px; }
  .introduction { grid-template-columns: minmax(0, 1fr) 140px; gap: 24px 14px; }
  .portrait { width: 140px; height: 140px; }
  h1 { font-size: 32px; }
  nav { column-gap: 12px; }
  .post-copy { padding: 16px; }
  .post-copy h3 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card { transition: none; }
}

/* Article pages use the same colors and type as the homepage. */
.skip-link { position: absolute; top: -100px; left: 20px; padding: 10px; background: white; z-index: 2; }
.skip-link:focus { top: 10px; }
.site-header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: 20px; margin-bottom: 40px; border-bottom: 1px solid var(--rule); }
.site-name { font-family: var(--serif); font-size: 24px; color: var(--heading); text-decoration: none; }
.reading-page { max-width: 780px; margin: auto; }
.article-header { padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--rule); }
.article-header h1 { font-size: 36px; line-height: 1.2; margin: 12px 0 16px; }
.article-header .subtitle { font-size: 19px; color: var(--muted); }
.authors { font-size: 14px; }
.resource-links { display: block; margin-top: 20px; font-size: 14px; word-spacing: .25em; }
.resource-links a { word-spacing: normal; }
.article-body { line-height: 1.8; overflow-wrap: break-word; }
.article-body h2 { margin: 40px 0 18px; font-size: 28px; }
.article-body h3 { margin: 30px 0 15px; font-family: var(--serif); font-size: 23px; font-weight: 400; color: var(--heading); }
.article-body h4 { font-size: 18px; margin: 26px 0 12px; }
.article-body :is(h2,h3,h4) { scroll-margin-top: 24px; }
.article-body p { margin-bottom: 20px; }
.article-body img, .article-body video { max-width: 100%; height: auto; }
.article-body figure { margin: 30px 0; text-align: center; }
.article-body figure img { display: block; margin: auto; }
.article-body figcaption { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 12px; }
.article-body blockquote, .article-body .note { margin: 24px 0; padding: 18px 22px; background: #f2f0e9; border-left: 2px solid var(--accent); }
.article-body blockquote > :last-child, .article-body .note > :last-child { margin-bottom: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }
.article-body ul, .article-body ol { padding-left: 26px; }
.article-body li + li { margin-top: 6px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
p code, li code { background: #eeeee8; padding: 2px 4px; border-radius: 3px; }
pre { background: #f0f0ea; border: 1px solid #e2e2d9; border-radius: 5px; padding: 18px; overflow-x: auto; line-height: 1.6; tab-size: 4; }
pre code { white-space: pre; overflow-wrap: normal; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 26px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; background: #f2f0e9; }
.math.display { display: block; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 12px 0; }
math { font-family: 'STIX Two Math', 'STIXGeneral', 'Cambria Math', math; }
.article-footer { margin-top: 52px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; gap: 24px; font-size: 14px; }
.writing-index > h1 { margin-bottom: 30px; }
.post-card.post-card-text { grid-template-columns: 1fr; }
.draft-label { display: block; color: #82542f; font-size: 12px; margin-bottom: 8px; }
@media (max-width: 700px) {
  .site-header { gap: 12px; margin-bottom: 28px; }
  .site-header nav { margin-top: 0; }
  .site-name { font-size: 22px; }
  .article-header h1 { font-size: 30px; }
  .article-header .subtitle { font-size: 17px; }
  .article-body h2 { font-size: 26px; }
  pre { padding: 14px; }
}

/* Syntax colors are generated at setup; no browser script is needed. */
code span.al { color: #ff0000; }
code span.an { color: #60a0b0; }
code span.at { color: #7d9029; }
code span.bn { color: #40a070; }
code span.bu { color: #008000; }
code span.ch { color: #4070a0; }
code span.co { color: #60a0b0; }
code span.cv { color: #60a0b0; }
code span.cn { color: #880000; }
code span.cf { color: #007020; }
code span.dt { color: #902000; }
code span.dv { color: #40a070; }
code span.do { color: #ba2121; }
code span.er { color: #ff0000; }
code span.fl { color: #40a070; }
code span.fu { color: #06287e; }
code span.im { color: #008000; }
code span.in { color: #60a0b0; }
code span.kw { color: #007020; }
code span.op { color: #666666; }
code span.ot { color: #007020; }
code span.pp { color: #bc7a00; }
code span.sc { color: #4070a0; }
code span.ss { color: #bb6688; }
code span.st { color: #4070a0; }
code span.va { color: #19177c; }
code span.vs { color: #4070a0; }
code span.wa { color: #60a0b0; }

.article-body p:has(> img:only-child) { text-align: center; margin: 30px 0; }
math[display="block"] { display: block; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 12px 0; }
