:root {
    color-scheme: light dark;
}

:root {
    --color-bg: light-dark(#fff, #000);
    --color-primary: light-dark(#fc88e5, #f6ade7);
    --color-primary-hover: light-dark(#5dc1a3, #73f7cf);
    --color-primary-muted: #a26897;
    --color-text: light-dark(#121212, #fafafa);
    --color-text-muted: #a5a5a5;
    --color-code-inline: #f6ade7;
    --color-mobile-li-hover: #332e27;
}

@font-face {
    font-family: 'Newsreader';
    src: url('/fonts/Newsreader.woff2') format('woff2-variations');
    font-weight: 300 400 500 600 700 800;
    font-style: normal;
}

body {
    font-family: 'Newsreader', sans-serif;
    font-size: 1.25rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--color-bg);
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23def0eb' fill-opacity='0.4'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--color-text);
    margin: 0;
}

/* common elements */
a {
    color: var(--color-primary);
    text-decoration: none;
}

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

main {
    margin: 3rem 0;
}

h1 {
    color: var(--color-primary);
    text-transform: capitalize;
}

article {
    margin: 3rem 0 3rem 0;
}

button {
    font-family: 'Newsreader', sans-serif;
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
    border-style: solid;
    border-color: var(--color-primary);
    border-radius: 5px;
    color: var(--color-bg);
}

button.primary-button {
    background-color: var(--color-primary);
    margin: 0.5rem;
}

button.secondary-button {
    background-color: var(--color-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
    margin: 0.5rem;
}

input,
textarea {
    font-family: 'Newsreader', sans-serif;
    font-size: 1.25rem;
    background-color: var(--color-bg);
    border: solid 1px var(--color-primary);
    border-radius: 5px;
    padding: 0.5rem;
    outline: none;
    color: var(--color-text);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-muted a {
    color: var(--color-primary-muted);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    text-align: center;
    margin: 3rem auto;
    border: 1px solid;
    padding: 1rem;
    border-radius: 5px;
    background: lightgoldenrodyellow;
}

.text-error {
    text-align: center;
    color: indianred;
    margin: 3rem auto;
    border: 1px solid;
    padding: 1rem;
}

form div {
    margin-bottom: 1rem;
}

/* paginator */
.paginator div {
    margin: 1rem;
}

.paginator a {
    margin: 0 0.5rem;
}

/* pageNumber header */
header {
    text-align: center;
}

.navbar {
    padding-top: 1rem;
    border-bottom: 14px solid transparent;
    border-image: url('/images/layout/menu-border.gif') 0 0 14 0 repeat;
}

.navbar button {
    margin-bottom: 1rem;
}

.navbar ul {
    display: none;
    list-style: none;
    padding: 0;
    margin-top: 0;
}

.navbar-visible {
    display: block;
}

.navbar li {
    padding: 1rem 0 1rem 0;
}

.navbar a {
    color: var(--color-menu-link);
}

.logo {
    max-width: 90%;
}

/* pageNumber footer */
footer {
    text-align: center;
    border-top: 14px solid transparent;
    border-image: url('/images/layout/menu-border.gif') 14 0 0 0 repeat;
    padding: 2rem;
}

footer a {
    color: var(--color-primary-muted);
    margin: 0 1rem 0 1rem;
}

footer div {
    margin-bottom: 3rem;
}

/* post formatting */
.post-title {
    margin: 0 0 1rem 0;
    text-align: center;
}

.post-text {
    margin: 1rem auto;
}

.post-date {
    display: inline-block;
    width: 49%;
    margin: 0;
}

.post-read-more {
    text-align: right;
    display: inline-block;
    width: 49%;
    margin: 0;
}

.post img {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    border-radius: 10px;
}

.post code {
    color: var(--color-code-inline);
}

.post pre code {
    overflow: scroll;
    display: block;
}

/* post eidtor */
.editor-form input,
.editor-form textarea {
    width: 100%;
}

.editor-form textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
    'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
    'Helvetica Neue', sans-serif;
}

.editor-form .post-options input {
    width: auto;
    height: 1rem;
    width: 1rem;
    background-color: var(--color-bg);
}

/* tables */
table {
    border-collapse: collapse;
    width: 100%;
}

tbody tr {
    border-top-style: solid;
    border-top-width: 1px;
    border-top-color: var(--color-primary);
}

/* priorities... */
.visible {
    display: block;
}

/* large screen only */
@media (min-width: 840px) {
    main {
        max-width: 840px;
        margin: 3rem auto;
    }

    input {
        width: 50%;
    }

    .navbar {
        padding: 2rem;
    }

    .navbar ul {
        display: flex;
        justify-content: center;
        margin: 0;
        gap: 2rem;
        max-height: 24px;
    }

    .navbar li {
        padding: 0;
    }

    .navbar li img {
        object-fit: contain;
    }

    .navbar button {
        display: none;
    }

    .post-text {
        width: 90%;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-image: url('/images/layout/background-dark.gif');
    }
}
