@font-face {
  font-display: swap;
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 100 900;
  src: url("/assets/fonts/plex-serif/IBM Plex Serif Var-Roman.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "IBM Plex Serif";
  font-style: italic;
  font-weight: 100 900;
  src: url("/assets/fonts/plex-serif/IBM Plex Serif Var-Italic.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
    --bg: #f7f7f7;
    --text: #222222;
    --muted: #666666;
    --quiet: #707070;
    --link: #222222;
    --link-hover: #222222;
    --accent: #222222;
    --border: #d0d0d0;
    --border-soft: #e5e5e5;
    --code-bg: #f0f0f0;
    --focus: #0044cc;
    --selection: #d0d0d0;
     --font: "IBM Plex Serif", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
     --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
   :root {
       --bg: #111111;
       --text: #e0e0e0;
       --muted: #888888;
       --quiet: #888888;
       --link: #e0e0e0;
       --link-hover: #e0e0e0;
       --accent: #e0e0e0;
       --border: #333333;
       --border-soft: #222222;
       --code-bg: #1a1a1a;
       --focus: #6ebfff;
       --selection: #333333;
   }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  margin: 0;
  min-height: 100vh;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: color 140ms ease;
}

a:hover,
a:focus-visible {
  color: var(--text);
}

a:focus-visible,
button:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

::selection {
  background: var(--selection);
}

.skip-link {
  background: var(--bg);
  border: 1px solid var(--text);
  color: var(--text);
  font-family: var(--font);
  left: 1rem;
  padding: 0.55rem 0.8rem;
  position: absolute;
  top: -4rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  margin: 0 auto;
  max-width: 720px;
  padding: clamp(1.5rem, 4vh, 2.8rem) clamp(1rem, 5vw, 3rem) 2rem;
}

.site-header {
  border-bottom: 1px solid var(--border-soft);
  margin: 0 0 clamp(2rem, 4.5vh, 3rem);
  padding-bottom: 0.85rem;
}

.site-main {
  margin: 0;
  max-width: none;
}

.site-nav {
  display: flex;
  flex-flow: row wrap;
  gap: 0.5rem 0.9rem;
  font-family: var(--font);
}

.site-nav a {
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  padding: 0.1rem 0 0.18rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.prose {
  font-family: var(--font);
  line-height: 1.7;
  padding: 0;
}

.page-header {
  margin: 0 0 2.1rem;
  max-width: 680px;
}

.page-header::after {
  content: none;
}

.page-header h1 {
  color: var(--text);
  font-family: var(--font);
  font-size: 1.75rem;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
}

.page-dek {
  line-height: 1.6;
  margin: 0.6rem 0 0;
  max-width: 37rem;
}

.page-index .page-header {
  margin-bottom: 2rem;
}


.page-index h2 {
  color: var(--text);
  font-size: 1.25rem;
  margin: 2.6rem 0 0.85rem;
}

.page-index ul {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.page-index li {
  border-bottom: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.52;
  margin: 0;
  padding: 0.78rem 0 0.88rem;
}

.page-index li + li {
  margin-top: 0;
}

.page-index li a {
  display: block;
  font-family: var(--font);
  font-weight: 500;
  margin-bottom: 0.12rem;
}

.post-header {
  margin-bottom: 1.6rem;
}

.post-header h1 {
  font-size: 1.75rem;
}

.post-date {
  color: var(--quiet);
  font-family: var(--font);
  font-size: 0.875rem;
  margin: 0.55rem 0 0;
}

.prose.post {
  line-height: 1.65;
}

.prose.post p,
.prose.post ul,
.prose.post ol {
  margin: 0.7rem 0;
}

.prose.post p:first-child {
  margin-top: 0;
}

.prose.post p:last-child {
  margin-bottom: 0;
}

.prose.post strong {
  font-weight: 600;
}

.prose.post blockquote {
  margin-bottom: 1.3rem;
}

.page-header + p,
.page-header + section {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font);
  letter-spacing: 0;
  line-height: 1.3;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0;
}

h2 {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 650;
  margin: 2.35rem 0 0.8rem;
}

h3 {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 560;
  margin: 1.8rem 0 0.65rem;
}

p,
ul,
ol,
pre,
blockquote {
  margin: 1rem 0;
}

ul,
ol {
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.42rem;
}

strong {
  font-weight: 500;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

code {
  background: var(--code-bg);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 0.08rem 0.28rem;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  line-height: 1.5;
  overflow-x: auto;
  padding: 1rem;
}

pre code {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  margin-left: 0;
  padding-left: 1rem;
}

.prose a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
}

.prose img {
  border-radius: 7px;
  display: block;
  margin: 1.6rem 0;
}

.collection-index {
  margin-top: 0;
}

.post-list {
  display: block;
}

.post-list > p,
.blog-stream > p {
  color: var(--muted);
  margin: 0;
  padding: 0;
}

.post-row {
  align-items: baseline;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: 0;
}

.post-row + .post-row {
  margin-top: 1.1rem;
}

.post-row h2 {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.38;
  margin: 0;
}

.post-row h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-row h2 a:hover {
  color: var(--link-hover);
}

.post-row time {
  color: var(--quiet);
  font-size: 0.76rem;
  line-height: 1.4;
  white-space: nowrap;
}

.blog-stream {
  margin-top: 0;
}

.blog-entry {
  padding: 0;
}

.blog-entry + .blog-entry {
  margin-top: 2.25rem;
}

.blog-entry-header {
  margin-bottom: 0.9rem;
}

.blog-entry-header h2 {
  font-size: 1.25rem;
  font-weight: 650;
  margin: 0;
}

.blog-entry-header h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-entry-header h2 a:hover {
  color: var(--link-hover);
}

.blog-entry-header time {
  color: var(--quiet);
  display: block;
  font-size: 0.76rem;
  margin-top: 0.28rem;
}

.blog-entry-body {
  font-family: var(--font);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

.blog-entry-body > :first-child {
  margin-top: 0;
}

.blog-entry-body > :last-child {
  margin-bottom: 0;
}

.blog-entry-body p,
.blog-entry-body ul,
.blog-entry-body ol {
  margin: 0.7rem 0;
}

.blog-entry-body strong {
  font-weight: 600;
}

.blog-archive {
  color: var(--muted);
  margin-top: 3rem;
}

.blog-archive h2 {
  color: var(--text);
  font-size: 1.25rem;
  margin-bottom: 0.7rem;
}

.blog-archive ul {
  list-style: none;
  padding-left: 0;
}

.blog-archive li {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}

.blog-archive li + li {
  margin-top: 0.7rem;
}

.blog-archive a {
  color: var(--text);
  text-decoration: none;
}

.blog-archive a:hover {
  color: var(--link-hover);
}

.blog-archive time {
  color: var(--quiet);
  font-size: 0.76rem;
  white-space: nowrap;
}

.publications {
  margin-top: 2.2rem;
}

.publication-year-group {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 3.8rem minmax(0, 1fr);
}

.publication-year-group + .publication-year-group {
  margin-top: 2.35rem;
}

.publication-year {
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 560;
  line-height: 1.4;
  margin: 0.08rem 0 0;
}

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

.publication {
  padding: 0;
}

.publication + .publication {
  margin-top: 1.35rem;
}

.publication-title,
.publication-authors,
.publication-meta,
.publication-links {
  margin: 0;
}

.publication-title {
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.36;
}

.publication-authors,
.publication-meta,
.publication-links {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 0.2rem;
}

.publication-meta {
  font-style: italic;
  margin-top: 0.16rem;
}

.publication-links {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.36rem;
}

.publication-links a {
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 400;
}

.publication-links a + a {
  margin-left: 0.55rem;
}

.page-talks ul {
  list-style: none;
  margin-top: 2rem;
  max-width: 43rem;
  padding: 0;
}

.page-talks li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0;
  padding: 0;
}

.page-talks li + li {
  margin-top: 1.35rem;
}

.page-talks li > strong:first-child {
  color: var(--text);
  display: block;
  font-weight: 500;
  line-height: 1.36;
  margin-bottom: 0.24rem;
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.76rem;
  letter-spacing: 0;
  line-height: 1.5;
  margin-top: clamp(4.5rem, 12vh, 7rem);
  padding: 1.15rem 0 1.25rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

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

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

.footnote-ref,
.footnote-backref {
  text-decoration: none;
}

.footnotes {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
}

.footnotes ol {
  margin: 0;
  padding-left: 1.2rem;
}

.math-display,
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
}

img,
video {
  height: auto;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.65rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

   *,
   *::before,
   *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
   }
}

@media (max-width: 620px) {
  html {
    font-size: 16px;
  }

   .site-shell {
    padding-top: 1.2rem;
   }

   .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2.2rem;
   }

   .site-nav {
    gap: 0.55rem 0.8rem;
    justify-content: flex-start;
   }

   .site-nav a {
    font-size: 0.76rem;
   }

   .page-header {
    margin-bottom: 1.7rem;
   }

   .page-header h1,
  h1 {
    font-size: 1.5rem;
   }


   .post-header h1 {

   .page-dek,
   .page-index .page-dek {
    line-height: 1.55;

   .page-index ul {
    grid-template-columns: 1fr;

   .prose {
    line-height: 1.65;

   .publication-year-group {
    display: block;

   .publication-year {
    margin: 0 0 0.7rem;

   .publication-list {
    padding-left: 0;

   .post-row {
    gap: 0.22rem;
    grid-template-columns: 1fr;

   .blog-archive li {
    display: block;
