/**
 * Site header
 */
.site-header {
    position: relative;
    width: 100%;
    min-height: calc(var(--spacing-unit) * 1.865);
    line-height: calc(var(--base-line-height) * var(--base-font-size) * 2.25);
    background-color: var(--background-color);
    border-top: 5px solid var(--border-color-03);
    border-bottom: 1px solid var(--border-color-01);
}

.site-title {
    font-size: 1.625rem;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 0;
    float: left;

    @media screen and (max-width: var(--on-palm)) {
        padding-right: 45px;
    }

    &,
    &:visited {
        color: var(--site-title-color);
    }
}

.site-nav {
    float: right;
    border: none;
    background-color: inherit;

    label[for="nav-trigger"], #nav-trigger {
        display: none;
    }

    .nav-item {
        color: var(--text-color);
        &:not(:last-child) {
            margin-right: var(--spacing-unit-half);
        }
    }

    @media screen and (max-width: var(--on-medium)) {
        position: absolute;
        top: 9px;
        right: var(--spacing-unit-two-thirds);
        background-color: var(--background-color);
        border: 1px solid var(--border-color-01);
        border-radius: 5px;
        text-align: right;

        label[for="nav-trigger"] {
            display: block;
            float: right;
            width: 36px;
            height: 36px;
            cursor: pointer;
        }

        .menu-icon {
            float: right;
            width: 36px;
            height: 26px;
            line-height: 0;
            padding-top: 18px;
            text-align: center;

            &::before {
                font-family: "Font Awesome 7 Free";
                font-weight: 900;
            }

            > svg path {
                fill: var(--border-color-03);
            }
        }

        #nav-trigger {
            ~ label[for=nav-trigger] .menu-icon {
                &::before {
                    content: "\f0c9";
                    font-size: 1.25em;
                }
            }
            ~ .nav-items {
                clear: both;
                display: none
            }
            &:checked {
                ~ label[for=nav-trigger] .menu-icon {
                    &::before {
                        content: "\f00d";
                        font-size: 1.5em;
                    }
                }
                ~ .nav-items {
                    display: block;
                    padding-bottom: 5px;
                    .nav-item {
                        margin-left: 20px;
                        padding: 5px 10px;
                    }
                }
            }
        }

        .nav-item {
            display: block;
            margin-right: var(--spacing-unit-half);
            padding: 5px 0;
            color: var(--text-color);
            line-height: var(--base-line-height);
        }
    }
}



/**
 * Site footer
 */
.site-footer {
    border-top: 1px solid var(--border-color-01);
    padding: var(--spacing-unit) 0;
}

.footer-heading {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-unit-half);
}

.feed-subscribe .svg-icon {
    padding: 5px 5px 2px 0
}

.contact-list,
.social-media-list {
    list-style: none;
    margin-left: 0;
}

.footer-col-wrapper,
.social-links {
    font-size: 0.9375rem;
    color: var(--brand-color-dimmed);
}

.footer-col-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

.footer-col {
    float: left;
    margin-bottom: var(--spacing-unit-half);
}

.footer-col-1 {
    width: calc(35% - var(--spacing-unit-half));
}

.footer-col-2 {
    width: calc(30% - var(--spacing-unit-half));
}

.footer-col-3 {
    width: calc(35% - var(--spacing-unit-half));
}

@media screen and (min-width: var(--on-large)) {
    .footer-col-1 {
        width: calc(35% - var(--spacing-unit-half));
    }

    .footer-col-2 {
        width: calc(20% - var(--spacing-unit-half));
    }

    .footer-col-3 {
        width: calc(45% - var(--spacing-unit-half));
    }
}

@media screen and (min-width: var(--on-medium)) {
    .footer-col-wrapper {
        display: flex
    }

    .footer-col {
        width: calc(100% - var(--spacing-unit-half));
        padding: 0 var(--spacing-unit-half);

        &:first-child {
            padding-right: var(--spacing-unit-half);
            padding-left: 0;
        }

        &:last-child {
            padding-right: 0;
            padding-left: var(--spacing-unit-half);
        }
    }
}


/**
 * Page content
 */
