/* VARS */
:root {
  --bg: rgb(8, 8, 8);
  --bg-light: #171717;
  --bg-lighter: #262626;
  --header-color: #ffffff;
  --text-color: rgb(245, 245, 245);
  --highlight: #eaa94e;
  --highlight-dark: #c79754;
  --underline-color: #d8d8d8;

  --standard-bottom-margin: 1.5rem;

  --site-width-margin: 1rem 25%;

  --font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-size: 1rem;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  overflow-wrap: break-word;
  hyphens: manual;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

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

html, body {
  height: 100%;
  background-color: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  font-family: var(--font);
}

/* LAYOUT */
.content {
  flex: 1 0 auto;
  margin: var(--site-width-margin);
  margin-top: 0;
}

footer {
  flex-shrink: 0;
  margin: var(--site-width-margin);
  margin-top: 3rem;
}

nav {
  display: flex;
  justify-content: space-between; /* Header left, nav items right */
  align-items: center;
  flex-wrap: wrap;
  margin: var(--site-width-margin);
}

#nav-header {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.nav-item {
  font-family: var(--font);
  font-weight: bold;
  margin-right: 1rem;
}

/* HEADINGS */
h1, h2, h3, h4, h5 {
  color: var(--text-color);
  font-family: var(--font);
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 2rem;
  margin-top: 3rem;
}
h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.6rem;
}
h2::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--bg-light);
  margin-top: 10px;
}
h3, h4, h5 {
  font-size: 1.2rem;
}

/* TEXT & LINKS */
a {
  color: var(--highlight-dark);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--highlight);
  text-decoration-thickness: 2px;
}

p, ul, li {
  color: var(--text-color);
  font-family: var(--font);
  font-size: var(--font-size);
}

p {
  font-size: var(--font-size);
  margin-bottom: var(--standard-bottom-margin);
  line-height: 1.7rem;
  hyphens: auto;
  overflow-wrap: anywhere;
}

ul {
  list-style: disc;
  margin-left: 3.3rem;
  margin-bottom: var(--standard-bottom-margin);
}

li {
  margin-bottom: 0.2rem;
  line-height: 1.5rem;
}

strong {
  font-weight: bold;
}

/* TABLES */
th {
  font-family: var(--font);
  color: var(--text-color);
  font-weight: bold;
  text-align: left;
}
td {
  font-family: var(--font);
  color: var(--text-color);
}
th, td {
  padding: 0.6rem;
  border: 2px solid var(--text-color);
  font-size: var(--font-size);
}
table {
  border: 2px solid var(--text-color);
  border-collapse: collapse;
  margin-bottom: var(--standard-bottom-margin);
}

/* POSTS */
.post-list ul {
  margin-left: 0;
  list-style-type: none;
}
.post-list li {
  display: flex;
}
.post-list time {
  font-size: 1rem;
  font-family: var(--font);
  color: var(--underline-color);
}
.post-list a {
  font-size: 1rem;
  font-family: var(--font);
  margin-left: 2rem;
  margin-bottom: 0.3rem;
}
.post-list  {
  margin-top: 2.5rem;
}
.post-header {
  margin-bottom: 3rem;
}
.post-header h1 {
  margin-bottom: 1rem;
  font-size: 2.2rem;
  line-height: 3.2rem;
}
.post-header p {
  margin-bottom: var(--standard-bottom-margin);
  color: var(--underline-color);
  font-family: var(--font);
  font-size: 1rem;
}

/* MEDIA */
.image-container {
  margin-top: 2rem;
  margin-bottom: 4rem;
}
img {
  max-width: 100%;
  height: auto;
}

/* NOTICES */
.notice {
  border: 2px dotted var(--underline-color);
  margin-bottom: var(--standard-bottom-margin);
  text-align: center;
  padding: 1rem 1rem;
}
.notice h4 {
  margin: 0;
}
.notice p {
  margin: 0;
}

/* ACCESSIBILITY */
:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

/* CODE AND CHROMA */
.chroma {
  overflow: auto;
  border-radius: 4px;
  color: #abb2bf;
  background-color: var(--bg-light);
}
.chroma * {
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.3rem;
}
.highlight {
  margin-bottom: 2.5rem;
  margin-top: 2.5rem;
}
pre.chroma {
  padding-left: 1rem;
}
code {
  font-size: 0.9rem;
  font-family: monospace;
  padding: 3px 5px;
  background-color: var(--bg-light);
}

/* Responsive */
@media (max-width: 1200px) {
  :root {
    --site-width-margin: 1rem 10%;
  }
}
@media (max-width: 840px) {
  :root {
    --site-width-margin: 1rem 5%;
  }
}

