:root {
    --background-color: #fff;
    --text-color: #444;
    --code-background: #f4f4f4;
    --border-color: #ddd;
}

[data-theme="dark"] {
    --background-color: #222;
    --text-color: #e4e4e4;
    --code-background: #333;
    --border-color: #666;
}

body {
    margin: 40px auto;
    max-width: 650px;
    line-height: 1.6;
    font-size: 18px;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 0 10px;
    font-family: sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,h2,h3{
    line-height:1.2
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

.small-image {
    max-width: 400px;
}

pre {
    background-color: var(--code-background);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1em;
    overflow-x: auto;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Inline code styling */
:not(pre) > code {
    background-color: var(--code-background);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

#theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

#theme-toggle:active {
    transform: scale(0.9);
}