Snorkeling amid the tree-tangled rock islands of Ngermid Bay in the western Pacific nation of Palau, Alison Sweeney lingers at a plunging coral ledge, photographing every giant clam she sees along a 50-meter transect. In Palau, as in few other places in the world, this means she is going to be underwater for a skin-wrinkling long time.

At least the clams are making it easy for Sweeney, a biophysicist at the University of Pennsylvania. The animals plump from their shells like painted lips, shimmering in blues, purples, greens, golds, and even electric browns. The largest are a foot across and radiate from the sea floor, but most are the smallest of the giant clams, five-inch Tridacna crocea, living higher up on the reef. Their fleshy Technicolor smiles beam in all directions from the corals and rocks of Ngermid Bay.

After being cooped up in their lab at the Palau International Coral Reef Center, Sweeney and three of the scientists on her team have decided to swim out to these clam grounds, about a mile from shore. As we slice through blue-green water beside the mushroom-shaped islands, we see fruit bats sleeping upside down in the trees above us, and extensive corals below. Some of the corals are bleached from the conditions in Ngermid Bay, where naturally high temperatures and acidity mirror the expected effects of climate change on the global oceans. (Ngermid Bay is more commonly known as “Nikko Bay,” but traditional leaders and government officials are working to revive the indigenous name of Ngermid.)

Even those clams living on bleached corals are pulsing color, like wildflowers in a white-hot desert. Sweeney’s ponytail flows out behind her as she nears them with her camera. They startle back into their fluted shells. Like bashful fairytale creatures cursed with irresistible beauty, they cannot help but draw attention with their sparkly glow.

It’s the glow that drew Sweeney’s attention to giant clams, and to Palau, a tiny republic of more than 300 islands between the Philippines and Guam. Its sun-laden waters are home to seven of the world’s dozen giant-clam species, from the storied Tridacna gigas—which can weigh an estimated 550 pounds and measure over four feet across—to the elegantly fluted Tridacna squamosa. Sweeney first came to the archipelago in 2009, while working on animal iridescence as a post-doctoral fellow at the University of California at Santa Barbara. Whether shimmering from a blue morpho butterfly’s wings or a squid’s skin, iridescence is almost always associated with a visual signal—one used to attract mates or confuse predators. Giant clams’ luminosity is not such a signal. So, what is it?

In the years since, Sweeney and her colleagues have discovered that the clams’ iridescence is essentially the outer glow of a solar transformer—optimized over millions of years to run on sunlight and algal biofuel. Giant clams reach their cartoonish proportions thanks to an exceptional ability to grow their own photosynthetic algae in vertical farms spread throughout their flesh. Sweeney and other scientists think this evolved expertise may shed light on alternative fuel technologies and other industrial solutions for a warming world.

I float on my back in Ngermid Bay, waiting for Sweeney and her team to finish their transect. The intense Palauan sun is dropping behind the ancient rock islands, and the fruit bats are beginning to wake, stretch their wings and take off into the twilight. I head toward land, backstroking so I can watch them soar. Bat-stroke, I think.

Sweeney is the last to turn back. It’s hard for her to leave the clam grounds, and her quest to decode the mammoth mollusks’ dazzling glow.

Fruit bats are above me and giant clams below again the very next day, this time on land. The two are among the animals painted on the oldest bai—men’s meeting house—in Palau. The historic governing houses with brightly painted wood beams and steep thatched roofs once dominated every village. But this one, in the state of Airai on Palau’s scantly developed largest island, Babeldaob, is one of the last traditional bai still standing. Fruit bats, symbols of humility in Palauan culture, decorate the entryways at each end of the building, reminders that even the most important chiefs should bow down and show respect as they enter. In a bold black-and-white strip below the bats, stylized giant clams stretch across the front and back of the bai, a pattern that also often borders Palauan lintels and carved wooden storyboards. On the walls of the bai and in the legends of Palau, “the clam signifies power and it signifies persistence,” says Elsa Sugar of Airai’s Office of Historic and Cultural Preservation, who is giving me a clam tour of the village where she was born.

