:root {
  --header-background-color: 252, 247, 242;
  --background-color: 253, 251, 249;
  --border-color: 236, 218, 198;
  --body-color: 28, 27, 26;
  --marmalade: 232, 121, 48;
  --blur-radius: 20px;
  --_hypercard-scale: 1.1;
  --drip-size: 1;
}

body {
  background-color: rgb(var(--background-color));
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  font-weight: normal;
}

/* Typography */

.handwritten {
  font-family: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive;
  font-weight: normal;
  color: rgb(var(--marmalade));
}

a {
  color: rgb(var(--marmalade));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
  font-weight: normal;
  margin-bottom: 0.5rem;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  text-decoration: none;
  color: rgb(var(--body-color));
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover {
  text-decoration: none;
  opacity: 0.8;
}

.post h1 {
  font-size: 3rem;
  line-height: 1.1;
  text-wrap: pretty;
}

.post h1 svg {
  width: 2.6rem;
  height: 2.6rem;
  vertical-align: bottom;
  display: inline-block;
  opacity: 0.8;
}

.post h2 {
  font-size: 1.4rem;
}

.post h3,
.post h4,
.post h5,
.post h6 {
  font-size: 1.2rem;
}

.post .metadata {
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.post .metadata a {
  text-decoration: none;
  margin: 0 0.5rem;
}

.post .metadata a:first-child {
  margin-left: 0;
}

.post .metadata a:hover {
  text-decoration: underline;
}

.post .timestamp a {
  text-decoration: none;
  color: rgb(var(--body-color));
  font-style: italic;
}

.post .timestamp a:hover {
  color: rgb(var(--marmalade));
  opacity: 1;
}

.pagination a {
  text-decoration: none;
}

blockquote {
  padding: 0.5rem 1rem;
  color: #7a7a7a;
  border-left: 0.2rem solid rgb(var(--marmalade));
}

.post blockquote p:last-child {
  margin-bottom: 0;
}

.post p code {
  color: rgb(var(--marmalade));
}

.post h2 code,
.post h3 code,
.post h4 code,
.post h5 code,
.post h6 code {
  color: rgb(var(--body-color));
  margin-left: 0.2rem;
  margin-right: 0.2rem;
  font-size: 80%;
}

/* Basics */

hr {
  color: inherit;
  border: 0;
  margin: 1rem 0;
  border-top: 1px dashed rgb(var(--border-color));
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p,
pre,
ul,
ol,
blockquote {
  margin-top: 0;
  margin-bottom: 1rem;
}

.post img {
  max-width: 100%;
  border-radius: 5px;
}

.post blockquote p:last-child {
  margin-bottom: 0;
}

a.headerlink {
  margin-left: 5px;
  color: rgb(var(--marmalade));
  opacity: 0;
}

h1:hover a.headerlink,
h2:hover a.headerlink,
h3:hover a.headerlink,
h4:hover a.headerlink,
h5:hover a.headerlink,
h6:hover a.headerlink {
  opacity: 0.5;
}

.text-muted {
  opacity: 0.5;
}

/* Layout */

.container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.post,
.pagination {
  max-width: 720px;
  margin-bottom: 5rem;
}

.post .timestamp {
  margin-top: 0.4rem;
  margin-bottom: 1rem;
}

.post .timestamp hr {
  margin: 1rem 0;
  width: 4rem;
  border-top: 1px dashed rgb(var(--marmalade));
}

.pagination {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed rgb(var(--border-color));
  padding-top: 2rem;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

/* Code */

pre {
  display: block;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-all;
  word-wrap: break-word;
  background-color: rgb(var(--header-background-color));
  border-radius: 5px;
}

pre code {
  padding: 0;
  background-color: transparent;
}

.highlight .hll {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-right: 6px;
  background-color: rgb(248, 222, 206);
}

/* Page layout */

.page h1 {
  margin-bottom: 1rem;
}

.page h3,
.page h2 {
  font-size: 1.6rem;
  color: rgb(var(--marmalade));
  border-bottom: 1px dashed rgb(var(--marmalade));
  margin-top: 2rem;
}

.page h2 small {
  color: rgb(var(--body-color));
  float: right;
  opacity: 0.5;
}

.page ul {
  list-style: none;
  padding-left: 0;
}

.page ul li a {
  color: rgb(var(--body-color));
  text-decoration: none;
}

.page ul li a:hover {
  color: rgb(var(--marmalade));
}

.page ul li span {
  float: right;
}

.post-date {
  opacity: 0.5;
  font-style: italic;
}

/* Header */

header {
  border-bottom: 1px solid rgb(var(--border-color));
  position: relative;
  margin-bottom: 2rem;
}

header nav {
  display: flex;
  align-items: end;
}

header nav h1 {
  margin-bottom: 0;
  margin-right: auto;
  z-index: 20;
}

header nav h1 a {
  color: rgb(var(--body-color));
  text-decoration: none;
  display: block;
  padding: 0.8rem 0;
}

header nav h1 a em {
  color: rgb(var(--marmalade));
  font-family: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive;
}

header nav>a {
  padding: 1.2rem 1rem;
  text-decoration: none;
  text-transform: uppercase;
  color: rgb(var(--body-color));
  letter-spacing: 2px;
  font-weight: 500;
  z-index: 20;
}

header nav>a:last-child {
  padding-right: 0;
}

header nav a:hover,
header nav a.active {
  color: rgb(var(--marmalade));
}

header nav a:hover {
  text-decoration: none;
}

header nav a:hover em {
  color: rgb(var(--body-color));
}

@media (max-width: 800px) {

  :root {
    --drip-size: 0;
  }

  header nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  header nav h1 {
    grid-area: 1 / 1 / 2 / 4;
    border-bottom: 1px solid rgb(var(--border-color));
    width: 100%;
    margin-bottom: 0.5rem;
    font-weight: 700;
  }

  header nav h1 a {
    text-align: center;
    /*padding-bottom: 0;*/
  }

  header nav>a {
    text-align: center;
    padding: 0rem 0 0.5rem 0;
    font-weight: 600;
    font-size: 0.8rem;
  }
}

footer,
.liquid-cover {
  background-color: rgb(var(--header-background-color));
  background-color: #fcf7f2;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='12' viewBox='0 0 20 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 12c0-.622-.095-1.221-.27-1.785A5.982 5.982 0 0 0 10 12c1.67 0 3.182-.683 4.27-1.785A5.998 5.998 0 0 0 14 12h2a4 4 0 0 1 4-4V6c-1.67 0-3.182.683-4.27 1.785C15.905 7.22 16 6.622 16 6c0-.622-.095-1.221-.27-1.785A5.982 5.982 0 0 0 20 6V4a4 4 0 0 1-4-4h-2c0 .622.095 1.221.27 1.785A5.982 5.982 0 0 0 10 0C8.33 0 6.818.683 5.73 1.785 5.905 1.22 6 .622 6 0H4a4 4 0 0 1-4 4v2c1.67 0 3.182.683 4.27 1.785A5.998 5.998 0 0 1 4 6c0-.622.095-1.221.27-1.785A5.982 5.982 0 0 1 0 6v2a4 4 0 0 1 4 4h2zm-4 0a2 2 0 0 0-2-2v2h2zm16 0a2 2 0 0 1 2-2v2h-2zM0 2a2 2 0 0 0 2-2H0v2zm20 0a2 2 0 0 1-2-2h2v2zm-10 8a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4z' fill='%23ecdac6' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");
}

footer {
  border-top: 1px solid rgb(var(--border-color));
  position: relative;
  margin-top: 2rem;
}

footer .container {
  /*display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;*/
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

footer .quote {
  font-family: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive;
  transform: rotate(-2deg);
  font-size: 1.2rem;
  margin: 1rem 0;
  line-height: 1.2;
  flex-shrink: 0;
}

footer .quote em {
  color: rgb(var(--marmalade));
  font-style: normal;
  font-size: 1.8rem;
}

footer .icon {
  display: flex;
}

footer .icon img {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  margin-right: 0.5rem;
}

footer .copyright {
  text-align: right;
  opacity: 0.6;
  font-size: 1rem;
  align-self: end;
  flex-shrink: 0;
}

footer ul {
  list-style: none;
  margin: 0 3rem;
  padding: 0;
  display: flex;
  justify-content: end;
  width: 100%;
  gap: 2rem;
}

@media (max-width: 800px) {
  footer .container {
    flex-direction: column;
    align-items: start;
    padding-top: 0;
    padding-bottom: 1rem;
  }

  footer .quote {
    text-align: center;
    align-self: center;
  }

  footer .copyright {
    align-self: center;
    margin-top: 1rem;
  }

  footer ul {
    margin: 0;
    justify-content: center;
  }
}

/* Container for the liquid effect */

.liquid-cover {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  z-index: 15;
}

.liquid-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.liquid-filter-wrapper {
  filter: url("#marmalade-filter");
  width: 100%;
  height: 100%;
  position: relative;
}

.liquid-base {
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(var(--marmalade));
}

.drip {
  position: absolute;
  background-color: rgb(var(--marmalade));
  border-radius: 50%;
  top: calc(100% - 12px);
  transform-origin: center top;
  animation: drip-emerge 0.4s cubic-bezier(0.2, 0, 0.3, 1.4) forwards;
  transition: all 0.3s ease-in;
}

@keyframes drip-emerge {
  0% {
    transform: scale(0) translateY(0);
  }

  100% {
    transform: scale(1) translateY(var(--dist));
  }
}

.drip.retracting {
  transform: scale(0) translateY(-15px) !important;
  opacity: 0;
}

@supports (font: -apple-system-body) {
  :root {
    --drip-size: 1.5;
  }

  .drip {
    animation: none;
    transition: none;
  }
}

/* Almanac */

.almanac-page {
  max-width: initial;
}

.almanac {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.2rem;
}

.almanac>* {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  aspect-ratio: 1 / 1.5;
  background-color: rgba(var(--marmalade), 0.1);
  background-position: 50% 0;
  overflow: hidden;
}

.almanac h3 {
  background-color: rgb(var(--marmalade));
  color: white;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 2.5rem;
  line-height: 1;
  border-radius: 3px;
}

.almanac h3 small {
  font-size: 1.2rem;
  opacity: 0.4;
}

.almanac .title {
  padding: 1rem;
}

.almanac .event {
  transition-duration: 150ms;
  transition-property: transform, box-shadow;
  transition-timing-function: ease-out;
  transform: rotate3d(0);
  border-radius: 3px;
}

.almanac .event:hover {
  transform: scale3d(var(--_hypercard-scale), var(--_hypercard-scale), var(--_hypercard-scale));
  box-shadow: 0 5px 20px 5px #00000044;
}

.almanac .event.has-image .title {
  opacity: 0;
  /*transition-duration: 150ms;
    transition-property: opacity;
    transition-timing-function: ease-out;*/
}

.almanac .event.has-image:hover .title {
  /*    opacity: 1;*/
}

@media (max-width: 1200px) {
  .almanac {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 600px) {
  .almanac {
    grid-template-columns: repeat(3, 1fr);
  }
}