What are the key principles of rock mechanics in civil engineering, and how do they influence the design and construction of tunnels, slopes, and underground structures, considering factors like rock mass properties, stress distribution, and deformation behavior?