I started with RFC 1034 and 1035 to understand the protocol specs and header bit-masks. For the practical side, I used Cloudflare’s DNS docs to understand the recursive logic.
For coding, I relied on Go's dnsmessage documentation. I also used Gemini to help me with codes.