/** Get yer font on! **/
@font-face {
  font-family: 'GeneralSans';
  src: url('https://cdn.kevquirk.com/GeneralSans-Variable.woff2') format('woff2'),
       url('https://cdn.kevquirk.com/GeneralSans-Variable.woff') format('woff');
       font-weight: 200 700;
       font-display: swap;
       font-style: normal;
}

@font-face {
  font-family: 'GeneralSans';
  src: url('https://cdn.kevquirk.com/GeneralSans-VariableItalic.woff2') format('woff2'),
       url('https://cdn.kevquirk.com/GeneralSans-VariableItalic.woff') format('woff');
       font-weight: 200 700;
       font-display: swap;
       font-style: italic;
}

/** Global colour variables **/
:root {
  --text: #2a2a2a;
  --bg: #fafafa;
  --accent: #0D47A1;
  --accent-light: #E3F2FD;
  --accent-bg: #eee;
  --input-bg: white;
  --mark: #FFB84D;
  --underline: #90CAF9;
  --border: lightgrey;
  --dark-red: #b71c1c;
  --light-red: #ffebee;
  --dark-green: #1B5E20;
  --light-green: #E8F5E9;
  --dark-purple: #4A148C;
  --light-purple: #F3E5F5;
  --sans: 'GeneralSans', Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
  --mono: Menlo, Consolas, Monaco, "Liberation Mono", Lucida Console, monospace;
  --content-margin: 1.5rem auto;
  --bigger-content-margin: 2.5rem auto;
  --standard-border: 1px solid var(--border);
  --border-radius: 5px;
}

@media (prefers-color-scheme: dark) {
    :root {
      --text: #D8DEE9;
      --bg: #2E3440;
      --accent: #88C0D0;
      --accent-light: #1B222C;
      --accent-bg: #3B4252;
      --input-bg: #434C5E;
      --underline: #DCEFF8;
      --border: #4C566A;
      --dark-red: #B84A58;
      --light-red: #2A1B1D;
      --dark-green: #A3BE8C;
      --light-green: #202D20;
      --dark-purple: #B48EAD;
      --light-purple: #2B2230;
      --mark: #EBCB8B;
    }
}

/****** Main body elements ******/
html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 1.35rem;
  line-height: 1.5;
  margin: 0 auto;
  display: block;
  max-width: 650px;

}

body img {
  max-width: 100%;
  border-radius: var(--border-radius);
}

figure {
  margin: 2.5rem auto;
  text-align: center;
}

figcaption,
img+em {
  font-size: 1rem;
  font-style: normal;
  text-align: center;
  display: block;
}

/**** Typography ****/
h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  line-height: 1.2;
}

h4, h5, h6 {
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  margin-top: 0;
}

h1.title {
  margin-bottom: 3rem;
}

h2 {
  font-size: 2.6rem;
  margin: 4rem 0 0 0;
}

h2.post-title {
  font-size: 2rem;
}

h3 {
  font-size: 2rem;
  margin: 3rem 0 0 0;
}

h4 {
  font-size: 1.44rem;
}

h5 {
  font-size: 1.15rem;
}

h6 {
  font-size: 0.96rem;
}

h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code {
  font-size: inherit;
}

p {
  margin: var(--content-margin);
}

h2.post-title,
p.meta,
p.date {
  margin: 0;
}

p.meta,
p.date {
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

p.meta span,
p.post-meta span {
padding: 0 0.5rem;
}

p.post-meta {
  font-size: 1.1rem;
  margin: -2rem 0 3rem 0;
}

p.description {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

.tldr,
.medium {
  margin: 3rem 0;
  font-size: 1.75rem;
  line-height: 1.3;
  font-weight: 300;
}

.small {
  font-size: 1rem;
}

/*** Links and buttons ***/
a,
a:visited {
  color: var(--accent);
  text-decoration-color: var(--underline);
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  transition: 0.25s;
}

a:hover {
  text-decoration-color: var(--accent);
}

.button,
#submit {
  color: var(--accent);
  border: var(--standard-border);
  border-radius: var(--border-radius);
  border-color: var(--accent);
  background: var(--bg);
  transition: color .1s ease-in-out, .1s ease-in-out;
  margin: 1.5rem 0;
  padding: 10px 12px;
  font-size: inherit;
  font-family: inherit;
  transition: 0.25s;
  cursor: pointer;
}

a.button {
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.button:hover,
#submit:hover,
.current {
  background: var(--accent-light);
}

.reply-button {
  font-size: 2rem;
  padding: 15px 20px;
}

/* Everything else... */
.center {
  text-align: center;
}

.right {
  text-align: right;
}

.large {
  font-size: 1.6rem;
}

.floatleft {
  float: left;
}

figure.floatleft {
  margin: 0;
}

.border {
  border: var(--standard-border);
}

hr {
  border-top: var(--standard-border);
  margin: 3.5rem auto;
  max-width: 60%;
}

blockquote {
  font-size: 1.5rem;
  font-style: italic;
  margin: var(--bigger-content-margin);
  padding: .4rem .8rem;
  border-left: 3px solid var(--accent);
  display: block;
}

blockquote p {
  opacity: 0.7;
}

cite {
  font-size: 1rem;
  font-style: normal;
  opacity: 0.7;
}

pre,
code,
tt,
var {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text);
  background: var(--accent-bg);
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

pre,
pre.highlight {
  background: var(--accent-bg);
  border: var(--standard-border);
  border-radius: var(--border-radius);
  margin: var(--bigger-content-margin);
  max-width: 100%;
  padding: 1.5rem;
  max-height: 650px;
  overflow: auto;
  white-space: pre-wrap;
}

pre code {
  font-size: 1rem;
  padding: 0;
  background: none;
  border: none;
}

kbd {
  color: var(--text);
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-bottom: var(--standard-border);
  border-radius: var(--border-radius);
  padding: 0.1rem 0.25rem;
}

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

img.emoji,
.icon {
  position: relative;
  top: 0.1em;
  padding-right: .25rem;
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 0;
  stroke: currentColor;
  fill: currentColor;
}

@keyframes jiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

a:hover .emoji,
.button:hover .emoji,
.socials svg:hover {
  animation: jiggle 0.4s ease-in-out infinite;
}

.post-meta {
  font-size: 1rem;
  margin: var(--bigger-content-margin);
}

ul.post-meta {
  list-style-type: none;
  padding: 0;
}

ul.post-meta::before {
  content: "Posted in:";
  padding-right: 0.5rem;
  font-weight: bold;
}

ul.post-meta li {
  margin-right: 0.5rem;
  display: inline-block;
}

ul.post-meta li:last-child {
  margin-right: 0;
}

.card {
  border: var(--standard-border);
  border-radius: var(--border-radius);
  background: var(--accent-bg);
  padding: 1rem;
  margin: var(--bigger-content-margin);
}

.penpal h2,
.card h1,
.card h2,
.card h3 {
  margin: 0;
}

.card p:first-child {
  margin-top: 0;
}

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

.note p {
  margin: 0 0 1rem 0 !important;
}

span.note-meta {
  display: block;
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  color: var(--accent);
  line-height: 1.5;
  font-weight: bold;
  text-align: center;
  padding: 0.25rem 0;
  margin: -1rem -1rem 2rem -1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  border-radius: 5px 5px 0 0;
  background: var(--accent-light);
}

span.note-meta a {
  text-decoration: none;
}

.note {
  margin-top: 2rem;
  border-color: var(--accent) !important;
}

.note figure {
  margin: 1rem auto 0 auto;
}

.note a {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

