:root {
  --bg: #faf9f6;
  --card: #ffffff;
  --text: #1f1e1b;
  --muted: #75716a;
  --rule: #e8e4db;
  --accent: #a8442a;
  --accent-hover: #8a3a24;
  --glow-1: color-mix(in srgb, #a8442a 6%, transparent);
  --glow-2: color-mix(in srgb, #d9a441 6%, transparent);
  --serif: "Source Serif 4", Charter, "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 790px;
  --maxw-essay: 680px;
  /* type scale (base 19px) */
  --fs-xs: 0.72rem;
  --fs-s: 0.82rem;
  --fs-m: 0.95rem;
  --fs-body: 1rem;
  --fs-l: 1.16rem;
  --fs-xl: 1.35rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191917;
    --card: #20201e;
    --text: #e8e6e0;
    --muted: #9a9a92;
    --rule: #2e2e2c;
    --accent: #e07a5f;
    --accent-hover: #f3a48d;
    --glow-1: color-mix(in srgb, #e07a5f 9%, transparent);
    --glow-2: color-mix(in srgb, #d9a441 8%, transparent);
  }
}

* { box-sizing: border-box; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--card);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 0 0 6px 0;
  border: 1px solid var(--rule);
}

.skip-link:focus {
  left: 0;
}

#content:focus { outline: none; }

::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Soft ambient glow along the top of the page, painted as body
   background layers so it can never stack behind the page fill */
body {
  background-image:
    radial-gradient(620px 300px at 18% -60px, var(--glow-1), transparent 70%),
    radial-gradient(820px 380px at 92% -100px, var(--glow-2), transparent 70%);
  background-repeat: no-repeat;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* Essays read at a narrower measure than lists */
.container--essay {
  max-width: var(--maxw-essay);
}

/* ---------- Homepage masthead ---------- */
.site-header {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas:
    "avatar identity"
    "avatar profiles";
  align-items: center;
  column-gap: 28px;
  row-gap: 0;
  margin-bottom: 34px;
}

.avatar {
  grid-area: avatar;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--rule), 0 6px 20px rgba(31, 29, 24, 0.08);
}

.site-id {
  grid-area: identity;
  align-self: end;
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
}

.title-row .site-title { margin: 0; }

.seal-mark {
  display: block;
  width: 34px;
  height: auto;
  flex: 0 0 auto;
  transform: translateY(-3px) rotate(-0.8deg);
  filter: drop-shadow(0 2px 5px rgba(103, 35, 24, 0.1));
}

.site-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.65rem;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-tagline {
  font-family: var(--serif);
  font-style: normal;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.38;
  margin: 4px 0 7px;
}

.links {
  grid-area: profiles;
  align-self: start;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--serif);
  font-size: 0.9rem;
}

.links li {
  display: inline-flex;
  align-items: center;
}

.links li:not(:last-child)::after {
  content: "·";
  margin: 0 9px;
  color: var(--rule);
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.links a:hover { color: var(--accent); }
/* ---------- Navigation ---------- */
.tabnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  display: flex;
  gap: 28px;
  margin: 0 0 48px;
  padding: 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  flex-wrap: wrap;
}

.tabnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 1px 0 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tabnav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  transition: background 0.15s ease;
}

.tabnav a:hover { color: var(--text); }

.tabnav a.active {
  color: var(--text);
}

.tabnav a.active::after {
  background: var(--accent);
}

/* ---------- Compact header on inner pages ---------- */
.pagehead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0;
  margin: -16px 0 0;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
}

.pagehead-name {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-l);
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.pagehead-name:hover { color: var(--accent); }

.tabnav--inline {
  position: static;
  margin: 0;
  padding: 0;
  border-bottom: none;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.tabnav--inline a::after { bottom: -1px; }

.page-intro {
  margin: 44px 0 40px;
}

.page-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-3xl);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.page-dek {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: var(--fs-l);
  margin: 8px 0 0;
}

/* The About page opens with a slightly larger editorial lede. */
.home-content > p:first-child {
  font-size: var(--fs-l);
  line-height: 1.6;
  letter-spacing: -0.006em;
}

