/* Base */
/* ----------------------------------------------------------*/

@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,400italic);

@font-face {
    font-family: 'Dusty';
    src: url('/resources/dusty-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #080309;
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 300;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;
  letter-spacing: 1.1;
  color: #ffe2f8;
}

body > * {
  -webkit-flex: 1 100%;
  flex: 1 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-size: 100%;
  font-weight: 600;
  margin: 10px 0;
  clear: both;
}

h2 {
  border-bottom: 1px solid #666;
}

a         { color: #bfb2ef; text-decoration: none; }
a:hover   { text-decoration: underline; }
a:visited { color: #9070e2; }

strong {
  font-weight: bold;
}

/* Layout Styles */
/* ----------------------------------------------------------*/

/* Site header */

#site-header {
  min-height: 60px;
  background-color: #6a37bc;
  font-size: 19px;
  color: #727272;
  font-weight: 500;
  background-image: url("/resources/mgba-header.png");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 200px 150px;
  z-index: 1;
}

#site-title {
  display: block;
  float: left;
  padding-top: 20px;
  color: #fad8e7;
  min-width: 200px;
  min-height: 36px;
  opacity: 0;
}

#site-nav {
  text-align: right;
  float: right;
}

#site-nav .page-link {
  padding: 15px 12px 11px 12px;
  display: inline-block;
  height: 30px;
  color: #fad8e7;
  transition-duration: 0.2s;
  transition-property: background-color, border-color;
  border-bottom: 4px solid #6a37bc;
}

#site-nav .page-link:hover {
  text-decoration: none;
  background-color: rgba(58, 31, 105, 0.8);
  border-color: #fad8e7;
}

/* Site footer */

#site-footer {
  margin-top: 40px;
  padding: 10px 0;
  min-height: 60px;
  -webkit-order: 99;
  order: 99;
}

#site-footer ul { list-style: none; }

#site-footer p {
  margin: 10px;
  letter-spacing: -.3px;
  color: #828282;
  font-size: 12px;
}

#footer-links {
  float: right;
  margin: 0 20px;
  clear: both;
}

#description {
  text-align: center;
}

.icon-svg {
  display: inline-block;
  width: 16px;
  height: 16px;
  position: relative;
  top: 3px;
}

#front-logo {
  display: block;
  margin: auto;
  max-width: 100%;
}

#sub-nav {
  margin: 0;
  margin-right: auto;
  padding: 20px 0;
  -webkit-flex: 0 auto;
  flex: 0 auto;
  -webkit-order: 2;
  order: 2;
  width: 15%;
  max-width: 200px;
  position: relative;
  left: -16px;
}

#sub-nav > ul {
  background-color: #2f203c;
  margin-bottom: 12px;
  -moz-border-radius: 0 0 8px 8px;
  -webkit-border-radius: 0 0 8px 8px;
  border-radius: 0 0 8px 8px;
  padding: 8px 0 10px 0;
  margin-bottom: 20px;
}

#sub-nav h2 {
  border-bottom: 0;
  background-color: #6a37bc;
  -moz-border-radius: 12px 12px 0 0;
  -webkit-border-radius: 12px 12px 0 0;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}

#sub-nav li {
  list-style-type: none;
}

#sub-nav a, #sub-nav h2 {
  display: block;
  padding: 3px 20px;
}

#sub-nav a {
  font-size: 14px;
  line-height: 15px;
  transition-duration: 0.2s;
  transition-property: background-color, color;
}

#sub-nav a:hover {
  background-color: #543a60;
}

#sub-nav .toc-h3::before {
  content: "›";
  float: left;
  position: relative;
  left: 22px;
  margin-top: 2px;
}

#sub-nav .toc-h3 {
  font-size: 12px;
}
#sub-nav .toc-h3 a {
  padding-left: 32px;
}

/* Page Content styles */
/* ----------------------------------------------------------*/

.page-content {
  padding: 25px;
  -webkit-flex: 1 60%;
  flex: 1 auto;
  max-width: 820px;
  width: 60%;
  margin-left: auto;
  margin-top: 0;
  -webkit-order: 1;
  order: 1;
  background-color: #231a2b;
  -moz-border-radius: 0 0 20px 20px;
  -webkit-border-radius: 0 0 20px 20px;
  border-radius: 0 0 20px 20px;
}

/* Home styles */
/* ----------------------------------------------------------*/

.site-title {
  color: white;
  font-family: Dusty;
  font-size: 100px;
  text-align: center;
  margin-bottom: 0;
}

.site-title::first-letter {
  font-size: 80%;
}

.big-info {
  font-size: 125%;
  text-align: center;
  font-weight: bold;
}

.big-info + *:not(.big-info) {
  margin-top: 30px;
}

.home h1 { margin-bottom: 25px; }

.posts { list-style-type: none; }

.posts > li { margin-bottom: 30px; }

.posts .post-link {
  font-size: 24px;
  letter-spacing: -1px;
  line-height: 1.3;
}

