Eco-friendly and intrinsic nanogels for durable flame retardant and antibacterial properties