/* =============================================
   blog.css — wheatBread1306 Blog スタイル
   既存の style.css の後に読み込む
   ============================================= */

/* ── 記事一覧ページ ─────────────────────────── */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.post-card {
  display: block;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.post-card:hover {
  opacity: 0.7;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-card-meta time {
  font-size: 0.8rem;
  color: var(--text-secondary, #888);
  font-family: 'Inter', sans-serif;
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text-primary, #f0f0f0);
}

.post-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary, #888);
  margin: 0;
  line-height: 1.6;
}

/* ── タグバッジ ─────────────────────────────── */

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--border-color);
  border-radius: 99px;
  color: var(--text-secondary, #888);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
}

/* ── 記事詳細ページ ─────────────────────────── */

.blog-post-main {
  padding: 6rem 0 4rem;
}

.blog-container {
  max-width: 720px;
}

.blog-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-secondary, #888);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}

.blog-back:hover {
  color: var(--text-primary, #f0f0f0);
}

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

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.post-meta time {
  font-size: 0.8rem;
  color: var(--text-secondary, #888);
  font-family: 'Inter', sans-serif;
}

.post-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

/* ── 記事本文 ───────────────────────────────── */

.post-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-primary, #f0f0f0);
}

.post-body img {
  max-width: min(100%, 560px);
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

.post-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.post-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

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

.post-body ul,
.post-body ol {
  margin: 0 0 1.25rem 1.5rem;
}

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

.post-body a {
  color: var(--text-primary, #f0f0f0);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body code {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.85em;
  background: var(--card-bg, #1a1a1a);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.post-body pre {
  background: var(--card-bg, #1a1a1a);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 0 0 1.5rem;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── レスポンシブ ───────────────────────────── */

@media (max-width: 640px) {
  .post-title {
    font-size: 1.35rem;
  }

  .post-body h2 {
    font-size: 1.1rem;
  }

  .blog-container {
    padding: 0 1rem;
  }
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
}

th {
  background-color: #333;
}