Physics and applications of terahertz metagratings | Synapse