/* ---------- Featured publication ---------- */
.paper-feature {
  display: grid;
  grid-template-columns: 7fr 5fr;
  text-decoration: none !important;
  color: var(--text) !important;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  margin: 1.4em 0 20px;
}

.paper-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 29, 24, 0.07);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
}

.paper-feature:focus-visible,
.paper-card:focus-visible {
  border-color: var(--accent);
}

.paper-feature .paper-thumb {
  aspect-ratio: auto;
  height: 100%;
  border-bottom: none;
  border-right: 1px solid var(--rule);
}

@media (max-width: 640px) {
  .paper-feature .paper-thumb {
    aspect-ratio: 16 / 9;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
}

.paper-feature .paper-meta {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.paper-feature .paper-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.paper-feature .paper-desc {
  font-family: var(--sans);
  font-size: var(--fs-s);
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.paper-kicker {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Paper cards (research grid) ---------- */
.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 1em;
}

.paper-card {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: var(--text) !important;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid var(--rule) !important;
}

.paper-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 29, 24, 0.07);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
}

.paper-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f6f3ec;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--rule);
}

.paper-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 0 !important;
  display: block;
  transition: transform 0.35s ease;
}

.paper-card:hover .paper-thumb img,
.paper-feature:hover .paper-thumb img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .paper-card,
  .paper-feature { transition: none; }
  .paper-thumb img { transition: none; }
  .paper-card:hover,
  .paper-feature:hover { transform: none; }
  .paper-card:hover .paper-thumb img,
  .paper-feature:hover .paper-thumb img { transform: none; }
}

.paper-meta {
  padding: 12px 14px;
}

.paper-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-m);
  line-height: 1.3;
  margin-bottom: 3px;
}

.paper-sub {
  font-family: var(--sans);
  color: var(--muted);
  font-size: var(--fs-s);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .paper-grid { grid-template-columns: 1fr; }
  .paper-feature { grid-template-columns: 1fr; }
}

/* ---------- Typography ---------- */
.content h2, .content h3 {
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
}

/* Section headings: set in the serif, title case — quiet but authored */
.content h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-xl);
  color: var(--text);
  margin: 2.5em 0 0.7em;
}

.content h3 {
  font-family: var(--serif);
  font-size: var(--fs-l);
  margin: 2em 0 0.6em;
  color: var(--text);
  font-weight: 600;
}

/* Intro paragraph on the About page */
.lede {
  font-size: 1.22em;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

/* Article date line (tagged .essay-meta in each essay's markdown);
   .views is appended there by the GoatCounter script once the count loads */
.essay-meta em,
.essay-meta .views {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

/* Essay pages only: grander title, breathing room under the date line */
.essay-content h1 {
  font-size: var(--fs-3xl);
  letter-spacing: -0.022em;
  line-height: 1.15;
}

.essay-content .essay-meta {
  margin-bottom: 2.4em;
}

.content p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

.content h2, .content h3, .content h1 {
  scroll-margin-top: 72px;
}

.content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.content a:hover { text-decoration-color: var(--accent); }

.content strong { font-weight: 600; }

.content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3em 0;
}

/* Essay pages only: section breaks render as a centered ornament */
.essay-content hr {
  border: none;
  margin: 2.8em 0;
  text-align: center;
}

.essay-content hr::before {
  content: "· · ·";
  display: block;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.7em;
  text-indent: 0.7em;
  line-height: 1;
}

/* ---------- Prose lists ---------- */
.content ul,
.content ol {
  padding-left: 1.25em;
  margin: 0 0 1.35em;
}

.content ul { list-style: disc; }

.content ul ul,
.content ol ol,
.content ul ol,
.content ol ul {
  margin: 0.35em 0 0;
}

.content ul li,
.content ol li {
  padding: 0.2em 0;
  line-height: 1.6;
}

/* ---------- Journal-style lists (News, Essays, Papers) ---------- */
.content ul.datelist,
.content ul.essay-list,
.pubs ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
}

.content ul.datelist > li,
.content ul.essay-list > li,
.pubs > ul > li,
.pubs > h3 + ul > li {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.55;
}

