Hierarchical semi-Markov models with duration-aware dynamics for activity sequences