
:root {
  --bg: #ffffff;
  --text: #1c1c1c;
  --muted: #5c5c5c;
  --rule: #dcdcdc;
  --accent: #8c1d18;
  --plate: #f2f2f2;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17181a;
    --text: #e8e6e3;
    --muted: #a8a6a2;
    --rule: #36383b;
    --accent: #e6a198;
    --plate: #26282b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17181a;
  --text: #e8e6e3;
  --muted: #a8a6a2;
  --rule: #36383b;
  --accent: #e6a198;
  --plate: #26282b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

.page { max-width: 720px; margin: 0 auto; padding: 28px 20px 64px; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 20px; top: 8px; background: var(--bg); padding: 4px 8px; }

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 15px;
  margin-bottom: 44px;
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent); }

.theme-toggle {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }

h1 { font-size: 32px; font-weight: 400; line-height: 1.2; margin: 0 0 4px; }
h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 48px 0 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.lede { color: var(--muted); margin: 0 0 24px; font-size: 16px; }

.intro { display: grid; grid-template-columns: 1fr 148px; gap: 32px; align-items: start; }
.intro p { margin: 0 0 14px; }
.intro .lede { margin-bottom: 18px; }
.photo { display: block; width: 148px; height: 178px; object-fit: cover; }
.photo-placeholder {
  background: var(--plate);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.contact { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }

.entry { display: grid; grid-template-columns: 220px 1fr; gap: 22px; margin-bottom: 30px; }
.entry.no-fig { display: block; }
.fig { background: #fff; padding: 4px; align-self: start; }
.fig img { display: block; width: 100%; height: auto; }
a.fig { background: none; padding: 0; }
.entry h2, .entry h3 { font-size: 17px; font-weight: 700; line-height: 1.35; margin: 0; padding: 0; border: 0; }
.status { font-style: italic; color: var(--muted); font-size: 15px; margin: 2px 0 6px; }
.entry p { font-size: 16px; line-height: 1.5; margin: 0 0 6px; }
.entry p.status { font-size: 15px; margin: 2px 0 6px; }
.entry .meta { color: var(--muted); font-size: 15px; }

.dated { list-style: none; margin: 0; padding: 0; }
.dated li { display: grid; grid-template-columns: 124px 1fr; gap: 12px; margin-bottom: 8px; font-size: 16px; line-height: 1.5; }
.dated .when { color: var(--muted); }

.simple { margin: 0 0 8px; padding-left: 20px; font-size: 16px; line-height: 1.5; }
.simple li { margin-bottom: 6px; }
.builds { margin: 0 0 8px; padding-left: 20px; font-size: 16px; line-height: 1.5; }
.builds li { margin-bottom: 14px; padding-left: 2px; }
.builds li::marker { color: var(--accent); }
.builds p { margin: 2px 0 0; }
.build-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.build-when { color: var(--muted); font-size: 15px; white-space: nowrap; }
.cv p { font-size: 16px; line-height: 1.5; margin: 0 0 8px; }
.cv h3 { font-size: 16px; line-height: 1.4; margin: 12px 0 2px; }
.cv h3.group { color: var(--muted); font-weight: 400; font-style: italic; margin: 22px 0 8px; }
.cv .item { margin-bottom: 14px; }
.cv .item h3 { margin: 0 0 2px; }
.cv .item p, .cv .item .simple { margin-bottom: 4px; }
.cv .item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.cv .item-when { color: var(--muted); font-size: 15px; white-space: nowrap; }
.cv .byline { color: var(--muted); font-size: 15px; font-style: italic; }

footer { margin-top: 56px; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  .intro { grid-template-columns: 1fr; gap: 16px; }
  .photo { order: -1; width: 112px; height: 134px; }
  .entry { grid-template-columns: 1fr; gap: 10px; }
  .fig { max-width: 320px; }
  .dated li { grid-template-columns: 1fr; gap: 0; margin-bottom: 12px; }
  .cv .item-head { display: block; }
  .build-head { display: block; }
  .build-when { display: block; white-space: normal; }
  .cv .item-when { display: block; white-space: normal; }
}

@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --text: #000; --muted: #333; --rule: #999; --accent: #000; color-scheme: light;
  }
  @page { margin: 0.6in; }
  body { font-size: 10.5pt; line-height: 1.32; }
  .page { max-width: none; padding: 0; }
  .site-nav, .skip, footer, .no-print { display: none; }
  h1 { font-size: 20pt; }
  h2 { font-size: 11.5pt; margin: 10pt 0 4pt; padding-bottom: 2pt; break-after: avoid; }
  .lede { font-size: 10.5pt; margin-bottom: 6pt; }
  .cv p, .simple, .dated li { font-size: 10.5pt; line-height: 1.32; }
  .cv h3 { font-size: 10.5pt; margin: 6pt 0 1pt; break-after: avoid; }
  .cv h3.group { margin: 8pt 0 3pt; }
  .cv .item { margin-bottom: 5pt; break-inside: avoid; }
  .cv .item p, .cv .item .simple { margin-bottom: 1pt; }
  .cv .item-when, .cv .byline { font-size: 10pt; }
  .cv .byline { break-after: avoid; }
  .simple { padding-left: 14pt; }
  .simple li { margin-bottom: 2pt; }
  .builds { font-size: 10.5pt; line-height: 1.32; padding-left: 14pt; }
  .builds li { margin-bottom: 3pt; break-inside: avoid; }
  .builds p { margin: 0; }
  .build-when { font-size: 10pt; }
  .dated li { grid-template-columns: 100pt 1fr; gap: 6pt; margin-bottom: 2pt; break-inside: avoid; }
  a { text-decoration: none; }
}