.content ul.datelist > li:last-child,
.content ul.essay-list > li:last-child,
.pubs > ul > li:last-child,
.pubs > h3 + ul > li:last-child { border-bottom: none; }

/* Date emphasis: anything in **bold** at the start of a bullet reads as date */
.content ul.datelist li > strong:first-child {
  color: var(--muted);
  font-weight: 500;
  font-family: var(--sans);
  font-size: var(--fs-s);
  letter-spacing: 0.02em;
}

/* ---------- Essay filter chips ---------- */
.essay-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.filter-chip {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 7px 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--muted);
}

.filter-chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.essay-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ---------- Related essays at bottom of article ---------- */
.related {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.related h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related ul li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.related ul li:last-child { border-bottom: none; }

.related ul li strong {
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--fs-s);
  font-weight: 500;
}

/* ---------- Topnav for articles ---------- */
.topnav {
  margin-bottom: 32px;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
}

.topnav a:hover { color: var(--accent); }

/* ---------- Code & quotes ---------- */
.content code {
  background: var(--rule);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.content pre {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.85em;
  line-height: 1.55;
}

.content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 1em;
}

.content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5em 0;
  padding: 0.2em 1.2em;
  color: var(--muted);
  font-style: italic;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5em 0;
}

/* ---------- Tables ---------- */
.content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.5em 0 2em;
  font-family: var(--sans);
  font-size: var(--fs-s);
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}

.content th,
.content td {
  min-width: 7rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.content th {
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.content td:first-child,
.content th:first-child { padding-left: 0; }

.content td:last-child,
.content th:last-child { padding-right: 0; }

/* ---------- Essay colophon ---------- */
.colophon {
  display: grid;
  grid-template-columns: minmax(32px, 1fr) auto minmax(32px, 1fr);
  align-items: center;
  gap: 16px;
  margin: 3.25rem 0 2.5rem;
}

.colophon::before,
.colophon::after {
  content: "";
  height: 1px;
  background: var(--rule);
}

.colophon .seal-mark {
  width: 30px;
  opacity: 0.78;
}

/* ---------- Comments + footer ---------- */
.comments h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1em;
}

.site-footer {
  margin-top: 88px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer p { margin: 0; }

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--accent); }

/* ---------- Date-column lists (Essays, News, related essays) ----------
   Dates hang in a fixed left column so titles align vertically and
   wrapped lines stay clear of it. */
.content ul.datelist li,
.content ul.essay-list li,
.related ul li {
  position: relative;
  padding-left: 92px;
}

.content ul.datelist li > strong:first-child,
.related ul li > strong:first-child,
.content ul.essay-list .item-date {
  position: absolute;
  left: 0;
  top: 16px;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--sans);
  font-size: var(--fs-s);
  letter-spacing: 0.02em;
}

.related ul li > strong:first-child { top: 15px; }

/* List titles read as ink, warming to the accent on hover */
.content ul.essay-list li a,
.content ul.datelist li a:not([href^="http"]),
.related ul li a {
  color: var(--text);
  text-decoration: none;
}

.content ul.essay-list li a:hover,
.content ul.datelist li a:not([href^="http"]):hover,
.related ul li a:hover {
  color: var(--accent);
}

