I don't know offhand, but this sounds like a really, really bad idea. People don't expect the text size to change as they change the browser window. They make windows bigger so they can see more of your page, and smaller if they need more room on their monitor for other things.
I completely understand, this is not for a real world project.
Just a practice (knowledge) project!
If I was making an actual real world project, I'll add buttons to let the user increase or decrease the text size according to their liking.