/*****************************************************************************/
/*
/* Common
/*
/*****************************************************************************/

/* Global Reset */
* {
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  hanging-punctuation: first allow-end last;
}

body {
  background-color: #fefcfd;
  color: #222;
  font-size: 20px;
  line-height: 30px;
  font-family: "ff-meta-web-pro", Helvetica, sans-serif;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: bold;
  margin: 10px 0;
  clear: right;
  color: #5b0f6a;
}

h1 {
  font-size: 42px;
  line-height: 46px;
  margin: 10px 0;
  text-wrap: balance;
}

h1 a:link,
h1 a:visited {
  color: #5b0f6a;
}

h2,
h3 {
  font-size: 28px;
  line-height: 36px;
}

h1 {
  margin: 0px 0px 20px 0px;
}
p {
  margin: 1em 0;
}

a {
  color: #9600b3;
  text-decoration: none;
}
a:hover {
  color: #9600b3;
  text-decoration: underline;
}
a:visited {
  color: #9600b3;
}

table {
  font-size: inherit;
  font: 100%;
}

.post table {
  border-collapse: separate;
  border-spacing: 1em 0;
  /* Compensate for edge spacing created by border-spacing */
  width: calc(100% + 2em);
  margin-left: -1em;
  margin-bottom: 1em;
}

@media (min-width: 651px) {
  .post table {
    border-spacing: 2em 0;
    width: calc(100% + 4em);
    margin-left: -2em;
  }
}

.post table th,
.post table td {
  padding: 0.25em 0;
}

.post table th {
  border-bottom: 1px solid #8e17a6;
}

.post table td {
  border-bottom: 1px solid rgba(142, 23, 166, 0.5);
}

p.summary {
  font-size: 24px;
}

hr.subtle {
  border-color: #eae7eb;
  margin: 2em 0;
  border-width: 1px 0px 0px 0px;
  width: 100%;
}

.container {
  max-width: 730px;
  min-width: 320px;
  margin: 0px auto;
  padding: 0 2em 2em 2em;
}

#content {
  margin: 70px 14px 0px 14px;
}

ul,
ol {
  margin-left: 2em;
}

.post > ul,
.post > ol {
  margin-top: 1em;
  margin-bottom: 1em;
}

img {
  max-width: 100%;
}

.post img {
  float: right;
  margin: 0px 0px 24px 24px;
  max-width: 100%;
}

.post img.retinize {
  width: 150px;
  margin-bottom: 10px;
}

hr {
  margin: 0px auto;
  margin-top: 3em;
  margin-bottom: 3em;
  width: 33%;
  border: solid #9600b3;
  border-width: 4px 0px 0px 0px;
}

.post hr {
  margin: 0px auto;
  margin-top: 2em;
  margin-bottom: 2em;
  width: 25%;
  border: solid #555;
  border-width: 1px 0px 0px 0px;
}

.footnotes {
  font-size: 16px;
}

.footnotes ol {
  margin-left: 3em;
}

li.active {
  font-weight: bold;
}

.navigation {
  list-style: none;
  font-size: 22px;
  margin-left: 0;
  margin: 38px 0px 28px 0px;
  text-align: right;
  border-color: #8e17a6;
  border-style: solid;
  border-width: 4px 0px;
  padding: 11px 14px;
}

.footer.navigation {
  clear: both;
}

p.permalink {
  text-align: right;
  margin-bottom: -1em;
}

.navigation li {
  display: inline;
  margin-left: 1em;
  padding-bottom: 4px;
}

a.sitename {
  font-family: "skolar-sans-latin", Helvetica, sans-serif;
  font-weight: 800;
  padding-bottom: 0px;
  top: -2px;
  position: relative;
  float: left;
  margin-left: 0px;
  font-size: 28px;
  font-weight: 800;
}

ul.posts {
  list-style: none;
  margin-left: 0;
}

blockquote {
  padding-left: 1em;
  border-left: 2px solid #8400b8;
}

blockquote.speaker-2 {
  border-left: none;
  border-right: 2px solid #0056b8;
  padding-left: 1em;
  padding-right: 1em;
  text-align: right;
}

blockquote.top {
  margin-top: 2em;
}

blockquote.bottom {
  margin-bottom: 2em;
}

img.side {
  max-width: 50%;
}

div.centered {
  text-align: center;
  clear: both;
  font-style: italic;
  color: #444;
}

div.centered iframe,
div.centered .instagram-media {
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (prefers-color-scheme: dark) {
  div.centered {
    color: #ccc;
  }
}

div.centered img {
  margin: 0;
  float: none;
}

div.centered p {
  margin-top: 0;
}

/*****************************************************************************/
/*
/* Posts
/*
/*****************************************************************************/

/* standard */
.post pre {
  border: 1px solid #ddd;
  background-color: #eef;
  padding: 0 0.4em;
  max-width: 100%;
}

.post code {
  border: 1px solid #ddd;
  background-color: oklch(96.72% 0.016 314.06);
  padding: 0 0.2em;
}

.post pre,
.post code {
  white-space: pre-wrap;
  max-width: 100%;
  font-size: 0.94em;
}

.post pre code {
  border: none;
  background-color: transparent;
}

/* terminal */
.post pre.terminal {
  border: 1px solid #000;
  background-color: #333;
  color: #fff;
}

.post pre.terminal code {
  background-color: #333;
}

@media (max-width: 500px) {
  a.sitename {
    font-size: 19px;
  }

  .navigation {
    padding-bottom: 6px;
  }

  .navigation ul {
    margin: -2px 0 2px 0;
    padding: 0px;
  }

  h1 {
    font-size: 32px;
  }

  h2,
  #recent h2 {
    font-size: 23px;
  }
}

