Better to make do with a smaller closet than start modifying your vent stack.
I'm not a plumber so I don't know if there's any requirement that the vent stack needs to be straight. But, if I had to guess, I'd guess that the plumbing code requires it to be straight and vertical so there's negligible chance it could get blocked with twigs and leaves and stuff that might fall into it. If the vent stack is straight and vertical, then anything that falls in would fall to the bottom and be washed away every time you flush your toilet. But, I don't know for sure that there's any requirement that the vent stack be straight.
Here's how it works:
That 3 inch PVC pipe goes from just below your basement concrete floor to just above your roof line where it's open to the atmosphere. All the drains in your house try to empty into the lower part of that pipe (called the "soil stack") and all the vent piping in your house try to connect to the upper part of that same pipe (called the "vent stack) before it goes through the roof in order to reduce the number of roof penetrations and therefore potential leakage sites. It's the same pipe, but the lower part is often called the "soil stack" whereas the upper part is called the "vent stack", and the whole thing together is commonly referred to as the "vent stack".
Once the soil stack goes into your basement floor, it turns and runs at a shallow downward angle to the sewer pipe buried under the middle of the street your house is on. That shallow sloping pipe is the main drain line from your house. Typically, the first 10 to 20 feet of the main drain line will be where solids (mostly from your kitchen sink) will accumulate. Consequently, if you look on your basement floor near where the soil stack goes into the concrete, you will find a "clean out". That's where a plumber will run his snake in to clear the main drain line. It's good preventative maintenance to have the main drain line from your house cleared every 10 years or so just to avoid drain problems which are often the result of a partially clogged main drain line.
Where I live, the building code requires that there also be a cleanout at every change in direction of the main drain line under the basement floor, too. That way, if push comes to shove, a plumber can clear each straight section of the main drain line separately. So, if you're doing any home renovations, then keep in mind that you need to provide access to these clean outs, and so you don't want to install flooring over them to make them inaccessible and hide their location.