
@charset 'UTF-8';

/*
 * CSS Reset stolen from the wonderful Elly Loel, with a few formatting and artistic tweaks.
 *
 * The original GitHub Gist can be found here: https://gist.github.com/EllyLoel/4ff8a6472247e6dd2315fd4038926522
 *
 *
 * PROTECT THE DOLLS
 *
 *
 *                                  ____
 *                              .dSSSSSb.gp.
 *                            .dSSS$$$SS$$$$Sb
 *                        _.dSSS$$$$SSS$$$SS$Sb
 *                      .dSSS$$$$$$SSS$$$SSSSSS;
 *                    dSS$$$$$S$$SSSSSS$SSS$SSS
 *                    :SS$$$SSS$$SSSS$$SS$SSS$S$;
 *                    :S$$$SSS$$SSSS$$SSSS$$S$S$S
 *                    T$$SSSS$$SSS$$SSSS$$$S$SS$
 *                      $$SSSS$$SSS$$SSS$$$$$SSS$
 *                      $$$SSSS$$SS$$SS$P'"S$$SS$;
 *                    .SS$$SP^J`^$$$$S$_  :$$SS$S
 *                    dSS$$SS /dB   T$$db\ ;`$$SSS
 *                  :SS$$S$S; TP    `;TP : dS$$SS
 *                  SS$$SS$$S"""  +   """$$SSS$$S;
 *                  SS$$S$S$$b.  '--'  .d$$SSSS$$;
 *                  :S$$S$S$$SSS+.__.+S$SS$$SSS$$S
 *                    TS$$$SS$$SSS    SS$SS$$SSS$$S
 *                    TS$$$SS$$S;    :SS$SS$$SSS$$b
 *                      `TS$$P^"       "^T$SSS$$SS$$b._
 *                    .dSP::_           :;""^^T$$SS$$$Sp.
 *                  _:SP'/:: ""--.  .---:;"     T$$SSS$$$$.
 *                .-" " -'--,            :;       SS$$SSSS$$b
 *              /      .-"\:            ;:       :SS$$SSSS$$;
 *              :   _.+"   ;;            ;:       :SS$$SSSSS$$
 *              :   ; :   `;;            ;: :     SSS$$SSSSS$;
 *              :   ; ;    ;;            ;: ;    :SS$$SSSSS$P
 *              :   ;:    :  "-.    /  .'  \;    :SS$$SSS$$'
 *              :   :;    ;     "-.:.-"     :    SS$$SS$$'
 *              ;   :     ;        ;        :    SS$$S$SS  ,
 *              ;    ;   :$        :        ;    S$$S$$TSbgd;
 *              ;    :   S$;.    .' `.    .:S    SS$S$; "^^"
 *              :     ; :S$$ """"     """" $S    :S$S$$     -,
 *              \    : |TS$;             :$S    :S'TS$b     d;
 *                \     ; `T:             SSS    :   `TSSggpSS'
 *                `.  /    `;           :  :     \    "^^^^"
 *                  ""      :           ;  :      \
 *                          ;           :   \      \
 *                          /             \   \      ;
 *                        /               \   `.    :
 *                        /        c        \    \    \
 *                      :                   ;    `.   \
 *                      ;`-...____________..:      \   \
 *                      : `.               .' ;      \   \
 *                      ;   `.           .'   :       ;   `.
 *                    :      `.       .'      ;      :_ . `:.
 *                    ;        `.   .'        :        "-:+.);
 *                    ;          `.'          :          ; ;;;
 *                    ;           :           :          ://::
 *                    ;           :           :           " ::
 *                    :           :           ;
 *                      ;          :          :
 *                      :          :          |
 *                      ;         :          ;
 *                      :         :         :
 *                        ;        :         |
 *                        :        ;         ;
 *                        ;       ;        :
 *                        :       ;        ;
 *                          ;      ;       :
 *                          :      ;       ;
 *                          ;     ;      :
 *                          :     :  ;   ;
 *                          ;   :  ; :   :
 *                          :    :  :      \
 *                          |      : ;      \
 *                          ;      ; :       \
 *                        :      :   ;       \
 *                        |      :   :        ;
 *                        ;      :    ;       :
 *                        ;      ;    :        ;
 *                        |      ;     ;       ;
 *                        :      :     :       :
 *                          ;     :      ;      :
 *                          :     :      :      :
 *                          ;     ;      ;    /:
 *                          :\    ;      :`--" ;
 *                            ;"--';       ;    ;
 *                            :    :       |    :
 *                            :    :       :   .-\
 *                            ;    :        ;     `.
 *                          : `-   ;       :       \
 *                          ;      :        ;       \
 *                          :       :        :       _;
 *                          |       :         \   .-" ;
 *                          ;       :          `.'   /
 *                          :.-----.;            "--"
 *                          \     /
 *                            `---'
 *
 * Made by Elly Loel - https://ellyloel.com/
 *
 * With inspiration from:
 *   - Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
 *   - Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
 *   - Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
 *
 * Notes:
 *   - `:where()` is used to lower specificity for easy overriding.
 */