.page-content {
    padding: var(--spacing-unit) 0;
    flex: 1 0 auto;
}

.page-heading {
    font-size: 2rem;
}

.post-list-heading {
    font-size: 1.75rem;
}

.post-list {
    margin-left: 0;
    list-style: none;

    > li {
        margin-bottom: var(--spacing-unit);
    }
}

.post-meta {
    font-size: var(--small-font-size);
    color: var(--brand-color-dimmed);
}

.post-link {
    display: block;
    font-size: 1.5rem;
}



/**
 * Posts
 */
.post-header {
    margin-bottom: var(--spacing-unit);
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color-01);
}

.post-meta {
    .bullet-divider { padding-inline: 15px }
    .meta-label { font-weight: 600 }

    /*.force-inline {*/
    /*    display: inline;*/
    /*    &::before {*/
    /*        content: "•";*/
    /*        padding-inline: 5px;*/
    /*    }*/
    /*}*/
    /*.post-authors {*/
        /*margin-top: 3px;*/
        /*display: inline;*/
    /*}*/
}

.post-title,
.post-content h1 {
    margin-bottom: 10px;
    font-size: 2.625rem;
    font-weight: var(--base-font-weight);
    letter-spacing: -1px;
    line-height: 1.15;

    @media screen and (min-width: var(--on-large)) {
        font-size: 2.625rem;
    }
}

.post-content {
    margin-bottom: var(--spacing-unit);

    h1, h2, h3, h4, h5, h6 { margin-top: var(--spacing-unit) }

    h3.post-link {
        margin-top: 0; /* TODO LMD */
    }

    h2 {
        font-size: 1.75rem;

        @media screen and (min-width: var(--on-large)) {
            font-size: 2rem;
        }
    }

    h3 {
        font-size: 1.375rem;

        @media screen and (min-width: var(--on-large)) {
            font-size: 1.625rem;
        }
    }

    h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1.125rem;
    }
    h6 {
        font-size: 1.0625rem;
    }
}

.comments-disabled-message {
    text-align: center;
    font-weight: 300;
}

/**
 * Task-lists
 */

.task-list {
    margin-left: 0;
    padding-left: var(--spacing-unit-two-thirds);
}

.task-list-item {
    list-style-type: none;
    &-checkbox {
        position: relative;
        margin-right: var(--spacing-unit-third);
        margin-left: calc(var(--spacing-unit) * -0.5);
        appearance: none;
        border: 8px solid var(--border-color-01);
        vertical-align: text-top;
        z-index: -1;
        &::after {
            position: absolute;
            top: -8px;
            left: -3px;
            width: 4px;
            height: 10px;
            content: "";
            border: solid transparent;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }
        &:checked::after { border-color: var(--border-color-03) }
    }
}


/**
 * Grid helpers
 */
@media screen and (min-width: var(--on-large)) {
    .one-half {
        width: calc(50% - var(--spacing-unit-half));
    }
}


/* LMD */
.page-tag {
    display: inline-block;
    background: var(--brand-color-very-light);
    padding: 0 .5rem;
    margin-right: .5rem;
    border-radius: 4px;
    color: var(--text-color);
    font-size: 90%;
    /* I now add the icon explicitly, so styling is done using `.icon-span` class. */
    /*&:before {*/
    /*    content: "\f02b";*/
    /*    font-family: FontAwesome;*/
    /*    padding-right: .5em;*/
    /*}*/
    &:hover {
        text-decoration: none;
        background: var(--brand-color);
        color: var(--background-color);
    }
}

.icon-span {
    padding-right: .3em;
}

ul.page-list {
    list-style: none;
}

.page-list {
    font-size: 18px;

    & i {
        font-size: 14px;
    // Based on blockquote.
    color: #828282;
    }
}

.invalid-wiki-link {
    background: red;
}

.backlinks {
    border-top: 1px solid var(--border-color-01);
    > ul {
        list-style-type: none;

        .backlinks-count {
            float: right;
        }

        .backlinks-list {
            li {
                list-style-type: disc;
            }
            .backlink {
                background-color: #cdca32;
            }
        }
    }
}

