@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Quicksand";
  src: url("/fonts/quicksand-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #faf8f3;
  --white: #fffdf8;
  --ink: #21332b;
  --muted: #55625a;
  --accent: #233a30;
  --accent-hover: #365246;
  --shade: #e5ecdf;
  --row-hover: #f2f4ed;
  --line: #d9ded3;
  --control-line: #aeb9ad;
  --outline-line: #859487;
  --notice-line: #b7c8ae;
  --focus: #8d662a;
  --heading: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

.public-page {
  --paper: #fff;
  --white: #fff;
  --ink: #000;
  --muted: #4b4b4b;
  --accent: #000;
  --accent-hover: #333;
  --panel: #e0e0e0;
  --shade: #f2f2f2;
  --row-hover: #f7f7f7;
  --line: #e5e5e5;
  --control-line: #767676;
  --outline-line: #767676;
  --notice-line: #bcbcbc;
  --focus: #000;
  --sans: "Quicksand", system-ui, sans-serif;
  --heading: var(--sans);
  --post-heading: "Playfair Display", Georgia, serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); }
main { min-height: 56vh; }
.public-page main { flex: 1; }
main:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); font-weight: 400; line-height: 1.02; }
a { color: inherit; text-underline-offset: .19em; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: progress; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
img { display: block; max-width: 100%; }
.wrap { width: min(1180px, calc(100% - 104px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 50; top: 12px; left: 12px; padding: 8px 12px; background: var(--white); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.header-inner { min-height: 77px; padding-block: 12px; display: flex; align-items: center; justify-content: center; }
.public-page .site-header { border-bottom: 0; }
.public-page .header-inner { min-height: 96px; }
.site-nav { --nav-link-gap: clamp(12px, 2vw, 30px); display: flex; align-items: center; gap: var(--nav-link-gap); max-width: 100%; font-size: 14px; }
.site-nav ul { min-width: 0; margin: 0; padding: 0; list-style: none; }
.site-nav-primary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px var(--nav-link-gap); }
.site-nav li { min-width: 0; max-width: 100%; }
.site-nav a { display: block; padding-block: 6px; text-align: center; text-decoration: none; line-height: 1.35; overflow-wrap: anywhere; }
.site-nav a[aria-current], .site-nav a:hover { text-decoration: underline; text-underline-offset: .35em; }
.site-special-menu { position: relative; flex: none; }
.site-special-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 5px; }
.site-special-toggle:hover, .site-special-menu[open] > summary { background: var(--shade); }
.site-special-icon { width: 18px; height: 2px; border-radius: 1px; background: currentColor; box-shadow: 0 -6px currentColor, 0 6px currentColor; }
.site-nav .site-special-links {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-start: 0;
  width: min(240px, calc(100vw - 30px));
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgb(0 0 0 / .12);
}
.site-nav .site-special-links a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 4px;
  text-align: start;
}
.site-special-links a:hover, .site-special-links a[aria-current] { background: var(--shade); }
summary::marker, summary::-webkit-details-marker { display: none; content: ""; }
.chevron { width: .42em; height: .42em; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); }
details[open] > summary .chevron { transform: rotate(225deg) translate(-1px, -1px); }

.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-weight: 700; font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; text-decoration: none; font-weight: 650; font-size: 14px; line-height: 1.15; min-height: 43px; padding: 10px 16px; color: var(--white); background: var(--accent); border: 1px solid var(--accent); }
.button:hover { background: var(--accent-hover); }
.button-outline { background: transparent; color: var(--ink); border-color: var(--outline-line); }
.button-outline:hover { background: var(--shade); }
.plain-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 650; text-decoration: none; }
.plain-link:hover { text-decoration: underline; }

.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; font-size: 12px; color: var(--muted); }
.tag { background: var(--accent); color: var(--white); border-radius: 16px; padding: 3px 9px; font-size: 12px; }
.site-footer { background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); }
.footer-inner { padding-block: 28px; }
.footer-inner nav { display: flex; justify-content: center; gap: 10px 22px; flex-wrap: wrap; }
.footer-inner nav a { font-size: 13px; text-decoration: none; }
.footer-inner nav a:hover { text-decoration: underline; }