@media (max-width: 650px) {
  /* phone */

  body {
    font-size: 18px; /* Slightly smaller to maintain reasonable line count */
  }

  body .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  #recent span.date {
    display: none;
  }

  #recent span.spacer {
    margin: 0px 3px;
  }

  #recent span.smalldate {
    display: inline;
  }

  #content {
    margin: 0px;
  }

  .navigation {
    padding-left: 0px;
    padding-right: 0px;
  }

  .navigation li {
    font-size: 18px;
    margin-left: 12px;
  }

  .post img,
  .post img.side {
    float: none;
    margin: 0px;
    width: 100% !important;
    max-width: 100%;
  }
}

@media (max-width: 1079px) {
  /* mobile + tablet */
}

@media (min-width: 1080px) {
  /* desktop */

  body .container {
    display: relative;
    left: 20px;
  }
}

.videoWrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  padding-top: 25px;
  height: 0;
}

.videoWrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#nextnav {
  font-size: 0.8em;
  clear: both;
}

#nextnav:first-child {
  margin-top: 0;
}

#prev {
  float: right;
}

.warning {
  padding-left: 1em;
  border-left: 2px solid #ff8315;
}

div.formkit-alert {
  text-align: center;
  font-size: 24px;
  margin: 2em 0;
}

form.newsletter input {
  font-size: 18px;
  padding: 2px 6px 3px 6px;
  border: 1px solid #ccc;
  -webkit-appearance: button;
  box-sizing: border-box;
}

@media (max-width: 650px) {
  /* phone */
  form.newsletter input {
    width: 100%;
    max-width: 100%;
    margin: 0.5em 0px;
  }
}
@media (min-width: 651px) {
  /* desktop */
  form.newsletter input[type="text"],
  form.newsletter input[type="email"] {
    margin-right: 4px;
    width: 60%;
  }

  form.newsletter input[type="submit"] {
    width: 140px;
  }
}

form.newsletter {
  text-align: center;
  margin-top: 1.5em;
}

form.newsletter input[type="text"],
form.newsletter input[type="email"] {
  height: 40px;
  border-radius: 6px;
  margin-right: 0px;
  font-family: "ff-meta-web-pro", Helvetica, sans-serif;
}

form.newsletter input[type="submit"] {
  height: 40px;
  background-color: #ac36db;
  color: #ffffff;
  border-radius: 6px;
  border-color: #444;
  font-family: "ff-meta-web-pro", Helvetica, sans-serif;
}

p.meta,
span.meta {
  color: #645f66;
}

/* Home */

#home h4 {
  margin-bottom: 20px;
}

#recent h2 {
  font-size: 27px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 4px;
}

#recent h2 a:link,
#recent h2 a:visited {
  /* A bit less vibrant */
  color: #8c00a8;
}

#recent .spacer {
  margin: 0px 7px;
}

#recent .date,
#recent .smalldate,
#recent .spacer {
  color: #777;
}

#recent .smalldate {
  display: none;
}

#recent .description {
  padding: 0 0 0 23px;
  margin: 0 0 5px 0;
}

.archive li {
  /* Hanging indent for wrapping */
  padding-left: 1em;
  text-indent: -1em;
  margin-bottom: 0.25em;
}

.archive li.featured a {
  font-weight: bold;
}

.archive li span {
  color: #444;
}

/* 2-column layout for archive on wider screens */
@media (min-width: 800px) {
  .archive.series {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2em; /* horizontal gap between columns, no vertical gap */
  }
}

.prologue {
  text-align: center;
  opacity: 0.8;
  font-size: 0.8em;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #221e22;
    color: #eae4e8;
  }

  h1,
  h2,
  h3,
  h4,
  h5 {
    color: #d362e9;
  }

  a:link {
    color: #d362e9;
  }

  a:visited {
    color: #d362e9;
  }

  h1 a:link,
  h1 a:visited {
    color: #d362e9;
  }

  p.meta,
  span.meta,
  .archive li span {
    color: #aaa1ad;
  }

  hr,
  .navigation {
    border-color: #d362e9;
  }

  .post table th {
    border-bottom-color: #d362e9;
  }

  .post table td {
    border-bottom-color: rgba(211, 98, 233, 0.5);
  }

  hr.subtle {
    border-color: #3f3e3f;
  }

  .post pre {
    background-color: #002;
    border-color: #444;
  }

  .post code {
    background-color: #002;
    color: oklch(96.72% 0.016 314.06);
  }

  div.centered p {
    color: #ccc;
  }
}
