
/* the blog's font, Noto Serif, served from fonts/ so that it looks the same on
   every computer instead of falling back to whatever each browser's default
   serif font is. the files are the ones installed on the computer the blog is
   written on (/usr/share/fonts/truetype/noto), cut down with
       python3 -m fontTools.subset NotoSerif-Regular.ttf --flavor=woff2
           --unicodes=... --layout-features='*' --name-IDs='*' --no-hinting
   to Latin, Greek, punctuation, arrows and a few maths symbols. anything else
   falls back to the browser's own serif font */
@font-face {
    font-family: "Noto Serif";
    src: url("fonts/noto-serif-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Noto Serif";
    src: url("fonts/noto-serif-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Noto Serif";
    src: url("fonts/noto-serif-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Noto Serif";
    src: url("fonts/noto-serif-bold-italic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Noto Serif has no ⊞ or ⊟, the note icons script.js puts on note buttons,
   so these two come from DejaVu Math TeX Gyre, which is where Firefox finds
   them on the computer the blog is written on */
@font-face {
    font-family: "DejaVu Math TeX Gyre";
    src: url("fonts/dejavu-math-note-icons.woff2") format("woff2");
    unicode-range: U+229E-229F;
    font-display: swap;
}

/* likewise ツ, which turns up in a ¯\_(ツ)_/¯, from Noto Serif CJK. any other
   character Noto Serif doesn't have is drawn in the reader's own fonts */
@font-face {
    font-family: "Noto Serif CJK JP";
    src: url("fonts/noto-serif-cjk-tsu.woff2") format("woff2");
    unicode-range: U+30C4;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    background-color: #d4d4d4;
    font-family: "Noto Serif", "DejaVu Math TeX Gyre", "Noto Serif CJK JP", serif;
}


postTitle {
    font-size: 50px;
}

metadata {
    color: #1a1a1a;
    font-size: 15px;
    font-style: italic;
}

post-tags {
    color: #1a1a1a;
    font-size: 17px;
    font-style: italic;
}


post {
    display: block;
    background: #cdcdcd;
    color: black;
    margin: auto;
    padding: 10px;
    border-radius: 4px;
    max-width: 900px;
}



/* places where we put stuff */

.header {
    margin-bottom: 20px;
    padding: 20px;
    border: 4px solid;
    border-color: #bababa;
    max-width: 1600px;
    display: block;
    margin: 0 auto;
    background: #ffffff;
    overflow: hidden;
}

.header a {
    color: #000000;
    text-decoration: none;
}

.header-img {
    width: 100%;
    aspect-ratio: 4 / 1;
}

.header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%;
    display: block;
}


.footer {
    padding: 10px 20px;
    border: 4px solid;
    border-color: #bababa;
    max-width: 1600px;
    margin: 20px auto;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 15px;
    text-align: center;
}

.wrapper {
    display: flex;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
}



.postFeed {
    display: block;
    background: #ffffff;
    color: black;
    margin-left: 100px;
    margin-right: 100px;
    padding: 30px;
    border-radius: 4px;
    border-color: #bababa;
    max-width: 1600px;
    border-style: solid;
    margin: 0 auto;
    width: 100%;
    /* lets the feed shrink narrower than a wide equation, instead of pushing
       the sidebar off the page. the equation is then scaled down to fit by
       fitEquations in script.js */
    min-width: 0;
}

.feedNav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}




.sidebar {
    display: block;
    background: #ffffff;
    width: 500px;
    /* never wider than the feed: half of the wrapper, less half the gap */
    max-width: calc((100% - 30px) / 2);
    color: black;
    padding: 30px;
    justify-content: left;
    border-radius: 4px;
    border-color: #bababa;
    border-style: solid;
}

/* the navigation links in a bar under the header, for when the sidebar is gone */
.navbar {
    display: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 30px;
    padding: 10px 20px;
    border: 4px solid;
    border-color: #bababa;
    max-width: 1600px;
    margin: 20px auto 0;
    background: #ffffff;
    font-size: 17px;
}

/* on narrow windows the sidebar is dropped, leaving the feed the whole width,
   and its navigation links move to the bar under the header */
@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .navbar {
        display: flex;
    }
}



/* the sidebar's list of recent posts: titles only, no bullets */
.recent-posts {
    list-style: none;
    padding-left: 0;
}

.recent-posts li {
    margin-bottom: 6px;
}

.recent-date {
    color: #1a1a1a;
    font-size: 13px;
}

/* posts and their associated bits */

.post {

}

.post name {
    color: #000000;
    font-size: 50px;
}

/* in previews the title links to the post, but should look exactly like a plain title */
.post name a,
.post name a:link,
.post name a:visited,
.post name a:hover,
.post name a:active {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

/* the "Read full post" link at the bottom of a preview */
.readmore {
    margin-top: 10px;
    color: #1a1a1a;
    font-size: 17px;
    font-style: italic;
}

.readmore a {
    color: inherit;
    font-size: inherit;
    font-style: inherit;
}

.post subheading {
    color: #000000;
    font-size: 30px;
}

.post date {
    color: #1a1a1a;
    font-size: 15px;
    font-style: italic;
}

.post content {

}


.taglist {
    color: #1a1a1a;
    font-size: 17px;
    font-style: italic;
}

.taglist a {
    color: inherit;
    font-size: inherit;
    font-style: inherit;
}



/* displayed equations are scaled down to fit the post by fitEquations in
   script.js, but the browser won't draw text smaller than about 6px. an
   equation that still doesn't fit at that size gets marked too-wide, and
   scrolls sideways instead of spilling out of the post. (only those, because
   scrolling can shave a pixel or two off the top and bottom of an equation) */
.katex-display.too-wide {
    overflow-x: auto;
    overflow-y: hidden;
}



/* inline notes: a clickable <noteButton> followed by the <innerNote> it opens */

noteButton {
    color: blue;
    cursor: pointer;
}

innerNote {
    display: none;
    margin: 6px 0;
    border-radius: 4px;
    padding: 8px 24px;
    border-style: ridge;
    border-width: thin;
    position: relative;
}

innerNote .close-button {
    position: absolute;
    bottom: 2px;
    right: 6px;
    color: blue;
    cursor: pointer;
}
