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

body {
  margin: 0;
  font-family: Merriweather, serif;
  font-size: 16px;
  line-height: 1.6;
  color: #36393b;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Rubik, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em 0;
}

h1 {
  font-family: Merriweather, serif;
  font-size: 4em;
  margin: 0 0 1em 0;
}

h2 { margin: 1.6em 0 0 0; font-size: 1.8em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.4em; }
h5 { font-size: 1.3em; }
h6 { font-size: 1.2em; }

p, ul, ol {
  font-size: 1.3rem;
  line-height: 1.75em;
  margin: 1.2em 0;
}

ol, ul {
  padding-left: 2rem;
  -webkit-padding-start: 5%;
  -webkit-padding-end: 5%;
}

li { margin: 1rem 0; }
li p { margin-bottom: 0.5rem; margin-top: 0.5rem; }

a {
  color: inherit;
  transition: color linear .15s;
}

a:hover { color: #fd6378; }

p a {
  text-decoration: none;
  box-shadow: inset 0 -0.12em 0 #fd6378;
  transition: box-shadow .2s ease-in-out, color .2s ease-in-out;
}

p a:hover {
  box-shadow: inset 0 -1.5em 0 #fd6378;
  color: #FFF;
}

img { max-width: 100%; }

hr {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(253, 99, 120, .8), rgba(0, 0, 0, 0));
  border: 0;
  height: 2px;
  margin: 40px auto;
}

code {
  font-family: 'SF Mono', menlo, inconsolata, monospace;
  font-size: calc(1em - 2px);
  color: #555;
  background-color: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 2px;
}

pre {
  background-color: #272822;
  border-radius: 8px;
  margin: 1.2em 0;
  padding: 1em 1.2em;
  overflow-x: auto;
}

pre code {
  padding: 0;
  color: #f8f8f2;
  background-color: transparent;
  font-size: 0.9em;
  line-height: 1.5;
}

blockquote {
  border-left: 4px solid #cccccc;
  font-size: 1.4em;
  font-style: italic;
  margin: 2rem 0;
  padding-left: 2rem;
  padding-right: 2rem;
}

blockquote p { padding-bottom: 6px; }
blockquote footer { font-size: 1.1rem; text-align: right; }

figure {
  padding: 0; border: 0; font-size: 100%; font: inherit;
  vertical-align: baseline;
  margin: 0 0 3em 0;
}

table {
  border-collapse: collapse;
  font-family: Rubik, sans-serif;
  font-size: 1.125em;
  margin: 2em 0;
}

th { border-bottom: 2px solid #cccccc; padding: 0.4em 0.8em; }
td { padding: 0.4em 0.8em; }

.container {
  margin: 0 auto;
  max-width: 42em;
  width: 85%;
}

.content h1 { font-size: 3em; margin: 1em 0; }

/* Header */
.site-header {
  display: flex;
  margin: 0 auto;
  max-width: 1400px;
  padding: 2em;
  width: 100%;
  font-size: large;
}

.site-header .logo { width: 40px; height: 40px; }

.site-header nav {
  align-items: flex-end;
  display: flex;
  flex: 1;
  font-family: Rubik, sans-serif;
  font-weight: 700;
  justify-content: flex-end;
  text-transform: uppercase;
}

.site-header nav a {
  color: inherit;
  text-decoration: none;
  padding: 10px 5px;
  display: block;
  position: relative;
  margin-left: 20px;
  opacity: 0.7;
}

.site-header nav a.selected { opacity: 1; }

.site-header nav a::before {
  content: "";
  position: absolute;
  transition: transform 0.3s ease;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #aaa;
  transform: scaleX(0);
}

.site-header nav a:hover::before,
.site-header nav a.selected::before {
  transform: scaleX(1);
}

.site-header nav a.selected::before {
  background: #fd6378;
}

/* Footer */
.site-footer {
  color: #aaa;
  font-size: 1em;
  font-family: Rubik, sans-serif;
  margin: 1em auto;
  max-width: 1400px;
  padding: 1em 2em;
  text-align: center;
  width: 100%;
}

/* Bio */
.bio {
  align-items: center;
  display: flex;
}

.bio-pic {
  width: 100px;
  height: 100px;
  border-radius: 100px;
  border: 3px solid #fd6378;
  display: block;
  margin-right: 20px;
}

.bio p { font-size: 1.125rem; }

/* Home */
.home-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.home-intro-text {
  font-size: 1.2rem;
  line-height: 1.5;
}

.home-post-container {
  font-size: 1.2rem;
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 100%;
  flex-direction: column;
}

.home-post-container-title { padding-bottom: 28px; margin: 0; }

.home-post-links {
  padding-bottom: 20px;
  align-self: baseline;
  font-size: 0.8rem;
  text-decoration: none;
  justify-content: space-between;
  flex-direction: row;
}

.home-post-title { font-size: 1.2rem; }

/* Blog index */
.blog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.post-item-footer {
  font-family: Rubik, sans-serif;
  font-weight: 700;
}

.post-item-date {
  color: #aaa;
  text-align: left;
  text-transform: uppercase;
  margin-right: 16px;
}

/* Post page */
.post-header {
  text-align: center;
}

.post-header h1 { margin-bottom: 0.7em; }

.post-header p {
  color: #aaa;
  text-transform: uppercase;
  font-family: Rubik, sans-serif;
  font-weight: 600;
}

.post-header hr { min-width: 100px; width: 30%; }

/* TIL */
.til-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 50px;
}

.til-intro-text { font-size: 1.4rem; line-height: 1.5; }

.til-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.post-container {
  color: grey;
  display: flex;
  flex-direction: column;
  font-size: 14pt;
  margin: 5px;
  padding: 10px;
}

.post-link { color: black; }

.lucky-image { padding: 20px; }

/* Responsive */
@media (max-width: 1020px) {
  h1 { font-size: 3em; }
  .content h1 { font-size: 2.4em; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  p, ul, ol { font-size: 1.2rem; margin: 1em 0; }
}

@media (min-width: 768px) {
  .home-container { flex: 1 0 25%; }
  .home-post-container { flex: 1 0 25%; }
  .post-container { flex: 1 0 25%; }
}
