:root {
  --background: hsl(45,40%,95%);
  --foreground: hsl(0,0%,28%);

  --icon-size: 1.5em;
}

:root {
  font-family: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 62.5%;
}

body {
  font-size: 2em;
}
body,
p,
h1,
h2,
h3,
h4 {
  line-height: 1.5em;
}


* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--background);
  color: var(--foreground);
}

.github {
  left: .5em;
  top: .5em;
  position: absolute;
  transition: opacity 1s ease;
  transform: scale(0.4);
  opacity: 0.75;
}
.github:hover {
  opacity: 1;
}

blockquote {
  border-left: 0.5rem solid hsla(30,5%,60%,0.3);
  font-size: 1.5em;
  margin: 0 auto;
  max-width: 100rem;
  padding-left: 2em;
}
.smiley {
  display: block;
  margin: 0 auto;
  transform: translateX(-5vw) translateY(-25%);
  margin-bottom: 5em;
}

#content {
  display: grid;
  grid-template-areas: "toc"
                       "title"
                       "subtitle"
                       "main";
  grid-template-rows: 2vh 48vh 50vh auto;
}

main {
  grid-area: main;
  margin: 0 auto;
  padding: 0 1vw;
  position: relative;
  width: 95vw;
}

.outline-2:last-child {
  background: var(--foreground);
  color: var(--background);
  margin-top: 3em;
  padding: 3em;
}
.outline-2:last-child h2 {
  background: transparent;
}

.title {
  font-size: 14vh;
  grid-area: title;
  text-align: center;
}

#content > p {
  font-size: 2em;
  line-height: 1.5em;
  max-width: 90rem;
  grid-area: subtitle;
  text-align: center;
  margin: 0 auto;
  padding: 1em;
}

#table-of-contents {
  grid-area: toc;
}
#table-of-contents ul {
  display: flex;
  right: 0;
  position: absolute;
  max-width: 80rem;
  width: 100%;
}
#table-of-contents li {
  flex: 1;
  text-align: center;
}
#table-of-contents a {
  color: var(--foreground);
  font-size: 0.8em;
  text-transform: uppercase;
}
#table-of-contents a::after {
  background: var(--foreground);
  border-radius: 1.5px;
  content: " ";
  display: block;
  height: 3px;
  opacity: 0;
  transition: opacity 1s ease;
  width: 100%;
  will-change: opacity;
}
#table-of-contents a:hover::after {
  opacity: 1;
}
#table-of-contents h2 {
  display: none;
}

table {
  border-color: hsl(0,0%,95%);
  margin-bottom: 2em;
  width: 100%;
}
table sub {
  all: unset;
}
table sub::before {
  display: inline;
  content: "_";
}
th {
  text-align: left;
}
td + td {
  width: 70%;
}

a {
  color: hsl(100,40%,50%);
  text-decoration: none;
}

ul {
  list-style: none;
  padding-left: 0;
}
li {
  display: inline-block;
  padding: 1.5rem;
}

h1,
h2,
h3,
h4 {
  margin-top: 2em;
}

h2 {
  background: var(--background);
  border-bottom: 0.5px solid hsl(0,0%,90%);
  position: sticky;
  top: -1px;
  width: 100%;
  margin: 0;
  padding: 1em 0;
  z-index: 10;
}

.outline-2 {
  max-width: 80rem;
  margin: 0 auto;
  position: relative;
}
.outline-3 {
  max-width: 100vw;
  overflow-x: auto;
}
.figure {
  position: absolute;
  left: -9rem;
}

.org-src-container {
  overflow: auto;
}

pre.src {
  border: none;
  box-shadow: none;
  margin: 0;
}

.org-string {
  color: #77aa71;
}

.org-comment {
  color: #c57a6d;
}

.shell::before {
  background: url('../images/shell.svg');
}
.git::before {
  background: url('../images/git.svg');
}
.tmux::before {
  background: url('../images/tmux.svg');
}

.shell::before,
.git::before,
.tmux::before {
  background-size: var(--icon-size) var(--icon-size);
  content: ' ';
  display: block;
  height: var(--icon-size);
  position: absolute;
  transform: translateX(-150%);
  width: var(--icon-size);
}

@media screen and (max-width: 700px) {
  blockquote {
    font-size: 1.2em;
  }
  h2 {
    font-size: 1em;
  }
  .smiley {
    transform: translateY(0);
  }
  #table-of-contents {
    font-size: 4vw;
  }
  #content > p {
    font-size: 4vh;
  }
  .github {
    top: 4em;
  }
  .github img {
    width: 25vw;
  }
  .shell::before,
  .git::before,
  .tmux::before {
    right: 0;
    transform: translateX(0);
  }
}
