:root {
  --bg: #ffffff;
  --text: #171717;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --accent: #111827;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--max), 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
}

.brand {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.brand-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.top-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  font-size: 0.96rem;
  transition: 0.2s ease;
}

.top-nav a:hover {
  color: var(--accent);
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 40px;
  padding: 42px 0 60px;
}

.hero {
  background: linear-gradient(to bottom, #ffffff, #fcfcfc);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 30px;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 0;
  max-width: 760px;
  color: #4b5563;
  font-size: 1.05rem;
}

.posts-section {
  margin-top: 32px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.posts-list {
  display: grid;
  gap: 18px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
  border-color: #d8dee7;
}

.post-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.post-card h3 a:hover {
  text-decoration: underline;
}

.post-description {
  margin: 0 0 16px;
  color: #4b5563;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #374151;
  font-size: 0.86rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
}

.read-more:hover {
  text-decoration: underline;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.sidebar-box h3 {
  margin: 0 0 14px;
  font-size: 1.08rem;
}

.sidebar-box p {
  margin: 0;
  color: var(--muted);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: #374151;
  font-size: 0.9rem;
  transition: 0.18s ease;
}

.tag-cloud a:hover {
  background: #f1f5f9;
  border-color: #d7dde5;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  background: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.empty-state,
.error-state {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 22px;
  color: var(--muted);
  background: #fff;
}

@media (max-width: 980px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
  }
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 14px 0;
  }

  .brand {
    font-size: 1.7rem;
  }

  .hero {
    padding: 24px 20px;
  }

  .post-card,
  .sidebar-box {
    padding: 18px;
  }
}
.tag-cloud-btn,
.post-tag-btn,
.filter-clear-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--soft);
  color: #374151;
  cursor: pointer;
  font: inherit;
  transition: 0.18s ease;
}

.tag-cloud-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.tag-cloud-btn:hover,
.post-tag-btn:hover,
.filter-clear-btn:hover {
  background: #eef2f7;
  border-color: #cfd6df;
}

.tag-cloud-btn.is-active,
.post-tag-btn.is-active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.filter-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 600;
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.filter-clear-btn:hover {
  background: #1f2937;
  border-color: #1f2937;
}
