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

body {
  font-family: charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  line-height: 1.8;
  color: #242424;
  background: #fff;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 1.125rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Nav */
header {
  padding: 2rem 0 1.75rem;
  margin-bottom: 2.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #242424;
  text-decoration: none;
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #242424;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #1a8917;
}

/* Main */
main {
  min-height: 60vh;
}

/* Post list (index) */
h1 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.post-list time {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: #757575;
  font-size: 0.8rem;
  white-space: nowrap;
  min-width: 130px;
}

.post-list a {
  color: #242424;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.post-list a:hover {
  color: #1a8917;
}

/* Post */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.post-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: #757575;
  font-size: 0.85rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.category {
  background: #f2f2f2;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.78rem;
  color: #757575;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

.post-body,
.page-body {
  font-size: 1.25rem;
  line-height: 1.85;
  letter-spacing: -0.003em;
  word-break: break-word;
}

.post-body h2,
.page-body h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.75rem;
  line-height: 1.25;
}

.post-body h3,
.page-body h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
  line-height: 1.3;
}

.post-body p,
.page-body p {
  margin-bottom: 1.45rem;
}

.post-body img,
.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.post-body a,
.page-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.post-body a:hover,
.page-body a:hover {
  text-decoration-color: #242424;
}

.post-body blockquote,
.page-body blockquote {
  border-left: 3px solid #242424;
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  font-style: italic;
  color: #555;
}

.post-body ul,
.post-body ol,
.page-body ul,
.page-body ol {
  margin: 0 0 1.45rem 1.5rem;
}

.post-body strong,
.page-body strong {
  font-weight: 700;
}

/* Older posts by year */
.older-heading {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 3rem 0 1rem;
  color: #757575;
  letter-spacing: -0.01em;
}

.year-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.year-link {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #242424;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: background 0.15s, border-color 0.15s;
}

.year-link:hover {
  background: #f8f8f8;
  border-color: rgba(0, 0, 0, 0.2);
}

.year-link .count {
  font-weight: 400;
  color: #757575;
  font-size: 0.85rem;
}

/* Page */
article h1 {
  font-size: 2.5rem;
  margin-bottom: 1.75rem;
}

/* Comments */
.comments {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.comments h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.comment {
  margin-bottom: 1rem;
  padding: 1.1rem 1.25rem;
  background: #fafafa;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.65;
}

.comment-reply {
  margin-top: 0.75rem;
  margin-left: 1.5rem;
  background: #f4f4f4;
}

.comment-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.comment-meta strong {
  font-weight: 600;
}

.comment-meta time {
  color: #757575;
  font-size: 0.78rem;
}

.comment-body {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* 404 */
.not-found {
  text-align: center;
  padding: 4rem 0;
}

.not-found h1 {
  font-size: 5rem;
  font-weight: 800;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
}

.not-found p {
  font-size: 1.15rem;
  color: #757575;
  margin-bottom: 1.5rem;
}

.not-found a {
  color: #242424;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid #242424;
  padding-bottom: 1px;
}

.not-found a:hover {
  color: #1a8917;
  border-color: #1a8917;
}

/* Footer */
footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  margin-top: 4rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: #757575;
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 480px) {
  body {
    font-size: 1.05rem;
  }

  .post-list li {
    flex-direction: column;
    gap: 0.1rem;
  }

  .post-list time {
    min-width: auto;
  }

  .post-header h1,
  article h1 {
    font-size: 1.75rem;
  }

  .post-body,
  .page-body {
    font-size: 1.1rem;
  }
}
