I know 上代/中古日本語 are Old/Early middle Japanese, and that 古文 is Classical Japanese, and I know the latter is exclusively written since it's the literary language, but what are the other differences? Wikipedia says that 古文 was used since the introduction of written language until the Edo period, but that's such a huge swath of time. Are there different stages of 古文 through history? Is the 古文 during the Nara period the same as during the Edo period?
古文 means the following:
２ 唐以後、四六駢儷体 (べんれいたい) （四六文）に対して、秦漢以前の経史子家の用いたような散文の文体。
３ 《「文」は、文字の意》中国、先秦時代に使われていた文字の書体で、大篆 (だいてん) 以外のもの。漢代に通行した隷書を今文 (きんぶん) とよぶのに対していう。→今文 (きんぶん)
In the context of Japanese language, it means 1. So essentially it is a school subject like English or Math. As the definition says, it deals with Japanese of 10C-19C.
On the other hand, the Japanese language is historically divided into
- 上代日本語 up to around late 8th century
- 中古日本語 up to late 11th century
- 中世日本語 up to 17th century
- 近世日本語 up to middle 19th century.
These distinctions are mostly academic, and not mentioned or at least not emphasized in 古文 as a school subject (i.e., up to high school).