    /* Root theme variables for light mode */
    :root {
        --background-color: #ffffff;
        --text-color: #333;
        --link-color: #007bff;
        --header-background: #121212;
        --section-background: #f8f8f8;
    }

    /* Theme variables for dark mode */
    [data-theme='dark'] {
        --background-color: #121212;
        --text-color: #e0e0e0;
        --link-color: #bb86fc;
        --header-background: #2a2a2a;
        --section-background: #2a2a2a;
         --heading-color: #ffffff; /* Heading color in dark mode */
    }

    /* Applying root variables */
    body {
        background-color: var(--background-color);
        color: var(--text-color);
    }

    header {
        background-color: var(--header-background);
    }

    section {
        background-color: var(--section-background);
    }

    a, ul a {
        color: var(--link-color);
    }

    .note {
        color: var(--text-color);
    }

/* Section titles */
section h2 {
    color: var(--heading-color); /* Use the heading color variable */
}

    /* Dark mode toggle button */
    #dark-mode-toggle {
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.2em;
        cursor: pointer;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1000;
        width: 40px;
        height: 40px;
        padding: 0;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    [data-theme='dark'] #dark-mode-toggle {
        background-color: rgba(255, 255, 255, 0.2);
    }

    /* Dark mode button icon position */
    #dark-mode-toggle i {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    [data-theme='dark'] #dark-mode-toggle .fa-moon {
        display: none;
    }

    #dark-mode-toggle .fa-sun {
        display: none;
    }

    [data-theme='dark'] #dark-mode-toggle .fa-sun {
        display: inline-block;
    }

    #dark-mode-toggle .fa-moon {
        display: inline-block;
    }