/* Scoped to: portfolio-template-header */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="portfolio-template-header"]');
  componentRoots.forEach(function(componentRoot) {
    // Helper to query within component, with fallback to document for sibling elements
    var $ = function(sel) { 
      return componentRoot.querySelector(sel) || document.querySelector('[data-component-slug="portfolio-template-header"] ~ ' + sel) || document.querySelector(sel);
    };
    var $$ = function(sel) { 
      var results = componentRoot.querySelectorAll(sel);
      return results.length ? results : document.querySelectorAll(sel);
    };
    // Original component JS runs in this scope
    let toggle = document.getElementById("menuToggle"); let closeBtn = document.getElementById("closeMenu"); let mobileMenu = document.getElementById("mobileMenu"); toggle?.addEventListener("click", () => { mobileMenu.classList.remove("hidden"); mobileMenu.classList.add("flex"); }); closeBtn?.addEventListener("click", () => { mobileMenu.classList.add("hidden"); mobileMenu.classList.remove("flex"); });
  });
})();