3D CSEM modeling and inversion in complex geologic settings