:root {
    /* Background colors */
    --color-background-main: #121212;
    --color-background-secondary: #505050;
    --color-background-tertiary: #707070;
    --color-border-main: #444444;
    --color-accent-main: #888888;
    --color-shadow-main: #303030;
    --color-code-container: #343434;

    /* Text colors */
    --color-text-main: #E0E0E0;
    --color-text-secondary: #B0B0B0;

    /* Font styles */
    --font-family-main: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    --font-size-standard: 18px;
    --font-size-small: 0.75rem;
    --font-size-medium: 1.25rem;
    --font-size-large: 1.5rem;
    --font-size-xl: 2rem;
    --font-size-xxl: 3rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Background colors */
        --color-background-main: #121212;
        --color-background-secondary: #505050;
        --color-background-tertiary: #707070;
        --color-border-main: #333333;
        --color-accent-main: #888888;
        --color-shadow-main: #303030;
        --color-code-container: #343434;

        /* Text colors */
        --color-text-main: #e0e0e0;
        --color-text-secondary: #b0b0b0;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        /* Background colors */
        --color-background-main: #fffff3;
        --color-background-secondary: #ccffe7;
        --color-background-tertiary: #8fe8bb;
        --color-border-main: #4effa7;
        --color-accent-main: #da75a7;
        --color-shadow-main: #606060;
        --color-code-container: #fef9bf;

        /* Text colors */
        --color-text-main: #0000a3;
        --color-text-secondary: #808080;
    }
}

* {
    font-family: var(--font-family-main);
    font-size: var(--font-size-standard);
    color: var(--color-text-main);
}

html, body {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

main {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: max(15vh, 80px) 0 0 250px;
    padding: 2rem;
}

body {
    display: flex;
    flex-direction: column;
    height: auto;
    background-color: var(--color-background-main);
}

@media (max-width: 700px) {
    main {
        margin: max(15vh, 80px) 0 0 0;
        max-width: 100%;
        padding: 1rem 1.5rem;
        box-sizing: border-box;
    }

    body {
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-x: hidden;
    }

    .blog-layout {
        width: 90%;
        max-width: 500px;
    }

    .blog-text {
        width: 100%;
        max-width: 500px;
    }
}

h1 {
    text-align: center;
    font-size: var(--font-size-xxl);
}

h2 {
    text-align: left;
    font-size: var(--font-size-xl);
}

h3 {
    text-align: left;
    font-size: var(--font-size-large);
}

h4 {
    text-align: left;
    font-size: var(--font-size-medium);
}

p a {
    display: inline-block;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease-in-out;
    transform-origin: center;
}

p a:hover {
    transform: scale(1.05);
}

.article-date {
    text-align: right;
    margin-right: 5%;
}

.blog-layout {
    width: 90%;
    max-width: 900px;
    display: flex;
    flex-flow: row wrap;
    box-sizing: border-box;
    position: relative;
    flex-grow: 1;
}

.blog-text {
    box-sizing: border-box;
}

.code-container {
    position: relative;
    background-color: transparent;
    justify-self: left;
    margin-left: 5%;
    max-width: 90%;
    height: auto;
}

pre code {
    background-color: transparent;
    margin: 0px;
    border-radius: 10px;
}

.code-and-result-container {
    display: flex;
    flex-flow: row wrap;
    box-sizing: border-box;
    padding: 5px;
    flex-grow: 1;
}

.copy-button {
    background-color: transparent;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: grab;
    border-radius: 5px;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: transform 0.3s;
}

@keyframes wobble {
    0% { transform: scale(1) rotate(0deg) translateX(0); }
    25% { transform: scale(1.1) rotate(-10deg) translateX(-10px); }
    50% { transform: scale(1.1) rotate(10deg) translateX(10px); }
    75% { transform: scale(1.1) rotate(-5deg) translateX(-5px); }
    100% { transform: scale(1.1) rotate(5deg) translateX(5px); }
}

.copy-button:hover {
    transform: scale(1.1);
    animation: wobble 0.6s ease-in-out;
}
  
  .copy-button:focus {
    outline: none;
}

.main-image {
    width: 100%;
    height: auto;
}

.article-image {
    max-width: 90%;
    height: auto;
}

figcaption {
    color: gray;
}

.blog-post-link {
    color: #7f68de;
}