function Nav({ accent }) { const [scrolled, setScrolled] = React.useState(false); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 30); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); const navStyle = { position: 'fixed', top: 0, left: 0, right: 0, zIndex: 100, padding: scrolled ? '14px 40px' : '24px 40px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 24, background: scrolled ? 'rgba(250,250,247,0.88)' : 'transparent', backdropFilter: scrolled ? 'blur(20px) saturate(140%)' : 'none', WebkitBackdropFilter: scrolled ? 'blur(20px) saturate(140%)' : 'none', borderBottom: scrolled ? '1px solid var(--line)' : '1px solid transparent', transition: 'all .4s cubic-bezier(.2,.7,.2,1)', }; return ( ); } window.Nav = Nav;