Palau’s islands have been inhabited for at least 3,400 years, and from the start, giant clams were a staple of diet, daily life, and even deity. Many of the islands’ oldest-surviving tools are crafted of thick giant-clam shell: arched-blade adzes, fishhooks, gougers, heavy taro-root pounders. Giant-clam shell makes up more than three-fourths of some of the oldest shell middens in Palau, a percentage that decreases through the centuries. Archaeologists suggest that the earliest islanders depleted the giant clams that crowded the crystalline shallows, then may have self-corrected. Ancient Palauan conservation law, known as bul, prohibited fishing during critical spawning periods, or when a species showed signs of over-harvesting.

Before the Christianity that now dominates Palauan religion sailed in on eighteenth-century mission ships, the culture’s creation lore began with a giant clam called to life in an empty sea. The clam grew bigger and bigger until it sired Latmikaik, the mother of human children, who birthed them with the help of storms and ocean currents.

The legend evokes giant clams in their larval phase, moving with the currents for their first two weeks of life. Before they can settle, the swimming larvae must find and ingest one or two photosynthetic alga, which later multiply, becoming self-replicating fuel cells. After the larvae down the alga and develop a wee shell and a foot, they kick around like undersea farmers, looking for a sunny spot for their crop. When they’ve chosen a well-lit home in a shallow lagoon or reef, they affix to the rock, their shell gaping to the sky. After the sun hits and photosynthesis begins, the microalgae will multiply to millions, or in the case of T. gigas, billions, and clam and algae will live in symbiosis for life.

The microalgae, called zooxanthellae, keep their clams fat and happy with the sugars they need to survive. In exchange, their hosts provide a safe home and a daily dose of sunlight—delivered with remarkable precision. These intertwining life cycles raise compelling scientific questions for the times: How do the clams collect such intense equatorial sunlight without overheating? How do they distribute the light evenly to millions of microalgae, including those in the darkest depths of the clam? And perhaps most urgently, how are these animals proving so resilient in the warming, acidifying tropical seas?

In the bathtub-warm waters of Ngermid Bay, I swim with Amanda Holt and Jing Cai, two postdoctoral fellows on Sweeney’s team, as they search for giant clams. I’d imagined we might find the hundred-pound, blue-glowing T. gigas that illustrate every giant-clam article and academic paper. I soon learn that this is like expecting Bengal tigers to pop out of the forests of India. Our most ubiquitous wild icons have become our rarest, T. gigas no exception.

Alison Sweeney observes a giant clam in Palau (Cynthia Barnett)

Giant clam is a beloved staple in Palau and many other Pacific islands, prepared raw with lemon, simmered into coconut soup, baked into a savory pancake, or sliced and sautéed in a dozen other ways. But luxury demand for their ivory-like shells and their adductor muscle, which is coveted as high-end sashimi and an alleged aphrodisiac, has driven T. gigas extinct in China, Taiwan, and other parts of their native habitat. Some of the toughest marine-protection laws in the world, along with giant-clam aquaculture pioneered here, have helped Palau’s wild clams survive. The Palau Mariculture Demonstration Center raises hundreds of thousands of giant clams a year, supplying local clam farmers who sell to restaurants and the aquarium trade and keeping pressure off the wild population. But as other nations have wiped out their clams, Palau’s 230,000-square-mile ocean territory is an increasing target of illegal foreign fishers.

We see only one T. gigas all afternoon. But the relatively diminutive T. crocea are everywhere. I count twenty affixed to a single coral rock, their soft bodies, called mantles, pulsing color. A velvety-black clam is trimmed with electric-blue spots. A dark turquoise clam has a brighter aquamarine band ringed in black spots. They cling next to a yellow-green clam mottled like lizard skin, and a brown one with dark gold running through its mantle like veins in quartz rock. They look like nothing so much as living scrunchies, gleefully discarded by a passing mermaid.

The riotous colors belie the naturally low pH and high temperatures of Ngermid Bay. Like corals, which have a similar bond with zooxanthellae, giant clams are susceptible to bleaching in extreme heat. Under stress, they expel their algae, which drains their color and ultimately can kill them. But the wild clams of Ngermid Bay appear to be thriving despite conditions similar to those predicted for the global oceans in the year 2100.