.post-link {
  font-weight: 400;
}

.posts .post-date {
  display: block;
  font-size: 15px;
  color: #818181;
}

.pagination {
  text-align: center;
}

.pagination span, .pagination a {
  margin: 0 20px;
}

/* Post styles */
/* ----------------------------------------------------------*/

.post-header { margin: 10px 0 30px; }

.post-header h1 {
  font-size: 42px;
  letter-spacing: -1.75px;
  line-height: 1;
  font-weight: 300;
}

.post-header .meta, #patreon-footer, .note {
  font-size: 15px;
  color: #ad9fa3;
  margin-top: 10px;
  padding: 0 20px;
  font-style: italic;
}

.post-footer {
  font-size: 13px;
}

.post-content > * { margin: 20px 0; }

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  line-height: 1;
  font-weight: 300;
  margin: 40px 0 20px;
}

.post-content h2 {
  font-size: 32px;
  letter-spacing: -1.25px;
}

.post-content h3 {
  font-size: 26px;
  letter-spacing: -1px;
}

.post-content h4 {
  font-size: 20px;
  letter-spacing: -1px;
}

.post-content blockquote {
  border-left: 4px solid #e8e8e8;
  padding-left: 20px;
  font-size: 18px;
  opacity: .6;
  letter-spacing: -1px;
  font-style: italic;
  margin: 30px 0;
}

.post-content dd {
	padding: 1px 10px 8px 20px;
}

.post-content dt {
	font-weight: 600;
	padding: 0px 10px 2px 0px;
}

.post-content ul,
.post-content ol { padding-left: 20px; }

.post pre,
.post code,
.highlight code,
.highlight pre {
  border: 1px solid #7f75a1;
  background-color: #332249;
  padding: 8px 12px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  font-size: 15px;
  overflow: auto;
}

.post code {
  border-color: #493d71;
  padding: 1px 3px;
}

.post ul,
.post ol { margin-left: 1.35em; }

.post pre code {
  border: 0;
  padding-right: 0;
  padding-left: 0;
}

.timeline {
	margin-left: 7em;
}

.timeline .tl-date {
	position: relative;
	left: -9.5em;
	display: block;
	width: 8em;
	height: 0;
	text-align: right;
}

.timeline dd {
	border-left: 1px solid white;
	padding: 2px 10px 10px 14px;
}

.timeline dt {
	border-left: 6px solid white;
	font-weight: 700;
	padding: 1px 10px 2px 9px;
}

.timeline .tl-prehistory {
	border-left-color: rgba(255, 255, 255, 0.2);
}

.timeline .tl-old {
	border-left-color: rgba(255, 255, 255, 0.5);
}

.timeline .tl-future {
	border-left-color: rgba(255, 90, 120, 0.8);
}

.timeline p:not(:first-child) {
	margin-top: 0.8em;
}

.timeline dd.tl-prehistory, .timeline dd.tl-old {
	border-left-style: dashed;
}

.timeline dd.tl-future {
	border-left-style: dotted;
}

/* terminal */
.post pre.terminal {
  border: 1px solid #000;
  background-color: #d5d5e9;
  color: #FFF;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
}

.tag-list-item {
  list-style: none;
  display: inline;
  margin: 0 3px;
}

.tags {
  display: inline-block;
  margin-left: 0 !important; /* grumble */
}

.gallery, .gallery-caption, .inline-gallery figcaption {
  text-align: center;
}

.inline-gallery figure, .inline-gallery figcaption {
  break-inside: avoid-column;
}

.gallery img, .gallery picture {
  padding: 2px 4px;
  max-width: 720px;
  max-width: min(720px, 100% - 8px);
}

.gallery-caption {
  display: block;
  margin-top: -20px;
  font-size: 14px;
}

.inline-gallery figcaption {
  display: block;
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 10px;
}

.inline-gallery img {
  display: block;
  margin: auto;
  width: 100%;
  max-width: 720px;
  max-width: min(720px, 100% - 8px);
}

.hero, .hero-big, .superhero, .article-aside {
  display: block;
  margin: auto;
  margin-bottom: 10px;
  margin-top: 10px;
  text-align: center;
  max-width: 90%;
}

.superhero {
  width: calc(100% + 50px);
  max-width: calc(100% + 50px);
  margin: 10px -25px 20px -25px;
}

.home .hero-big {
  margin-right: 30px;
  float: left;
  clear: left;
  max-width: 280px;
}

.article-aside {
  margin-left: 30px;
  float: right;
  clear: right;
  max-width: 35%;
  font-size: 13px;
  display: block table;
}

.article-aside img {
  max-width: 100%;
  display: block;
  margin: auto;
  margin-bottom: 8px;
}

.youtube {
  border: none;
  margin: auto;
  display: block;
  max-width: 90%;
}

#donate {
  font-size: 13px;
  margin-top: 18px;
}

#donate p {
  margin-top: 2px;
}

