The Potter-verse was thrown for a loop when author J.K. Rowling announced she had always imagined one of the main characters in the “Harry Potter” series -- Albus Dumbledore -- to be gay.

Even the most diligent “Harry Potter” scholars found themselves caught unaware. But could anyone have seen this coming? Did Rowling leave any clues in the book?

To find out we called Andrew Slack, head of the Harry Potter Alliance, an organization that uses online organizing to mobilize more than 100,000 Harry Potter fans around social justice issues, drawing on parallels from the book. Slack is incredibly fluent in “Potter” textual analysis, and we knew that if anyone could predict Rowling’s curveball, it would be him.

FULL COVERAGE: Harry Potter

Speaking from his home in Boston, Slack said he hadn’t guessed that Dumbledore was gay, but in hindsight, he was able to point to specific character traits of the Hogwarts headmaster that might have indicated his sexual orientation.

Below he tells us seven textual clues that Dumbledore was gay.

1. His pet. “Fawkes, the many-colored phoenix, is ‘flaming.’”

2. His name. “While the anagram to ‘Tom Marvolo Riddle’ is ‘I am Lord Voldemort,’ as my good friend pointed out, ‘Albus Dumbledore’ becomes ‘Male bods rule, bud!’”

3. His fashion sense. “Whether it’s his ‘purple cloak and high-heeled boots,’ a ‘flamboyantly cut suit of plum velvet,’ a flowered bonnet at Christmas or his fascination with knitting patterns, Dumbledore defies the fashion standards of normative masculinity and, of course, this gives him a flair like no other. It’s no wonder that even the uppity portrait of former headmaster Phineas Nigellus announced, ‘You cannot deny he’s got style.’”

4. His sensitivity. “Leaders like Cornelius Fudge, Rufus Scrimgeour and Dolores Umbridge (yes, even a woman) who are limited by the standards of normative masculinity could not fully embrace where Voldemort was weakest: in his capacity to love. Dumbledore understood that it’s tougher to be vulnerable, to express one’s feelings, and that one’s undying love for friends and for life itself is a more powerful weapon than fear. Even his most selfish moments in pursuing the Deathly Hallows were motivated either by his feelings for Grindelwald or his wish to apologize to his late sister.”

5. His openness. “After she outed Dumbledore, Rowling said that she viewed the whole series as a prolonged treatise on tolerance. Dumbledore is the personification of this. Like the LGBT community that has time and again used its own oppression to fight for the equality of others, Dumbledore was a champion for the rights of werewolves, giants, house elves, muggle-borns, centaurs, merpeople -- even alternative marriage. When it came time to decide whether the marriage between Lupin the werewolf and Tonks the full-blooded witch could be considered natural, Professor Minerva McGonagall said, ‘Dumbledore would have been happier than anybody to think that there was a little more love in the world.’”

6. His historical parallel. “If Dumbledore were like any one in history, it would have to be Leonardo DaVinci. They both were considered eccentric geniuses (‘He’s a genius! Best wizard in the world! But he is a bit mad, yes’); both added a great deal to our body of knowledge (after all, Dumbledore did discover the 12 uses of dragon’s blood!); both were solitary, both were considered warm, loving and incredibly calm; both dwelt in mysterious mystical realms; both spent a lot of time with their journals (Leonardo wrote his backwards while Dumbledore was constantly diving into his pensieve); both even had long hair! And, of course, a popular thought among many scholars is that the maestro Leonardo was gay.”

7. The fact that so few of us realized he was gay. “No matter how many ‘clues’ I can put down that Dumbledore was gay, no matter how many millions of people have read these books again and again, Rowling surprised even the most die-hard fans with the announcement that Dumbledore was gay. And in the end, the fact that we never would have guessed is what makes Dumbledore being gay so real. So many times I have encountered friends who are gay that I never would have predicted. It has shown me that one’s sexual orientation is not some obvious ‘lifestyle choice,’ it’s a precious facet of our multi-faceted personalities. And in the end whatever the differences between our personalities are, it is time that our world heeds Dumbledore’s advice: ‘Differences of habit and language are nothing at all if our aims are identical and our hearts are open.’ Today as I write this, I believe that it’s time for our aims to be loyal to what the greatest wizard in the world would have wanted them to be: love.”