:root {
  --grid-color: #29ab87;
  --main-color: #2b9284;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Verdana, sans-serif;
  min-height: 100vh;
  background: conic-gradient(from -45deg,#ECEDDC 90deg,#0000 90.5deg), conic-gradient(from 135deg,#ECEDDC 90deg,#0000 90.5deg) 50px 0, var(--grid-color);
  background-size: 100px 100px;
}

main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: rgba(255,255,255,.7);
}

main > div {
  border: 1px solid var(--main-color);
  position: relative;
  box-shadow: -6px 6px 0 var(--main-color);
}

.container {
  width: min(calc(100vw - 2em), 660px);
  height: 70vh;
}

.content {
  padding: 2em;
  font-size: 1em;
  height: 100%;
  overflow-y: scroll;
  position: relative;
  background: rgba(255, 255, 255, .75);
  scrollbar-color: var(--main-color) white;
  scrollbar-width: thin;
}

.content::-webkit-scrollbar {
  width: 8px;
  background-color: white;
}

.content::-webkit-scrollbar-thumb {
  background: var(--main-color);
}

.content img {
  margin: 1em auto;
  display: block;
  width: 100%;
}

.teagif img {
  margin: 3em auto;
  user-select: none;
  width: auto;
}

::selection {
  background: var(--main-color);
  color: white;
}

a {
  color: var(--main-color);
}

p {
  line-height: 1.7;
  margin: 1em 0;
}

.post {
  font-size: 16px;
  text-align: justify;
}

blockquote {
  padding-left: 1em;
  border-left: 0.2em solid var(--main-color);
}

blockquote.quote {
  text-align: center;
  border-left: none;
  font-size: 0.7em;
  margin-bottom: 2em;
}

.date {
  font-weight: bold;
  font-size: 1.2em;
  text-align: left;
}

.date a {
  text-decoration: none;
}

.date:first-of-type {
  margin-top: 0px;
}

/* Lists */
ul {
  color: #222;
  list-style-type: "› ";
  padding-left: 1.4em;
  margin: .5em 0 1em;
}

li {
  line-height: 1.5;
  margin: .25em 0;
}

li::marker {
  color: #1d6b61;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
}

/* Code */
pre,
code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  font-size: .9em;
}

pre {
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(43,146,132,.25);
  padding: 1em;
  margin: 1em 0;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre code {
  background: none;
  padding: 0;
  white-space: inherit;
}

:not(pre) > code {
  background: rgba(0,0,0,.06);
  padding: .1em .35em;
}

/* Site menu (items come from _data/nav.yml) */
.site-nav {
  position: absolute;
  top: 50%;
  left: calc(50% + 330px + 28px);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
}

.site-nav img {
  display: block;
  image-rendering: pixelated;
  transition: transform .15s;
}

.site-nav a:hover img {
  transform: translateY(-2px);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--main-color);
}

/* Narrow screens: menu moves under the main window as a row */
@media (max-width: 860px) {
  main {
    gap: 16px;
    padding: 1em 0;
  }

  .site-nav {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: space-evenly;
    width: min(calc(100vw - 2em), 660px);
  }
}

/* Search page */
.search {
  --pf-font: Verdana, sans-serif;
  --pf-text: #222;
  --pf-text-secondary: #555;
  --pf-background: #fff;
  --pf-border: var(--main-color);
  --pf-border-focus: #1d6b61;
  --pf-hover: #eef7f5;
  --pf-mark: #1d6b61;
  --pf-outline-focus: var(--main-color);
  --pf-border-radius: 0;
  --pf-input-font-size: 16px;
  margin-bottom: 2.5em;
}

.archive h3 {
  margin-top: 1em;
}

.archive .count {
  color: #555;
  font-size: .8em;
}
