:root {
  --bg: #ffffff;
  --text: #515151;
  --heading: #2b2b2b;
  --muted: #aaaaaa;
  --link: #268bd2;
  --border: #eeeeee;
  --sidebar-width: 200px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

/* Layout */
.layout {
  display: flex;
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex: none;
  padding: 3rem 1.5rem 2rem 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  padding: 3rem 2rem 4rem;
  min-width: 0;
}

/* Sidebar */
.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 2rem;
  display: block;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.sidebar nav a {
  color: var(--muted);
  font-weight: 300;
  font-size: 1rem;
}

.sidebar nav a:hover {
  color: var(--link);
}

.sidebar-newsletter {
  margin-top: auto;
  padding-top: 1.5rem;
}

.sidebar-newsletter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sidebar-newsletter form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-newsletter input[type="email"] {
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}

.sidebar-newsletter button {
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--heading);
  border-radius: 4px;
  background: var(--heading);
  color: var(--bg);
  cursor: pointer;
}

.sidebar-newsletter button:hover {
  opacity: 0.85;
}

.colophon {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 1.5rem 0 0;
}

/* Page title (category pages) */
.page-title {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--heading);
  margin: 0 0 1.5rem;
  text-transform: capitalize;
}

/* Entry list (index + category pages) */
.entry-list {
  display: flex;
  flex-direction: column;
}

.entry {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.entry:last-child {
  border-bottom: none;
}

.entry-title {
  display: block;
  color: var(--link);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.entry-title:hover {
  text-decoration: underline;
}

.entry-date {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

/* Posts */
.post h1,
h1 {
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--heading);
  margin: 0 0 0.25rem;
  font-weight: 400;
}

/* Books page */
.books-intro {
  margin-bottom: 1rem;
}

.books-intro blockquote {
  margin: 1.25rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-style: italic;
}

.book {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  overflow: auto;
}

.book-cover {
  float: left;
  width: 110px;
  height: auto;
  margin: 0.3rem 1.4rem 0.8rem 0;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.book-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.4;
}

.book-title a {
  color: var(--link);
}

.book-title a:hover {
  text-decoration: underline;
}

.book .entry-date {
  margin: 0.15rem 0 0.6rem;
}

.book-review p {
  margin: 0 0 1rem;
}

/* Landing image (homepage) */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.landing-caption {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0;
}

.meta a {
  color: var(--muted);
}

.meta a:hover {
  color: var(--link);
}

.post img {
  max-width: 100%;
}

.post p {
  margin: 0 0 1.1rem;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-style: italic;
}

code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.9em;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* About page prose */
.content h1 {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 700px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.75rem 1.25rem 1.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.25rem;
  }

  .site-title {
    margin-bottom: 0;
    margin-right: auto;
    flex: 1 0 100%;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 0;
  }

  .sidebar-newsletter {
    margin-top: 1rem;
    flex: 1 0 100%;
  }

  .sidebar-newsletter form {
    flex-direction: row;
  }

  .colophon {
    flex: 1 0 100%;
    margin-top: 1rem;
  }

  .content {
    padding: 2rem 1.25rem 3rem;
  }
}