At the Palau International Coral Reef Center on the busy island of Koror, CEO Yimnang Golbuu, a biologist, explains that Ngermid’s conditions are a natural result of its low flushing and isolation from outside ecosystems. Those features also confine larvae to the bay, which may allow marine life to select for tolerant traits and adapt to the harsh environment. “Obviously there are differences in resilience that nature has provided us,” says Golbuu. “We need to understand and listen to nature and learn from those differences.”

Listening to nature is at the heart of a growing confluence of biology and materials science. When Sweeney took her first physics class, as an undergraduate biology major in her native Illinois, she found that studying life through its physical structures gave her a welcome sense of order amid the amorphous questions of evolutionary biology. Twenty years later, as the first biologist hired in Penn’s department of Physics and Astronomy, she is still drawn to the elegant efficiency of living creatures: The acuity of a squid’s eye lens, or now, the giant clam’s ability to turn sunlight into energy.

In a sense, it’s the laboratory version of the animal moral stories painted on the Palauan bai. Just as a new generation of civil engineers has learned that working with ecosystems can make for superior design, materials scientists increasingly look to biology not only for inspiration, but for actual blueprints.

“Evolution,” Sweeney says, “is so much more clever than human engineers.”

Nearly 9,000 miles away, on the other side of the Earth, a light January snow is falling when I visit an unlikely epicenter of giant-clam research. Philadelphia is home to not only Sweeney’s lab, but also to the oldest malacology collection in North America, housed at the Academy of Natural Sciences. Founded in 1812 and now part of Drexel University, the Academy is a mélange of Victorian-era collections and modern technology. On the top floor, more than 10 million specimens, ranging from mondo T. gigas shells to mini .01-millimeter sea-snail spirals, are tucked into 13,500 aluminum drawers. Five hundred giant-clam shells fill the bottommost drawers, specially reinforced to withstand their weight.

Just as understanding a human requires knowing not only our physical body but also our history, understanding a mollusk means knowing not only the animal but also its shell. Drexel biogeochemist Michelle Gannon can read a Palauan clam’s life story in its custom-built home.

In the Academy’s basement, past funky-smelling stacks of stuffed mammals and beastly horns, Gannon guides a T. crocea shell collected by Sweeney’s team into an electric trim saw with a seven-inch blade. The cross-section reveals feathery gray growth rings that, like tree rings, mark years of the clam’s life. She uses a scanning electron microscope to peer more closely at the rings, reading daily cycles of sunlight and darkness in crystals just a few micrometers wide. In the Academy’s stable isotope lab, she zeroes in still further, grinding the crystals into powder and weighing them. Shells are made of calcium carbonate—CaCO3, one atom of calcium, one carbon, three oxygen—and clams build different amounts of the isotopes oxygen-16 and oxygen-18 into their homes depending on water temperature, evaporation rates and other conditions. By measuring the relative weights of the isotopes, Gannon can describe daily changes in the clam’s environment.

When she binds these bioarchives together, Gannon has a detailed history of the clam’s living conditions and photosynthetic output—even the amount of sunlight that reached the animal each day. On the brightest days, she’s found, the clams grow an order of magnitude faster than when it’s cloudy.

The snow is falling harder the next day when I meet Sweeney and her University of Pennsylvania collaborator, materials science and engineering professor Shu Yang, at Penn’s Laboratory for Research on the Structure of Matter. In an enormous close-up photo in the lobby, an iconic T. gigas glows in tropical blue.

Yang began her career at Bell Laboratories-Lucent Technologies, researching the use of light in telecommunications. She’s spent the past 14 years at Penn, where she and the more than twenty researchers in her lab work to fabricate materials based on natural forms. They’ve mimicked the self-cleaning ability of lotus leaves; the adhesive talents of gecko foot hairs and burdock seeds; and the water-repellent colors of butterfly wings and beetle scales. Now, they are modeling the photosynthetic efficiency of giant clams.

The research began with the glow. Unlike a pigment, the iridescent color in a giant-clam mantle, a peacock feather, or a blue butterfly wing is a physical effect produced when nanometer-sized lattices within the surface interact with light. Scientists call these lattices photonic crystals. Materials scientists such as Yang are keen to fabricate them to harness light for any number of applications, from speedier fiber optics to more efficient photovoltaic cells.

