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

/* Body */
body {
  font-family: 'Noto Serif JP', serif;
  background: #f5f0e8;
  color: #2c2c2c;
  line-height: 1.9;
  font-size: 16px;
}

/* Centered single-column layout */
header, main, footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Site header */
header {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #d4c9b0;
  margin-bottom: 3rem;
}

nav {
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c2c2c;
  text-decoration: none;
}

nav a {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
}

nav a:hover { color: #2c2c2c; }
nav a:focus { outline: 2px solid #8b7355; outline-offset: 2px; }

/* Post list (homepage and tag pages) */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.post-summary h2 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.post-summary h2 a {
  color: #2c2c2c;
  text-decoration: none;
}

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

.post-summary p {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Meta line: date + tag pills */
.meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #888;
}

time { letter-spacing: 0.02em; }

/* Tag pills */
.tag {
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 1px 7px;
  color: #888;
  text-decoration: none;
  font-size: 0.75rem;
}

.tag:hover,
.tag:focus {
  border-color: #8b7355;
  color: #5c4a32;
  outline: none;
}

/* Single post */
.post-header {
  border-bottom: 1px solid #d4c9b0;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.post h1 {
  font-size: 1.6rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* Post body */
.content p { margin-bottom: 1.2em; }

.content h2 {
  font-size: 1.2rem;
  margin: 2em 0 0.75em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid #d4c9b0;
}

.content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
}

.content ul,
.content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.content li { margin-bottom: 0.4em; }

.content blockquote {
  border-left: 3px solid #d4c9b0;
  padding-left: 1rem;
  color: #666;
  margin: 1.5em 0;
}

/* Inline code */
code {
  font-family: 'Courier New', Courier, monospace;
  background: #e8e0d0;
  color: #5c4a32;
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 0.87em;
}

/* Code blocks */
pre {
  background: #ede7d9;
  border: 1px solid #d4c4a8;
  border-radius: 4px;
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5em 0;
}

pre code {
  background: none;
  padding: 0;
  color: #3d3228;
  font-size: 0.85em;
  line-height: 1.7;
}

/* Tags index page (/tags/) */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tag-item {
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 4px 12px;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
}

.tag-item:hover,
.tag-item:focus {
  border-color: #8b7355;
  color: #5c4a32;
  outline: none;
}

/* List page heading (tag pages, /posts/ section) */
.list-page h1 {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #d4c9b0;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid #d4c9b0;
  font-size: 0.8rem;
  color: #aaa;
  text-align: center;
}

/* Mobile */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .site-title { font-size: 1.2rem; }
  header, main, footer { padding: 0 1rem; }
}
