Welcome.
While many here are more knowledgeable, my garden also is on a slope. Was.
grades present many limitations and challenges. Steep grades….at a minimum, tough on stock and locos.
6% max. That’s my experience. And it is really too much.
fwiw, with my rack locos, 20% is very steep once you include the weight of a couple of cars.
grade is “bad” . If you ever go to live steam, non r/c its very bad, lol.
i would take time to really envision a practical route, and then analyze any needed fills, cuts, supports, and critically, foot access to the right of way. And, a comfortable area from which you can operate. Do not underestimate this. Careful planning will serve you well. Then layout sections of track on the route to help you envision the terrain changes needed. Then, consider stakes, a line of string , all on the route, to give you a good idea of grade.
Take it in sections, in order not to feel overwhelmed. And to allow for changes.
one method i have seen is to build small wooden cribs to support track, ie like smallish crates, slatted, then fill those with ballast. Actually, over fill them, so there is a shoulder like normal roadbed, but the supporting area is cribbed.
The track is level, the cribbing helps keep ballast in place. Real railroads used this. Trestle were built to span small valleys, gorges, cuts, then those trestles later filled.
Assume that without something to hold the ballast, it will , over time, flow away.
On another note, there are excellent polymer adhesives designed for outdoor patio grout/ filling, which while not fool proof, would really help with fixing ballast. The stuff , however, isn’t inexpensive.
While i did not have rocky terrain, I built a proper retaining wall , 4 ft high at its highest, and a planting area 12ft in width, to fill and create a level area. It has changed everything for the better, in terms of operation. It has also brought some sections closer to eye level, which is a delight.
It was a lot of work, and cost as well. Trenched, stringers and wider at the bottom to withstand the fill, carefully fitted cut stones and cap. Worth every dollar and hour. Its fully irrigated, conduit for lighting and accessories, fully planted with pinyons and columnar oaks and smaller plants, affording shaded areas for trains and structures. I had avoided The Full Monty for decades, but, it has made my simple layout a lot more fun and friendly, especially with shade.
A year out from the completion of this project, while i shall eventually ballast my ROW properly, once i finalize my route, (still contemplating a couple of sidings and passing tracks, as well as a potential branch line out and away to other garden areas) i am currently using shredded mulch.
Not realistic, but…easy to shift and support the track, and the best part, i get zero rain splatter and grit. Fwiw,lol. I actually like it this far. While is compresses and swells with precipitation, it doesn’t seem to shift. And in strong summer sun, it doesn’t get as hot as rock. Its a lighter color, btw.
Some variation of this might be your solution, if you’re interested in the brain damage.
if you choose to use posts and stringers for your right of way, there are pre fabricated cement footers available at the chain hardware stores, which fit 4x4s, i believe. I would try to use composite stringers (I beams) to avoid warping and uv damage. You may well consider 2 legs instead of 1 support post in the event you simply cannot properly seat the footers..
The potential downside of post and stringers is room for lineside structures, not to mention really good fit and leveling. And, it can be unattractive.
You will need a surveyors level, imho. Otoh, you build off ground level , at a higher level, for comfort of operation
if you choose switchbacks, switches must be level, and any rise/ drop must not be closer than 2 coach lengths before and after the switch, if you want to avoid frustration in operations.
another thought , from the old lgb planning book, actually a variation assuming the gound is impenetrable, it to basically lay support blocks, and create a ROW path, either with wood or composite, or, stone blocks. Not sure this would work for you.
best of luck.
curves must be level side to side. If you can, it is preferable to keep curves more or less without grade, but this isnt always possible.
regardless of rain, everything shifts and settles. Plan on this, and fix your footers, and your ROW ballast.