An interdisciplinary approach reveals how chemistry, microbes, and ocean circulation work together to shape reef ecosystems