Intelligent infrared sensing enabled by tunable moiré quantum geometry