Guest-adaptive molecular sensing in a dynamic 3D covalent organic framework