The geology of South Dakota began to form more than 2.5 billion years ago in the Archean eon of the Precambrian. Igneous crystalline basement rock continued to emplace through the Proterozoic, interspersed with sediments and volcanic materials. Large limestone and shale deposits formed during the Paleozoic, during prevalent shallow marine conditions, followed by red beds during terrestrial conditions in the Triassic. The Western Interior Seaway flooded the region, creating vast shale, chalk and coal beds in the Cretaceous as the Laramide orogeny began to form the Rocky Mountains. The Black Hills were uplifted in the early Cenozoic, followed by long-running periods of erosion, sediment deposition and volcanic ash fall, forming the Badlands and storing marine and mammal fossils. Much of the state's landscape was reworked during several phases of glaciation in the Pleistocene. South Dakota has extensive mineral resources in the Black Hills and some oil and gas extraction in the Williston Basin. The Homestake Mine, active until 2002, was a major gold mine that reached up to 8000 feet underground and is now used for dark matter and neutrino research.