/* Essay rows: serif titles, restrained category label on the right */
.content ul.essay-list li a {
  font-family: var(--serif);
  font-size: var(--fs-l);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.item-tag {
  position: absolute;
  right: 0;
  top: 18px;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.content ul.essay-list li { padding-right: 84px; }

/* ---------- Essay list descriptions ---------- */
.essay-list .essay-desc {
  margin: 3px 0 0;
  font-family: var(--sans);
  font-size: var(--fs-s);
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Papers: scannable publication hierarchy ---------- */
.pubs ul li {
  font-family: var(--sans);
  font-size: var(--fs-s);
  color: var(--muted);
  line-height: 1.6;
  padding: 16px 0;
}

.pubs ul li strong:first-child + br { display: none; }

.pubs ul li strong:first-child {
  display: block;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 2px;
}

.pubs ul li em {
  color: var(--text);
  font-family: var(--serif);
}

.pubs ins {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
  color: var(--text);
}

/* ---------- Resource chips on the Papers page ---------- */
.content a.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 1px 10px;
  margin-top: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.content a.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Reading progress bar (essay pages) ---------- */
.readbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 0;
  z-index: 50;
  pointer-events: none;
}

/* ---------- "All essays →" style centered links ---------- */
.more-link {
  text-align: center;
  margin: 1.6em 0 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.more-link a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.more-link a:hover { color: var(--accent); }

.error-code {
  margin: -0.12em 0 0.08em;
  color: color-mix(in srgb, var(--accent) 84%, var(--text));
  font-family: var(--serif);
  font-size: clamp(4.5rem, 18vw, 7.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

/* ---------- Cross-page fade (progressive enhancement) ---------- */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .container { padding: 36px 20px 64px; }
  .site-header {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-areas:
      "avatar identity"
      "avatar profiles";
    align-items: start;
    column-gap: 18px;
    row-gap: 0;
    margin-bottom: 26px;
  }
  .avatar { width: 82px; height: 82px; }
  .site-id { align-self: end; }
  .title-row { gap: 9px; }
  .site-title { font-size: 1.9rem; line-height: 1.08; }
  .seal-mark { width: 27px; }
  .site-tagline { font-size: 0.83rem; margin: 3px 0 5px; }
  .links { font-size: 0.82rem; }
  .links { width: 100%; }
  .links a { min-height: 30px; }
  .links li:not(:last-child)::after { margin-inline: 6px; }
  .tabnav {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }
  .pagehead { margin-top: 0; }
  .pagehead-name { display: none; }
  .tabnav--inline { width: 100%; }
  .page-intro { margin: 32px 0 28px; }
  .page-title { font-size: 1.9rem; }
  .content h1 { font-size: 1.7rem; }
  .essay-content h1 { font-size: 1.9rem; }
  .paper-card {
    flex-direction: row;
    min-height: 104px;
  }
  .paper-card .paper-thumb {
    width: 116px;
    flex: 0 0 116px;
    aspect-ratio: auto;
    border-right: 1px solid var(--rule);
    border-bottom: 0;
  }
  .paper-card .paper-thumb img {
    object-fit: contain;
    padding: 8px;
    background: #f2efe8;
  }
  .paper-card .paper-meta {
    align-self: center;
    padding: 12px 14px;
  }
  .content ul.essay-list li { padding-right: 0; }
  .item-tag { display: none; }
  .content ul.datelist li,
  .content ul.essay-list li,
  .related ul li {
    padding-left: 0;
  }
  .content ul.datelist li > strong:first-child,
  .related ul li > strong:first-child,
  .content ul.essay-list .item-date {
    position: static;
    display: block;
    margin-bottom: 2px;
  }
}

@media (max-width: 360px) {
  .container { padding-inline: 18px; }
  .site-header {
    grid-template-columns: 70px minmax(0, 1fr);
    column-gap: 14px;
  }
  .avatar { width: 70px; height: 70px; }
  .site-title { font-size: 1.7rem; }
  .seal-mark { width: 24px; }
  .site-tagline { font-size: 0.78rem; }
  .links { font-size: 0.78rem; }
  .links li:not(:last-child)::after { margin-inline: 5px; }
}

@media (max-width: 340px) {
  .site-header {
    grid-template-areas:
      "avatar identity"
      "profiles profiles";
    row-gap: 6px;
  }
}

@media print {
  :root {
    --bg: #fff;
    --card: #fff;
    --text: #111;
    --muted: #555;
    --rule: #ddd;
    --accent: #7d2f20;
  }
  body { background: #fff; }
  .container,
  .container--essay {
    max-width: none;
    padding: 0;
  }
  .tabnav,
  .links,
  .readbar,
  .site-footer,
  .topnav,
  .related,
  .essay-filters { display: none; }
  .pagehead {
    position: static;
    margin: 0;
    border: 0;
    background: none;
  }
  a { color: inherit !important; }
}
