/* resets */

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
a,
p,
span,
em,
small,
strong,
sub,
sup,
mark,
del,
ins,
strike,
abbr,
dfn,
blockquote,
q,
cite,
code,
pre,
ol,
ul,
li,
dl,
dt,
dd,
div,
section,
article,
main,
aside,
nav,
header,
hgroup,
footer,
img,
figure,
figcaption,
address,
time,
audio,
video,
canvas,
iframe,
details,
summary,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
  margin: 0;
  padding: 0;
  border: 0;
}

article,
aside,
footer,
header,
nav,
section,
main {
  display: block;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

ol,
ul {
  list-style: none;
}

img,
video {
  max-width: 100%;
}

img {
  border-style: none;
}

/* colors */

:root {
  --fg-color: #333333;
  --fg-color-light: #666666;
  --fg-color-lightest: #999999;

  --bg-color: #f0f3f3;
  --border-color: #dadddd;

  --emphasis-color: #00ff00;
  --emphasis-bg-color: #00ff00;
}

/* typography */

html {
  font-size: 100%;
}

body {
  color: var(--fg-color);
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

a,
a:visited {
  color: inherit;
  text-decoration: none;
}

/* general structure */

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

.column {
  width: 100%;
  margin: 0 auto;
  max-width: 880px;
  padding: 0 40px;
}

/* header */

.header {
  padding: 20px 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 300;
  font-size: 1.8rem;
  border-bottom: 1px solid var(--border-color);
}

.header a,
.header a:visited {
  color: inherit;
}

.header .active,
.header a:hover {
  color: var(--fg-color);
}

.brand {
  float: left;
}

.brand span {
  font-weight: bold;
}

.nav {
  text-align: right;
}

.nav li {
  display: inline-block;
  margin-left: 4rem;
  font-size: 1.4rem;
  color: var(--fg-color-lightest);
}

.nav .nav-icon {
  display: none;
}

/* main (shared) */

.main {
  flex: 1;
  padding: 40px 0;
  font-family: "Roboto Mono", monospace;
}

.main a {
  box-shadow: inset 0 -6px 0 var(--emphasis-bg-color);
}

.main a:hover {
  background: var(--emphasis-bg-color);
}

.main h1,
.main h2,
.main h3,
.main h4 {
  margin: 0 0 0.5rem 0;
  font-family: "Roboto Mono", monospace;
  font-weight: 700;
}

.main h1 {
  margin: 0 0 2rem 0;
  font-size: 2.5rem;
  background: linear-gradient(90deg, var(--fg-color) 9%, transparent 9%);
  background-size: 100% 2px;
  background-position: 0% 100%;
  background-repeat: no-repeat;
}

.main h2 {
  font-size: 2rem;
}

.main h3,
.main h4 {
  font-size: 1.2rem;
}

.main p,
.main ul,
.main ol,
.main blockquote,
.main pre {
  margin: 0 0 2rem 0;
}

/* lists */

.list li {
  margin-bottom: 0.4rem;
}

.list li time {
  float: right;
  margin-left: 0.5rem;
  color: var(--fg-color-light);
}

/* article */

.article ul {
  margin-left: 1rem;
  list-style: disc;
}

.article ul ul {
  list-style: circle;
}

.article ol {
  margin-left: 2rem;
  list-style: decimal;
}

.article ol ol {
  list-style: lower-latin;
}

.article li p {
  margin-bottom: 0.4rem;
}

.article img {
  display: block;
  margin: 0 auto;
}

.article table {
  display: block;
  margin: 0 auto 2rem auto;
  white-space: nowrap;
  overflow-x: auto;
}

.article th,
.article td {
  padding: 0 5px;
}

.article th + th,
.article td + td {
  padding: 0 5px 0 30px;
}

.article th {
  font-weight: bold;
  border-bottom: 1px solid var(--fg-color-light);
}

.article time {
  font-size: 0.8rem;
  color: var(--fg-color-light);
}

.article pre {
  padding: 5px 10px;
  overflow-x: auto;
}

.article code {
  display: inline-block;
  padding: 1px 4px;
  word-break: break-all;
  font-family: "Roboto Mono", monospace;
  font-size: 0.8rem;
}

.article pre code {
  display: inline;
  padding: 0;
  word-break: inherit;
}

.article blockquote {
  padding-left: 1rem;
  color: var(--fg-color-light);
  border-left: 6px solid var(--bg-color);
}

.article hr {
  border: 2px 0 0 0;
  border-style: solid;
  border-color: var(--fg-color);
}

/* footer */

.footer {
  padding: 30px 0;
  color: var(--fg-color-light);
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
}

.footer a {
  box-shadow: inset 0 -6px 0 var(--emphasis-bg-color);
}

.footer a:hover {
  background: var(--emphasis-bg-color);
}

.footer-nav {
  margin: 0 -1rem 2rem 0;
}

.footer-nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.footer-nav li {
  flex: 1 0 calc(100% / 3);
  max-width: calc(100% / 3);
  padding-right: 1rem;
  padding-bottom: 1rem;
}

.footer-nav li a {
  font-family: "Roboto Mono", monospace;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--fg-color);
}

.footer-nav li span {
  display: block;
}

.footer-note {
  float: left;
}

.footer-icons {
  float: right;
  font-size: 1.6rem;
  margin-top: -0.5rem;
}

.footer-icons li {
  display: inline-block;
  margin-left: 1.5rem;
}

.footer-icons a {
  color: var(--fg-color-lightest);
  box-shadow: none;
}

.footer-icons a:hover {
  color: var(--fg-color-light);
  background: none;
}

/* media queries */

@media only screen and (max-width: 600px) {
  .nav ul {
    position: relative;
    text-align: left;
  }
  .nav li {
    display: none;
  }
  .nav .nav-icon {
    display: inline-block;
    position: absolute;
    top: 0.4rem;
    right: 0;
  }

  .nav .responsive {
    padding-top: 3.5rem;
  }
  .nav .responsive li {
    display: block;
    clear: left;
    margin: 0;
    text-align: left;
  }
  .nav .responsive .nav-icon a {
    color: var(--fg-color);
  }

  .list li time {
    display: block;
    float: none;
    margin: 0;
  }
  .list li time::after {
    content: ":";
  }

  .footer-nav li {
    flex: 1 0 calc(100%);
    max-width: calc(100%);
  }

  .footer-note {
    margin-bottom: 1rem;
  }
  .footer-icons {
    clear: left;
    float: none;
    margin: 0;
  }
  .footer-icons li {
    margin-left: 0;
    margin-right: 1.5rem;
  }
}
