Hierarchical porous carbons with layer-by-layer motif architectures from confined soft-template self-assembly in layered materials