Our skin might give us grief sometimes, but one thing we can always depend on it to do is not start indiscriminately leaking blood and sweat everywhere - despite the fact that we're shedding roughly 500 million cells every 24 hours.

Yep, somehow we replace our entire outer layer of skin every two to four weeks, but it never leaks. And scientists think they figured out why back in 2016 - our skin made of a unique arrangement of shapes called tetrakaidecahedrons, which never leave a gap, even as individual cells are sloughed away.

"Our study is also helping us to see how the cells that make up our skin can switch on a mechanism to make a kind of glue, which binds the cells together, ensuring that our skin maintains its integrity," said one of the team, Reiko Tanaka, from the Imperial College London, back in December 2016.

Tanaka and her team decided to investigate the various layers that make up the mammalian epidermis - our protective barrier of skin.

Previous studies had found that the mammalian epidermis has two main physical barriers in the top two layers of the epidermis.

Near the surface is an air-liquid interface barrier formed by the outermost layer of the skin, called the stratum corneum, and below that is a liquid-liquid interface barrier formed by tight junctions - incredibly narrow areas between tessellating skin cells that are virtually impermeable to fluid.

While scientists have long been studying the outermost layer of the epidermis, which is constantly shedding dead skin cells and replacing them with newer, healthier ones, little is known about the thin, secondary skin barrier that sits beneath it, called the stratum granulosum.

The stratum granulosum is crucial to ensuring that our skin doesn't leak, because it's the layer where the tight junctions form, and the outermost layer of the skin could not form without them.

The stratum granulosum also plays a huge role in the process of shedding.

For mammals to shed their outer layer of skin, new skin cells must be continuously produced in the lowest layers of the epidermis, before they're moved up into the stratum granulosum. Here they replace the old skin cells, which are then pushed up into the outermost layer of the epidermis for shedding.

Before 2016, no one could figure out exactly how the stratum granulosum cells can be replaced without disrupting the tight junction barrier that ensures we don't start leaking bodily fluids everywhere.

Tanaka and her team used an imaging technique called confocal microscopy to examine the stratum granulosum cells in the ears of mice, and found that the shape of these cells is crucial to the type of barrier that they form.

The shape is basically a flattened version of something called a Kelvin's tetrakaidecahedron: a 14-sided polyhedron with six rectangular and eight hexagonal sides:

Tomruen/Wikimedia

The structure was first proposed in 1887 by Scotch-Irish mathematical physicist and engineer, William Thomson (Lord Kelvin), who declared it to be the best shape for filling space.

In the images of mouse epidermis layers, a flattened version of this shape appears to form tight junctions on each of its edges, ensuring that a continuous barrier is maintained despite the constant comings and goings of individual cells.

"It is amazing to think that an abstract concept for a shape devised by the mathematician Lord Kelvin over a century ago may be an important shape in nature, helping our skin to maintain its effectiveness as barrier," says Tanaka.

The team figured out that this shape allows the new skin cells to replace old cells by producing a protein that acts as a temporary 'glue', which holds both the old skin cell on top and the new skin cell beneath in tight junctions with those around them, so that even if the top cell is lost, the barrier stays intact.

You can see the process below:

While the experiments were only carried out on mice, the mammalian epidermis is very similar across species - especially in the deeper layers.

The researchers say that corneocytes - a type of skin cell in the outermost layer of the epidermis - in humans are more variegated in humans than in mice, their tetrakaidecahedron model still applies, and this could make a big difference in research into human skin conditions.

The team says a better understanding of how the mammalian epidermis maintains its tight junctions could explain the root causes of chronic skin conditions such as eczema and psoriasis - common ailments that are frustratingly difficult to prevent or treat.

"'Malfunctions' in the production of the tight junctions may be a contributing factor that explains why some people have conditions such as eczema, where the skin barrier is weakened, which leads to bacterial infiltration, inflammation, scratching and further infection," the researchers explained.

"In other cases, fails in the interlocking barrier between cells - the tight junctions - may partly explain why in psoriasis there is an overproduction of epidermal cells, causing thick patches of skin on the surface."

The team now plans to figure out how skin thickness is determined in the epidermis layers, and how the balance between cell growth and cell shedding is maintained, to identify where faults or malfunctions might originate.

The research was published in eLife.