/* Catppuccin Latte. Palette: https://catppuccin.com/palette/ */
:root {
  color-scheme: light;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --text: #4c4f69;
  --muted: #5c5f77;
  --line: #ccd0da;
  --accent: #8839ef;
  --blue: #1e66f5;
  --green: #40a02b;
  --red: #d20f39;
}
/* Catppuccin Macchiato. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --base: #24273a;
  --mantle: #1e2030;
  --text: #cad3f5;
  --muted: #b8c0e0;
  --line: #494d64;
  --accent: #c6a0f6;
  --blue: #8aadf4;
  --green: #a6da95;
  --red: #ed8796;
}
/* Honor system dark mode even with JavaScript disabled. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --base: #24273a; --mantle: #1e2030; --text: #cad3f5;
    --muted: #b8c0e0; --line: #494d64; --accent: #c6a0f6;
    --blue: #8aadf4; --green: #a6da95; --red: #ed8796;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--base); color: var(--text); font: 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--base); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, video:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
button { font: inherit; }
[hidden] { display: none !important; }
.site-shell { max-width: 890px; margin: 0 auto; padding: 0 36px; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 30px 0; margin-bottom: 43px; }
.wordmark { font: 600 1.75rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text); text-decoration: none; letter-spacing: -.08em; }
.wordmark .prompt-chevron { color: var(--accent); margin-left: .08em; }
.wordmark > span::after { content: ""; display: inline-block; width: .08em; height: .8em; margin-left: .18em; vertical-align: -.06em; background: var(--accent); }
.wordmark:hover { text-decoration: none; }
nav { display: flex; align-items: center; gap: 26px; font-size: .875rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .45em; }
.theme-toggle { display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); background: transparent; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 19px; height: 19px; }
.sun, [data-theme="dark"] .moon { display: none; }
[data-theme="dark"] .sun { display: block; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 178px; align-items: center; gap: 52px; }
.eyebrow { font-size: .8125rem; color: var(--muted); margin: 0 0 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 3.75rem/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.045em; margin-bottom: 22px; }
.name-period { color: var(--accent); }
.bio p { margin-bottom: 14px; }
.bio strong { font-weight: 600; }
.portrait { width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; border-radius: 5px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-top: 4px; font-size: .875rem; }
.profile-links a, .paper-links a, .section-heading a { text-decoration: none; }
.profile-links a:hover, .paper-links a:hover, .section-heading a:hover { text-decoration: underline; }
.profile-links span, .paper-links span, .section-heading span { font-size: .8em; }
.research { margin-top: 57px; }
.news { margin-top: 44px; }
.news-list { list-style: none; margin: 12px 0 0; padding: 0; }
.news-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 20px; padding: 7px 0; }
.news-item time { color: var(--muted); font-size: .8125rem; padding-top: 3px; white-space: nowrap; }
.news-item p { margin: 0; }
.news-item > div { overflow-wrap: anywhere; }
.older-news { margin-top: 9px; }
.older-news summary { width: fit-content; padding: 4px 0; cursor: pointer; color: var(--accent); font-size: .875rem; }
.older-news summary:hover { text-decoration: underline; text-underline-offset: .22em; }
.hide-older, .older-news[open] .show-older { display: none; }
.older-news[open] .hide-older { display: inline; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
h2 { font: 1.625rem/1.3 Georgia, "Times New Roman", serif; letter-spacing: -.025em; margin: 0; }
.section-heading > a { font-size: .8125rem; white-space: nowrap; color: var(--muted); }
.publication-list { list-style: none; padding: 0; margin: 0; }
.publication { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 26px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.publication--text { grid-template-columns: 1fr; }
.publication:last-child { border-bottom: 0; }
.publication-thumbnail { display: block; align-self: start; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); background: var(--mantle); }
.publication-thumbnail picture { display: block; }
.publication-thumbnail img, .publication-thumbnail video { display: block; width: 100%; height: auto; }
.publication-thumbnail, .publication-thumbnail video { cursor: zoom-in; }
.publication-thumbnail:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.media-viewer-open { overflow: hidden; }
.media-viewer { width: min(1100px, calc(100% - 32px)); max-width: none; max-height: 90vh; max-height: 90dvh; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--base); color: var(--text); }
.media-viewer::backdrop { background: rgb(0 0 0 / 75%); }
.media-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.media-viewer-header p { margin: 0; font-size: .875rem; line-height: 1.4; }
.media-viewer-header form { flex-shrink: 0; }
.media-viewer-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--mantle); color: var(--text); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.media-viewer-close:hover { color: var(--accent); border-color: var(--accent); }
.media-viewer-content picture { display: block; }
.media-viewer-content img, .media-viewer-content video { display: block; width: 100%; height: auto; max-height: calc(90vh - 9rem); max-height: calc(90dvh - 9rem); object-fit: contain; }
.publication-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; margin-bottom: 6px; }
.year { font: .875rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.venue { font-size: .875rem; font-weight: 650; line-height: 1.4; color: var(--accent); background: var(--mantle); background: color-mix(in srgb, var(--accent) 10%, var(--base)); padding: 3px 8px; border-radius: 4px; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.5; margin-bottom: 7px; }
h3 a { color: var(--text); text-decoration: none; }
h3 a:hover { color: var(--accent); }
.authors { font-size: .875rem; line-height: 1.6; color: var(--muted); }
.authors p { margin-bottom: 0; }
.authors strong { color: var(--text); font-weight: 600; }
.paper-note { font-size: .8125rem; color: var(--muted); margin: 4px 0 0; }
.paper-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: .8125rem; margin-top: 9px; }
.site-footer { margin-top: 38px; padding: 23px 0 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .8125rem; }
.site-footer a { color: inherit; text-decoration: none; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 8px 16px; background: var(--base); z-index: 1; }
.skip-link:focus { top: 10px; }
.page-heading { margin-bottom: 38px; }
.page-heading h1 { font-size: 2.75rem; margin-bottom: 16px; }
.page-heading p, .empty-state { color: var(--muted); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); padding: 22px 0; }
.post-list time, .post-date { color: var(--muted); font-size: .875rem; }
.post-list h2 { font: 600 1.125rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 5px 0; }
.post-list a { color: var(--text); text-decoration: none; }
.post-list p { margin: 5px 0 0; color: var(--muted); }
.post { max-width: 680px; margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: 30px; font-size: .875rem; }
.post h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; }
.post header { margin-bottom: 36px; }
.prose { overflow-wrap: anywhere; }
.prose h2 { margin: 38px 0 16px; }
.prose h3 { margin: 28px 0 12px; font-size: 1.15rem; }
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose blockquote { margin: 24px 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--muted); }
code { font: .875em/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--mantle); padding: .15em .35em; border-radius: 3px; }
pre { background: var(--mantle); padding: 20px; border-radius: 4px; overflow-x: auto; }
pre code { padding: 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 24px 0; }
.prose th, .prose td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.highlight .c, .highlight .c1, .highlight .cm { color: var(--muted); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .ow { color: var(--accent); }
.highlight .s, .highlight .s1, .highlight .s2 { color: var(--text); }
.highlight .nf, .highlight .nc, .highlight .nb { color: var(--blue); }
.highlight .m, .highlight .mi, .highlight .mf { color: var(--red); }
@media (max-width: 640px) {
  .site-shell { padding: 0 24px; }
  .site-header { padding: 22px 0; margin-bottom: 30px; }
  nav { gap: 18px; }
  .intro { grid-template-columns: minmax(0, 1fr) 112px; gap: 20px; align-items: start; }
  .intro-copy { display: contents; }
  .eyebrow { grid-column: 1; margin: 12px 0 0; }
  .intro h1 { grid-column: 1; font-size: 3.25rem; margin: 0; }
  .portrait { grid-column: 2; grid-row: 1 / 3; }
  .bio, .profile-links { grid-column: 1 / -1; }
  .bio p:last-child { margin-bottom: 0; }
  .research { margin-top: 42px; }
  .news { margin-top: 36px; }
  .news-item { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .publication { grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 23px 0; }
  .publication--text { grid-template-columns: 1fr; }
  .section-heading { flex-wrap: wrap; gap: 8px; }
  h2 { font-size: 1.5rem; }
  .site-footer { margin-top: 26px; flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .publication { grid-template-columns: 1fr; gap: 14px; }
  .publication-thumbnail { width: min(100%, 240px); }
}
@media (prefers-reduced-motion: no-preference) {
  .wordmark > span::after { animation: cursor-blink 1.1s step-end infinite; }
  a, button { transition: color .15s, border-color .15s; }
}
@keyframes cursor-blink { 50% { opacity: 0; } }
