:root {
    /* Theme */
    --text: #3d3040;
    --border: rgb(128, 116, 139, 0.38);
    --accent: #725875;
    --faint: #756279;

    /* Page and panel colors. */
    --bg: #e4dde5;
    --gradientTop: #f7f4fb;
    --gradientBottom: rgb(237, 233, 245, 0.86);
    --containerTop: #ded9e2;
    --containerBottom: #a9a0b4;
    --container-border: rgb(122, 79, 120, 0.28);
    --card-bg: rgb(242, 238, 248, 0.72);
    --card-border: rgb(128, 116, 139, 0.34);

    /* Header colors.*/
    --headerTop: rgb(90, 63, 96, 0.55);
    --headerBottom: rgb(208, 184, 209, 0.35);
    --headerText: #fff7fb;
    --header-image: url("/assets/writings/writing_header.png");
}

* {
    box-sizing: border-box;
}
body {
    height: 100vh;
    margin: 0;
    overflow: hidden;
    padding: 0 10px 56px 10px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);

    background-color: #fff;
    background-image: url("/assets/writings/background.png");
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
}
.journal-shell {
    align-items: flex-start;
    height: calc(100vh - 34px);
}

.container {
    max-width: 60rem;
    margin: 0 auto;
    border: 1px solid var(--container-border);
    outline: 0;
    border-radius: 2px;
    display: flex;
    flex-wrap: wrap;
    padding: 5px;
    gap: 5px;

    background: linear-gradient(170deg, var(--containerTop), var(--containerBottom));
}
/* these control the column widths */
.small {
    flex: 1 1 9%;
}
.large {
    flex: 1 1 82%;
}
.full {
    flex: 1 1 100%;
}
.half {
    flex: 1 1 49%;
}

header {
    background:
        linear-gradient(135deg, var(--headerTop), var(--headerBottom)),
        var(--header-image);
    background-size: cover;
    background-position: center;
    width: calc(100% + 10px);
    height: 120px; /* change banner height here*/
    margin: -5px -5px 0 -5px;
    position: relative;
}
header span {
    font-size: 2.5rem;
    position: absolute;
    bottom: 0;
    left: 10px;
    margin: 10px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    color: var(--headerText);
}

nav {
    border: 2px ridge var(--border);
    border-radius: 1px;
    padding: 5px;
    background: linear-gradient(var(--gradientTop), var(--gradientBottom));
}
nav div {
    text-align: center;
    font-size: 1.25rem;
    margin: 5px 5px 10px 5px;
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
}
nav a {
    display: block;
    margin: 5px;
    background: linear-gradient(to right, var(--bg), var(--gradientBottom));
    border-radius: 1px;
    padding: 2px 7px;
    text-decoration: none;
}
nav a:link,
nav a:visited {
    color: var(--text);
}
nav a:hover,
nav a:focus {
    background: linear-gradient(
        to right,
        var(--bg),
        var(--gradientBottom),
        var(--gradientTop)
    );
}

.sidebar {
    flex: 0 0 13rem;
    height: calc(100% - 125px);
    overflow-y: auto;
}

.sidebar-note {
    border: 2px ridge var(--border);
    border-radius: 1px;
    background: linear-gradient(var(--gradientTop), var(--gradientBottom));
    margin-top: 5px;
    padding: 7px;
}
.sidebar-note p {
    font-size: 0.95rem;
}

.journal-index,
.article-wrap {
    flex: 1 1 0;
    height: calc(100% - 125px);
    min-width: 0;
    overflow-y: auto;
    padding-bottom: 72px;
}

.journal-section {
    border: 2px ridge var(--border);
    border-radius: 1px;
    background: linear-gradient(var(--gradientTop), var(--gradientBottom));
    padding: 7px;
    margin-bottom: 5px;
}

