/* ===== ブログ一覧 ===== */
.blog-header {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 32px 20px;
}

.blog-title { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.blog-sub   { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; }

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 40px;
  max-width: 860px;
  margin: 0 auto;
}

.search-row svg { color: var(--text-faint); flex-shrink: 0; }

.search-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
  width: 100%;
}

.search-input::placeholder { color: var(--text-faint); }

.filter-row {
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 32px;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}

.filter-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-right: 4px; }

.filter-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 99px;
  border: 0.5px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.filter-tag.active { border-color: var(--purple-main); color: var(--purple-light); background: var(--bg-surface); }
.filter-tag:hover  { border-color: var(--purple-main); color: var(--purple-light); }

.posts-grid {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 32px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.post-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.post-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.post-thumb {
  height: 80px;
  background: var(--bg-deep);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

.post-meta { display: flex; align-items: center; gap: 8px; }

.post-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
}

.cat-tech   { background: #26215C; color: var(--purple-light); border: 0.5px solid var(--purple-main); }
.cat-diary  { background: #04342C; color: var(--teal-light);   border: 0.5px solid var(--teal-mid); }
.cat-travel { background: #412402; color: var(--amber-mid);    border: 0.5px solid #854F0B; }

.post-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-left: auto; }

.post-title   { font-size: 13px; font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.post-excerpt { font-size: 12px; color: var(--text-dim); line-height: 1.6; }

.post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px; }

.post-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  border: 0.5px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  padding: 40px 0;
}

/* ===== 記事詳細 ===== */
.breadcrumb {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: rgba(11,11,24,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 100%;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 0.5px solid var(--border);
}

.bc-link { font-family: var(--font-mono); font-size: 11px; color: var(--purple-main); cursor: pointer; }
.bc-link:hover { color: var(--purple-light); }
.bc-sep  { font-size: 11px; color: var(--text-faint); }
.bc-cur  { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }

.article-layout {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 60vh;
  align-items: start;
}

.toc-sidebar {
  border-right: 0.5px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 101px;
  height: calc(100vh - 101px);
  overflow-y: auto;
}

.toc-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  padding: 0 16px;
  margin-bottom: 10px;
}

.toc-item {
  display: block;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1.4;
  text-decoration: none;
}

.toc-item:hover { color: var(--purple-light); border-left-color: var(--purple-main); }
.toc-item.active { color: var(--purple-light); border-left-color: var(--purple-main); background: rgba(83,74,183,0.08); }
.toc-item.h3 { padding-left: 28px; font-size: 11px; }

.article-main { padding: 28px 32px; overflow: hidden; }

.art-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 0.5px solid var(--border); }

.art-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.art-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

.art-title { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.3; margin-bottom: 10px; }

.art-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.art-tag  { font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 99px; border: 0.5px solid var(--border); color: var(--text-muted); }

.art-body { font-size: 14px; color: var(--text-muted); line-height: 1.8; }

.art-body h2 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 0.5px solid var(--border);
  scroll-margin-top: 125px;
}

.art-body h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-light);
  margin: 18px 0 8px;
  scroll-margin-top: 125px;
}

.art-body p  { margin-bottom: 12px; }
.art-body ul { padding-left: 1.5em; margin-bottom: 12px; }
.art-body li { margin-bottom: 4px; }

.art-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-light);
  background: var(--bg-deep);
  padding: 1px 5px;
  border-radius: 3px;
}

.art-body pre {
  background: var(--bg-deep);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
}

.art-body pre code {
  background: transparent;
  padding: 0;
  font-size: 12px;
  color: var(--teal-light);
  line-height: 1.7;
}

.art-body blockquote {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-left: 2px solid var(--purple-main);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin: 12px 0;
  color: var(--purple-light);
  font-size: 13px;
}

.art-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 0.5px solid var(--border);
}

.art-nav-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--purple-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: color 0.15s;
}

.art-nav-btn:hover { color: var(--purple-light); }

@media (max-width: 700px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }
  .article-main { padding: 20px 16px; }
  .blog-header { padding: 24px 16px 16px; }
  .filter-row { padding: 12px 16px; }
  .posts-grid { padding: 16px 16px 32px; grid-template-columns: 1fr; }
}
