/* Creative Grace — mockup v1. Mobile-first, no external fonts. */
:root{
  --ink:#1f1729; --muted:#5a5068; --bg:#faf8fc; --surface:#ffffff; --line:#e3deec;
  --plum:#3b1f5c; --purple:#5b2d8e; --purple-2:#7a4fb3; --silver:#c9c4d8; --silver-2:#eeebf5; --gold:#a8812f;
  --radius:14px; --maxw:1120px; --shadow:0 1px 2px rgba(31,23,41,.06),0 8px 24px rgba(59,31,92,.08);
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.65 var(--sans);color:var(--ink);background:var(--bg)}
img,svg{max-width:100%;height:auto;display:block}
a{color:var(--purple);text-underline-offset:3px}
a:hover{color:var(--plum)}
:focus-visible{outline:3px solid var(--purple-2);outline-offset:2px;border-radius:4px}
h1,h2,h3{font-family:var(--serif);line-height:1.2;color:var(--plum);margin:0 0 .5em}
h1{font-size:clamp(2rem,6vw,3.4rem);letter-spacing:-.01em}
h2{font-size:clamp(1.5rem,3.6vw,2.1rem)}
h3{font-size:1.2rem}
p{margin:0 0 1em;max-width:68ch}
.skip{position:absolute;left:-999px;top:0;background:var(--plum);color:#fff;padding:.75rem 1rem;z-index:100}
.skip:focus{left:8px;top:8px}
.wrap{width:min(100% - 2rem,var(--maxw));margin-inline:auto}
/* header */
.site-header{position:sticky;top:0;z-index:50;background:rgba(250,248,252,.92);backdrop-filter:saturate(1.4) blur(8px);border-bottom:1px solid var(--line)}
.bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:64px}
.brand{display:flex;align-items:center;gap:.6rem;text-decoration:none;color:var(--plum)}
.brand img{width:40px;height:40px}
.brand span{font:600 1.35rem/1 var(--serif);letter-spacing:.01em}
.nav details{position:relative}
.nav summary{list-style:none;cursor:pointer;min-height:44px;min-width:44px;display:flex;align-items:center;gap:.4rem;padding:0 .75rem;border:1px solid var(--line);border-radius:10px;font-weight:600;color:var(--plum);background:var(--surface)}
.nav summary::-webkit-details-marker{display:none}
.nav ul{list-style:none;margin:0;padding:.5rem;display:grid;gap:.15rem}
.nav details ul{position:absolute;right:0;top:calc(100% + 8px);min-width:230px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.nav a{display:flex;align-items:center;min-height:44px;padding:0 .8rem;border-radius:8px;text-decoration:none;color:var(--ink);font-weight:500}
.nav a:hover{background:var(--silver-2)}
.nav a[aria-current="page"]{color:var(--purple);background:var(--silver-2);box-shadow:inset 3px 0 0 var(--purple)}
.nav .archive-link{color:#fff;background:var(--purple)}
.nav .archive-link:hover{background:var(--plum);color:#fff}
.nav-wide{display:none}
@media (min-width:1000px){
  .nav details{display:none}
  .nav-wide{display:flex;gap:.1rem}
  .nav-wide a{padding:0 .7rem;font-size:.95rem}
  .nav-wide a[aria-current="page"]{box-shadow:inset 0 -3px 0 var(--purple)}
}
/* hero */
.hero{position:relative;overflow:hidden;background:radial-gradient(1200px 500px at 85% -10%,#e7def5 0%,transparent 60%),linear-gradient(180deg,#f4f0fa,var(--bg))}
.hero .wrap{display:grid;gap:2rem;padding:3.5rem 0 3rem;align-items:center}
.hero .knot{width:min(170px,42vw);justify-self:center;filter:drop-shadow(0 12px 30px rgba(59,31,92,.25))}
.eyebrow{font:600 .8rem/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--purple);margin-bottom:.9rem}
.lede{font-size:1.15rem;color:var(--muted)}
@media (min-width:820px){.hero .wrap{grid-template-columns:1.4fr 1fr;padding:5rem 0 4.5rem}.hero .knot{width:260px}}
.btns{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:48px;padding:0 1.25rem;border-radius:999px;font-weight:600;text-decoration:none;border:2px solid var(--purple);transition:background .2s,color .2s}
.btn-primary{background:var(--purple);color:#fff}
.btn-primary:hover{background:var(--plum);border-color:var(--plum);color:#fff}
.btn-ghost{color:var(--purple);background:transparent}
.btn-ghost:hover{background:var(--silver-2)}
/* sections */
section{padding:3.25rem 0}
.section-alt{background:var(--surface);border-block:1px solid var(--line)}
.grid{display:grid;gap:1.25rem}
@media (min-width:700px){.grid-2{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1.4rem;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:.4rem}
.card h3{margin:0}
.card p{color:var(--muted);margin:0}
.card a.more{margin-top:auto;font-weight:600}
.icon{width:28px;height:28px;color:var(--purple)}
.placeholder{position:relative;border:2px dashed var(--silver);border-radius:var(--radius);padding:1.25rem 1.25rem 1rem;background:repeating-linear-gradient(135deg,#fff,#fff 12px,#faf7fe 12px,#faf7fe 24px)}
.tag{display:inline-block;font:700 .7rem/1 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:#6b4a00;background:#fff3cf;border:1px solid #e8cf86;border-radius:999px;padding:.35rem .6rem;margin-bottom:.6rem}
.tag-real{color:#24461f;background:#e4f4df;border-color:#a9d39d}
blockquote{margin:0;padding:1rem 1.25rem;border-left:4px solid var(--purple-2);background:var(--silver-2);border-radius:0 10px 10px 0;font-family:var(--serif);font-size:1.1rem}
blockquote cite{display:block;margin-top:.6rem;font:500 .85rem var(--sans);color:var(--muted);font-style:normal}
.poem{font-family:var(--serif);font-size:1.08rem;line-height:1.8;white-space:pre-line}
.list-clean{list-style:none;margin:0;padding:0;display:grid;gap:.5rem}
.list-clean li{display:flex;justify-content:space-between;gap:1rem;align-items:baseline;padding:.8rem 0;border-bottom:1px solid var(--line)}
.meta{color:var(--muted);font-size:.9rem}
.page-head{padding:3rem 0 1.5rem;background:linear-gradient(180deg,#f4f0fa,var(--bg))}
.page-head p{color:var(--muted);font-size:1.1rem}
.archive-cta{display:grid;gap:1rem;align-items:center;background:linear-gradient(135deg,var(--plum),#24123a);color:#eee9f7;border-radius:var(--radius);padding:1.75rem}
.archive-cta h2{color:#fff}
.archive-cta p{color:#d9d1ea}
.archive-cta .btn-primary{background:#fff;color:var(--plum);border-color:#fff}
.archive-cta .btn-primary:hover{background:var(--silver-2)}
@media (min-width:820px){.archive-cta{grid-template-columns:1fr auto}}
form .field{display:grid;gap:.35rem;margin-bottom:1rem}
label{font-weight:600}
input,textarea{font:inherit;min-height:48px;padding:.65rem .8rem;border:1px solid #bdb5cc;border-radius:10px;background:#fff;color:var(--ink)}
textarea{min-height:140px}
.hint{font-size:.9rem;color:var(--muted)}
/* footer */
.site-footer{margin-top:3rem;background:#1d1328;color:#d6cfe4;padding:2.5rem 0 3rem;font-size:.95rem}
.site-footer a{color:#fff}
.foot{display:grid;gap:1.5rem}
@media (min-width:760px){.foot{grid-template-columns:2fr 1fr 1fr}}
.site-footer h2{color:#fff;font-size:1rem;font-family:var(--sans);letter-spacing:.08em;text-transform:uppercase}
.site-footer ul{list-style:none;margin:0;padding:0;display:grid;gap:.15rem}
.site-footer li a{display:inline-flex;min-height:36px;align-items:center}
.small{font-size:.85rem;color:#a99fbd}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* ===================== v2: portfolio, timeline, books, scroll-driven motion ===================== */
.sd-progress{position:fixed;inset:0 0 auto 0;height:3px;z-index:60;background:linear-gradient(90deg,var(--purple-2),var(--gold));transform-origin:0 50%;transform:scaleX(var(--sp,0));pointer-events:none}
.intro{max-width:62ch;color:var(--muted)}
.hero{isolation:isolate}
.hero-layers{position:absolute;inset:0;z-index:-1;pointer-events:none}
.hero-layers .layer{position:absolute;border-radius:50%;will-change:transform}
.l1{width:520px;height:520px;right:-140px;top:-160px;background:radial-gradient(closest-side,rgba(122,79,179,.22),transparent)}
.l2{width:360px;height:360px;left:-120px;bottom:-140px;background:radial-gradient(closest-side,rgba(168,129,47,.16),transparent)}
.l3{width:220px;height:220px;right:30%;bottom:10%;background:radial-gradient(closest-side,rgba(91,45,142,.14),transparent)}
.knot-stage{position:relative;justify-self:center;width:min(220px,52vw);aspect-ratio:1}
.hero-knot{width:100%;height:100%;filter:drop-shadow(0 14px 30px rgba(59,31,92,.28));transform:rotate(calc(var(--hp,0)*120deg)) scale(calc(1 - var(--hp,0)*.18))}
.knot-ring{position:absolute;inset:-14%;border:1px solid rgba(91,45,142,.18);border-radius:50%;transform:scale(calc(1 + var(--hp,0)*.25));opacity:calc(1 - var(--hp,0))}
@media (min-width:820px){.knot-stage{width:300px}}
.hero h1{font-size:clamp(2.4rem,7vw,4rem)}
.pgrid{display:grid;gap:1.5rem;margin:2rem 0;perspective:1200px}
@media (min-width:640px){.pgrid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1000px){.pgrid{grid-template-columns:repeat(3,1fr)}}
.pcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;transform-origin:50% 100%}
.pcard-media{display:block;aspect-ratio:1200/750;background:#120a1d;overflow:hidden}
.pcard-media img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.pcard:hover .pcard-media img{transform:scale(1.04)}
.pcard-body{padding:1.1rem 1.2rem 1.3rem;display:flex;flex-direction:column;gap:.15rem;flex:1}
.pcard-body h3{margin:0;font-size:1.25rem}.pcard-body h3 a{color:var(--plum);text-decoration:none}
.pcard-dom{font:600 .8rem/1.2 var(--sans);letter-spacing:.06em;color:var(--purple-2);margin:0 0 .4rem}
.pcard-body p{margin:0 0 .6rem;color:var(--muted)}
.more{display:inline-flex;align-items:center;gap:.35rem;font-weight:600;margin-top:auto;min-height:44px}
.tag-live{color:#0b3a4a;background:#dff3fa;border-color:#9fd3e6}
.timeline{list-style:none;margin:2rem 0 0;padding:0 0 0 1.6rem;position:relative;view-timeline-name:--tl}
.timeline::before{content:"";position:absolute;left:.45rem;top:.4rem;bottom:.4rem;width:3px;border-radius:3px;background:var(--line)}
.timeline::after{content:"";position:absolute;left:.45rem;top:.4rem;bottom:.4rem;width:3px;border-radius:3px;background:linear-gradient(var(--purple-2),var(--gold));transform-origin:50% 0;transform:scaleY(var(--tp,1))}
.tl-item{position:relative;padding:0 0 1.6rem 1.2rem}
.tl-item::before{content:"";position:absolute;left:-1.5rem;top:.35rem;width:15px;height:15px;border-radius:50%;background:var(--surface);border:3px solid var(--purple-2);box-shadow:0 0 0 4px var(--bg)}
.section-alt .tl-item::before{box-shadow:0 0 0 4px #f3f0f8}
.tl-date{font:700 .85rem/1.3 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--gold);margin:0 0 .25rem}
.tl-body h3{font-size:1.2rem;margin-bottom:.25rem}.tl-body p{margin:0;max-width:62ch}
.tl-body.placeholder{padding:1rem}
.ph-inline{margin-top:.6rem;padding:.8rem}
@media (min-width:820px){.tl-item{display:grid;grid-template-columns:150px 1fr;gap:1.5rem}}
.why blockquote{margin:0}
.toc{columns:2 220px;padding-left:1.2rem;margin:1rem 0 0}.toc li{margin:.2rem 0}
.poems{display:grid;gap:1.5rem;max-width:760px}
.poem-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1.5rem;box-shadow:var(--shadow)}
.poem-card h2{margin:0}
.narrow{max-width:760px}
.book{padding-top:1rem;padding-bottom:3rem;font-family:var(--serif);font-size:1.12rem;line-height:1.8}
.book p{margin:0 0 1em}.chapter{padding-top:2rem}.chapter h2{font-size:1.7rem}
.book-feature{align-items:center}
.book-cover{aspect-ratio:3/4;max-width:320px;justify-self:center;width:100%;border-radius:6px 14px 14px 6px;background:linear-gradient(160deg,#3b1f5c,#1d0f30 70%);color:#f4f2f9;padding:2rem 1.5rem;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:inset 6px 0 0 rgba(0,0,0,.25),0 20px 40px rgba(59,31,92,.3)}
.cover-knot{width:46%;margin-bottom:1.2rem}.cover-title{font:400 1.6rem/1.2 var(--serif);margin:0 0 .5rem}.cover-by{letter-spacing:.2em;text-transform:uppercase;font-size:.8rem;color:var(--silver);margin:0}
.chap-list{padding-left:1.3rem;columns:2 220px}
.arts{display:grid;gap:1.5rem;margin:1.5rem 0}
@media (min-width:760px){.arts{grid-template-columns:repeat(3,1fr);align-items:start}}
.art{margin:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow)}
.art img{margin:0 auto .8rem;border-radius:6px;width:100%;height:auto;max-height:360px;object-fit:contain}
.gallery{display:grid;gap:1.25rem;margin-top:1.5rem;perspective:1200px}
@media (min-width:700px){.gallery{grid-template-columns:repeat(2,1fr)}}
.feat{margin:0}.feat img{border-radius:12px;box-shadow:var(--shadow);width:100%}.feat figcaption{padding:.5rem .2rem;font-weight:600}
.btn-lg{font-size:1.1rem;padding:.9rem 1.4rem}
.rooms{list-style:none;padding:0;display:grid;gap:1rem}
@media (min-width:700px){.rooms{grid-template-columns:repeat(3,1fr)}}
.rooms li{background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:10px;padding:1rem 1.1rem}
.rooms h3{font-size:1.1rem;margin-bottom:.3rem}.rooms p{margin:0;color:var(--muted)}
.family-shot img{border-radius:14px;box-shadow:var(--shadow)}
.foot-brand{font:1.3rem var(--serif)}
.placeholder-dark{border:1px dashed rgba(255,255,255,.35);border-radius:10px;padding:.8rem 1rem;margin:1rem 0}.placeholder-dark p{margin:0}
.nav-wide a{white-space:nowrap}
@media (min-width:1000px) and (max-width:1180px){.nav-wide a{padding-left:.5rem;padding-right:.5rem;font-size:.92rem}}

/* ---- scroll-driven motion: transform/opacity only, scrubbed both ways ---- */
@keyframes sd-reveal{from{opacity:.12;transform:translateY(32px)}to{opacity:1;transform:none}}
@keyframes sd-card{from{opacity:.2;transform:translateY(60px) scale(.92) rotateX(14deg)}to{opacity:1;transform:none}}
@keyframes sd-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes sd-knot{from{transform:rotate(0) scale(1)}to{transform:rotate(120deg) scale(.82)}}
@keyframes sd-ring{from{transform:scale(1);opacity:1}to{transform:scale(1.25);opacity:0}}
@keyframes sd-l1{to{transform:translateY(140px)}}
@keyframes sd-l2{to{transform:translateY(-90px)}}
@keyframes sd-l3{to{transform:translate(-60px,60px)}}
@keyframes sd-line{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@media (prefers-reduced-motion:no-preference){
 @supports (animation-timeline:view()){
  .sd-progress{animation:sd-progress linear both;animation-timeline:scroll(root)}
  .sd-reveal{animation:sd-reveal linear both;animation-timeline:view();animation-range:entry 0% cover 30%}
  .sd-card{animation:sd-card linear both;animation-timeline:view();animation-range:entry 0% cover 40%}
  .hero-knot{animation:sd-knot linear both;animation-timeline:scroll(root);animation-range:0 90vh}
  .knot-ring{animation:sd-ring linear both;animation-timeline:scroll(root);animation-range:0 90vh}
  .l1{animation:sd-l1 linear both;animation-timeline:scroll(root);animation-range:0 100vh}
  .l2{animation:sd-l2 linear both;animation-timeline:scroll(root);animation-range:0 100vh}
  .l3{animation:sd-l3 linear both;animation-timeline:scroll(root);animation-range:0 100vh}
  .timeline::after{animation:sd-line linear both;animation-timeline:--tl;animation-range:cover 15% contain 85%}
 }
 /* JS fallback (scroll.js adds .sd-js only when view() is unsupported); --p defaults to 1 so content stays visible */
 .sd-js .sd-reveal{opacity:calc(.12 + .88*var(--p,1));transform:translateY(calc((1 - var(--p,1))*32px))}
 .sd-js .sd-card{opacity:calc(.2 + .8*var(--p,1));transform:translateY(calc((1 - var(--p,1))*60px)) scale(calc(.92 + .08*var(--p,1))) rotateX(calc((1 - var(--p,1))*14deg))}
 .sd-js .l1{transform:translateY(calc(var(--hp,0)*140px))}.sd-js .l2{transform:translateY(calc(var(--hp,0)*-90px))}.sd-js .l3{transform:translate(calc(var(--hp,0)*-60px),calc(var(--hp,0)*60px))}
}
@media (prefers-reduced-motion:reduce){.sd-progress{display:none}.hero-knot,.knot-ring{transform:none!important;opacity:1}.timeline::after{transform:none}}

/* ===================== v3 (perf + motion pass, 2026-10-25) ===================== */
/* image placeholders so lazy images never show as blank white boxes */
.feat a{display:block;border-radius:12px;background:linear-gradient(135deg,#2a1440,#120a1d);aspect-ratio:1200/750;overflow:hidden}
.feat img{height:100%;object-fit:cover}
.family-shot{display:block;border-radius:14px;background:linear-gradient(135deg,#2a1440,#120a1d);overflow:hidden}
/* modern page heads: same light/gradient language as the home hero, with parallax glows and a knot watermark */
.page-head{position:relative;overflow:hidden;isolation:isolate;padding:3.5rem 0 2.25rem;background:radial-gradient(900px 380px at 88% -20%,#e7def5 0%,transparent 62%),linear-gradient(180deg,#f4f0fa,var(--bg));border-bottom:1px solid var(--line)}
.page-head::before,.page-head::after{content:"";position:absolute;z-index:-1;pointer-events:none;border-radius:50%}
.page-head::before{width:440px;height:440px;right:-120px;top:-170px;background:radial-gradient(closest-side,rgba(122,79,179,.2),transparent);transform:translateY(calc(var(--hp,0)*110px))}
.page-head::after{width:300px;height:300px;left:-110px;bottom:-150px;background:radial-gradient(closest-side,rgba(168,129,47,.14),transparent);transform:translateY(calc(var(--hp,0)*-70px))}
.ph-knot{position:absolute;z-index:-1;right:max(1rem,calc((100vw - var(--maxw))/2));top:50%;width:clamp(110px,22vw,220px);aspect-ratio:1;margin-top:calc(clamp(110px,22vw,220px)/-2);background:url(../img/knot.svg) center/contain no-repeat;opacity:.09;pointer-events:none;transform:rotate(calc(var(--hp,0)*90deg)) scale(calc(1 + var(--hp,0)*.15))}
.page-head .wrap{position:relative;transform:translateY(calc(var(--hp,0)*-36px));opacity:calc(1 - var(--hp,0)*.55)}
.page-head h1{font-size:clamp(2.2rem,6.5vw,3.6rem)}
@media (min-width:820px){.page-head{padding:4.5rem 0 3rem}}
/* section heading accent bar that draws in with scroll */
section h2.sd-reveal::after,.sd-bar::after{content:"";display:block;width:56px;height:3px;margin-top:.55rem;border-radius:3px;background:linear-gradient(90deg,var(--purple-2),var(--gold));transform-origin:0 50%;transform:scaleX(var(--p,1))}
.archive-cta h2.sd-reveal::after,.radio h2::after,.poem-card h2.sd-reveal::after{display:none}
/* column stagger (--sd-d = delay share), used by native timelines and the JS fallback, both directions */
@media (min-width:640px) and (max-width:999px){.pgrid>:nth-child(2n){--sd-d:.08}}
@media (min-width:1000px){.pgrid>:nth-child(3n+2){--sd-d:.08}.pgrid>:nth-child(3n){--sd-d:.16}}
@media (min-width:700px){.gallery>:nth-child(2n),.grid-2>:nth-child(2n){--sd-d:.08}.grid-3>:nth-child(3n+2){--sd-d:.08}.grid-3>:nth-child(3n){--sd-d:.16}}
@media (max-width:699px){.albums>:nth-child(2n){--sd-d:.08}}
@media (min-width:700px) and (max-width:999px){.albums>:nth-child(3n+2){--sd-d:.08}.albums>:nth-child(3n){--sd-d:.16}}
@media (min-width:1000px){.albums>:nth-child(4n+2){--sd-d:.06}.albums>:nth-child(4n+3){--sd-d:.12}.albums>:nth-child(4n){--sd-d:.18}}
/* book reader: softer text reveal */
@keyframes sd-soft{from{opacity:.3;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes sd-bar{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes sd-head{to{transform:translateY(-36px);opacity:.45}}
@keyframes sd-ph1{to{transform:translateY(110px)}}
@keyframes sd-ph2{to{transform:translateY(-70px)}}
@keyframes sd-phk{to{transform:rotate(90deg) scale(1.15)}}
@media (prefers-reduced-motion:no-preference){
 @supports (animation-timeline:view()){
  .page-head .wrap{animation:sd-head linear both;animation-timeline:scroll(root);animation-range:0 60vh}
  .page-head::before{animation:sd-ph1 linear both;animation-timeline:scroll(root);animation-range:0 80vh}
  .page-head::after{animation:sd-ph2 linear both;animation-timeline:scroll(root);animation-range:0 80vh}
  .ph-knot{animation:sd-phk linear both;animation-timeline:scroll(root);animation-range:0 80vh}
  .sd-soft{animation:sd-soft linear both;animation-timeline:view();animation-range:entry 0% entry 100%}
  section h2.sd-reveal::after,.sd-bar::after{animation:sd-bar linear both;animation-timeline:--hbar;animation-range:entry 20% cover 40%}
  .sd-card{animation-range:entry calc(var(--sd-d,0)*100%) cover calc(40% + var(--sd-d,0)*100%)}
  section h2.sd-reveal,.sd-bar{view-timeline-name:--hbar}
 }
 .sd-js .sd-soft{opacity:calc(.3 + .7*var(--p,1));transform:translateY(calc((1 - var(--p,1))*14px))}
}
@media (prefers-reduced-motion:reduce){.page-head .wrap,.page-head::before,.page-head::after,.ph-knot{transform:none!important;opacity:1}.ph-knot{opacity:.09}section h2.sd-reveal::after,.sd-bar::after{transform:none}}
/* Graphics: archived originals (2001–2003) */
.legacy{display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));margin-top:1.25rem}
.legacy figure{margin:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:.6rem}
.lg-art{display:grid;place-items:center;min-height:150px;background:#f3f0f8;border-radius:10px;padding:.75rem}
.lg-art img{max-width:100%;height:auto}
.legacy figcaption{font-size:.95rem;color:var(--muted)}
.legacy figcaption strong{display:block;color:var(--ink)}
.legacy-wide{grid-column:1/-1}
/* books: published shelf */
.shelf{display:grid;gap:1.5rem;margin:2rem 0;perspective:1200px;grid-template-columns:1fr}
@media (min-width:640px){.shelf{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1000px){.shelf{grid-template-columns:repeat(3,minmax(0,1fr))}}
.shelf-book{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;transform-origin:50% 100%}
.shelf-cover{display:flex;align-items:center;justify-content:center;height:15rem;flex:none;padding:1rem;background:linear-gradient(160deg,#3b1f5c,#1d0f30 70%)}
.shelf-cover picture{display:contents}
.shelf-cover img{height:100%;width:auto;max-width:100%;object-fit:contain;border-radius:3px 8px 8px 3px;box-shadow:0 10px 24px rgba(0,0,0,.4)}
.shelf-tile{height:100%;aspect-ratio:3/4;border-radius:3px 8px 8px 3px;background:linear-gradient(160deg,#5b2d8e,#2a1440 75%);color:#f4f2f9;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:.8rem;box-shadow:inset 4px 0 0 rgba(0,0,0,.25),0 10px 24px rgba(0,0,0,.4)}
.shelf-tile .cover-title{font-size:1.05rem}.shelf-tile .cover-by{font-size:.62rem}
.shelf-body{padding:1rem 1.2rem 1.2rem;display:flex;flex-direction:column;gap:.35rem;flex:1}
.shelf-body h3{margin:0;font-size:1.15rem;color:var(--plum)}
.shelf-sub{margin:0;font-style:italic;color:var(--muted);font-size:.92rem}
.shelf-by{margin:0;color:var(--muted);font-size:.9rem}
.shelf-meta{margin:0;font:600 .78rem/1.4 var(--sans);letter-spacing:.04em;color:var(--purple-2)}
.shelf-body p.shelf-desc{margin:.35rem 0 0;color:var(--ink)}
.shelf-links{margin-top:auto;padding-top:.5rem;display:flex;flex-wrap:wrap;gap:0 1.1rem}
.shelf-links a{font-weight:600;min-height:44px;display:inline-flex;align-items:center;gap:.3rem}
.shelf-links .icon{width:16px;height:16px}
.shelf-all{text-align:center;margin:0;max-width:none}
@media (min-width:640px) and (max-width:999px){.shelf>:nth-child(2n){--sd-d:.08}}
@media (min-width:1000px){.shelf>:nth-child(3n+2){--sd-d:.08}.shelf>:nth-child(3n){--sd-d:.16}}
/* Web Development: archive timeline cards (named timeline on the card: .pcard is overflow:hidden, so view() on .tl would track the card, not the page). --tlp (0..1) is driven by a native view() timeline when supported,
   otherwise by timeline.js; frames crossfade oldest -> live. Reduced motion: static thumbnail strip instead. */
@property --tlp{syntax:'<number>';inherits:true;initial-value:1}
.tl{--s:calc(var(--tlp)*(var(--n) - 1))}
.tl-frames{position:relative}
.tl-f{position:absolute;inset:0;display:block;pointer-events:none;opacity:clamp(0,(var(--s) - var(--k) + .5)*6,1)}
.tl:not([data-step]) .tl-f:last-child,.tl[data-step="0"] .tl-f:nth-child(1),.tl[data-step="1"] .tl-f:nth-child(2),.tl[data-step="2"] .tl-f:nth-child(3),.tl[data-step="3"] .tl-f:nth-child(4){pointer-events:auto}
.tl-ui{display:flex;align-items:center;gap:1rem;padding:.55rem 1.2rem;background:#120a1d;color:#fff}
.tl-yr{display:grid;margin:0;min-width:6.2rem;font:700 .95rem/1.2 var(--sans);letter-spacing:.02em}
.tl-y{grid-area:1/1;opacity:clamp(0,min((var(--s) - var(--k) + .5)*6,(var(--k) + .5 - var(--s))*6),1)}
.tl-dots{position:relative;flex:1;display:flex;justify-content:space-between}
.tl-dots::before,.tl-dots::after{content:"";position:absolute;left:12px;right:12px;top:50%;height:2px;margin-top:-1px;background:rgba(255,255,255,.22);border-radius:2px}
.tl-dots::after{right:auto;width:calc((100% - 24px)*var(--tlp));background:#c9a7ff}
.tl-d{position:relative;z-index:1;width:24px;height:24px;padding:0;border:0;background:none;cursor:pointer;border-radius:50%}
.tl-d::before{content:"";position:absolute;inset:6px;border-radius:50%;background:#120a1d;border:2px solid rgba(255,255,255,.55)}
.tl-d::after{content:"";position:absolute;inset:6px;border-radius:50%;background:#c9a7ff;box-shadow:0 0 0 3px rgba(201,167,255,.3);opacity:clamp(0,(var(--s) - var(--k) + .5)*6,1)}
.tl-d:focus-visible{outline:2px solid #fff;outline-offset:2px}
.tl-strip{display:none;list-style:none;margin:.2rem 0 .6rem;padding:0;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:.5rem}
.tl-strip a{display:flex;flex-direction:column;gap:.2rem;font:600 .75rem/1.2 var(--sans);color:var(--plum);text-decoration:none}
.tl-strip img{width:100%;height:auto;border-radius:6px;border:1px solid var(--line)}
.tl-links{margin:auto 0 0!important;font-size:.88rem;display:flex;flex-wrap:wrap;gap:.3rem 1rem;align-items:center}
.tl-links a{color:var(--purple-2)}
.tl-live{font-weight:600;display:inline-flex;align-items:center;gap:.3rem;min-height:24px}
@media (prefers-reduced-motion:no-preference){
 @supports (animation-timeline:view()){
  .tl-card{view-timeline-name:--tlv}
  .tl{animation:tl-p linear both;animation-timeline:--tlv;animation-range:cover 31% cover 66%}
  .tl[data-pin]{animation:none}
 }
}
@keyframes tl-p{from{--tlp:0}to{--tlp:1}}
@media (prefers-reduced-motion:reduce){.tl-ui{display:none}.tl-strip{display:grid}.tl{--tlp:1}}
/* Site graphics decks (graphics.html): each site's graphics start stacked on its logo and fan out into a grid as the
   group scrolls in. --gp 0 = stacked, 1 = laid out. Native view timeline when supported, else gdeck.js sets --gp.
   Only transform/opacity change; every box is reserved by the grid and aspect-ratio, so no layout shift. */
@property --gp{syntax:'<number>';inherits:true;initial-value:1}
.gd-nav{display:flex;flex-wrap:wrap;gap:.5rem;margin:1.25rem 0 .5rem}
.gd-nav a{display:inline-block;padding:.35rem .8rem;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-size:.9rem;text-decoration:none}
.gd-nav a:hover,.gd-nav a:focus-visible{border-color:var(--purple-2)}
.gd{margin-top:2.75rem;scroll-margin-top:5rem;view-timeline-name:--gdv}
.gd-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:.25rem .75rem;margin:0}
.gd-h span{font-size:.9rem;font-weight:400;color:var(--muted)}
.gd-deck{list-style:none;margin:1rem 0 0;padding:0;display:grid;gap:1rem;grid-template-columns:repeat(2,minmax(0,1fr));position:relative}
.gd-c{position:relative;z-index:calc(10 - var(--k));--q:calc(1 - var(--gp));transform:translate(calc(var(--sx,0px)*var(--q)),calc(var(--sy,0px)*var(--q))) rotate(calc(var(--r,0deg)*var(--q))) scale(calc(1 - .1*var(--q)))}
.gd-c:first-child{grid-column:span 2}
.gd-a{display:flex;flex-direction:column;height:100%;padding:.7rem;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);color:inherit;text-decoration:none;transition:transform .2s ease}
.gd-a:hover,.gd-a:focus-visible{transform:translateY(-5px)}
.gd-a:focus-visible{outline:3px solid var(--purple-2);outline-offset:3px}
.gd-art{position:relative;display:block;aspect-ratio:4/3;background:#f3f0f8;border-radius:10px}
.gd-art picture{position:absolute;inset:.6rem;display:block}
.gd-art img{width:100%;height:100%;object-fit:contain}
.gd-cap{display:block;margin-top:.6rem;font-size:.92rem;color:var(--muted);opacity:clamp(0,(var(--gp) - .55)*2.4,1)}
.gd-cap strong{display:block;color:var(--ink)}
.gd-cap em{display:block;margin-top:.2rem;font-style:normal;font-size:.82rem;color:var(--purple)}
@media (min-width:760px){.gd-deck{grid-template-columns:repeat(4,minmax(0,1fr))}.gd-c:first-child{grid-row:span 2}.gd-c:first-child .gd-art{aspect-ratio:auto;flex:1;min-height:16rem}}
@keyframes gd-p{from{--gp:0}to{--gp:1}}
@supports (animation-timeline:view()){.gd-deck{animation:gd-p linear both;animation-timeline:--gdv;animation-range:entry 0% cover 45%}}
@media (prefers-reduced-motion:reduce){.gd-deck{animation:none}.gd-c{transform:none}.gd-cap{opacity:1}.gd-a{transition:none}.gd-a:hover,.gd-a:focus-visible{transform:none}}
