:root {
  /* backgrounds */
  --bg-image-color: #dce8ed;
  --bg-main: #ffffffeb;
  /* accents */
  --green: #008400;
    --text: #003000;
    --border: #008400db;
  --brown: #b06200;
    --hyperlink: #7e4b0c;
    --hr: #b0620099; 
  --magenta: #bd1c90;
    --hyperlink-code: #92166f;
    --bg-inline-code: #f2e3eaaf;
    --bg-accent: #f7eef2c2;
    --border-accent: #92156ea0;
}

html, body {
  margin: 0;
  color: var(--text);
  background-color: white;
  text-size-adjust: none;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  line-height: 22px;
  background-color: var(--bg-image-color);
}

body {
  font-family: "cmu_concrete", serif;
  letter-spacing: 0.01rem;
  word-spacing: -0.02rem;

  overflow-x: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;

  padding: 0.75rem;

  background-image: -webkit-image-set(
    url("background.avif"),
    url("background.webp"),
    url("background.jpg")
  );
  background-image: image-set(
    url("background.avif") type("image/avif"),
    url("background.webp") type("image/webp"),
    url("background.jpg") type("image/jpg")
  );
  min-height: 100vh;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 45rem;
  padding: 0.5em;
  border: 2px dotted var(--green);
  border-radius: 1.4rem;
}
header, footer, .posts, .article {
  background-color: var(--bg-main);
}
header, footer {
  background-color: var(--bg-main);
  padding: 0.41rem 1.5rem 0.39rem;
}
.posts {
  padding: 0.75rem 1.5rem;
}
.article {
  padding: 1.45rem 1.5rem 1.9rem;
}
@media (max-width: 480px) {
  header, footer, .posts, .article {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* HEADER */
header p {
  margin-bottom: 0;
}

/* POST HEADING */
.head {
  margin-bottom: 1rem;
}
.head h1 {
  margin-top: 0;
  margin-bottom: 0.2rem;
}
.head * {
  color: var(--magenta);
}
.post {
  margin-bottom: 0;
}
p, h1, h2, h3, h4, h5, h6, table, ul, ol {
  margin-top: 0;
  margin-bottom: 0.6rem;
  overflow-wrap: break-word;
}
p strong, p b {
  letter-spacing: -0.01rem;
}
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, "system-ui", "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: normal;
  line-height: 26px;
  text-wrap: balance;

  color: var(--green);

  margin-top: 1.25em;
}
h1 {
  font-size: 26px;
  line-height: 30px;
}
h2 {
  font-size: 22px;
  line-height: 30px;
  letter-spacing: 0.02rem;
}
h3, h4 {
  font-size: 19px;
  line-height: 26px;
  letter-spacing: 0.03rem;
}
h5, h6 {
  font-size: 16px;
  line-height: 26px;
}
p:last-child, ol:last-child, ul:last-child {
  margin-bottom: 0;
}

/* HYPERLINKS */
a {
  color: var(--hyperlink);
  text-decoration-color: var(--hyperlink);
  text-decoration-thickness: 1px;
  text-decoration-style: dotted;
  text-underline-offset: 0.2rem;
  word-break: break-all;
  overflow-wrap: break-word;

}
a:link, a:visited {
  color: var(--hyperlink);
}
code a:link, code a:visited, a:link code, a:visited code {
  color: var(--hyperlink-code);
}
header a:link, header a:visited, footer a:link, footer a:visited {
  color: var(--green);
  text-decoration-color: var(--green);
}
a:hover,
code a:hover, a:hover code,
header a:hover, footer a:hover {
  color: var(--magenta);
  text-decoration-color: var(--magenta);
  text-decoration-style: solid;
}

/* MEDIA */
img, video {
  max-width: 100%;
  height: auto;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
}
img {
  cursor: grab;
}
figure {
  margin: 0;
}
figure img {
  display: block;
  padding-top: 0.6rem;
  margin-bottom: 0.1rem;
}
figcaption {
  font-family: -apple-system, "system-ui", "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--green);
  font-size: 12px;
  text-align: center;
}

/* CODE BLOCKS, QUOTES, ASIDES */
pre, blockquote, aside {
  border: 1px dotted var(--border-accent);
  border-radius: 0.25rem;
  background-color: var(--bg-accent);
  margin: 0;
  margin-top: 0.1rem;
  margin-bottom: 1rem;
}
blockquote, aside {
  padding: 0.75rem;
}
code, pre, tt, kbd, samp {
  font-family: "cmu_typewriter", 'Nimbus Mono PS', 'Courier New', monospace;
}
pre {
  white-space: pre;
}
code {
  background: var(--bg-inline-code);
  padding: 1px 2px 0 2px;
  font-size: 0.9rem;
}
pre code {
  background: none;
  overflow-x: auto;
  display: block;
  line-height: 1.25;
  padding: 0.5rem 0.75rem;;
}

/* TABLES */
table {
  border-collapse: collapse;
}
th {
  background-color: var(--bg-accent);
}
table th, table td {
  padding: 0.1rem 0.4rem 0 0.4rem;
  border: 1px solid var(--border-accent);
}

/* HORIZONTAL DIVIDER */
hr {
  margin: 2rem 0;
  border: none;
  height: 1px;
  color: var(--hr); /* old IE */
  background-color: var(--hr); /* modern browser */
}

/* SUP/SUB */
sup, sub {
  font-size: 0.75rem;
}
sup {
  vertical-align: top;
  position: relative;
  top: -0.5em;
}
sub {
  vertical-align: bottom;
  position: relative;
  top: 0.5em;
}

/* FOOTNOTES IN TEXT */
a[data-footnote-ref] {
  text-decoration: none;
}
a[data-footnote-ref]::before {
  content: "[";
  
}
a[data-footnote-ref]::after {
  content: "]";
}
/* FOOTNOTES SECTION */
#footnote-label {
  color: var(--brown);
}
.footnotes li {
  font-size: 0.875rem;
}
.data-footnote-backref {
  text-underline-offset: -0.1rem;
}

/* IMAGE FULLSCREEN */
.fullscreen {
  background-color: rgba(255, 255, 255, 0.9);
  cursor: grab;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}
/* thank u nezu.world for the fullscreen design inspo */
.fullscreen > * {
  max-height: calc(100% - 4rem);
}
.fullscreen img {
  max-height: inherit;
  margin: 0;
  padding: 0;
}
.fullscreen figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}