* {
  /*
   * Remove default margin on everything
   */
  margin: 0;

  /*
   * Remove default padding on everything
   */
  padding: 0;

  /*
   * Calc `em` based line height, bigger line height for smaller font size and smaller line
   * height for bigger font size: https://kittygiraudel.com/2020/05/18/using-calc-to-figure-out-optimal-line-height/
   */
  line-height: calc(0.4rem + 1em + 0.4rem);
}

/*
 * Use a more-intuitive box-sizing model on everything
 */
*,
::before,
::after {
  box-sizing: border-box;
}

/*
 * Remove border and set sensible defaults for backgrounds, on all elements except fieldset progress and meter
 */
*:where(:not(fieldset, progress, meter)) {
  border-width: 0;
  border-style: solid;
  background-origin: border-box;
  background-repeat: no-repeat;
}

html {
  /*
   * Allow percentage-based heights in the application
   */
  block-size: 100%;

  /*
   * Making sure text size is only controlled by font-size
   */
  -webkit-text-size-adjust: none;
}

/*
 * Smooth scrolling for users that don't prefer reduced motion
 */
@media (prefers-reduced-motion: no-preference) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}

body {
  /*
   * https://marco.org/2012/11/15/text-rendering-optimize-legibility
   */
  text-rendering: optimizeSpeed;

  /*
   * Allow percentage-based heights in the application
   */
  min-block-size: 100%;

  /*
   * https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter#example_2
   */
  /* scrollbar-gutter: stable both-edges; Removed until this bug is fixed: https://bugs.chromium.org/p/chromium/issues/detail?id=1318404#c2 */
}

/*
 * Improve media defaults
 */
:where(img, svg, video, canvas, audio, iframe, embed, object) {
  display: block;
}
:where(img, svg, video) {
  block-size: auto;
  max-inline-size: 100%;
}

/*
 * Remove stroke and set fill colour to the inherited font colour
 */
:where(svg) {
  stroke: none;
  fill: currentColor;
}

/*
 * SVG's without a fill attribute
 */
:where(svg):where(:not([fill])) {
  /*
   * Remove fill and set stroke colour to the inherited font colour
   */
  stroke: currentColor;
  fill: none;

  /*
   * Rounded stroke
   */
  stroke-linecap: round;
  stroke-linejoin: round;
}

/*
 * Set a size for SVG's without a width attribute
 */
:where(svg):where(:not([width])) {
  inline-size: 5rem;
}

/*
 * Remove built-in form typography styles
 */
:where(input, button, textarea, select),
:where(input[type='file'])::-webkit-file-upload-button {
  color: inherit;
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

/*
 * Change textarea resize to vertical only and block only if the browser supports that
 */
:where(textarea) {
  resize: vertical;
}
@supports (resize: block) {
  :where(textarea) {
    resize: block;
  }
}

/*
 * Avoid text overflows
 */
:where(p, h1, h2, h3, h4, h5, h6) {
  overflow-wrap: break-word;
}

/*
 * Fix h1 font size inside article, aside, nav, and section
 */
h1 {
  font-size: 2em;
}

/*
 * Position list marker inside
 */
:where(ul, ol) {
  list-style-position: inside;
}

/*
 * Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed
 */
:where(ul, ol)[role='list'] {
  list-style: none;
}

/*
 * More readable underline style for anchor tags without a class. This could be set on anchor tags globally,
 * but it can cause conflicts.
 */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/*
 * Make it clear that interactive elements are interactive
 */
:where(a[href], area, button, input, label[for], select, summary, textarea, [tabindex]:not([tabindex*='-'])) {
  cursor: pointer;
  touch-action: manipulation;
}
:where(input[type='file']) {
  cursor: auto;
}
:where(input[type='file'])::-webkit-file-upload-button,
:where(input[type='file'])::file-selector-button {
  cursor: pointer;
}

/*
 * Animate focus outline
 */
@media (prefers-reduced-motion: no-preference) {
  :focus-visible {
    transition: outline-offset 145ms cubic-bezier(0.25, 0, 0.4, 1);
  }
  :where(:not(:active)):focus-visible {
    transition-duration: 0.25s;
  }
}
:where(:not(:active)):focus-visible {
  outline-offset: 5px;
}

/*
 * Make sure users can't select button text
 */
:where(button, button[type], input[type='button'], input[type='submit'], input[type='reset']),
:where(input[type='file'])::-webkit-file-upload-button,
:where(input[type='file'])::file-selector-button {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  text-align: center;
}

/*
 * Disabled cursor for disabled buttons
 */
:where(button, button[type], input[type='button'], input[type='submit'], input[type='reset'])[disabled] {
  cursor: not-allowed;
}

/*
  The CSS in this style file is based off of Bear Blog's default CSS.
  https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css
  License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md
 */

:root {
  --system-fonts:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --monospace-fonts: 'Inconsolata', 'Ubuntu Mono', monospace;
  --main-colour: rgb(var(--black));
  --main-colour-body: rgb(var(--gray-dark));
  --background-colour: #ffdef8;
  --accent: #86016a;
  --orange: #ffad16;
  --white: 256, 256, 256;
  --black: 15, 18, 25;
  --gray: 96, 115, 159;
  --gray: 98, 47, 106;
  --gray-light: 246, 246, 246;
  --gray-dark: 34, 41, 57;
  --box-shadow: 0 2px 6px rgba(var(--gray), 2%), 0 8px 24px rgba(var(--gray), 6%), 0 16px 32px rgba(var(--gray), 8%);
}

/* Add margin before content when scrolling to anchor links */
:target {
  scroll-margin-block-start: 1em;
}

body {
  font-family: 'Source Serif 4', 'Times New Roman', var(--system-fonts);
  text-align: left;
  background: var(--background-colour) no-repeat;
  background-size: 100% 600px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--main-colour-body);
  font-size: 20px;
  color-scheme: light dark;
  -webkit-font-smoothing: antialiased;
}

