Interface-driven and pore-mediated fracture in layered and porous geomaterials: Insights from elastoplastic phase field model