:root {
  --red: #c5004a;
  --darkred: #7f0036;
  --lightgray: #e0e0e0;
  --gray: #c0c0c0;
  --darkgray: #333;
  --navy: #17050f;
  --blue: #082840;
  --white: #fff;
  --link: tomato;
  --notreallywhite: rgb(194, 194, 194);
  /*var(--link); */
}
* {
  box-sizing: border-box;
}
html,
body {
  padding: 0;
  margin: 0;
  font-family: -system-ui, -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  color: var(--darkgray);
  background-color: var(--white);
  color: var(--white);
  background-color: #000;
}

h1 {
  line-height: 1em;
}

p:last-child {
  margin-bottom: 0;
}
p,
.tmpl-post li,
img {
  max-width: 37.5em; /* 600px /16 */
}
p,
.tmpl-post li {
  line-height: 1.6;
}
main {
  min-height: calc(100vh - 130px);
}

main p {
  color: var(--notreallywhite);
}
a[href] {
  color: var(--link);
  text-decoration: none;
}
a[href]:visited {
  color: var(--link);
  text-decoration: none;
}
a[href]:hover {
  text-decoration: underline;
}

main,
.sidebar,
.footer {
  padding: 1rem;
}
main :first-child {
  margin-top: 0;
}
header {
  border-bottom: 1px dashed var(--lightgray);
}
/*
header:after {
  content: "";
  display: table;
  clear: both;
}*/

aside {
  background-color: #333;
  color: #fff;
  grid-column-start: 1;
}
table {
  margin: 1em 0;
}
table td,
table th {
  padding-right: 1em;
}

pre,
code {
  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;
  line-height: 1.5;
}
pre {
  font-size: 14px;
  line-height: 1.375;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  -moz-tab-size: 2;
  -o-tab-size: 2;
  tab-size: 2;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  padding: 1em;
  margin: 0.5em 0;
  background-color: #f6f6f6;
}
.highlight-line {
  display: block;
  padding: 0.125em 1em;
  text-decoration: none; /* override del, ins, mark defaults */
  color: inherit; /* override del, ins, mark defaults */
}

/* allow highlighting empty lines */
.highlight-line:empty:before {
  content: " ";
}
/* avoid double line breaks when using display: block; */
.highlight-line + br {
  display: none;
}

.highlight-line-isdir {
  color: #b0b0b0;
  background-color: #222;
}
.highlight-line-active {
  background-color: #444;
  background-color: hsla(0, 0%, 27%, 0.8);
}
.highlight-line-add {
  background-color: #45844b;
}
.highlight-line-remove {
  background-color: #902f2f;
}

.header {
  grid-area: header;
  background-color: var(--link);
  background-color: papayawhip;
}
span.prompt::after {
  content: "\220E";
  color: #000;
  animation-name: font;
  /* animation-duration: .6s; */
  animation-duration: 0.5s;
  /*animation-iteration-count: 10;*/
  animation-iteration-count: infinite;
  animation-direction: alternate;
  background-color: var(--link);
  font-size: 30px;
}
@keyframes font {
  from {
    font-size: 30px;
    color: var(--link);
  }
  to {
    font-size: 30px;
    color: #000;
  }
}
.home a:hover {
  text-decoration: none;
}
.home a:link,
.home a:visited {
  color: #000;
}

.main {
  grid-area: main;
}
.sidebar {
  grid-area: sidebar;
  border-top: 3px solid var(--link);
}
.sidebar img.profile {
  display: block;
  height: 60px;
  width: 60px;
  border-radius: 75px;
  background-size: cover;
  background-position: center center;
  margin: 0;
}
.sidebar p.profile {
  font-size: 0.6em;
  color: var(--link);
}
.sidebar a {
  color: paleturquoise;
  font-size: 0.6em;
}
.sidebar a[href]:visited {
  color: paleturquoise;
  font-size: 0.6em;
}
.sidebar ul ::marker {
  color: var(--link);
  font-size: 0.7em;
}

.footer {
  grid-area: footer;
  background-color: #111;
  font-size: 0.7em;
  text-align: center;
}

.container {
  display: grid;
  grid-template-columns: [first] 1fr [end];
  grid-template-rows:
    [row1start] 170px [row1end] auto [row2start] minmax(600px auto)
    [footer] 50px [lastline];
  grid-template-areas: "header" "main" "sidebar" "footer";
  grid-gap: 20px;
  gap: 10px;
  grid-column-start: span;
}