pre,
code {
  font-family: var(--monospace-fonts) !important;
}

main {
  width: 720px;
  max-width: calc(100% - 2em);
  margin: auto;
  padding: 3em 1em;
  min-height: 80vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
:is(h1, h2, h3, h4, h5, h6) a {
  margin: 0 0 0.8rem 0;
  color: var(--main-colour);
  line-height: 1.2;
  font-weight: 300;
  font-style: italic;
  text-wrap: balance;
  text-decoration: none;
}

:is(h1, h2, h3, h4, h5, h6) a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1%;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2.25rem;
}

h4 {
  font-size: 2rem;
}

h5 {
  font-size: 1.75rem;
}

h6 {
  font-size: 1.5rem;
}

* + :is(h2, h3, h4, h5, h6) {
  margin: 3rem 0 0.8rem 0;
}

.header-anchor:not(:hover, :focus)::before {
  visibility: hidden;
}

.header-anchor::before {
  color: rgba(var(--gray));
  font-size: 0.75em;
  margin-top: 0.15em;
  position: absolute;
}

@media not (width <= 720px) {
  .header-anchor::before {
    content: '#';
    margin-left: -0.8em;
    padding-right: 0.8em;
  }
}

strong,
b {
  font-weight: 400;
}

a,
p,
div,
li,
header,
footer,
code,
pre {
  font-weight: 300;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1%;
}

a:hover {
  text-decoration: none;
}

p {
  text-wrap: pretty;
}

p,
ul,
ol,
pre,
br,
hr {
  margin-top: 0 !important;
  margin-bottom: 1.2em !important;
}

.prose :is(p, ul, ol, pre, br, hr) {
  margin-top: 0 !important;
  margin-bottom: 2em !important;
}

ul li,
ol li {
  line-height: calc(0.6rem + 1em + 0.6rem);
  padding-left: 1.5rem;
}

ul li::marker {
  color: rgba(var(--gray-dark), 90%);
  content: '♡ ';
  font-size: 0.9em;
}

textarea {
  width: 100%;
  font-size: 16px;
}

input {
  font-size: 16px;
}

