Mechanical adaptation of brachiopod shells via hydration-induced structural changes