Light-front Hamiltonians for heavy quarks and gluons