table {
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

code {
  padding: 2px 5px;
  background-color: rgb(var(--gray-light));
  border-radius: 2px;
}

pre {
  padding: 1.5em !important; /* TODO: conflict with more specific padding style from prism */
  border-radius: 8px;
}

pre > code {
  all: unset;
}

blockquote {
  border-left: 4px solid var(--accent);
  padding: 0 0 0 20px;
  margin: 0px 20px 0px 20px;
  line-height: 2;
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid rgba(var(--gray-dark), 20%);
  margin: 0 auto;
  width: 40%;
}

.sr-only {
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;

  /* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
  clip: rect(1px 1px 1px 1px);

  /* maybe deprecated but we need to support legacy browsers */
  clip: rect(1px, 1px, 1px, 1px);

  /* modern browsers, clip-path works inwards from each corner */
  clip-path: inset(50%);

  /* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */
  white-space: nowrap;
}

.text-center {
  display: flex;
  justify-content: center;
}

.text-right {
  display: flex;
  justify-content: flex-end;
}

.portrait {
  margin: 2rem 0 2.5rem 0;
}

.portrait img {
  width: 60%;
  border-radius: 16px;
  box-shadow: var(--box-shadow);
  margin: 0 auto;
}

.prose {
  width: 720px;
  max-width: calc(100% - 2em);
  margin: auto;
  color: rgb(var(--gray-dark));
}

.icon-rss {
  color: var(--orange);
}

/* Mobile styling fixes */
@media (max-width: 720px) {
  main {
    padding: 1em;
    max-width: 100%;
  }

  .portrait img {
    width: 100%;
  }

  .prose {
    max-width: 100%;
  }

  hr {
    margin: 0 auto;
    width: 80%;
  }
}

header {
  margin: 0;
  padding: 0 1em;
  background: rgba(var(--white), 50%);
  box-shadow: 0 2px 8px rgba(var(--black), 5%);

  h2 {
    margin: 0;
    font-size: 1em;

    a,
    a.active,
    a:hover {
      text-decoration: none;
    }
  }

  nav {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .internal-links {
      a {
        display: inline-block;
        padding: 1em 0.5em;
        color: var(--main-colour);
        border-bottom: 4px solid transparent;
        text-decoration: none;
      }

      a.active {
        font-weight: bolder;
        text-decoration: none;
        border-bottom-color: var(--accent);
      }
    }
  }

  .profile > picture > img {
    border-radius: 50%;
    height: auto;
    max-width: 50px;
  }

  @media (max-width: 720px) {
    .profile {
      display: none;
    }
  }
}

footer {
  padding: 2em 1em 6em 1em;
  background: rgba(var(--white), 40%);
  color: rgb(var(--gray));
  text-align: center;

  /* Transgender gradient thanks to https://cesque.com/gaydient/ */
  border-image-slice: 1;
  border-bottom: 4px solid;
  border-image-source: linear-gradient(
    to right,
    rgb(85, 205, 252),
    rgb(179, 157, 233),
    rgb(247, 168, 184),
    rgb(246, 216, 221),
    rgb(255, 255, 255) 45%,
    rgb(255, 255, 255),
    rgb(255, 255, 255) 55%,
    rgb(246, 216, 221),
    rgb(247, 168, 184),
    rgb(179, 157, 233),
    rgb(85, 205, 252)
  );
}

/*
Name: Duotone Dark
Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)

Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-evening-dark.css)
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
*/

code[class*="language-"],
pre[class*="language-"] {
	font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
	font-size: 14px;
	line-height: 1.375;
	direction: ltr;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
	background: #2a2734;
	color: #9a86fd;
}

pre > code[class*="language-"] {
	font-size: 1em;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
	text-shadow: none;
	background: #6a51e6;
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
	text-shadow: none;
	background: #6a51e6;
}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: #6c6783;
}

.token.punctuation {
	color: #6c6783;
}

.token.namespace {
	opacity: .7;
}

.token.tag,
.token.operator,
.token.number {
	color: #e09142;
}

.token.property,
.token.function {
	color: #9a86fd;
}

.token.tag-id,
.token.selector,
.token.atrule-id {
	color: #eeebff;
}

code.language-javascript,
.token.attr-name {
	color: #c4b9fe;
}

code.language-css,
code.language-scss,
.token.boolean,
.token.string,
.token.entity,
.token.url,
.language-css .token.string,
.language-scss .token.string,
.style .token.string,
.token.attr-value,
.token.keyword,
.token.control,
.token.directive,
.token.unit,
.token.statement,
.token.regex,
.token.atrule {
	color: #ffcc99;
}

.token.placeholder,
.token.variable {
	color: #ffcc99;
}

.token.deleted {
	text-decoration: line-through;
}

.token.inserted {
	border-bottom: 1px dotted #eeebff;
	text-decoration: none;
}

.token.italic {
	font-style: italic;
}

.token.important,
.token.bold {
	font-weight: bold;
}

.token.important {
	color: #c4b9fe;
}

.token.entity {
	cursor: help;
}

pre > code.highlight {
	outline: .4em solid #8a75f5;
	outline-offset: .4em;
}

/* overrides color-values for the Line Numbers plugin
 * http://prismjs.com/plugins/line-numbers/
 */
.line-numbers.line-numbers .line-numbers-rows {
	border-right-color: #2c2937;
}

.line-numbers .line-numbers-rows > span:before {
	color: #3c3949;
}

/* overrides color-values for the Line Highlight plugin
* http://prismjs.com/plugins/line-highlight/
*/
.line-highlight.line-highlight {
	background: rgba(224, 145, 66, 0.2);
	background: -webkit-linear-gradient(left, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0));
	background: linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0));
}

