The sun is perfectly fine, but for generations, not a single human has seen sunlight. Earth is completely covered in black fog, reaching high up into the atmosphere, so that not even skyscrapers can escape it.
The fog is actually made of microscopic organisms. In the upper layers of the atmosphere, they photosynthesize. Dead microbes eventually drift down to the ground, creating a rich black soil that feeds fungus and other lifeforms.
Across the whole world, the fog utterly blacks out the sky, and even at ground level, it is dense enough to limit visibility to under a hundred feet, even with a powerful torch (of course, since there is no sunlight, a human would need some artificial light source to see at all). This level of fog is roughly similar to a perpetual Tule fog.
The problem: thick atmospheres lead to greenhouse conditions on a planet, but Earth must remain habitable for human-like creatures.
How can I keep our world from turning into a Venusian hellhole?
The fog is genetically engineered by a sufficiently advanced intelligence, so any hard science answer is acceptable.
/thick atmospheres lead to greenhouse conditions on a planet/
Venus has a huge greenhouse effect because their atmosphere contains a metric buttload*of CO2. This makes the Venusian atmosphere "thicker" as well because CO2 is more massive than N2 or O2.
If you add a heavier gas like CO2 to the atmosphere it will increase atmospheric pressure, because the gas column above you will be more massive. If a given volume of floating fog microbe were more massive than the atmosphere it displaced, a lot of shoulder-to-shoulder dense microbes might increase atmospheric pressure. I conclude that these microbes are not that massive because by your description of them floating around they seem to be at least neutrally buoyant - equal in mass to the atmosphere they displace. So their presence should not increase atmospheric pressure.
Actually for a couple of reasons I think this black fog might make things colder. People argue whether nuclear winter could really happen - enormous airborne clouds of black soot caused by fires cooling the planet.
This aerosol of particles could heat the stratosphere and block out a
portion of the sun's light from reaching the surface, causing surface
temperatures to drop drastically, and with that, it is predicted
surface air temperatures would be akin to, or colder than, a given
region's winter for months to years on end.
That is one mechanism by which the fog would cool the earth - trapping heat high up and preventing light from heating the earth below.
The other mechanism is that this colossal biomass of floating photosynthetic organisms would deplete our atmosphere of the main greenhouse gases we have - CO2 and H2O both of which are required for photosynthesis and which presumably this fog will gobble up, there being no other obvious carbon source or water source for them. Without those two, it gets cold.
Something is going to need to circulate the atmosphere, bringing the hot air trapped at the bottom of the fog to the top to cool off and bringing the cool air down.
Whoever created the microbes cracked open a bunch of volcanoes at the equator. They heat the air, causing it to rise and bringing up materials for the live microbes in the upper atmosphere.
Meanwhile, at the poles, the microbes detect that the local magnetic field is pointing down, turn white, and die. The white microbes reflect a lot of sunlight from the poles, making the air much colder. The cool air sinks, slowly making its way to the equator and cooling the land as it does so.
This makes the poles the most hospitable region of Earth, as the vast amount of falling microbes and cool air make it an ideal place to live.
There are three kinds of events that are similar yet not identical and that are said to reduce the temperature should they happen. Impact winter, nuclear winter and volcanic winter.
What they have in common is that in all three cases at least part of the reason for the lowering of temperature are particles injected into the upper atmosphere. And that would be true for the scenario described in the question, too.
Based on that I'd post the thesis that the microorganisms in the upper atmosphere would block sunlight and by that reduce temperature, too.
Biological decomposition creates heat and if happening on a big enough scale that can offset the reduction in temperature by the artificial winter.
How can this work?
Certain microbes are introduced into earth's eco system. They are light enough to float when you but get heavier over time when they reproduce. The old microbe starts drifting down, releases its seeds and dies.
After some time the microbes, having no natural enemies and a high reproduction, build a fog that covers all of earth. The temperature rises in the upper atmosphere and lowers down on the surface (as it would during a volcanic winter). The increased temperature speeds up the growth of the microbes, but the lack of light below the upper reaches of the fog speeds up the death of the mature microbes, too.
The dead microbes settle down at an increasing rate, creating compost heaps everywhere they collect due to wind currents. There they decompose in an exothermic reaction that, after some time raises the ground temperature back to levels similar to those before the introduction of the microbes.
Such a scenario would always be on the brink of becoming a planet wide dead zone. But surely the advanced intelligence who engineered the microbes in the first place would prevent that, no?
I'm not sure whether the citations about the various kinds of artificial winters and those about heat generated by decomposition of organic matter are enough that this answer is on topic but I think it gives an overview how such a scenario could work.