Given the following sentence:
Das ist der perfekte Ort.
Why does perfekt end with an e? I thought that nouns following ist are in the nominative case and that an adjective following the definite article before the noun would not take an ending?
I know Ort is not in the accusative case because then perfekt would take en as in:
Er ging an den perfekten Ort.
So the fact it picks up an e in the first sentence confuses me. What do I need to update regarding my knowledge involving the declination of adjectives?