:root { --paper:#f9f8f7; --sage:#e1e3d8; --ink:#242823; --muted:#515a51; --blue:#245fc1; --line:#a3aa9b; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--paper); color:var(--ink); font:15px/1.65 ui-monospace, 'Ubuntu Mono', 'Cascadia Code', 'Courier New', monospace; }
a { color:inherit; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; overflow-wrap:anywhere; }
a:hover { color:var(--blue); }
a:focus-visible,button:focus-visible { outline:2px solid var(--blue); outline-offset:4px; }
img { display:block; max-width:100%; }
p { margin:0 0 1.15em; }
h1,h2,h3,h4 { line-height:1.3; letter-spacing:-.035em; }
h2 { font-size:23px; margin:0 0 22px; font-weight:600; }
h3,h4 { font-size:17px; margin:0 0 10px; font-weight:600; }
.site-header { max-width:1380px; margin:auto; padding:34px 36px 28px; display:grid; grid-template-columns:minmax(320px,1fr) 2fr; gap:12px 40px; align-items:baseline; }
.site-name { margin:0; font-size:clamp(30px,3vw,43px); line-height:1.2; font-weight:600; text-decoration:none; letter-spacing:-.055em; }
.site-header nav { display:flex; flex-wrap:wrap; gap:10px 23px; }
.profile-links { display:flex; gap:8px 20px; flex-wrap:wrap; grid-column:1/-1; font-size:13px; }
.layout { max-width:1380px; margin:auto; display:grid; grid-template-columns:minmax(300px,1fr) minmax(0,2fr); gap:40px; padding:0 36px; align-items:start; }
.rail { min-width:0; }
.photo-frame { margin:0; }
.photo-window { aspect-ratio:4/4.5; width:100%; max-height:430px; background:#e9e9e4; overflow:hidden; }
.photo-window img { width:100%; height:100%; object-fit:cover; }
.photo-window .kitchen { object-position:50% 43%; }
.photo-window .natural { object-position:50% 45%; }
.photo-window .mountain { object-position:50% 50%; }
.photo-window .blackboard { object-fit:contain; }
figcaption { font-size:12px; color:var(--muted); margin-top:8px; line-height:1.5; }
.carousel-controls { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:7px 0 28px; font-size:12px; }
button { font:inherit; min-width:42px; min-height:40px; border:1px solid var(--line); background:transparent; color:var(--ink); cursor:pointer; }
button:hover { background:var(--sage); }
.about { font-size:14px; line-height:1.7; }
.about h2 { font-size:19px; margin-bottom:15px; }
.about p:empty { display:none; }
.about b { font-weight:600; }
.about p { overflow-wrap:anywhere; }
#main { min-width:0; background:var(--sage); padding:30px 34px 36px; }
.section { clear:both; padding:29px 0 0; margin-top:30px; border-top:1px solid var(--line); display:flow-root; scroll-margin-top:24px; }
.section:first-child { padding-top:0; margin-top:0; border-top:0; }
.section p:last-child { margin-bottom:0; }
.notice { color:#a53c26; font-weight:bold; }
.research-figure { float:right; width:250px; max-width:40%; margin:0 0 20px 23px; }
.research-figure figcaption { text-align:left; width:400px }
.processor { float:none; margin:20px auto; width:270px; max-width:70%; }
.paper { margin:22px 0; padding-left:16px; border-left:2px solid #818d78; }
.paper h3 { font-size:16px; }
.metadata,time,.publication-reference,.publication-number { font-size:12px; color:var(--muted); }
.writing-card { border-top:1px solid var(--line); padding:18px 0 6px; }
.writing-card h4 { margin-top:6px; }
.writing-card p { font-size:14px; }
.recovered { font-size:14px; line-height:1.8; }
.recovered br { content:''; display:block; margin:8px 0; }
.recovered b { display:inline-block; margin-top:17px; }
.site-footer { max-width:1380px; margin:auto; padding:30px 36px; font-size:12px; color:var(--muted); }
.skip-link { position:absolute; left:20px; top:-100px; background:var(--paper); padding:12px; z-index:10; }
.skip-link:focus { top:10px; }
.topline { font-size:12px; display:flex; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); padding-bottom:12px; margin-bottom:25px; }
.section-label { display:none; }
.page-hero h2,.article-header h2 { font-size:clamp(26px,3vw,38px); margin:0 0 18px; }
.page-hero { margin-bottom:32px; }
.publication-record,.archive-entry { display:grid; grid-template-columns:72px minmax(0,1fr); gap:14px; border-top:1px solid var(--line); padding:23px 0; }
.publication-record h3 { font-size:18px; }
.publication-record p { font-size:14px; }
.publication-number span { display:block; }
.record-links { margin-bottom:0; }
.illustration-plate { max-width:400px; margin:20px auto 0; }
.illustration-plate img { width:100%; }
.archive-entry h3 { margin:8px 0 12px; font-size:21px; }
.article-header { margin-bottom:35px; }
.article-body { font:18px/1.7 Georgia,'Times New Roman',serif; max-width:70ch; }
.article-body h2 { font-size:26px; margin-top:35px; }
.article-body h3 { font-size:22px; margin-top:30px; }
.article-body img { max-width:100%; height:auto; margin:24px auto; }
.article-body blockquote { margin:24px 0; border-left:2px solid var(--line); padding-left:20px; }
.article-body pre { overflow:auto; padding:16px; background:var(--paper); }
.article-body .katex-display { overflow-x:auto; overflow-y:hidden; padding:8px 0; }
.article-footer { border-top:1px solid var(--line); margin-top:35px; padding-top:20px; }
@media (min-width:1500px) { body { font-size:16px; } .about { font-size:15px; } }
@media (max-width:1000px) { .layout { grid-template-columns:minmax(270px,1fr) minmax(0,1.6fr); gap:24px; padding:0 24px; } .site-header { padding:26px 24px; grid-template-columns:1fr; gap:16px; } #main { padding:26px; } .research-figure { float:none; margin:0 auto 22px; max-width:80%; } }
@media (max-width:720px) { .layout { grid-template-columns:1fr; gap:30px; padding:0 18px; } .site-header { padding:25px 18px; } .photo-window { aspect-ratio:4/4; max-height:420px; } .rail-media { max-width:390px; } .about { font-size:14px; } #main { padding:25px 20px; } .publication-record,.archive-entry { grid-template-columns:45px minmax(0,1fr); gap:10px; } .topline { flex-wrap:wrap; } .site-footer { padding:25px 18px; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

.site-name a { text-decoration:none; }

/* Keep the moving cells behind the page and let them show through the sage panel. */
body { isolation:isolate; }
body:has(.life-background:not([hidden])) #main {
  background:color-mix(in srgb, var(--sage) 72%, transparent);
}
.life-background canvas {
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:-1;
  opacity:.23;
  pointer-events:none;
}
.life-background button {
  position:fixed;
  right:12px;
  bottom:12px;
  z-index:2;
  padding:4px 8px;
  min-height:32px;
  background:var(--paper);
  font-size:11px;
  color:var(--muted);
}
.life-background button:hover { background:var(--sage); }
