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

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

body {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.7;
  color: #222;
  background: #fff;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Header */
header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

header h1 {
  font-size: 1.4rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

header h1 a {
  color: #222;
  text-decoration: none;
}

header h1 a:hover {
  text-decoration: underline;
}

nav {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #666;
}

nav a {
  color: #555;
  text-decoration: none;
  margin-right: 1.2rem;
}

nav a:hover {
  color: #222;
  text-decoration: underline;
}

/* Post list (homepage) */
.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 1.8rem;
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
}

.post-list .date {
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #888;
  white-space: nowrap;
  min-width: 7rem;
}

.post-list a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1rem;
}

.post-list a:hover {
  text-decoration: underline;
}

/* Post page */
article header {
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

article h1.post-title {
  font-size: 1.6rem;
  line-height: 1.3;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.post-meta {
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #888;
  margin-bottom: 2rem;
}

/* Typography */
.post-content h2 {
  font-size: 1.25rem;
  margin-top: 2.2rem;
  margin-bottom: 0.6rem;
  font-weight: bold;
}

.post-content h3 {
  font-size: 1.05rem;
  margin-top: 1.8rem;
  margin-bottom: 0.4rem;
  font-weight: bold;
}

.post-content p {
  margin-bottom: 1.2rem;
}

.post-content ul,
.post-content ol {
  margin: 0.8rem 0 1.2rem 1.5rem;
}

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

.post-content blockquote {
  border-left: 3px solid #ccc;
  padding-left: 1rem;
  color: #555;
  margin: 1.5rem 0;
  font-style: italic;
}

.post-content a {
  color: #1a1a1a;
}

.post-content a:hover {
  color: #444;
}

/* Code */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
  background: #f5f5f5;
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

pre {
  background: #f5f5f5;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border-radius: 3px;
  margin: 1.2rem 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

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

/* Images */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2.5rem 0;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #999;
}

footer a {
  color: #888;
}

footer a:hover {
  color: #444;
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #666;
  text-decoration: none;
}

.back-link:hover {
  color: #222;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
  html { font-size: 16px; }
  body { padding: 1.2rem 1rem 3rem; }

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