Questions & Answers about Denkst du an mich?
The verb denken takes a prepositional object with an + accusative when you mean “to think of” someone or something.
Über is used with the different verb nachdenken (“to reflect, to ponder”). You cannot say denken über mich, but you can say nachdenken über mich.
Here an governs the accusative case to mark the target of your thought, so you need mich.
When an indicates location (e.g. an der Wand), it takes the dative (der Wand), but for the action of thinking “of me,” it’s always accusative.