.page-banner { padding-block: 41px 44px; background: var(--panel); text-align: center; }
.page-banner h1 { font-size: clamp(32px, 6vw, 47px); line-height: 1.25; overflow-wrap: anywhere; }
.page-banner p { color: var(--muted); margin-top: 8px; font-size: 16px; overflow-wrap: anywhere; }
.page-content { padding-block: 28px 60px; }
.filters { display: grid; grid-template-columns: minmax(150px, 1.35fr) repeat(3, minmax(115px, 1fr)) auto; align-items: end; gap: 11px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.filters .button { min-height: 43px; }
.archive-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.archive-filters label { min-width: 0; }
.archive-date-field input { min-width: 0; }
.archive-filters :is(.search-field, .archive-sort-field) { grid-column: span 2; }
.archive-filters > button { grid-column: -2 / -1; justify-self: end; min-width: 110px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-stack { display: grid; gap: 14px; }
.span-all { grid-column: 1 / -1; }
label { display: grid; gap: 5px; font-weight: 650; font-size: 13px; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; max-width: 100%; min-height: 43px; border: 1px solid var(--control-line); border-radius: 0; padding: 8px 10px; background: var(--white); color: var(--ink); font-weight: 400; font-size: 15px; }
textarea { resize: vertical; }
label small { font-weight: 400; font-size: 12px; color: var(--muted); }
.result-line { display: flex; justify-content: space-between; gap: 10px; margin-block: 14px; color: var(--muted); font-size: 14px; }
.archive-result { align-items: center; flex-wrap: wrap; }
.archive-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.archive-result .archive-actions { margin-inline-start: auto; }
.blog-content { max-width: 980px; }
.publication-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.publication-meta { display: grid; align-items: center; justify-items: start; gap: 6px 10px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.publication-portal { max-width: 100%; padding: 3px 9px; border-radius: 4px; background: var(--accent); color: var(--white); overflow-wrap: anywhere; }
.publication-excerpt { max-width: 76ch; color: var(--muted); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.blog-publication { position: relative; display: grid; gap: 8px; padding: clamp(12px, 1.8vw, 18px); background: var(--row-hover); }
.blog-publication .publication-meta { gap: 4px; }
.blog-publication .publication-excerpt { font-size: 14px; }
.blog-publication :is(h2, h3) { font: 700 clamp(19px, 2.2vw, 24px)/1.32 var(--post-heading); overflow-wrap: anywhere; }
.blog-publication :is(h2, h3) a { text-decoration: none; }
.blog-publication :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; }
.blog-publication :is(h2, h3) a:hover { text-decoration: underline; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; text-align: center; font-size: 14px; }
.pagination a { background: var(--white); border: 1px solid var(--line); padding: 6px 11px; text-decoration: none; }
.pagination a:hover { background: var(--shade); }
.empty { padding: 15px 17px; background: var(--white); color: var(--muted); border: 1px solid var(--line); }
.empty a { font-weight: 650; }
.table-scroll { border: 1px solid var(--line); overflow: auto; max-width: 100%; }
table { width: 100%; min-width: 860px; border-collapse: collapse; background: var(--white); font-size: 13px; line-height: 1.42; }
thead { background: var(--shade); }
td, th { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { width: 25%; font-size: 14px; }
tbody tr:hover { background: var(--row-hover); }
td a { font-weight: 600; }
.nowrap { white-space: nowrap; }
.archive-sort-link { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; }
.archive-sort-link:hover { text-decoration: underline; }
.archive-sort-link [data-sort-indicator] { color: var(--muted); font-size: 12px; }
.archive-table th[aria-sort] { background: var(--line); }
.archive-table th[aria-sort] [data-sort-indicator] { color: var(--ink); font-weight: 700; }

.reading { max-width: 810px; padding-block: 37px 70px; }
.article-heading { margin: 18px 0 26px; }
.reading h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.2; overflow-wrap: anywhere; }
.article-heading h1 { margin: 10px 0 12px; font-family: var(--post-heading); font-weight: 700; }
.original {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  width: fit-content;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.article-heading .subtitle { margin-top: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 21px; color: var(--muted); }
.prose { font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
.prose > * { margin: 0 0 1em; }
.prose h1, .prose h2, .prose h3 { font-size: 34px; }
.prose blockquote { margin-inline: 0; border-inline-start: 3px solid var(--line); padding-inline-start: 15px; color: var(--muted); }
.references { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; font-style: italic; }
.references :is(h1, h2, h3, h4, h5, h6) { font-size: 1em; }
.references > h2:first-child { font-size: 17px; font-style: normal; }
.article-related { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-related > h2 { margin-bottom: 14px; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; }
.resume-download { margin-bottom: 18px; }
.error-page > * + * { margin-top: 16px; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery a { display: block; background: var(--shade); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.035); }
.photo-dialog { padding: 8px; border: 1px solid var(--control-line); background: var(--white); max-width: 95vw; }
.photo-dialog::backdrop { background: #000000d6; }
.photo-dialog form { display: flex; justify-content: end; margin-bottom: 7px; }
.photo-dialog img { max-height: 80vh; margin-inline: auto; }

.notice, .problem { padding: 9px 13px; margin-bottom: 11px; border: 1px solid var(--notice-line); background: var(--shade); font-size: 14px; }
.problem { background: #f6e7e2; border-color: #d9aaa0; color: #652f24; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 64px); }
  .site-nav { --nav-link-gap: 15px; }
}
@media (max-width: 820px) {
  .wrap { width: calc(100% - 36px); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: span 2; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .public-page .site-header { border-bottom: 1px solid var(--line); }
  .public-page .header-inner { min-height: 0; padding-block: 6px; }
  .site-nav { gap: 6px; }
  .site-nav-primary { gap: 0 3px; }
  .site-nav a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 5px clamp(3px, 1.2vw, 7px); border-radius: 5px; }
  .site-nav a[aria-current] { background: var(--shade); font-weight: 700; text-decoration: none; }
  .page-banner { padding-block: 28px 30px; }
}
@media (max-width: 550px) {
  .wrap { width: calc(100% - 30px); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-filters :is(.archive-date-field, .archive-sort-field) { grid-column: 1 / -1; }
  .pagination a { padding: 5px 6px; }
  .pagination { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