/* Header */
.home {
  padding: 0 1rem;
  float: left;
  margin: 1rem 0; /* 16px /16 */
  font-size: 1em; /* 16px /16 */
  line-height: 36px;
  background-color: var(--link);
}

.home :link:not(:hover) {
  text-decoration: none;
}

/* Nav */
.nav {
  padding: 0;
  list-style: none;
  float: left;
  margin-left: 1em;
}
.nav-item {
  display: inline-block;
  margin-right: 1em;
}
.nav-item a[href]:not(:hover) {
  text-decoration: none;
  color: #000;
}
.nav-item-active {
  font-weight: 700;
  text-decoration: underline;
}

/* Posts list */
.postlist {
  list-style: none;
  padding: 0;
  width: 100%;
}
.postlist-item {
  counter-increment: start-from -1;
}
.postlist-item:before {
  display: inline-block;
  pointer-events: none;
  content: "" counter(start-from, decimal-leading-zero) ". ";
  line-height: 100%;
  text-align: right;
}
.postlist-date,
.postlist-item:before {
  font-size: 0.6125em; /* 13px /16 */
  color: var(--gray);
}
.postlist-date {
  word-spacing: -0.5px;
  display: block;
}
.postlist-link {
  display: inline-block;
  padding: 0.25em 0.1875em; /* 4px 3px /16 */
}
a.postlist-link,
a.postlist-link:visited {
  color: #fff;
}
.postlist-item-active .postlist-link {
  font-weight: bold;
}
.tmpl-home .postlist-link {
  font-size: 1.1875em; /* 19px /16 */
  font-weight: 700;
  display: block;
  margin-top: 50px;
}
.postlist-intro {
  font-size: 0.8em;
  color: var(--notreallywhite);
}

/* Tags */
.tag {
  display: inline;
  vertical-align: text-top;
  text-transform: uppercase;
  font-size: 0.425em;
  padding: 2px 4px;
  margin-left: 0.8em; /* 8px /10 */
  background-color: var(--link);
  color: var(--white);
  border-radius: 0.25em; /* 3px /12 */
  text-decoration: none;
}
a[href].tag,
a[href].tag:visited {
  color: #fff;
}

/* Warning */
.warning {
  background-color: #ffc;
  padding: 1em 0.625em; /* 16px 10px /16 */
}
.warning ol:only-child {
  margin: 0;
}

/* Direct Links / Markdown Headers */
.direct-link {
  font-family: sans-serif;
  text-decoration: none;
  font-style: normal;
  margin-left: 0.1em;
}
a[href].direct-link,
a[href].direct-link:visited {
  color: transparent;
}
a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover > a[href].direct-link,
:hover > a[href].direct-link:visited {
  color: #aaa;
}

/* Reponsive Adjustment */

pre {
  width: 320px;
  height: 250px;
  overflow-x: scroll;
  overflow-y: scroll;
}

/*
@media (max-width:600px) {
  .container {
      grid-template-columns: 4fr 1fr;
  }
}

*/

@media (min-width: 768px) {
  .container {
    /* grid-template-columns: [first] 3fr [colstart] 2fr [end]; */
    grid-template-columns: [main-start] 5fr [main-end] auto [sidebar-start] 2fr [sidebar-end];
    grid-template-rows: [row1start] 80px [row1end] auto [footer] 50px [lastline];
    grid-template-areas:
      "header header header header  header"
      "main main main . sidebar"
      "footer footer footer footer footer";
    grid-gap: 10px;
    gap: 10px;
    grid-column-start: span;
  }

  /* Posts list */
  .postlist {
    list-style: none;
    padding: 0;
    width: 80%;
  }

  .sidebar img.profile {
    /*margin: 0 auto;*/
  }

  .main {
    grid-area: main;
    grid-column-start: main-start;
    grid-column-end: main-end;
  }

  .sidebar {
    grid-area: main;
    grid-column-start: sidebar-start;
    grid-column-end: sidebar-end;
  }

  pre {
    overflow: auto;
    width: initial;
    height: initial;
  }
}

@media (min-width: 1400px) {
  main {
    margin-left: 34%;
  }
}
