The adjective has to match the grammar. What you're doing is called a genitive construction, where one noun modifies the other (e.g. "biology teacher," "boy's book"), where the nouns' genders don't have to agree.
For grammar, I happen to like the Transparent Languages Blog, which you can search by adding " site:blogs.transparent.com" after a Google search. As for dictionaries, I love Wiktionary for its ease of use and understanding, but for a more technical and traditional dictionary search up the Wehr dictionary.