/* Homepage & article refresh — 2026-11 */
:root {
  --home-accent: #2563eb;
  --home-ink: #0f172a;
  --home-muted: #64748b;
  --home-line: #e5e7eb;
  --home-bg: #ffffff;
}

/* ---------- homepage ---------- */
.home-refresh {
  padding-bottom: 24px;
}
.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 40px 38px;
  margin: 0 0 22px;
  color: #f8fafc;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(37, 99, 235, .55), transparent 60%),
              linear-gradient(135deg, #111827 0%, #1e293b 55%, #0b1220 100%);
}
.home-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .35), transparent 65%);
}
.home-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #93c5fd;
}
.home-hero h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.25;
  color: #fff;
}
.home-hero-desc {
  margin: 0 0 22px;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.8;
  color: #cbd5e1;
}
.home-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}
.home-hero-stats a,
.home-hero-stats div {
  color: inherit;
  text-decoration: none;
}
.home-hero-stats strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
.home-hero-stats span {
  font-size: 12px;
  color: #94a3b8;
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .28);
  color: #e2e8f0;
  transition: all .2s ease;
}
.home-btn:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.home-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.home-btn-primary:hover {
  background: #1d4ed8;
}

.home-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.home-filter {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--home-line);
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  line-height: 1.2;
  transition: all .18s ease;
}
.home-filter:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}
.home-filter.is-active {
  background: var(--home-ink);
  border-color: var(--home-ink);
  color: #fff;
}
.home-filter .home-filter-count {
  margin-left: 6px;
  opacity: .65;
  font-size: 11px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}
.home-card {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}
.home-card.is-hidden {
  display: none;
}
.home-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.home-card-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.home-card-time {
  font-size: 12px;
  color: var(--home-muted);
}
.home-card h2 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--home-ink);
}
.home-card h2 a {
  color: inherit;
  text-decoration: none;
}
.home-card h2 a:hover {
  color: var(--home-accent);
}
.home-card p {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.75;
  color: #64748b;
  flex: 1;
}
.home-card-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--home-accent);
  text-decoration: none;
}
.home-card-more:hover {
  color: #1d4ed8;
}
.home-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--home-muted);
}

/* category colors: badge + dot */
.cat-security { background: #fee2e2; color: #b91c1c; }
.cat-devops   { background: #ccfbf1; color: #0f766e; }
.cat-dev      { background: #dbeafe; color: #1d4ed8; }
.cat-essay    { background: #ede9fe; color: #6d28d9; }

.cat-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.cat-dot.cat-security { background: #dc2626; }
.cat-dot.cat-devops   { background: #0d9488; }
.cat-dot.cat-dev      { background: #2563eb; }
.cat-dot.cat-essay    { background: #7c3aed; }

/* ---------- sidebar categories ---------- */
.categories-widget {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--home-line);
}
.categories-widget-title {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #94a3b8;
}
.categories-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.categories-list li a {
  display: flex;
  align-items: center;
  padding: 6px 2px;
  font-size: 13px;
  color: #475569;
  text-decoration: none;
  border-radius: 6px;
}
.categories-list li a:hover {
  color: var(--home-accent);
}
.categories-list .cat-count {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
}

/* ---------- post page ---------- */
.post-cat-badge {
  margin: 0 0 8px;
}
.post-cat-badge a {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.post-catalog {
  margin: 0 0 22px;
  padding: 16px 20px;
  border: 1px solid var(--home-line);
  border-left: 3px solid var(--home-accent);
  border-radius: 10px;
  background: #f8fafc;
}
.post-catalog-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--home-ink);
}
.post-catalog ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.9;
}
.post-catalog a {
  color: #475569;
  text-decoration: none;
}
.post-catalog a:hover {
  color: var(--home-accent);
}
.post-catalog ol ol {
  margin: 2px 0;
  font-size: 12.5px;
}

/* ---------- categories overview ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 6px;
}
.category-card {
  display: block;
  padding: 22px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}
.category-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--home-ink);
}
.category-card p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #64748b;
}
.category-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--home-accent);
}

@media (max-width: 767px) {
  .home-hero { padding: 28px 22px; border-radius: 12px; }
  .home-hero h1 { font-size: 23px; }
  .home-grid { grid-template-columns: 1fr; }
}

/* ---------- header logo ---------- */
.custom-logo-image {
  margin-top: 0;
}
@media (min-width: 992px) {
  .site-brand-container {
    background: transparent;
  }
  .site-meta {
    padding-top: 8px;
  }
}

/* ---------- 归档页标题 ---------- */
.archive-page-title {
  font-size: 1.5em;
  margin: 0 0 16px;
}

/* ---------- logo 下方站名 ---------- */
.site-brand-text {
  display: block;
  margin-top: 8px;
  color: #222;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .5px;
  white-space: nowrap;
}
@media (max-width: 991px) {
  .site-brand-text {
    display: none;
  }
}
