/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --text: #3d2b2b;
  --text-muted: #9e7a7a;
  --accent: #c0607a;
  --accent-hover: #a84d67;
  --bg: #fdf6f0;
  --bg-header: #fff8f5;
  --bg-code: #f5ebe6;
  --border: #edd8d0;
  --max-width: 720px;
  --font-sans: Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html { font-size: 18px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

/* Layout */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* White center column */
.site-column {
  max-width: var(--max-width);
  margin: 0 auto;
  background: #ffffff;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  min-height: 100vh;
}

.site-header,
.site-banner,
.page-content,
.site-footer {
  max-width: 100%;
}

/* Banner image */
.site-banner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 0;
  padding: 0;
  background: #ffffff;
}

.site-banner img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center 40%;
}

/* Header */
.site-header {
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.site-title:hover { color: var(--accent); }

.site-description {
  margin: 0.25rem 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--accent); }

/* Main content */
.page-content {
  padding-bottom: 4rem;
}

.page-content .wrapper {
  padding-top: 2.5rem;
}

/* Post list */
.post-list { list-style: none; padding: 0; margin: 0; }

.post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:last-child { border-bottom: none; }

.post-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.post-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.post-item h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-item h3 a:hover { color: var(--accent); }

.post-cats {
  margin: 0;
}

.cat-label {
  font-size: 0.75rem;
  background: var(--bg-code);
  padding: 0.15em 0.5em;
  border-radius: 3px;
  color: var(--text-muted);
  margin-right: 0.3rem;
}

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

.post-title {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
  line-height: 1.3;
}

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

.post-meta a { color: var(--accent); text-decoration: none; }

.post-tags { margin: 0; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
  text-decoration: none;
}

.tag:hover { color: var(--accent); }

/* Post content typography */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

.post-content h2 { font-size: 1.4rem; }
.post-content h3 { font-size: 1.2rem; }

.post-content p { margin: 0 0 1.25rem; }

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover { color: var(--accent-hover); }

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.post-content blockquote {
  border-left: 4px solid var(--border);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-content pre {
  background: var(--bg-code);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.post-content th { background: var(--bg-code); font-weight: 600; }

/* Post nav */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.post-nav a { color: var(--accent); text-decoration: none; }
.post-nav a:hover { text-decoration: underline; }

/* Page */
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.8rem; margin: 0; }
.page-content p { margin: 0 0 1.25rem; }
.page-content a { color: var(--accent); }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 0.5rem; }
.page-content li { margin-bottom: 0.15rem; line-height: 1.5; }
.page-content li p { margin: 0; }
.page-content h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.page-content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.page-content img { max-width: 100%; height: auto; border-radius: 4px; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.pagination a { color: var(--accent); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }
.page-info { color: var(--text-muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Headings */
.post-list-heading { font-size: 1.2rem; margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .post-title { font-size: 1.5rem; }
}
