<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # Serve existing files/directories as-is
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # Everything else falls back to index.html (client-side routing)
  RewriteRule ^ index.html [L]
</IfModule>

# Cache hashed assets aggressively
<IfModule mod_expires.c>
  ExpiresActive On
  <FilesMatch "\.(js|css|woff2|png|jpg|jpeg|svg|gif)$">
    ExpiresDefault "access plus 1 year"
  </FilesMatch>
</IfModule>