/* Chroma theme tweaks */
/* Background */ .bg { color:#abb2bf;background-color: var(--bg-light); }
/* PreWrapper */ .chroma { color:#abb2bf;background-color: var(--bg-light); }
/* Other */ .chroma .x {  }
/* Error */ .chroma .err {  }
/* CodeLine */ .chroma .cl {  }
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit }
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; }
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; }
/* LineHighlight */ .chroma .hl { background-color:#3d4148 }
/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#55595f }
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#55595f }
/* Line */ .chroma .line { display:flex; }
/* Keyword */ .chroma .k { color:#c678dd }
/* KeywordConstant */ .chroma .kc { color:#e5c07b }
/* KeywordDeclaration */ .chroma .kd { color:#c678dd }
/* KeywordNamespace */ .chroma .kn { color:#c678dd }
/* KeywordPseudo */ .chroma .kp { color:#c678dd }
/* KeywordReserved */ .chroma .kr { color:#c678dd }
/* KeywordType */ .chroma .kt { color:#e5c07b }
/* Name */ .chroma .n { color:#e06c75 }
/* NameAttribute */ .chroma .na { color:#e06c75 }
/* NameBuiltin */ .chroma .nb { color:#e5c07b }
/* NameBuiltinPseudo */ .chroma .bp { color:#e06c75 }
/* NameClass */ .chroma .nc { color:#e5c07b }
/* NameConstant */ .chroma .no { color:#e06c75 }
/* NameDecorator */ .chroma .nd { color:#61afef }
/* NameEntity */ .chroma .ni { color:#e06c75 }
/* NameException */ .chroma .ne { color:#e06c75 }
/* NameFunction */ .chroma .nf { color:#61afef}
/* NameFunctionMagic */ .chroma .fm { color:#56b6c2;}
/* NameLabel */ .chroma .nl { color:#e06c75 }
/* NameNamespace */ .chroma .nn { color:#e06c75 }
/* NameOther */ .chroma .nx { color:#e06c75 }
/* NameProperty */ .chroma .py { color:#e06c75 }
/* NameTag */ .chroma .nt { color:#e06c75 }
/* NameVariable */ .chroma .nv { color:#e06c75 }
/* NameVariableClass */ .chroma .vc { color:#e06c75 }
/* NameVariableGlobal */ .chroma .vg { color:#e06c75 }
/* NameVariableInstance */ .chroma .vi { color:#e06c75 }
/* NameVariableMagic */ .chroma .vm { color:#e06c75 }
/* Literal */ .chroma .l {  }
/* LiteralDate */ .chroma .ld {  }
/* LiteralString */ .chroma .s { color:#98c379 }
/* LiteralStringAffix */ .chroma .sa { color:#98c379 }
/* LiteralStringBacktick */ .chroma .sb { color:#98c379 }
/* LiteralStringChar */ .chroma .sc { color:#98c379 }
/* LiteralStringDelimiter */ .chroma .dl { color:#98c379 }
/* LiteralStringDoc */ .chroma .sd { color:#98c379 }
/* LiteralStringDouble */ .chroma .s2 { color:#98c379 }
/* LiteralStringEscape */ .chroma .se { color:#98c379 }
/* LiteralStringHeredoc */ .chroma .sh { color:#98c379 }
/* LiteralStringInterpol */ .chroma .si { color:#98c379 }
/* LiteralStringOther */ .chroma .sx { color:#98c379 }
/* LiteralStringRegex */ .chroma .sr { color:#98c379 }
/* LiteralStringSingle */ .chroma .s1 { color:#98c379 }
/* LiteralStringSymbol */ .chroma .ss { color:#98c379 }
/* LiteralNumber */ .chroma .m { color:#d19a66 }
/* LiteralNumberBin */ .chroma .mb { color:#d19a66 }
/* LiteralNumberFloat */ .chroma .mf { color:#d19a66 }
/* LiteralNumberHex */ .chroma .mh { color:#d19a66 }
/* LiteralNumberInteger */ .chroma .mi { color:#d19a66 }
/* LiteralNumberIntegerLong */ .chroma .il { color:#d19a66 }
/* LiteralNumberOct */ .chroma .mo { color:#d19a66 }
/* Operator */ .chroma .o { color:#56b6c2 }
/* OperatorWord */ .chroma .ow { color:#56b6c2 }
/* Punctuation */ .chroma .p {  }
/* Comment */ .chroma .c { color:#ffffff }
/* CommentHashbang */ .chroma .ch { color:#ffffff }
/* CommentMultiline */ .chroma .cm { color:#ffffff }
/* CommentSingle */ .chroma .c1 { color:#ffffff }
/* CommentSpecial */ .chroma .cs { color:#ffffff }
/* CommentPreproc */ .chroma .cp { color:#ffffff }
/* CommentPreprocFile */ .chroma .cpf { color:#ffffff }
/* Generic */ .chroma .g {  }
/* GenericDeleted */ .chroma .gd { color:#e06c75 }
/* GenericEmph */ .chroma .ge {  }
/* GenericError */ .chroma .gr {  }
/* GenericHeading */ .chroma .gh {  }
/* GenericInserted */ .chroma .gi { color:#98c379}
/* GenericOutput */ .chroma .go {  }
/* GenericPrompt */ .chroma .gp {  }
/* GenericStrong */ .chroma .gs {  }
/* GenericSubheading */ .chroma .gu {  }
/* GenericTraceback */ .chroma .gt {  }
/* GenericUnderline */ .chroma .gl {  }
/* TextWhitespace */ .chroma .w {  }
