So my compost is very nitrogen-rich since my yard is mostly lawn and grass clippings are nitrogen-heavy. I read that hay, on the other hand, is carbon-rich. Since hay is just grass dried in the sun, am I correct that nitrogen actually becomes carbon after drying? I also read that dry leaves are good source of carbon, but wet leaves are not. I'm a bit confused, please advice me.
You are missing the fact that the ratio of carbon to nitrogen in organic material is nowhere near a 50/50 split. The difference between "nitrogen rich" and "nitrogen poor" is more like the difference between 25 parts carbon to 1 part nitrogen and 30 parts carbon to 1 part nitrogen, by weight.
The most common chemical compound in plant material is cellulose, which is roughly equal parts of carbon and oxygen by weight plus a few percent of hydrogen, and contains no nitrogen at all.
Nitrogen as an element is a gas (air is about 80% nitrogen) and most simple nitrogen compounds are gases and/or soluble in water, so nitrogen can easily be "lost" when grass is dried to turn it into hay, for example. The side effect of a small (1% or 2%) loss of the mass of nitrogen from the compost is not noticeable.
Wet leaves contain just as much carbon as dry leaves. The problem with composting wet leaves (or any other wet material) is that too much water excludes air from the compost pile, which inhibits the micro-organisms which produce aerobic decomposition and generate heat to sterilize weed seeds etc.
A compost pile which is too wet decomposes slowly and anaerobically, producing a horrible-smelling slimy mess instead of compost.
Elements like carbon don't change into other elements (like nitrogen). The carbon that remains after the nitrogen is gone was already there to begin with, and it was there when the plants were alive, too. It's possible that some of the carbon was converted into another form, and maybe some got released as gas, somehow; but you're probably not going to get more carbon in the substance without living plants.
Bacteria can potentially sequester carbon, but the majority of the carbon we're talking about was probably put there by the plant itself.
So, in summary, wet leaves should still have just as much carbon in them as dry leaves, if we're talking about a single leaf. By weight, rather than by number of leaves, dry leaves should have more carbon, though. Wet leaves have nitrogen that dry leaves lack.