// Project Stack. One dependency-free component; edit projects in demo.html.
(() => {
if(customElements.get('project-stack'))return;
const arrow='';
class ProjectStack extends HTMLElement{
connectedCallback(){
if(this.shadowRoot)return;
const r=this.attachShadow({mode:'open'});
r.innerHTML=`
PICK A PROJECT. TAKE A LOOK.
`;
this.items=[{title:'Orbit',tag:'BRAND & WEB',description:'A home for your next big idea.',href:'https://example.com/#orbit'},{title:'Forma',tag:'DESIGN SYSTEM',description:'A small system for making things feel consistent.',href:'https://example.com/#forma'},{title:'Echo',tag:'DIGITAL PRODUCT',description:'A quieter place for your favourite sounds.',href:'https://example.com/#echo'}];
const supplied=this.querySelector('script[type="application/json"]');
if(supplied){try{const data=JSON.parse(supplied.textContent);if(Array.isArray(data)&&data.length===3)this.items=data;}catch(_) {}}
this.items.forEach((item,i)=>{
const card=document.createElement('section');card.className='card';card.id='project-'+i;card.setAttribute('role','tabpanel');card.setAttribute('aria-labelledby','tab-'+i);
card.innerHTML=`