:root {
  --orange: #ea580c;
  --orange-dark: #c2470a;

  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --border: #e5e7eb;
  --bg: #ffffff;

  --max-width: 720px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
}

/* ── Nav ── */

.site-nav {
  background: var(--orange);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-links .icon-link {
  display: flex;
  align-items: center;
}

/* ── Main ── */

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  letter-spacing: -0.03em;
}

/* ── Post list ── */

.posts-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-thumb {
  flex-shrink: 0;
}

.post-thumb img {
  width: 144px;
  height: 96px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.post-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}

.post-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s;
}

.post-title:hover {
  color: var(--orange);
}

.post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.post-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.1rem;
}

.post-read-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--orange);
  text-decoration: none;
  margin-top: 0.4rem;
  display: inline-block;
  transition: color 0.15s;
}

.post-read-more:hover {
  color: var(--orange-dark);
}

/* ── Pagination ── */

.pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.15s;
}

.pagination a:hover {
  color: var(--orange-dark);
}

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2rem;
}

/* ── Post article page ── */

.post-article {
  max-width: 65ch;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-heading {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--text-primary);
}

.post-meta {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-content p {
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
}

.post-content h2 {
  margin-top: 2.5rem;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
}

.post-content h3 {
  margin-top: 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.post-content h4 {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.post-content li {
  margin-top: 0.4rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
}

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

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

.post-content blockquote {
  border-left: 3px solid var(--orange);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.75rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content blockquote p {
  margin-top: 0;
}

.post-content code {
  background: #f3f4f6;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
}

.post-content pre {
  background: #f3f4f6;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.75rem 0;
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.75rem 0;
}

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

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--orange-dark);
}
