body {
    scroll-behavior: smooth;
    --text-color: black;
}

.post-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 900px;
    margin-right: auto;
    margin-left: auto;
}

.post-detail > .post {
    flex-grow: 4;
    margin-right: 20px;

    background: none;
}

.post-title {
    color: var(--title-color);
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 3.9rem;
    margin-left: -50px;
    line-height: 1;
    letter-spacing: -0.05rem;
}

.codehilite pre {
    overflow: auto;
}

.post-detail img {
    max-width: 100%;
    display: block;
}

@media (max-width: 700px) {
    .container {
        width: 95%;
    }
}

.post-content {
    font-size: 1.1rem;
    word-break: break-word;
}

.post-content img {
    border-radius: 2px;
}

.post-body h1, .post-body h2, .post-body h3 {
    margin-top: 40px;
    margin-bottom: 10px;
    color: rgb(104, 93, 115);
}

.post-body h4, .post-body h5 {
    margin-top: 30px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.09rem;
}

.post-content a {
    text-decoration: underline;
    color: var(--title-color);
    text-decoration-color: var(--primary-color);
}

.post-content a:hover {
    color: var(--primary-color);
}

.post-content .annotation {
    margin-top: 0;
    border: none;
    font-weight: normal;
    padding-left: 0;
}

.post-content .link-anchor {
    font-size: 0.7rem;
    padding-left: 3px;
    color: inherit;
    font-style: italic;
    text-transform: uppercase;
    opacity: 0.7;
}

.post-content .link-anchor:hover {
    opacity: 1;
}

.post-content p {
    margin-top: 5px;
    max-width: 60ch;
    line-height: 1.5;
}

.post-content p code {
    font-size: 1.0rem;
    font-family: monospace,monospace;
}

.share-container {
    padding: 10px;
    border-radius: 2px;
    border: 1px solid darkcyan;
    background-color: var(--secondary-background);
}

.share-button {
    padding: 5px 20px;
    background-color: darkcyan;
    color: white;
    border-radius: 3px;
    margin-top: -5px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.share-buttons-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-button:hover {
    text-decoration: underline;
}

.tweet-button {
    padding: 5px 20px;
    background-color: #1DA1F2;
    color: white;
    height: 22px;
    border-radius: 3px;
    margin-top: -5px;
}

.all-posts-button {
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    margin-left: 10px;
    margin-top: 30px;
    display: block;
    color: white;
    text-align: center;
    background-color: #0E0114;
    transition: 0.1s;
}

.all-posts-button:hover {
    opacity: 0.9;
}

.codehilite {
    position: relative;
}

.codehilite pre {
    margin-bottom: 0;
    position: relative;
    font-size: 1rem;
    font-family: monospace,monospace;
}

.codehilite code {
    font-family: monospace,monospace;
}

.codehilite:hover .copy-code-button {
    display: block;
}

.copy-code-button {
    background-color: var(--primary-color);
    color: white;
    padding: 7px 12px;
    outline: none;
    border: none;
    position: absolute;
    right: 0;
    top: 0;
    cursor: pointer;
    border-radius: 2px;
    display: none;
    font-weight: bolder;
}

.copy-code-button:hover {
    opacity: 0.8;
}

.more-posts-header {
    margin-top: 15px;
    margin-bottom: 0;
}

.chats-header-text {
    margin-top: 20px;
    margin-bottom: 0;
    border-left-color: #404FBF;
}

.chats-container {
    display: flex;
    flex-wrap: wrap;
}

.chat-card {
    flex: 1;
    flex-basis: 25%;
}

.chat-card-content {
    margin: 10px;
    background-color: #404FBF;
    padding: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.chat-card-content:hover {
    border-radius: 18px 8px;
}

.chat-card-image {
    width: 50px;
    height: 50px;
    border-radius: 21px;
}

.chat-card-name {
    flex: 5;
    color: whitesmoke !important;
    font-weight: bolder;
    margin: 0 0 0 5px;
    padding-bottom: 3px;
}

.chat-card-name:hover {
    text-decoration: none !important;
}

.author-container {
    width: 100%;

    border-radius: 15px;
    box-shadow: inset 0 0 2px #000000;
    margin-bottom: 20px;
    margin-top: 40px;

}

.author-content {
    display: flex;
    padding: 15px 20px;
}

.author-content p {
    margin: 0;
}

.author-content .author-name {
    margin-bottom: 5px;
    font-weight: bolder;
}

.author-content .author-image {
    width: 100px;
    height: 100px;
    margin-right: 15px;
}

.author-bio {
    flex: 2;
}

.author-twitter-link {
    font-weight: normal;
    font-size: 0.9rem;
    text-decoration: none;
    color: black;
}

.table-of-contents {
    box-shadow: inset 0 0 2px #000000;
    border-radius: 10px;
    padding: 10px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    transition: 0.2ms;
}

.table-of-contents li:hover {
    list-style: disc;
}

.table-of-contents h4 {
    margin: 0;
    cursor: pointer;
    margin-left: 10px;
    font-weight: bolder;
}

.table-of-contents a {
    font-weight: normal;
    color: black;
    text-decoration: none;
}

.table-of-contents ul {
    margin-top: 10px;
    margin-bottom: 5px;
    list-style: circle;
}

.table-of-contents-hidden {
    display: none;
}

.badges-container {
    margin-top: 20px;
}

a.tweet-button {
    text-decoration: none;
    color: white;
}

a.tweet-button:hover {
    color: white;
    opacity: 0.8;
}

.mobile-bio a, .wide-bio a {
    text-decoration-color: currentColor;
}

.mobile-bio {
    display: none;
    margin-top: 10px;
    font-size: 0.9rem;
}

.author-twitter-link::after {
    content: none !important;
}

@media (prefers-color-scheme: dark) {
    .author-container {
        background-color: #232428;
        border-top: 2px solid lightgray;
    }

    .external-link::after {
        filter: invert(1);
    }

    html {
        --text-color: white;
    }

    .author-twitter-link {
        color: white;
    }

    .post-content a {
        color: white;
    }

    .post-body blockquote a {
        color: var(--secondary-text);
    }

    .table-of-contents {
        background-color: #232428;
    }

    .table-of-contents a {
        color: darkgray;
    }

    .table-of-contents a:hover {
        color: whitesmoke;
    }
}

@media (max-width:  1100px) {
    .post-content .post-title {
        margin-left: 0;
    }
}

@media (max-width: 740px) {
    .chat-card {
        flex-basis: 50%;
    }

    .post-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 450px) {
    .author-content {
        flex-direction: column;
    }

    .wide-bio {
        display: none;
    }

    .mobile-bio {
        display: block;
    }
}

@media (max-width: 400px) {
    .post-title {
        font-size: 1.7rem;
    }

    .annotation {
        text-align: left;
    }

    .badges-container {
        justify-content: flex-start;
    }

    .table-of-contents li {
        margin-top: 5px;
    }
}