The sparkling lattices in butterfly wings and peacock feathers appear to have evolved to attract mates. But the clams’ glowing cells—called iridocytes—seek to woo the sun. Inside the mantle of a clam, Sweeney’s team discovered, microalgae organize into pillars, and iridocytes assemble into solar-collection panels over each pillar. The iridocytes draw in concentrated sunlight, then scatter the light waves that best spark photosynthesis in the algae. By directing blue and red light waves to the pillars and reflecting the rest back into the water, the iridocytes keep the algae fueled up without the clam burning up in the intense tropical sun. “I was fascinated because it’s self-assembly, and it’s cheap,” says Yang.

Yang had spent years working to fabricate photonic crystals with costly metallic materials. Working with Sweeney as part of a special interdisciplinary grant from the National Science Foundation, she and her team discovered that silica nanoparticles embedded in gelatin could mimic the shining clam cells’ light-scattering properties—and best of all, they could do it inexpensively.

Stephen Mayfield, director of the California Center for Algae Biotechnology at the University of California at San Diego, says that the gigas-sized obstacle to ramping up algal biofuels is cost. “We’ve proven that we can grow productive algae, and that we can convert them to fuel,” Mayfield says. “The reason we’re not making this transition is that we as a society have not been willing to make the short-term investment for the long-term payout”—especially given the subsidies that keep fossil fuels cheap.

Michael Pawlyn, a British architect known for his work to bring biological design to buildings and industrial plants, says the challenges are similar worldwide. Investors are put off by upfront costs, and with no price on emissions, there’s no financial incentive to consider the benefits of low-carbon energy to the world.

Sweeney and Yang believe that a giant-clam-inspired bioreactor could be both cheaper and more productive than existing biofuel production methods. Whether they can build one is the question at hand. Using cultures from Palauan clams, Yang and her team are now at work on the algal side of the model. But so far, the scientists haven’t been able to coax the algae cells in the lab to line up as dutifully as they did in the clams—and neither Yang nor anyone else knows how long that will take.

Back underwater in Ngermid Bay, the same stylized giant-clam pattern from the Palauan bai circles the bicep of one of Sweeney’s doctoral students in a banded tattoo. Lincoln Rehm grew up in Texas in a Palauan family and traveled to the islands for vacations as a child, often kayaking through the shallows with his aunties to collect clams. They’d bring soy sauce and lemon and enjoy a clam-sashimi picnic on the reef. Rehm believes those summers defined his purpose, and after earning his degree in biology, he moved to Palau to work at the coral-reef center. It was there that he became interested in Sweeney’s research on the optical properties of giant clams. In 2015, he returned to the United States to begin a doctoral program at Drexel, funded in part by Sweeney and Yang’s NSF grant.

As Holt and Cai swim ahead to scope for the clams, Rehm dives down to set up Sweeney’s shots. He positions a color palette next to each clam to help log its hue into the computer later. Over the past three years, he has built a database of more than 800 giant-clam photos. Holt and Cai wrote a code that uses the palette to organize each clam by color; Cai, a machine-learning expert, designed an algorithm that analyzes every pixel, allowing the team to see hue and brightness in individual algae and clam cells, including the glowing iridocytes.

Giant clams in Palau (Cynthia Barnett)

Back in the laboratory at the coral reef center, Sweeney, Rehm, Holt, and Cai are finishing up a series of experiments on live clam tissue. They’re measuring how light and heat leave the algae and clam cells. Rehm slices a small bit of flesh from a softball-sized T. crocea he collected from the inlet behind the lab. He places the sample in water under bright light, attaches digital thermometers, and records the temperatures of the water and tissue over the course of 30 minutes.

Across the table, Sweeney whirs an immersion blender she picked up at a nearby shopping center, mixing algae extracted from the same clam. The resulting froth looks like a coconut smoothie, smells like clam juice, and is as dense with algae as a clam’s mantle.

Nearby, Holt uses a spectrometer to expose muscle, iridocytes and algae from another piece of the clam to different types of light, tracking how much is absorbed and through which cells.

