.history {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
}

.history .snake-top {
    position: absolute;
    top: calc(-1 * var(--navbar-height) - var(--padding-1));
    left: 30%;
    background-color: var(--theme-red);
    height: var(--navbar-height);
    padding: 0 calc(100vw - 70%) 0 var(--padding-2);
    width: 100vw;
    border-top-left-radius: var(--border-radius);
}

.history .snake-top h2 p {
    font-size: 1rem;
    text-align: center;
    display: grid;
    place-items: center;
    height: 100%;
    margin: var(--padding-0) 0;
}

.history .snake-top::before {
    content: "";
    position: absolute;
    top: 100%;
    right: calc(100% - var(--navbar-height));
    width: var(--navbar-height);
    height: calc(2 * var(--navbar-height));
    background-color: var(--theme-red);
    border-bottom-right-radius: var(--border-radius);
}

.history .snake-top::after {
    content: "";
    position: absolute;
    top: calc(100% - 1px);
    left: calc(var(--navbar-height) - 1px);
    width: 16px;
    height: 16px;
    background:
        radial-gradient(
            circle 10px at 100% 100%,
            transparent 16px,
            var(--theme-red) 17px);  /* + 1 px so the edge is smooth */
}

.history .snake-bottom {
    align-self: flex-start;
    position: absolute;
    top: calc(var(--padding-2) + 8px);
    background-color: var(--theme-red);
    height: var(--navbar-height);
    padding: 0 var(--padding-2);
    width: 30%;
}

.history .snake-bottom::before {
    content: "";
    position: absolute;
    bottom: calc(100% - 1px);
    right: -1px;
    width: 16px;
    height: 16px;
    background:
        radial-gradient(
            circle 10px at 100% 100%,
            transparent 16px,
            var(--theme-red) 17px);  /* + 1 px so the edge is smooth */
    transform: rotate(180deg);
}

.history .snake-bottom::after {
    content: "";
    position: absolute;
    right: 100%;
    height: var(--navbar-height);
    width: 100vw;
    background-color: var(--theme-red);
}

.history .history-text-content {
    width: 50%;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.history .history-text-content ul,
.history .history-text-content p {
    margin: var(--padding-0);
}


@media(max-width: 1200px) {
    .history {
        margin-top: calc(var(--navbar-height) + var(--padding-1));
    }
}

@media(max-width: 600px) {
    .history {
        margin-top: calc(var(--navbar-height) + var(--padding-1));
    }

    .history .history-text-content {
        margin-top: var(--navbar-height);
    }

    .history .snake-top {
        position: absolute;
        align-self: flex-start;
        left: 0;
        top: calc(-1 * var(--navbar-height) - var(--padding-1));
        background-color: var(--theme-red);
        min-height: calc(1 * var(--navbar-height));
        height: fit-content;
        width: 100%;
        border-radius: 0 var(--border-radius) var(--border-radius) 0;
    }

    .history .snake-top::before {
        content: "";
        position: absolute;
        top: calc(-2 * var(--navbar-height) - var(--padding-1));
        right: calc(100% - var(--navbar-height));
        width: var(--navbar-height);
        height: calc(2 * var(--navbar-height) + var(--padding-1));
        background-color: var(--theme-red);
        border-radius: 0;
    }

    .history .snake-top::after {
        top: unset;
        bottom: calc(100% - 1px);
        transform: rotate(-90deg);
    }

    .history .snake-top h2 p {
        display: flex;
    }

    .history .snake-bottom {
        display: none;
    }
}