@import "code-light.css" (prefers-color-scheme: light);
@import "code-dark.css" (prefers-color-scheme: dark);

@media (prefers-color-scheme: light) {
    :root {
        --background: #FFFFFF;
        --background-dim: #f5f7f9;

        --foreground: #2B303A;
        --foreground-dim: #723F16;
        --foreground-heavy: #191C22;

        --primary-color: #333; /*#375287;*/
        --primary-color-light : #ccc;
        --primary-color-light-light: #dedede;
        
        --alternate-color: #c60;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #2B363B;
        --background-dim: #2F3C42;

        --foreground: #f0f2f3;
        --foreground-dim: #d5d5d5;
        --foreground-heavy: #f2f4f5;

        --primary-color: #A1C5FF;
        --primary-color-light: #ccc;
        --primary-color-light-light: #dedede;

        --alternate-color: #c60;
    }
}


html {
  font-size: 18px;
  font-family: "freight-sans-pro", Geneva, Verdana, sans-serif;
  border-top: var(--alternate-color) solid 5px;
}

body {
  margin: 0 auto;
  max-width: 50rem;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  padding: 0rem 1rem;
}


aside {
    font-size: smaller;
    font-style: italic;
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
    color: var(--foreground-heavy);
}


a {
    text-decoration: none;
    color: var(--foreground-dim);
}

a:hover, header a:hover {
    color: var(--alternate-color);
}

h2 a {
    color: var(--foreground);
}

main a[href*="//"] {
  background: transparent url('/aoutside.gif') right center no-repeat;
  padding-right: 10px;
}

main a {
  background: none;
  padding-right: 0px;
}


a img {
  margin-right: -10px;
  vertical-align: bottom;
}


nav {
  float: right;
}



nav ul {
  list-style: none;
}

nav li {
  display: inline;
}

nav li + li:before {
  content: " · ";
  margin: 0 0.5ex;
}

article header {
    display: flex;
    flex-direction: row;
    margin: 1rem 0;
}

article header time {
    white-space: nowrap;
    color: var(--foreground);
    font-style: italic;
    flex: 0 0 12ex;
}

article header div h2,
article header h2,
article header p {
    font-size: 1rem !important;
    display: inline;
}

main h2:first-of-type {
  font-size: 2rem;
}


code,
pre {
  background: var(--background-dim);
  border-radius: 0.3rem;
  font-family: monospace;
}

pre {
  padding: 1rem;
  border-left: 2px solid var(--primary-color);
  overflow: auto;
}

code {
  padding: 0.1rem 0.2rem;
}

/* reset the padding for code inside pre */
pre code {
  padding: 0;
}

blockquote {
  background: var(--background-dim);
  border-radius: 0 0.3rem 0.3rem 0;
  font-style: italic;
  border-left: 2px solid var(--primary-color);
  margin: 0;
  padding: 1rem;
}

/* reset the margin for p inside blockquotes */
blockquote p {
  margin: 0;
}

/* Add spacing between paragraphs in blockquotes to simulate blank lines */
blockquote p + p {
  margin-top: 1rem;
}

body > header {
  padding: 2rem 0;
}

body footer {
  border-top: 1px var(--alternate-color) solid;
  margin: 3rem 0;
  font-size: smaller;
}

header nav {
   display: flex;
   flex-direction: row;
   justify-content: space-between;
}

header h1 {
  margin: 0 auto;
  color: var(--primary-color);
  font-size: 3rem;
}

header h2 {
  display: inline;
  font-size: 1.2rem;
}

#fixedlogo {
  position: fixed;
  right: 15px;
  top: 15px;
  width: 40px;
  height: 40px;
}

.subtitle {
  font-style: italic;
    font-weight: lighter;
    color: #aaa;
}

.title, .title a {
  color: var(--primary-color-light);
}

.pam { padding: 20px;}
.ptm { padding-top: 20px; }
.pbl { padding-bottom: 30px; }
.mtl { margin-top: 30px; }
.mbl { margin-bottom: 30px; }

.left {float: left;}
img.left {
  margin-right: 1rem;
  padding-right: 1rem;
}

.right {
  float: right;
  padding-left: 2rem;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #fff2e5;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:nth-child(odd) {
    background-color: #ffffff;
}

.alternate-color { color: var(--alternate-color); }
.light { color: var(--primary-color-light);}
.lightlight { color: var(--primary-color-light-light);}

.iframe-container {
  position: relative;
  padding-bottom: 56.25%;
  /* Ratio 16:9 ( 9 / 16 * 100% ) */
  height: 0;
  overflow: hidden;
  margin: 0.1rem;
}

.iframe-container iframe,
.iframe-container object,
.iframe-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