Repeated late into the evenings during their three weeks in Palau, the experiments on the clam tissue and the isolated algae reveal a new clue to the workings of the bivalve bioreactor. The iridocytes appear to not only draw light into the clam and scatter the most useful wavelengths to the algae, but also collect the excess heat generated by photosynthesis and send it back out again via light. Photosynthesis can spike the clam’s body temperature several degrees higher than the surrounding seawater. The scientists detect heat leaving the algae, and then the clam, via infrared light through its iridocytes.

For giant clams, this ability to shed heat may be a key to their resilience in environments like Ngermid Bay. For humanity, it may point the way toward new cooling technologies—fossil-fuel-free methods of expelling heat from power plants, office buildings, or car interiors.

Magnified on Rehm’s computer screen, a microscopic fleck of iridocytes in the mantle of a giant clam evokes the Milky Way on a pitch-black night. It is a reminder of the still-unexplored worlds undersea—and the solutions that may lie within.

I spot giant clams and fruit bats together once more before I leave Palau. Both are delicacies on the menu at a local restaurant called Carp. Fruit-bat soup is an island favorite that arrives with the entire winged creature afloat in the bowl. I pass, having heard on my dive boat that Americans have a reputation for ordering fruit bat soup for a selfie or an Instagram post, and leaving the food untouched.

Likewise, I can’t bring myself to order the giant-clam soup, the giant-clam pie or the giant-clam sashimi. It’s one thing for Palauans to enjoy the staples that have sustained them for thousands of years. It’s another for outsiders to exert so much pressure on these island icons. It is, after all, the outside world that threatens Palau: the crowds of sunscreen-whitened, fin-flapping tourists on the reefs; the poaching of marine life; and the warming, acidifying, rising seas of a climate altered by the fossil-fuel emissions of much larger countries.

Palau is the thirteenth-smallest nation in the world, with a population of 20,000, yet it sees more than 160,000 visitors a year—and almost all of them head underwater. Far more damaging than the invited foreign tourists, who provide more than half the republic’s GDP, are the uninvited foreign fleets: the super trawlers and small-boat poachers that sneak into Palauan waters to nab giant clams, bluefin tuna, sharks, and other marine life for the ravenous global seafood market.

Palau, drawing on its ancient conservation tradition of bul, is fighting back. In 2015, President Tommy Remengesau Jr. signed into law the Palau National Marine Sanctuary Act, which prohibits fishing in 80 percent of Palau’s Exclusive Economic Zone and creates a domestic fishing area in the remaining 20 percent, set aside for local fishers selling to local markets. In 2016, the nation received a $6.6 million grant from Japan to launch a major renovation of the Palau Mariculture Demonstration Center. Now under construction at the waterfront on the southern tip of Malakal Island, the new facility will amp up clam-aquaculture research and increase giant-clam production five-fold, to more than a million seedlings a year.

Last year, Palau amended its immigration policy to require that all visitors sign a pledge to behave in an ecologically responsible manner. The pledge, stamped into passports by an immigration officer who watches you sign, is written to the island’s children:

Children of Palau, I take this pledge, as your guest, to preserve and protect your beautiful and unique island home. I vow to tread lightly, act kindly and explore mindfully. I shall not take what is not given. I shall not harm what does not harm me. The only footprints I shall leave are those that will wash away.

The pledge is winning hearts and public-relations awards. But Palau’s existential challenge is still the collective “we,” the world’s rising carbon emissions and the resulting upturns in global temperatures, sea levels, and destructive storms.

F. Umiich Sengebau, Palau’s Minister for Natural Resources, Environment, and Tourism, grew up on Koror and is full of giant-clam proverbs, wisdom and legends from his youth. He tells me a story I also heard from an elder in the state of Airai: that in old times, giant clams were known as “stormy-weather food,” the fresh staple that was easy to collect and have on hand when it was too stormy to go out fishing.

As Palau faces the storms of climate change, Sengebau sees giant clams becoming another sort of stormy-weather food, serving as a secure source of protein; a fishing livelihood; a glowing icon for tourists; and now, an inspiration for alternative energy and other low-carbon technologies. “In the old days, clams saved us,” Sengebau tells me. “I think there’s a lot of power in that, a great power and meaning in the history of clams as food, and now clams as science.”

The giant clam’s glow may be signaling something, after all.