I can't recommend Scratchapixel enough for diving deep into the concepts behind CG (although it seems to be down for me at the moment ironically). I can't remember how much it goes into libraries or if it sticks to implementing things from scratch, but I find knowing the concepts behind something makes learning the libraries much easier anyway.
https://www.scratchapixel.com