ilia 17338fc3b4 Tighten stack overlap; fix folder top tabs; replace paper with rack.
Cards and trace use negative-margin overlap; folder tabs stay above bodies; new server-rack variant.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 22:50:45 -04:00

16 lines
435 B
JavaScript

const sections = document.querySelectorAll('.scroll-section');
const depthEl = document.getElementById('depth');
const mid = () => window.innerHeight * 0.42;
function tick() {
let a = 0;
sections.forEach((s) => {
const r = s.getBoundingClientRect();
if (r.top <= mid() && r.bottom > mid()) a = +s.dataset.layer;
});
depthEl.textContent = `U${a}`;
}
window.addEventListener('scroll', tick, { passive: true });
tick();