/* Extends main.css. Load this AFTER main.css on blogs.html. */

.post-list {
    width: min(800px, 100%);
}

.post-list h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.post-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    padding: 30px;

    background: black;
    color: white;

    text-decoration: none;

    border: 1px solid black;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    opacity: 0.6;
    font-size: 13px;
    margin-bottom: 10px;
}

.post-card h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.post-card p {
    opacity: 0.7;
}

.post-button {
    flex-shrink: 0;

    background: white;
    color: black;

    padding: 10px 18px;

    text-decoration: none;
    font-size: 15px;

    border: 1px solid white;

    transition: 0.2s ease;
}

.post-card:hover .post-button {
    background: black;
    color: white;
    border-color: white;
}

.post-empty {
    opacity: 0.6;
    margin-top: 40px;
}

/* Single post view */

.post {
    width: min(700px, 100%);
}

.post-back {
    display: inline-block;
    margin-bottom: 30px;
    color: black;
    text-decoration: none;
    opacity: 0.6;
    font-size: 15px;
    transition: 0.2s ease;
}

.post-back:hover {
    opacity: 1;
}

.post-header {
    margin-bottom: 40px;
}

.post-header h1 {
    font-size: 34px;
    margin-bottom: 14px;
    line-height: 1.25;
}

.post-tags {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-tag {
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid black;
    opacity: 0.7;
}

.post-body {
    line-height: 1.75;
    font-size: 16px;
}

.post-body img {
    max-width: 100%;
    display: block;
    margin: 10px 0 24px;
}

.post-body h2 {
    font-size: 22px;
    margin: 36px 0 14px;
}

.post-body h3 {
    font-size: 18px;
    margin: 28px 0 12px;
}

.post-body p {
    margin-bottom: 18px;
}

.post-body ul,
.post-body ol {
    margin: 0 0 18px 22px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body a {
    color: black;
}

.post-body code {
    background: rgba(0,0,0,0.06);
    padding: 2px 6px;
    font-size: 14px;
}

.post-body pre {
    background: black;
    color: white;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 18px;
}

.post-body pre code {
    background: none;
    padding: 0;
}

.post-body blockquote {
    border-left: 2px solid black;
    padding-left: 18px;
    opacity: 0.7;
    margin: 0 0 18px;
}
