:root { color-scheme:light; --paper:#fff; --ink:#282825; --quiet:#62635f; }
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:16px/1.6 "Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
main { max-width:32rem; width:calc(100% - 48px); margin:clamp(52px,12vh,118px) auto 80px; }
h1,h2,p,ul,header { margin:0; }
h1 { font-size:1.18rem; font-weight:600; line-height:1.3; letter-spacing:-.025em; }
h2,.date,.meta,.back,.source { color:var(--quiet); font-size:.855rem; font-weight:400; }
p { margin-top:.9em; }
h1 + p { margin-top:1.25em; }
h2 { margin-bottom:.45rem; }
a { color:inherit; text-decoration-color:#a4a49e; text-underline-offset:3px; text-decoration-thickness:1px; }
a:hover { text-decoration-color:currentColor; }
a:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
ul.notes,ul.projects { padding:0; list-style:none; }
.notes li,.projects li { display:flex; align-items:baseline; gap:1rem; padding:2px 0; }
.date { min-width:3.1rem; font-variant-numeric:tabular-nums; }
.projects li span { color:var(--quiet); }
.listings > section { display:grid; grid-template-columns:5.25rem 1fr; align-items:baseline; gap:8px; margin-top:1.5rem; }
.experience-list { list-style:none; padding:2px 0; }
.experience-list li + li { margin-top:.65rem; }
.experience-list p { margin:0; color:var(--quiet); font-size:.855rem; }
.listings > section:first-child { margin-top:0; }
.back { display:inline-block; margin-bottom:2rem; }
article h2 { margin:1.7rem 0 0; color:var(--ink); font-size:1em; font-weight:600; }
article h2 + p { margin-top:.4rem; }
article pre { font: .86rem/1.5 ui-monospace,monospace; overflow:auto; padding-left:1rem; border-left:1px solid #bcbcb5; }
h1 + .notes { margin-top:1.25rem; }
@media(max-width:460px){
  main{width:calc(100% - 40px);margin-top:48px;}
  .listings > section{display:block;}
  .projects li{display:block;}
  .projects li span{margin-left:.6em;}
  .notes li{gap:.65rem;}
}

.home { margin-bottom:100px; }
.home header h1 { font-weight:550; }
.margin .home { display:grid; grid-template-columns:10rem minmax(0,32rem); column-gap:clamp(30px,6vw,86px); justify-content:center; max-width:52rem; }
.margin-intro h1 { line-height:1.6; font-size:1.05rem; }
.margin-intro p { font-size:.9rem; line-height:1.55; margin-top:.65rem; }
.letter { --paper:#fbfaf5; }
.letter-intro { margin-bottom:2.6rem; }
.letter-intro h1 { font:normal 1.65rem/1.25 "Baskervville",Georgia,serif; letter-spacing:-.035em; }
.home .letter-intro h1 { font-weight:400; }
.letter-intro p { max-width:29rem; margin-top:.7rem; font:1.13rem/1.5 "Baskervville",Georgia,serif; }
.short-intro { margin-bottom:2.2rem; border-bottom:1px solid #e4e3dd; padding-bottom:1rem; }
.mast-line { display:grid; grid-template-columns:1fr auto; align-items:baseline; }
.mast-line h1 { display:flex; align-items:center; gap:.55rem; font-size:1rem; }
.monogram { display:inline-block; width:14px; height:15px; background:radial-gradient(circle at 1px 1px,#45473d .95px,transparent 1.1px) left top / 2.6px 2.6px; clip-path:polygon(0 0,35% 0,35% 39%,65% 39%,65% 0,100% 0,100% 100%,65% 100%,65% 60%,35% 60%,35% 100%,0 100%); }
.mast-line details { display:contents; }
.mast-line summary { grid-column:2; grid-row:1; cursor:pointer; color:var(--quiet); font-size:.85rem; text-decoration:underline; text-underline-offset:3px; list-style:none; }
.mast-line summary::-webkit-details-marker { display:none; }
.mast-line details p { grid-column:1/-1; font-size:.94rem; margin-top:1rem; }
.chooser { position:fixed; bottom:0; left:0; right:0; padding:12px 16px max(12px,env(safe-area-inset-bottom)); display:flex; justify-content:center; gap:20px; background:var(--paper); font-size:12px; color:var(--quiet); }
.chooser a { padding:3px 0; text-decoration:none; }
.chooser a[aria-current],.chooser a:hover { text-decoration:underline; color:var(--ink); }
@media(max-width:770px){
  .margin .home { display:block; max-width:32rem; }
  .margin-intro { margin-bottom:2rem; }
}

.margin:has(.home)::before {
  content:"";
  position:absolute;
  pointer-events:none;
  top:0;
  left:0;
  width:clamp(0px, calc((100% - 46rem) / 2 - 20px), 360px);
  height:min(620px, 100vh);
  background:radial-gradient(circle at 2px 2px, #8d9186 1px, transparent 1.35px) 0 0 / 5px 5px;
  mask-image:
    repeating-radial-gradient(ellipse 200px 315px at 0 52%, #0009 0%, #0003 14%, #0001 26%, #0008 39%, #0009 48%),
    radial-gradient(ellipse farthest-side at 0 45%, #000c 0%, #0009 42%, transparent 100%);
  mask-repeat:no-repeat;
  mask-size:500px 860px, 360px 620px;
  mask-position:-40px -140px, 0 0;
  mask-composite:intersect;
  animation:margin-wave 12s ease-in-out infinite alternate;
}
@keyframes margin-wave {
  to { mask-position:0 -80px, 0 0; }
}
@media(prefers-reduced-motion:reduce){
  .margin:has(.home)::before { animation:none; }
}
@media print { .margin:has(.home)::before,.chooser { display:none; } }

.reader article img { max-width:100%; height:auto; }
.reader article { overflow-wrap:anywhere; }
