/* Markdown */
html {
  color: #232333;
  font-family: 'Roboto Mono', monospace;
  font-size: 15px;
  line-height: 1.6em;
}

* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

::selection {
  background: blue;
  color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-size: 1.2rem;
  margin-top: 2em;
}

h1::before { color: blue; content: '# '; }
h2::before { color: blue; content: '## '; }
h3::before { color: blue; content: '### '; }
h4::before { color: blue; content: '#### '; }
h5::before { color: blue; content: '##### '; }
h6::before { color: blue; content: '###### '; }

.header-link::before { display: none; }
.header-link a {
  text-decoration: none;
  border: none;
  color: blue;
  margin-right: 1ch;
}

p, li {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 18px;
  line-height: 1.77;
}

hr {
  border: 0;
  border-top: 3px solid blue;
  margin: 1em 0;
}

blockquote {
  border-left: 3px solid blue;
  color: #737373;
  margin: 0;
  padding-left: 1em;
}

a {
  border-bottom: 3px solid blue;
  color: inherit;
  text-decoration: none;
}
a:hover {
  background-color: blue;
  color: #fff;
}

ul {
  list-style: none;
  margin-left: 0;
  padding-left: 1.2em;
  position: relative;
}

ul li::before {
  content: "*";
  font-weight: bold;
  left: 0;
  position: absolute;
}

/* Images */
img, video {
  border: 3px solid #ececec;
  max-width: 100%;
}

.video-container { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; }

.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

figure {
  box-sizing: border-box;
  display: inline-block;
  margin: 0;
  max-width: 100%;
}

figure img {
  max-height: 500px;
}

figure h4 {
  font-size: 1rem;
  margin: 0;
  margin-bottom: 1em;
}
figure h4::before {
  content: '↳ ';
}

.attribution {
  color: #717171;
}

.expand {
  border-bottom: none;
  cursor: zoom-in;
}

.expand:hover {
  background-color: transparent;
}

/* Code blocks */
code {
  background-color: #f1f1f1;
  padding: .1em .2em;
}

pre {
  background-color: #ececec;
  line-height: 1.4;
  overflow-x: auto;
  padding: 1em;
}

.highlight pre ::selection {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

pre code {
  background-color: transparent;
  color: inherit;
  font-size: 100%;
  padding: 0;
}

/* Containers */
.content {
  margin-bottom: 2em;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  padding: 0 1ch;
  word-wrap: break-word;
}

/* Header */
header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 1em 0;
}

header .logo {
  font-size: 1.5rem;
}

/* Footer */
footer {
  margin-top: 3em;
}

/* Common */
.title h1 {
  margin-bottom: 0;
}

time {
  color: #757575;
}

/* Posts */
article .title {
  margin-bottom: 1em;
}

article a {
  border-bottom: 1px solid blue;
}

/* Timeline */
.event {
  display: flex;
  margin: 0.25em 0;
}
.event .date {
  background-color: blue;
  color: #fff;
  margin-right: 1ch;
  white-space: nowrap;
}

/* Lists */
.list {
  margin-top: 2em;
}

.list .title a {
  border: none;
}

.list .description a {
  border-bottom: none;
  color: blue;
}
.list .description a:hover {
  color: #fff;
}

.list h1 {
  margin-bottom: 0;
}

.list p {
  margin: 0;
}

.list-item {
  margin-bottom: 2em;
}

/* Expander */
.expander-content {
  overflow-y: hidden;
}

.expander button {
  background-color: #ececec;
  border: none;
  color: inherit;
  cursor: pointer;
  display: block;
  font-family: inherit;
  outline: none;
  padding: 10px;
  width: 100%;
}
.expander button:hover {
  background-color: #d8d8d8;
}

/* Callout */
.callout {
  background-color: blue;
  color: #fff;
  padding: 1em;
}

.callout p {
  font-family: 'Roboto Mono', monospace;
  font-size: 15px;
  margin: 0;
}

.callout a {
  border-bottom: 3px solid #fff;
}

.callout a:hover {
  background-color: #fff;
  color: blue;
}

.callout ::selection {
  background: #fff;
  color: blue;
}

/* Asterisk */
.asterisk {
  color: blue;
}

.asterisk-text {
  background-color: white;
  border: 3px solid blue;
  color: #232333;
  display: none;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  margin-left: -10px;
  margin-top: -10px;
  max-width: 200px;
  padding: 0.5em 1em;
  position: absolute;
}

.asterisk-text::before {
  color: blue;
  content: '* ';
}

.asterisk:hover .asterisk-text {
  display: inline;
}

/* Incontext */
.view-in-context {
  position: relative;
}

.view-in-context-link {
  border: none;
  bottom: 0;
  color: white;
  display: none;
  position: absolute;
  right: 0;
}

.view-in-context:hover .view-in-context-link {
  display: block;
}

.view-in-context-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Table of contents */
.tableofcontents a {
  border: none;
}

@media screen and (min-width: 600px) {
  figure {
    padding: 0 40px;
  }
}