.donate-links {
  color: #818181;
  font-size: 13px;
  text-align: center;
}

.readmore {
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

.readmore::before {
  content: "\203A";
  padding: 0 4px 0 6px;
}

.footnotes, .post-footer, #patreon-footer {
  clear: both;
}

.downloads {
  display: block;
  width: 100%;
  border-spacing: 0;
  list-style-type: none;
  margin-left: 0;
}

.downloads .download-name {
  font-weight: bolder;
  padding-right: 16px;
  display: block;
}

.downloads .download-size {
  font-size: 0.8em;
}

.downloads > li {
  padding: 3px 10px;
  border-bottom: 1px solid #bbb9c5;
  margin-right: 30px;
}

.downloads ul {
  -webkit-columns: 12em;
  -moz-columns: 12em;
  columns: 12em;
}

*:not(:hover) > .header-anchor {
  opacity: 0;
}

.header-anchor {
  margin-left: 0.5ch;
  transition-duration: 0.1s;
  transition-property: opacity;
}

/* Documentation styles */
/* ----------------------------------------------------------*/

.class-method dt, .class-member dd {
  letter-spacing: 0.2px;
}

.class-method dd,
.class-member dd,
.root-scope dd,
table.memory-domains,
table.scripting-constants,
table.register-list {
  padding: 8px 10px;
  border-top: none;
  -webkit-border-radius: 0 0 8px 8px;
  -moz-border-radius: 0 0 8px 8px;
  border-radius: 0 0 8px 8px;
  margin-bottom: 1em;
  margin-top: -3px;
  background-color: #2f203c;
}

table.memory-domains, table.scripting-constants, table.register-list {
  width: 100%;
}

table.memory-domains th, table.scripting-constants th, table.register-list th {
  text-align: left;
}

.class-method .function-parameters, .class-method .function-return {
  font-weight: normal;
  padding-left: 0.2em;
}

.scripting-constants .constant-name, a.scripting-constant, a.scripting-type {
  font-family: 'Source Code Pro', monospace;
  font-weight: bold;
}

tt,
pre,
code,
.scripting-type,
.scripting-constant,
td.memdomain-base,
td.memdomain-key,
td.register-name,
td.register-alias,
.root-scope dt {
  font-family: 'Source Code Pro', monospace;
}

.scripting-constants .constant-value {
  font-size: 85%;
  padding-left: 0.7em;
}

#section-constants {
  column-width: 14em;
}

#section-memdomains {
  column-width: 16em;
  column-count: 2;
}

#section-registers {
  column-width: 10em;
  column-count: 2;
}

#section-constants > div,
#section-memdomains > *,
#section-memdomains ul,
#section-register > *,
#section-registers ul {
  break-inside: avoid-column;
}

#section-constants h3, #section-memdomains h3, #section-registers h3 {
  font-size: 28px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 0px;
}

table.memory-domains td, table.register-list td {
  padding: 0.1em 0.3em;
}

.root-scope dt,
.class-method dt,
.class-member dt,
#section-constants h3,
#section-memdomains h3,
#section-registers h3 {
  background-color: #492d77;
  padding: 6px 10px 10px 10px;
  -webkit-border-radius: 12px 12px 0 0;
  -moz-border-radius: 12px 12px 0 0;
  border-radius: 12px 12px 0 0;
  font-size: 17px;
}

/* Syntax highlighting styles */
/* ----------------------------------------------------------*/

.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */

@media screen and (max-width: 680px) {

body {
  min-width: 560px;
}

.page-content {
  border-radius: 0;
  padding-right: 25px;
}

#sub-nav {
  -webkit-order: 2;
  order: 2;
  -webkit-flex: 1 100%;
  flex: 1 100%;
  margin-right: 0;
  -moz-border-radius: 0 0 20px 20px;
  -webkit-border-radius: 0 0 20px 20px;
  border-radius: 0 0 20px 20px;
  max-width: 100%;
  position: static;
}

#sub-nav li {
  display: inline-block;
}

#site-header {
  background-position: left -50px;
  min-height: 48px;
}

#site-title {
  min-width: 130px;
  max-width: 135px;
  width: 30%;
  padding-top: 8px;
}

#site-nav {
  max-width: calc(100vw - 140px);
  max-width: calc(max(100vw, 600px) - 140px);
  background-color: rgba(106, 53, 188, 0.85);
  min-height: 48px;
}

#site-nav .page-link {
  padding: 11px 5px;
  font-size: 20px;
  height: 22px;
}

.site-title {
	font-size: 60px;
}

.home .hero-big, .article-aside {
  float: none;
  margin-right: auto;
  margin-left: auto;
}

.gallery img, .gallery picture {
  padding: 2px 4px;
  max-width: 480px;
}

.article-aside {
  max-width: 80%;
}

body {
  font-size: 20px;
}

@media print {

#site-header, #footer-links {
	display: none;
}

html, body {
  background-color: white;
}

}
