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

* {
  margin: 0;
  transition-behavior: allow-discrete;
}

/* Improve media defaults */

img,
picture,
video,
canvas,
svg {
  display: block;

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

/* Inherit fonts for form controls */

input,
button,
textarea,
select {
  font: inherit;
}

/* Improve line wrapping */

p {
  text-wrap: pretty;
}

[inert],
[inert] * {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
  user-select: none;
}

:root {
  /* dimensions */
  --header-height: 8.75rem;
  --max-header-width: 1920px;
  --max-width: 1024px;
  --max-text-content-width: 600px;
  --padding-inline: 0.5rem;

  /* media query breakpoints */
  --mq-small: 1rem;
  --mq-medium: 50rem;

  /* fonts */
  --font-family-decorative: "Comic Helvetic", -apple-system, blinkmacsystemfont,
    "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
    "Droid Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  --font-family-copy: "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
    "Droid Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  --font-family-monospace: "Reddit Mono", "JetBrains Mono", "Fira Code", monospace;

  /* colours */
  --color-text: hsl(147, 27%, 28%);
  --color-text-dull: hsl(147, 27%, 28%, 0.8);

  --color-text-light: hsl(218deg 27% 14%);
  --color-text-light-dull: hsl(218deg 10% 37%);

  --color-text-dark: hsl(218deg 27% 94%);
  --color-text-dark-dull: rgb(171, 184, 207);

  --color-background: hsla(147, 100%, 50%); /* hsl(193, 80%, 10%); */
  --color-background-offset: hsla(147, 90%, 50%);
  --color-background-light: hsla(0, 0%, 80%);
  --color-background-dark: hsla(0, 0%, 10%);

  --button-background-color: hsla(147, 25%, 85%, 0.6);

  --color-border: hsl(220deg 12% 40%);

  --color-blue: hsl(193deg 60% 73%);
  --color-tertiary: hsl(25, 96%, 53%);

  --color-code-background: hsl(231deg 15% 18%);

  /* spacing */
  --spacing-none: 0;

  --spacing-xxs: 0.25rem;
  --spacing-xs: 0.5rem;
  --spacing-s: 0.75rem;
  --spacing-m: 1rem;
  --spacing-l: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 4rem;
  --spacing-xxxl: 6rem;

  /* typography */
  --font-size-base: 16px;
  --font-size-xs: 0.6944rem;
  --font-size-s: 0.8333rem;
  --font-size-m: 1.2rem;
  --font-size-l: 1.4rem;
  --font-size-xl: 1.6rem;
  --font-size-xxl: 1.8rem;
  --font-size-xxxl: 2rem;

  --font-weight-normal: 400;
  --font-weight-bold: 600;
  --line-height-tight: 1.3;
  --line-height-base: 1.6;

  /* borders */
  --rounded-corners: 0.5rem;

  /* easing */
  --easing-bounce-2: linear(
    0,
    0.004,
    0.016,
    0.035,
    0.063,
    0.098,
    0.141 15.1%,
    0.25,
    0.391,
    0.562,
    0.765,
    1,
    0.892 45.2%,
    0.849,
    0.815,
    0.788,
    0.769,
    0.757,
    0.753,
    0.757,
    0.769,
    0.788,
    0.815,
    0.85,
    0.892 75.2%,
    1 80.2%,
    0.973,
    0.954,
    0.943,
    0.939,
    0.943,
    0.954,
    0.973,
    1
  );
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  padding: 0;
  border: 0;
}

.overflow-hidden {
  overflow: hidden;
}

@view-transition {
  navigation: auto;
}




html {
  background-color: var(--color-background);
  color: var(--color-text);

  font-family: var(--font-family-copy);
  font-size: var(--font-size-base);

  /* must set scrollbar-color on html */
  scrollbar-width: auto;
  scrollbar-color: var(--color-primary) var(--color-background-offset-dark);
}

html:has(.post) {
  background-color: initial;
  background-image: url("/assets/img/backgrounds/paper.webp");

  color: hsl(0, 0%, 29%);
}

html:has(#hamburger-button.closed) {
  overflow: hidden;
}

body {
  margin: 0;

  line-height: 1.5;
  overflow: inherit;
}

button {
  padding-block: 0.25rem;

  background-color: var(--button-background-color);
  color: inherit;

  border: 1px solid currentColor;
  border-radius: 0.25rem;

  font-family: var(--font-family-decorative);

  svg {
    margin: 0;
    max-width: none;
  }
}

button[disabled] {
  color: var(--color-text-dull);
}

main blockquote :is(p, ol, ul) {
  margin-block-end: 0;
}

blockquote {
  display: block;
  position: relative;

  width: 90%;
  height: auto;
  margin-inline: auto;
  margin-block-end: var(--spacing-l);

  border-style: solid;
  border-width: 78px 70px 106px 79px;
  border-image: url("/assets/img/drawings/bubble.svg") 146 89 137 86 stretch
    stretch;

  /* fills in background of the element which is transparent otherwise */
  &::before {
    content: "";

    display: block;
    position: absolute;

    width: 100%;
    height: 104%;

    z-index: -1;

    background-color: white;
  }

  > * {
    /* compensate for rotation */
    margin-inline: -0.1rem;
    margin-block-end: 0;

    padding-block-end: var(--spacing-l);

    rotate: 1deg;

    /* background on blockquote overflows */
    background: white;
  }

  :first-child {
    margin-block-start: -0.3rem;
  }

  :last-child {
    margin-block-end: -0.3rem;
    padding-block-end: 0;
  }
}

button {
  padding-block: 0.25rem;

  background-color: var(--button-background-color);
  color: inherit;

  border: 1px solid currentColor;
  border-radius: 0.25rem;

  font-family: var(--font-family-decorative);

  svg {
    margin: 0;
    max-width: none;
  }
}

button[disabled] {
  color: var(--color-text-dull);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block-end: var(--spacing-l);

  font-family: var(--font-family-decorative);
  font-weight: var(--font-weight-normal);

  line-height: 1.2;
}

h1 {
  font-size: var(--font-size-xxxl);
}

h2 {
  font-size: var(--font-size-xxl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-l);
}

h5 {
  font-size: var(--font-size-m);
}

h6 {
  font-size: var(--font-size-base);
}

hr {
  color: currentColor;
  margin-block-end: var(--spacing-l);
}

iframe {
  width: 100%;

  border: none;
  border-radius: var(--rounded-corners);
}

img,
picture {
  margin-block-end: var(--spacing-l);
}

picture > img,
:is(button, a) > :is(img, picture) {
  display: inline;

  margin-block-end: 0;
}

a {
  color: currentColor;

  text-decoration: underline;
  text-decoration-thickness: 0.2rem;
  text-decoration-color: hsl(240, 66%, 48%, 0.5);
  text-underline-offset: 0.1rem;
  text-decoration-skip-ink: none;

  &:visited {
    color: inherit;
  }

  img {
    text-decoration: inherit;
  }
}

.content-header a {
  text-decoration: none;
}


main {
  svg,
  iframe,
  canvas {
    width: 100%;
  }
}

p {
  margin-block-end: var(--spacing-l);
}

.small {
  font-size: var(--font-size-s);
}


code {
  font-family: var(--font-family-monospace);

  /* Use tabular numerals for alignment of nums, and strawberry stylistic set of glyphs */
  font-feature-setvtings: "tnum" 1, "ss02" 1;

  background-color: hsla(0, 1%, 65%, 0.1);
}

pre code {
  background-color: transparent;
}

p code {
  /* prevent long urls from overflowing */
  overflow-wrap: break-word;
}

figure:not(.codeblock) {
  --outline-color: hsl(0, 0%, 10%);

  margin-block-end: var(--spacing-l);

  display: inline-block;
  place-self: center;

  img,
  picture,
  video {
    display: block;

    margin-block-end: 0;
  }

  figcaption {
    contain: inline-size;

    margin-block-start: 0.3rem;
    padding: 0.4rem;

    font-size: var(--font-size-s);

    background-color: hsl(0, 0%, 100%);
    color: hsl(0, 0%, 36%);

    border: 0.1rem solid hsla(0, 0%, 0%, 0.7);
  }
}

figure:not(.codeblock):has(blockquote) {
  position: relative;

  width: 90%;
  height: auto;

  border-style: solid;
  border-width: 78px 70px 106px 79px;
  border-image: url("/assets/img/drawings/bubble.svg") 146 89 137 86 stretch
    stretch;

  /* fills in background of the element which is transparent otherwise */
  &::before {
    content: "";

    display: block;
    position: absolute;

    width: 100%;
    height: 104%;

    z-index: -1;

    background-color: white;
  }

  > blockquote {
    border: none;
    border-image: none;

    width: 100%;
  }

  > * {
    /* compensate for rotation */
    margin-inline: -0.1rem;
    margin-block-end: 0;

    rotate: -0.5deg;

    /* background on blockquote overflows */
    background: white;
  }

  figcaption {
    padding-block: var(--spacing-s);

    rotate: 0.2deg;

    border: none;
  }
}

figure.codeblock {
  width: 100%;
}



