/* ----------------------------------------
   Reset & base
---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
  color: #111;
  background: #fff;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ----------------------------------------
   Typography
---------------------------------------- */
h1, h2, h3, h4 {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin-bottom: 1.25rem; }

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { opacity: 0.6; }

blockquote {
  border-left: 2px solid #ccc;
  padding-left: 1rem;
  color: #555;
  margin: 1.5rem 0;
}

pre {
  background: #f4f4f4;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.88em;
  background: #f4f4f4;
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

pre code {
  background: none;
  padding: 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li { margin-bottom: 0.25rem; }

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
}

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2.5rem 0;
}

/* ----------------------------------------
   Header
---------------------------------------- */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.site-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

header nav {
  display: flex;
  gap: 1.25rem;
}

header nav a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
  color: #555;
}

header nav a:hover {
  color: #111;
  opacity: 1;
}

/* ----------------------------------------
   Post list (homepage & list pages)
---------------------------------------- */
.posts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.posts article time {
  display: block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.2rem;
}

.posts article h2 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 0.3rem;
}

.posts article h2 a {
  text-decoration: none;
}

.posts article h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 1;
}

.posts article p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0;
}

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

.post-header time {
  display: block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.post-header h1 {
  margin-top: 0;
}

.post-body {
  margin-top: 1.5rem;
}

.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-footer a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #888;
  text-decoration: none;
}

.post-footer a:hover { color: #111; opacity: 1; }

/* ----------------------------------------
   Pagination
---------------------------------------- */
.pagination {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
}

.pagination a { text-decoration: none; }

/* ----------------------------------------
   Footer
---------------------------------------- */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #aaa;
}
