/******************************************************************************/
/* Main. */

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  font-size: 1em;
  font-family: 'Inter', sans-serif;
  line-height: 1.65;
  /* Always reserve space for the scrollbar so content doesn't shift
     horizontally between pages that scroll and pages that don't. */
  scrollbar-gutter: stable;
}

body {
  color: #000;
  background-color: #fff;
  /* See https://css-tricks.com/couple-takes-sticky-footer/. */
  display: flex;
  flex-direction: column;
}

/******************************************************************************/
/* Links. */

a {
  color: #21446a;
  text-decoration: none;
}

a:focus, a:hover {
  text-decoration: underline;
}

/******************************************************************************/
/* Headlines. */

h1, h2, h3, h4, h5, h6 {
  margin-top: 1.0em;
  margin-bottom: 0.5em;
  font-family: 'Lora Variable', serif;
  font-weight: 400;
  line-height: 1.65;
  color: #000;
}

h1 {
  font-size: 1.75em
}

h2 {
  font-size: 1.5em
}

h3 {
  font-size: 1.25em
}

h4,
h5,
h6 {
  font-size: 1em
}

/******************************************************************************/
/* Paragraphs and lists. */

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

dl, ol, ul {
  margin-top: 0;
  margin-bottom: 1em
}

dt {
  font-weight: 700
}

dd {
  margin-bottom: 0.5em
}

/******************************************************************************/
/* Inline code, timestamps, and labels. */

code, pre, .timestamp {
  font-family: 'JetBrains mono Variable', monospace;
  font-size: 1em;
  letter-spacing: -0.01em;
}

/* Inline code only. Scoped with :not(pre) so it does not paint a grey box
   behind code inside highlighted code blocks (which carry their own
   background from the syntax highlighter). */
:not(pre) > code {
  background-color: #eee;
}

.label, .timestamp {
  color: #444c57;
  background-color: #eee;
  display: inline;
  border-radius: 0.25em;
  line-height: 1;
  /* Do not wrap to next line. */
  /* XXX: May be problematic with long inline code blocks. */
  white-space: nowrap;
}

pre {
  padding: 0.5em;
  overflow: auto;
}

.label {
  padding: 0.2em 0.4em 0.2em 0.4em;
  margin: 0 0.25em 0 0;
}

.timestamp {
  padding: 0.2em 0em 0.2em 0.4em;
  margin: 0 0.25em 0 0;
}

a.label:focus, a.label:hover {
  text-decoration: none;
  cursor: pointer
}

.label:empty {
  display: none
}

/******************************************************************************/
/* Images. */

img {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/******************************************************************************/
/* Tables. */

table {
  padding: 0.25em 0.25em;
  width: 100%;
  border: 1px solid #eee;
  border-collapse: collapse
}

td,
th {
  padding: 0.25em 0.25em;
  border: 1px solid #ddd
}

tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th {
  background-color: #eee
}

/******************************************************************************/
/* Blocks */

blockquote, .blockemph {
  color: #666;
  border-left: 0.2em solid #eee;
  margin: 0.8em 1em;
  padding-left: 0.8em;
}

@media (max-width: 48em) {
  blockquote, .blockemph {
    padding-right: 0.8em;
  }
}

@media (min-width: 48em) {
  blockquote, .blockemph {
    padding-right: 3em;
  }
}

.blockemph {
  font-style: italic;
}

/******************************************************************************/
/* Forms. */

input[type=text] {
  font-size: 1em;
  width: 100%;
  padding: 12px 20px;
  margin: 20px 0 20px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
}

input[type=text]:focus {
  border: 1px solid #666;
}

/******************************************************************************/
/* Topbar and bottombar (identical styling). */

.topbar, .bottombar {
  color: rgba(255,255,255,.5);
  background-color: #444c57;
  text-align: center;
}

.topbar a, .bottombar a {
  color: #fff;
}

.topbar p, .bottombar p {
  margin: 0;
}

.topbar-sticky, .bottombar-sticky {
  padding: 0.5em 2em 0.5em 2em;
}

.topbar-sticky h1 {
  color: #fff;
  margin: 0.5em 0 0.5em 0;
  padding: 0 0 0 0;
}

.topbar-nav-item {
  margin: 0.7em;
}

/******************************************************************************/
/* Footer. */

.footer {
  font-size: 0.8em;
}

/******************************************************************************/
/* Icons. */

.icons {
  font-size: 1.5em;
}

.icons-item {
  padding-left: 0.4em;
  padding-right: 0.4em;
}

/* Inline icon row used as a subtitle within page content (e.g. the social
   icons under the name on the about page). Lays the icons out flush-left with
   even spacing so the row lines up with surrounding text, without affecting
   the centred .icons rows in the topbar/bottombar. */
.icons-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em;
}

.icons-subtitle .icons-item {
  padding: 0;
}

/******************************************************************************/
/* Content. */

.content {
  margin-top: 2em;
  margin-bottom: 2em;
  margin-left: auto;
  margin-right: auto;
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: auto;
}

@media (max-width: 54em) {
  .content {
    width: 100%;
  }
}

@media (min-width: 54em) {
  .content {
    width: 54em;
  }
}

/******************************************************************************/
/* Posts. */

.post {
  margin-top: 1em;
  margin-bottom: 3em;
  margin-left: 2em;
  margin-right: 2em;
}

.post-list {
  margin-top: 1em;
  margin-bottom: 2em;
  margin-left: 2em;
  margin-right: 2em;
}

/* Borderless, full-width listing of posts (section and taxonomy pages). */
.post-list table,
.post-list td,
.post-list th {
  border: none;
}

.post-list td,
.post-list th {
  padding: 5px 0;
  vertical-align: top;
}

.post-list tbody tr:nth-child(odd) td,
.post-list tbody tr:nth-child(odd) th {
  background-color: #fff;
}

.post-title,
.post-title a {
  color: #444c57;
  margin-bottom: 0.0em;
}

.date {
  color: #7a7a7a;
}

.post-date {
  color: #7a7a7a;
  display: block;
  margin-bottom: 1em;
}

/******************************************************************************/
/* Other class selectors. */

/* Useful to create right aligned tables. */
.right-aligned {
  text-align: right;
}
/******************************************************************************/
/* Self-hosted fonts. */

/* Inter — Body text. Variable font (weight axis 100–900). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../webfonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../webfonts/inter-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Lora — Headlines and display. Variable font (weight axis 400–700). */
@font-face {
  font-family: 'Lora Variable';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../webfonts/lora-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Lora Variable';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../webfonts/lora-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;

}

/* JetBrains Mono - Codeblocks. */
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../webfonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
