Basically, I hate puzzles in RPGs altho I love adventure games that have puzzles. And I guess the reason why I hate puzzles in RPGs is I got this prejudice that they of the infantile "push da boulder, flick da switch, find da correct sequence!" type. They feel tacked on, ya know? So I guess that my main "what to avoid" part. Like... make 'em organic? Don't make 'em like GOTTA HAVE A PUZZLE HERE! Like, you chasing orcs, then all a sudden, there's a goddam Sokoban puzzle so you can get a gate open.
(Also ya, like I said I'm prejudiced, I don't even know if puzzles are like that anymore in modern RPGs. I hope they not.

)
Soo, like, make 'em puzzles feel like they belong in yo world. Like that age-old trick that Gandalf goofed in
Lord of the Rings? The dwarves made a door, they didn't want any doofus get in, they make a bit of a trick. It's not a real good puzzle, I think, but at least it feels organic.
Another organic-feeling puzzle I can think of wuz in
Grim Fandango, and I won't spoil y'all cuz I don't remember how the puzzle goes,

but you in a bling-bling club and you find one of 'em fancy liquor bottles with gold flakes in, okay? And the way to get around was, you chug a bit of it, and get some gold flakes in yo system, and then you walk through a metal detector where the dead-stiff inspector lady is, and the detector beeps 'cuz you got flakes of gold in you, and then... uhh... something happens, and you get ahead in the puzzle.
...I'm sorry, I can't explain that well 'cuz I don't remember.


But the point was, none of that stuff is there by accident. There's a bling-bling club, so there's a bottle like that, and there's a metal detector 'cuz there's border control (I think?) and trust me y'all, it pans out altho it's a bit crazy but it's
Grim Fandango, okay? Play it and know love.
Aaaaand now Imma get to the "sophisticated, intelligent" part! I know it looks like I tick neither of those boxes, BUT I LOVE ME SOME SOPHISTICATED, INTELLIGENT WRITIN' like
always. 
So, the kind of sophisticated and intelligent puzzle I want is like, organic, of course, to start. But it'd also involve like, talking to people and figuring out who's lying, for example. Let's say you stranded in a foreign village and yo daughter got stolen, 'cuz she got green eyes which a sign of divine favour for the locals.
Then you walk around, tryina figure it out, and everybody reticent, so you get bits and scraps of dialogue and you hafta piece it together. And you can bribe folks with booze and tobacco to make the puzzle easier and get more hints. Or maybe if you wanna bypass the puzzle you can just clobber someone and strong-arm yo way through like that, but there's gonna be consequences later when the angry villagers want their vengeance.
Soo... like that, I guess? Like, I wanna see the puzzle as an integral part of the story, instead of a minigame tacked on 'cuz PUZZLES.