/* ==== Global Reset ==== */
*,
*:after,
*:before {
  box-sizing: border-box;
  background-color: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* ==== Base ==== */
body {
  font-family: system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  font-size: 1rem;
  color: #e5e5e5;
  background-color: #121212;
}

/* ==== Links ==== */
a {
  color: #8ab4f8;
  text-decoration-skip-ink: auto;
  text-decoration: underline;
}
a:hover {
  color: #aecbfa;
}

/* ==== Text Elements ==== */
pre {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #1e1e1e;
  border-radius: 4px;
}

code {
  background: #2a2a2a;
  color: #e6db74;
  padding: 0.2rem 0.3rem;
  border-radius: 3px;
}

pre code {
  background: none;
  color: #f8f8f2;
}

.post p {
  margin: 0.5rem 0;
}

.post h1,
.post h2,
.post h3,
.post h4 {
  margin: 1rem 0;
  color: #f1f1f1;
}

.post h2:first-child,
.project h2:first-child,
.photo h2:first-child {
  margin-top: 0;
}

.meta {
  margin: 2rem 0;
  color: #aaa;
}

img {
  max-width: 100%;
  border-radius: 4px;
}

hr {
  background: #333;
  height: 1px;
  border: 0;
}

/* ==== Header & Navigation ==== */
header {
  flex-basis: 10rem;
  flex-grow: 1;
  position: relative;
  padding: 1rem;
}

header a {
  text-decoration: none;
  color: #e5e5e5;
}

header a:hover {
  color: #fff;
}

header li {
  margin-bottom: 0.2rem;
  text-align: right;
  margin-right: 2rem;
}

header a.active {
  font-weight: bold;
  color: #fff;
}

header ul {
  list-style: none;
  border-right: 1px solid #333;
}

/* ==== Layout ==== */
main {
  display: flex;
  flex-wrap: wrap;
  max-width: 60rem;
  margin: 2rem auto;
  padding: 1rem;
}

section {
  flex-basis: 0;
  flex-grow: 999;
  min-width: 70%;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

/* ==== Typography ==== */
h1,
h2,
h3,
h4,
h5 {
  line-height: 1.2;
  margin: 1rem 0;
  font-weight: 600;
  color: #f1f1f1;
}

section h1:first-child {
  margin-top: 0;
}

strong,
b {
  font-weight: bold;
  color: #fff;
}

blockquote {
  font-style: italic;
  border-left: 5px solid #444;
  padding-left: 1rem;
  color: #ccc;
}

/* ==== Lists & Posts ==== */
.posts ul,
header ul,
.photos ul {
  list-style: none;
}

.posts li {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.posts li a,
.posts li div,
.projects li a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  color: #e5e5e5;
}

.posts li a:hover {
  color: #8ab4f8;
}

.posts li time,
.projects li time {
  padding-left: 1rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #999;
}

/* ==== Photos ==== */
.photos li {
  margin-bottom: 1.5rem;
}

.photo picture,
.project picture {
  margin-bottom: 0.5rem;
}

figcaption {
  font-size: smaller;
  color: #aaa;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}


/* ==== Responsive ==== */
@media screen and (max-width: 45rem) {
  header li {
    display: inline;
    margin-right: 1rem;
  }

  .logo {
    padding-bottom: 1rem;
  }

  header ul {
    border-bottom: 1px solid #333;
    padding-bottom: 2rem;
  }

  nav ul {
    border-right: 0;
  }

  .photos ul {
    margin-top: 0.5rem;
  }
}