Fine work fitting that into the space, function rules!
Kudos for braving the box joints on the timbers, that takes care to even try but the joints look like you pulled it off perfectly.
I take it you are going to put a mattress down below? As a kid I would have traded away all my string and marbles for a bunk bed (as long as I got the top).
Only "quibble" is having the step tongues on the top side, Kids ya know!