${KL[p.k]} · ${dfmt(p.date)}
${esc(p.title)}
${p.a.words} words${Math.max(1,Math.round(p.a.words/230))} min${p.a.code?`${p.a.code} lines of code`:''}${p.a.imgs?`${p.a.imgs} images`:''}
${p.html}
`;
const body=document.getElementById('body');
enhance(body,p);
// section anchors (match analyse(): optional opening + one per h2)
const kids=[...body.children];
const anchors=p.a.secs.map(s=>kids[s.ai]||body.firstElementChild);
const cv=document.getElementById('cv'), iso=new Iso(cv);
const floors=buildingFor(p,()=>1);
let fw=p.k==='image'?3.2:p.k==='note'?2.2:2.6, fd=p.k==='image'?2.4:p.k==='note'?2.2:2.6;
const N=floors.length;
const built=floors.map(()=>0), gap=floors.map(()=>0);
let cur=0;
function layout(){iso.resize();const W=iso.w,H=iso.h;
const totalH=floors.reduce((a,f)=>a+f.h,0);
// fit: building height in units ~ choose scale so total + explode fits
const s=Math.min(W/((fw+fd)*C30)*.5,(H*.62)/(totalH*1+fd*S30*2+N*.15+1.6));
iso.scale=Math.min(s,90);
const k=Math.min(1,(H*.62/iso.scale)/totalH);floors.forEach(f=>f.hh=f.h*Math.max(.3,k*.98));
const bh=floors.reduce((a,f)=>a+f.hh,0);
iso.ox=W/2-((fw-fd)/2)*C30*iso.scale; iso.oy=H/2+((bh)/2)*iso.scale-((fw+fd)/2)*S30*iso.scale+20;}
layout();
const onR=()=>layout();addEventListener('resize',onR);
const fl=document.getElementById('fl');
function progress(){
const vh=innerHeight;let c=0;
anchors.forEach((a,j)=>{if(a.getBoundingClientRect().top