function startTypewriter(lines, callback) {
    let i = 0, j = 0;
    const el = document.getElementById("typewriter");

    function type() {
        if (i < lines.length) {
            if (j < lines[i].length) {
                el.innerHTML += lines[i][j++];
                setTimeout(type, 80);
            } else {
                el.innerHTML += "<br>";
                j = 0; i++;
                setTimeout(type, 600);
            }
        } else callback();
    }
    type();
}
