<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Your Portfolio</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Arial', sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            background: linear-gradient(to right, #e0d9f5, #b39ddb);
            color: #fff;
        }

        header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: linear-gradient(to right, rgba(135, 206, 235, 0.0), rgba(0, 191, 255, 0.0));
            padding: 5px;
            text-align: center;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        nav {
            display: flex;
            justify-content: flex-end;
            background: linear-gradient(to right, #87CEEB transparent, #00BFFF);
            margin-top: 5px;
        }

        nav a {
            color: #fff;
            text-decoration: none;
            padding: 10px 20px;
            margin: 0 10px;
            border-radius: 5px;
            transition: background 0.3s;
        }

        nav a:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        #portfolio-section {
            text-align: center;
            width: 600px; /* Set a fixed width for the portfolio section */
            margin: 20px;
            background: linear-gradient(to right, #e0d9f5, #b39ddb);
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            padding: 20px;
        }

        #typing-effect {
            overflow: hidden;
            white-space: nowrap;
            border-right: 2px solid #fff;
            display: inline-block;
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <header>
        <div id="name-container">
            <h1>Your Name</h1>
        </div>

        <nav>
            <a href="#">Home</a>
            <a href="#">Skills</a>
            <a href="#">Projects</a>
            <a href="#">Education</a>
            <a href="#">Contact</a>
        </nav>
    </header>

    <div id="portfolio-section">
        <h2>Welcome to my portfolio!</h2>
        <p id="typing-effect"></p>
    </div>

    <script>
        // JavaScript for looping typing animation with consistent speed
        const typingEffect = document.getElementById('typing-effect');
        const textToType = "Here you can find information about my skills, projects, and more.";

        function typeText() {
            let index = 0;
            let isDeleting = false;
            let displayText = '';

            function animate() {
                if (isDeleting) {
                    displayText = textToType.substring(0, index);
                    index--;
                } else {
                    displayText = textToType.substring(0, index);
                    index++;
                }

                typingEffect.innerHTML = displayText;

                if (index > textToType.length) {
                    isDeleting = true;
                    setTimeout(animate, 1000); // Pause duration after completion (milliseconds)
                } else if (index < 0) {
                    isDeleting = false;
                    index = 0;
                }

                setTimeout(animate, 100); // Adjust the typing speed (milliseconds)
            }

            animate();
        }

        typeText(); // Start the typing animation
    </script>
</body>

</html>
in this code the speed of the typing animation is increasing with each iteration, make it so that the speed remains constant