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

html {
  font-size: 18px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.7;
}

.container {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */

header {
  padding: 60px 0 48px;
}

.site-title {
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #111;
  text-decoration: none;
}

.site-title:hover {
  color: #555;
}

/* Main */

main {
  flex: 1;
}

/* Post list */

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  padding: 20px;
  margin: 0 -20px;
  border-radius: 12px;
  transition: background 0.15s;
}

.post-list li:hover {
  background: #f7f7f7;
}

.post-list time {
  font-size: 0.8rem;
  color: #999;
  letter-spacing: 0.02em;
}

.post-list a.post-link {
  color: #111;
  text-decoration: none;
  font-size: 1.05rem;
}

.post-list a.post-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.post-list a.post-link:hover {
  color: #555;
}

.post-excerpt {
  font-size: 0.9rem;
  color: #777;
  margin-top: 4px;
  line-height: 1.5;
}

.post-read {
  margin-top: 10px;
  pointer-events: none;
}

.post-list li:hover .post-read {
  color: #111;
}

.post-list li:hover .post-read .btn-label {
  text-decoration-color: #111;
}

/* Post */

.post-header {
  margin-bottom: 40px;
}

.post-header h1 {
  font-size: 1.6rem;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 8px;
}

.post-header time {
  font-size: 0.8rem;
  color: #999;
}

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

.post-content p {
  margin-bottom: 1.4em;
}

.post-content h2,
.post-content h3 {
  font-weight: normal;
  margin: 2em 0 0.6em;
}

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

.post-content h3 {
  font-size: 1rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}

.post-content li {
  margin-bottom: 0.3em;
}

.post-content a {
  color: #111;
}

.post-content blockquote {
  margin: 2em 0;
  padding: 0 1.4em;
  border-left: 3px solid #111;
  color: #333;
  line-height: 1.6;
}

.post-content blockquote p {
  font-size: 1.05rem;
  font-style: italic;
}

.post-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  background: #f5f5f5;
  padding: 2px 5px;
  border-radius: 2px;
}

.post-content pre {
  background: #f5f5f5;
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 1.4em;
  border-radius: 3px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Link button component
   Usage: <a href="#" class="btn">
            <span aria-hidden="true">←</span>
            <span class="btn-label">Link text</span>
          </a>
   Icon can go left or right — only .btn-label gets underlined. */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.btn .btn-label {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #ccc;
  transition: text-decoration-color 0.15s;
}

.btn:hover {
  color: #111;
}

.btn:hover .btn-label {
  text-decoration-color: #111;
}

.btn-muted {
  color: #999;
}

/* Back link */

.back-link {
  margin-top: 48px;
}

/* Footer */

footer {
  padding: 48px 0 40px;
  border-top: 1px solid #eee;
  margin-top: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #999;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #999;
}
