    /* Custom styles beyond Tailwind */
    
    html {
        scroll-behavior: smooth;
    }
    
    body {
        overflow-x: hidden;
    }
    
    /* Scroll reveal base - content always visible by default */
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    /* Progressive enhancement: animate only when JS adds the class */
    @media (prefers-reduced-motion: no-preference) {
        .reveal.animated {
            opacity: 0;
            transform: translateY(24px);
        }
        .reveal.animated.animate-in {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Navbar scrolled state */
    #navbar.scrolled {
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    }
    
    /* Custom scrollbar */
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #F6F7F8;
    }
    ::-webkit-scrollbar-thumb {
        background: #C8CCD2;
        border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #A8AFBA;
    }
    
    /* Focus styles */
    a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
        outline: 2px solid #FF5C3A;
        outline-offset: 2px;
    }
    
    /* Mobile menu animation */
    #mobile-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    #mobile-menu.open {
        max-height: 500px;
    }
</style>
<sm-file path="script.js">
    // Mobile menu toggle
    const mobileToggle = document.getElementById('mobile-toggle');
    const mobileMenu = document.getElementById('mobile-menu');
    const menuOpen = document.getElementById('menu-open');
    const menuClose = document.getElementById('menu-close');
    const mobileLinks = document.querySelectorAll('.mobile-link');

    mobileToggle.addEventListener('click', () => {
        const isOpen = !mobileMenu.classList.contains('hidden');
        if (isOpen) {
            mobileMenu.classList.add('hidden');
            menuOpen.classList.remove('hidden');
            menuClose.classList.add('hidden');
        } else {
            mobileMenu.classList.remove('hidden');
            menuOpen.classList.add('hidden');
            menuClose.classList.remove('hidden');
        }
    });

    mobileLinks.forEach(link => {
        link.addEventListener('click', () => {
            mobileMenu.classList.add('hidden');
            menuOpen.classList.remove('hidden');
            menuClose.classList.add('hidden');
        });
    });

    // Navbar scroll effect
    const navbar = document.getElementById('navbar');
    let lastScroll = 0;

    window.addEventListener('scroll', () => {
        const currentScroll = window.pageYOffset;
        if (currentScroll > 50) {
            navbar.classList.add('scrolled');
        } else {
            navbar.classList.remove('scrolled');
        }
        lastScroll = currentScroll;
    });

    // Scroll reveal (progressive enhancement)
    const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
    
    if (!prefersReducedMotion) {
        const revealElements = document.querySelectorAll('.reveal');
        
        const observerOptions = {
            root: null,
            rootMargin: '0px 0px -60px 0px',
            threshold: 0.1
        };

        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    // Add hidden state first
                    entry.target.classList.add('animated');
                    // Force reflow
                    entry.target.offsetHeight;
                    // Add animated state
                    entry.target.classList.add('animate-in');
                    observer.unobserve(entry.target);
                }
            });
        }, observerOptions);

        // First, set all reveal elements to animated (hidden) state
        revealElements.forEach(el => {
            el.classList.add('animated');
        });

        revealElements.forEach(el => {
            observer.observe(el);
        });
    }

    // Contact form
    const contactForm = document.getElementById('contact-form');
    const formSuccess = document.getElementById('form-success');

    contactForm.addEventListener('submit', (e) => {
        e.preventDefault();
        
        // Simulate form submission
        const submitBtn = contactForm.querySelector('button[type="submit"]');
        const originalText = submitBtn.innerHTML;
        submitBtn.innerHTML = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="animate-spin"><path d="M10 2a8 8 0 1 1-8 8"/></svg> Sending...';
        submitBtn.disabled = true;
        
        setTimeout(() => {
            contactForm.style.display = 'none';
            formSuccess.classList.remove('hidden');
        }, 1200);
    });
</script>
