Dinosaurs are a diverse group of animals that were the dominant terrestrial vertebrates for over 160 million years, from the late Triassic period (about 230 million years ago) until the end of the Cretaceous (about 65 million years ago). The extinction of most dinosaur species occurred during the Cretaceous–Tertiary extinction event. The fossil record indicates that birds evolved from theropod dinosaurs during the Jurassic period. Some of them survived the Cretaceous–Tertiary extinction event, including the ancestors of all modern birds. Consequently, in modern classification systems, birds are considered a type of dinosaur the only group of which that survives until the present day. Dinosaurs are a diverse and varied group of animals; birds, at over 9,000 species, are the most diverse group of vertebrate besides perciform fish. Paleontologists have identified over 500 distinct genera and more than 1,000 different species of non-avian dinosaurs. Dinosaurs are represented on every continent by both extant species and fossil remains. Some dinosaurs are or were herbivorous, others carnivorous. Some have been bipedal, others quadrupedal, and others have been able to shift between these body postures. Many non-avian species developed elaborate skeletal modifications such as bony armor, horns or crests. Avian dinosaurs have been the planet's dominant flying vertebrate since the extinction of the pterosaurs. Although generally known for the large size of some species, most dinosaurs were human-sized or even smaller. Most groups of dinosaurs are known to have built nests and laid eggs.