Interstellar chemistry recorded by nitrogen isotopes in Solar System organic matter