Leviathan could have evolved from a small group of feral goats that had 6 legs due to polymelia. These cows might become arboreal, and shrink down. Due to their small size, they may evolve to glide using wings derived from their middle limbs. They male become more sexually dimorphic, with the males becoming far larger. These larger males would be unsafe in the trees, and would venture down to the ground. These goats might end up in a more coastal region, and the females may sometimes end up in the water from gliding. This will make a pressure causing the females to become more aquatic. To avoid ground predators, the females may spend longer underwater. They might evolve to become predators. This would require them to get extra armoured scales to protect against fighting prey. They may become nocturnal, and evolve to use light to attract curious prey. The males might become larger, and start caring for young males when they leave the water. In order to protect the young males, they may use a loud roar to scare away predators. The females may evolve to huge sizes, in order to feed on larger whales and other large prey, as well as to store larger amounts of milk for their young. The young females may face predation from birds, and so might evolve to spray out reactive spit, that may evolve to become firey breathe.