The Costa Rica leaf moth is truly a master of disguise. As a newly hatched larva, the species mimics bird poop. As a later-stage caterpillar, it can inflate its head to make it seem more snake-like. And as an adult moth, its wings look like every other dead leaf on the forest floor. With this impressive trickery, the moth avoids predation, first by being unappealing, then by looking threatening, and, finally, by blending in. But as one scientist recently discovered, that second stage—when the caterpillar impersonates a snake—can have unintended consequences. Earlier this year, Jim Marden, a biology professor at Pennsylvania State University, was leading a tropical-ecology course in Costa Rica when he was tipped off to a fierce showdown between a serpentine caterpillar and a female Rufous-tailed Hummingbird. Mere inches below was the hummingbird’s compact, lichen-covered nest, filled with a pair of small white eggs. As Marden’s thrilling photos and video reveal, the...