Solving integral equations in free space with inverse-designed ultrathin optical metagratings - Nature Nanotechnology