html {
  box-sizing: border-box;
  font-size: 18px;
}

*, *:before, *:after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ol, ul, section, figure {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

ol, ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

html {
  --latte: #FFF8E5;
  --latte-highlight: #F2ECDB;
  --root: #27080A;
  --root-highlight: #4D1014;
  --turquoise: #48D1CD;
  --reddish: #811B21;


  --default-text-color: var(--root);
  --default-background-color: var(--latte);
  --default-highlight-color: var(--turquoise);
  --code-bg: var(--latte-highlight);

  --standard-spacing: 1rem;
}

@media (prefers-color-scheme: dark) {
  html {
    --default-text-color: var(--latte);
    --default-background-color: var(--root);
    --default-highlight-color: var(--reddish);
    --code-bg: var(--root-highlight);
  }
}

body {
  font-family: "Nunito Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-variation-settings: "wdth" 100, "YTLC" 500;

  width: 100%;

  background-color: var(--default-background-color);
  color: var(--default-text-color);
}

tt {
  font-family: "Inconsolata", monospace;
  font-optical-sizing: auto;
  font-size: 1rem;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;

  display: inline-block;
  background-color: var(--code-bg);
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

a, a:hover {
  color: var(--default-text-color);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

a.back:before {
  content: "◀";
  font-size: 0.8rem;
  display: inline-block;
  margin-right: 0.4rem;
  text-decoration: none;
}

a.view-post:after {
  content: "▶";
  font-size: 0.8rem;
  display: inline-block;
  margin-left: 0.4rem;
  text-decoration: none;
}

ul, ol {
  list-style-position: outside;
  padding-left: var(--gutter);
}
ol > li {
  list-style-type: decimal;
}
ul > li {
  list-style-type: disc;
}

.aspect-box {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.aspect-box::after {
  display: block;
  content: "";
  padding-top: calc(1 / 1 * 100%);
}

.aspect-box.sixteen-to-nine::after {
  padding-top: calc(9 / 16 * 100%);
}

html {
  --gutter: 2rem;
}

body > header {
  position: sticky;
  top: 0;

  /* margin-top: calc(3 * var(--gutter)); */

  background-color: var(--default-background-color);
  z-index: 1;
}

body > header > h1 {
  font-size: 3rem;
  letter-spacing: .05rem;
  font-weight: 800;

  padding: 2rem 0;
  padding-left: var(--gutter);

  width: 100%;
  overflow: hidden;
}

body > header > h1 > span.dropline,
body > header > h1 > a,
body > header > h1 > a:hover,
body > header > h1 > a:visited {
  text-decoration: underline;
  text-decoration-thickness: 0.5rem;
  text-underline-offset: 0.75rem;
  text-decoration-color: var(--default-highlight-color);
}
body > header > h1 > span.dropline:after,
body > header > h1 > a:after {
  /* \00a0 == &nbsp; */
  content: "\00a0\00a0";
}

.banner {
  width: 100%;
  padding: 2rem 4rem;
  margin-bottom: 1rem;

  background-color: var(--default-highlight-color);

  font-weight: 700;
}
.banner > p {
  text-align: center;
}
.banner > p + p {
  margin-top: 0.4rem;
}
@media (min-width: 666px) {
  .banner {
    padding: 2rem 0;
  }
  .banner > p {
    padding-left: calc(33% / 3);
    width: 66%;
    text-align: left;
  }
}

main {
  width: 100%;
  padding: var(--gutter);
  margin-bottom: 4rem;
}
@media (min-width: 666px) {
  main {
    padding: 0;
    padding-left: calc(33% / 3);
  }
}

article {
  width: 100%;
}
article > img {
  width: 100%;
}
article.post-inline + article.post-inline {
  margin-top: 4rem;
}
@media (min-width: 666px) {
  article {
    width: 66%;
  }
}

/* post header */
article > header {
  margin-bottom: 1rem;
}
article > header > h1 {
  font-size: 1.6rem;
  font-weight: 600;
}
article > header > h1 > a {
  text-decoration: none;
}
article > header > p { /* date */
  font-size: 0.8rem;
  font-weight: 400;
}

/* post images */
article > a.image-link {
  display: block;
}
article > a.image-link, article > .yt-container {
  margin-bottom: var(--standard-spacing);
}
article > p.caption {
  position: relative;
  --shift: calc(-1 * (var(--standard-spacing) + 1.5rem));
  top: var(--shift);
  margin-bottom: var(--shift);

  font-size: 0.8rem;

  width: 80%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.6rem;

  background-color: var(--default-highlight-color);
}
@media (min-width: 666px) {
  article > p.caption {
    width: 70%;
    margin-left: 10%;
  }
}

/* post text */
.more > p,
div.side-by-side > div:last-child,
article > p,
article > ul > li,
article > ol > li {
  line-height: 1.4rem;
}
.more > p:not(:first-child),
article > p:not(:first-child),
article > ul:not(:first-child),
article > a.image-link:not(:first-child),
article > .yt-container:not(:first-child) {
  margin-top: var(--standard-spacing);
}

/* post footer */
article > footer {
  margin-top: 1.6rem;
}

article > .yt-container,
article > a.image-link {
  width: 90%;
  margin: 0 auto;
}
.yt-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hello {
  margin-bottom: -3rem;
}
.hello > img {
  width: 100%;
  border: 4px solid var(--default-highlight-color);
}
.hello > p {
  position: relative;
  top: -3.6rem;

  margin-left: -0.5rem;

  color: var(--latte-highlight);
  font-weight: 800;
  font-size: 4rem;
  letter-spacing: .2rem;
  line-height: 4rem;
}
.head {
  margin-bottom: 3rem;
}
@media (min-width: 666px) {
  .head {
    display: flex;
    flex-flow: row nowrap;
    gap: var(--gutter);
  }
  .hello {
    width: 30%;
  }
  .hello > p {
    margin-left: 0;
    text-align: right;
    padding-right: 0.2rem;
    font-size: 3rem;
    line-height: 3rem;
    top: -2.6rem;
  }
  .more {
    padding-top: var(--gutter);
  }
}

div.side-by-side {
  width: 100%;
}
div.side-by-side:not(:first-child) {
  margin-top: var(--gutter);
}
div.side-by-side > div:first-child {
  width: 80%;
}
div.side-by-side > div:first-child img {
  width: 100%;
}
div.side-by-side > div:last-child {
}
@media (min-width: 666px) {
  div.side-by-side {
    display: flex;
    gap: var(--gutter);
  }
  div.side-by-side > div:first-child {
    margin: 0;

    width: 30%;
    max-width: 30%;
    min-width: 30%;
    flex-basis: 30%;
  }
  div.side-by-side > div:last-child,
  .more {
    padding-top: 0;
  }
}
@media (min-width: 800px) {
  div.side-by-side > div:last-child,
  .more {
    padding-top: var(--gutter);
  }
  .hello > p {
    font-size: 4rem;
    line-height: 4rem;
    top: -3.6rem;
  }
}