.post-card {
    align-items: center;
    display: flex;
    gap: 10px;
    border: 1px solid var(--card-border);
    border-radius: 1px;
    background: var(--card-bg);
    margin: 8px 0;
    padding: 8px;
}
.featured-card {
    background:
        linear-gradient(90deg, rgb(205, 197, 222, 0.42), var(--card-bg)),
        var(--gradientTop);
}
.post-mascot {
    align-items: center;
    background: linear-gradient(
        135deg,
        rgb(255, 247, 251, 0.82),
        rgb(228, 221, 229, 0.92)
    );
    border: 2px ridge var(--border);
    border-radius: 1px;
    color: var(--faint);
    display: flex;
    flex: 0 0 92px;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.85rem;
    font-style: italic;
    height: 92px;
    justify-content: center;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    width: 92px;
}
.post-mascot img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.post-preview {
    flex: 1 1 auto;
}
.post-preview time,
.article-date {
    color: var(--faint);
    display: block;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.95rem;
    font-style: italic;
    margin: 2px 5px 4px 5px;
}
.post-preview h2 {
    font-size: 1.35rem;
    text-align: left;
}
.post-preview p {
    max-width: 56ch;
}
.tags {
    color: var(--faint);
    font-size: 0.9rem;
}
.tags a {
    text-decoration: none;
}

.longform {
    border: 2px ridge var(--border);
    border-radius: 1px;
    background: linear-gradient(var(--gradientTop), var(--gradientBottom));
    container-type: inline-size;
    padding: 14px 18px;
}
.longform h1 {
    font-size: 2rem;
    letter-spacing: 0;
    text-align: left;
}
.longform h2 {
    border-bottom: 1px solid var(--border);
    font-size: 1.35rem;
    margin-top: 20px;
    text-align: left;
}
.longform p,
.longform li {
    font-size: 1.08rem;
    line-height: 1.55;
    max-width: 64ch;
}
.dek {
    color: var(--faint);
    font-style: italic;
}
dfn[data-definition] {
    border-bottom: 1px dotted var(--accent);
    cursor: help;
    font-style: inherit;
    outline-offset: 2px;
    position: relative;
    text-decoration: none;
}
.dfn-tip {
    background: var(--gradientTop);
    border: 2px ridge var(--border);
    color: var(--text);
    font-style: normal;
    font-weight: normal;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.35;
    max-width: min(320px, calc(100vw - 16px));
    overflow-wrap: break-word;
    padding: 8px 10px;
    position: fixed;
    text-align: left;
    width: max-content;
    z-index: 1000;
    pointer-events: none;
}
blockquote {
    border-left: 4px double var(--accent);
    color: var(--faint);
    font-style: italic;
    margin: 18px 5px;
    padding: 4px 12px;
}
.closing-quote {
    margin: 24px 5px;
    max-width: 64ch;
}
.closing-quote blockquote {
    margin: 0 0 6px 0;
}
.closing-quote figcaption {
    color: var(--faint);
    font-size: 0.95rem;
    font-style: italic;
    text-align: right;
}
.footnotes-sep {
    display: none;
}
.footnotes {
    margin-top: 8px;
}
.footnote-ref a {
    text-decoration: none;
}
.footnotes li {
    font-size: 0.95rem;
    overflow-wrap: break-word;
    word-break: break-word;
}
.footnote-backref {
    text-decoration: none;
}
.post-neighbors {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 24px;
}
.post-neighbor {
    text-decoration: none;
}
.post-neighbor-disabled {
    color: var(--faint);
    opacity: 0.55;
}

/* optional button styling like in the preview */
div.small > img {
    display: block;
    margin: 5px auto;
    border: 2px ridge var(--border);
    border-radius: 1px;
}

.small,
.large,
.full,
.half {
    border: 2px ridge var(--border);
    border-radius: 1px;
    background: linear-gradient(var(--gradientTop), var(--gradientBottom));
    padding: 5px;
}

footer {
    text-align: center;
    margin-bottom: 5vw;
    font-size: 0.8rem;
}
footer a {
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 5px;
    line-height: 1.2;
}
h1 {
    font-size: 1.4rem;
    letter-spacing: 2px;
    font-weight: normal;
    text-align: left;
    border-bottom: 2px ridge var(--border);
    padding-bottom: 5px;
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
}
h2 {
    font-size: 1.25rem;
    font-weight: normal;
    text-align: left;
    font-family: "Times New Roman", Times, serif;
}
h3 {
    font-size: 1.1rem;
}
h4 {
    font-size: 1rem;
    color: var(--accent);
    padding-left: 12px;
}

a:link,
a:visited {
    color: var(--accent);
}

/* prevents overflow on smaller screens */
img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    max-width: 100%;
}
pre {
    overflow-x: auto;
}

a:hover,
a:focus {
    font-style: italic;
}
