It's something we all just take completely for granted: no matter how hard it rains or how much our clothes get soaked, our skin will keep the water out of our bodies. But until now, nobody knew why this was.

The waterproof nature of our skin is a basic fact of life - indeed, it's quite literally that, as it's hard to imagine our species (or any other, for that matter) would have gotten very far if foreign liquids could just seep into our bodies whenever. What makes human skin particularly impressive is that it's able to keep all that water out while still forcing water out in the form of sweat, something we do much more than other animals. That perfectly one-way system of water transport is an amazing evolutionary marvel, but it's proven fiendishly difficult to study just how the thing works.

As New Scientist reports, we know that the waterproof barrier is found in a thin layer of fat found between the outermost layers of skin cells. A team at Sweden's Karolinska Institute led by Lars Norlén spent months shaving layers of skin off of volunteers and flash-freezing the tissue samples at -140° C in an attempt to keep the fat cells in their original positions and make it possible to study them up close. After a lot of trial and error and many failed attempts, the team has been able to get a slice thin enough to reveal the inner workings of the skin's waterproof boundary. New Scientist explains:

Lipids have a hydrophilic (water-attracting) head and two hydrophobic (water-repelling) tails. Normally, the two tails point in the same direction, giving the molecule a hairpin-like appearance. A group of lipid molecules typically arrange themselves into a two-layered sheet – or bilayer – with all of the tails pointing inwards. However, the lipid molecules in between the cells of the stratum corneum are splayed outwards so that the two tails of each molecule point in opposite directions.

These lipid molecules are stacked on top of one another in an alternating fashion. "By stretching out like this they form a more condensed structure which is much more impermeable than a normal bilayer," says Norlén. This uniquely structured fatty layer prevents any water from getting past in either direction – except where the skin layer is modified to form pores.

Intriguingly, now that we know just how the skin so perfectly keeps foreign liquids out of the skin, we now have the opportunity to figure out how to hack our bodies so that we can, well, start putting foreign liquids into the skin. Specifically, the researchers say that opening up the waterproof barrier could allow for drugs to be administered through the skin straight into the bloodstream, bypassing organs like the liver and intestines.