.blog-page,
.post-page {
  max-width: 1440px;
  margin: 0 auto;
}

.blog-top {
  padding: 64px 24px 36px;
}

.blog-top-copy {
  max-width: 760px;
}

.blog-top-copy .eyebrow,
.post-hero-copy .eyebrow {
  color: var(--accent);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.blog-top-copy h1,
.post-hero-copy h1 {
  font-size: clamp(3rem, 4.4vw, 4.8rem);
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--text);
}

.blog-top-copy p {
  margin-top: 20px;
  color: var(--text);
  max-width: 760px;
  font-size: 1.1rem;
  line-height: 1.75;
  opacity: 0.9;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 24px 32px;
}

.blog-discovery {
  margin: 0 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.blog-search {
  width: min(620px, 100%);
}

.blog-search input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 500 1rem 'Open Sans', sans-serif;
  outline: none;
}

.blog-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 115, 218, 0.12);
}

#blogStatus {
  color: var(--text);
  opacity: 0.68;
  font-family: 'Open Sans', sans-serif;
  white-space: nowrap;
}

.filter-button {
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 220ms ease;
}

.filter-button.active,
.filter-button:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding: 0 24px 64px;
}

.post-card {
  display: grid;
  grid-template-rows: 240px 1fr;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  box-shadow: 0 20px 60px var(--shadow);
  transition: transform 220ms ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-card.featured {
  border-color: rgba(37, 115, 218, 0.35);
  box-shadow: 0 24px 70px rgba(37, 115, 218, 0.13);
}

.post-card-image {
  position: relative;
  background: var(--surface-soft);
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
}

.post-card-image::after {
  content: 'Blog Image';
}

.post-card-image.has-image::after {
  content: '';
}

.post-card-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent);
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 8px;
}

.post-card-meta {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  opacity: 0.7;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-card-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.8rem;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}

.post-card-excerpt {
  color: var(--text);
  opacity: 0.85;
  line-height: 1.8;
  flex: 1;
}

.post-card-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.post-card-tags,
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--accent);
  font: 600 0.78rem 'Open Sans', sans-serif;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border: 1px dashed var(--card-border);
  border-radius: 20px;
  color: var(--text);
  opacity: 0.72;
  font: 600 1rem 'Open Sans', sans-serif;
  text-align: center;
}

.post-page {
  padding: 0 0 80px;
}

.post-hero {
  position: relative;
  min-height: 500px;
  display: grid;
  align-items: end;
  padding: 0 24px 64px;
}

.post-hero-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.post-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding: 48px;
  background: var(--header-bg);
  border-radius: 32px;
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.15);
}

.post-meta {
  margin-top: 20px;
  color: var(--text);
  opacity: 0.8;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 1rem;
}

.post-content-wrapper {
  max-width: 1320px;
  margin: 64px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) 340px;
  gap: 64px;
}

.post-body {
  min-width: 0;
  border-radius: 32px;
  background: var(--surface);
  padding: 64px;
  box-shadow: 0 20px 60px var(--shadow);
  color: var(--text);
  line-height: 1.95;
  font-size: 1.15rem;
  border: 1px solid var(--card-border);
  overflow-wrap: anywhere;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: 'Times New Roman', Times, serif;
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  line-height: 1.12;
  color: var(--text);
}

.post-body p {
  margin: 1.2em 0;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: opacity 180ms ease;
}

.post-body a:hover {
  opacity: 0.8;
}

.post-body ul, .post-body ol {
  margin: 1.5em 0;
  padding-left: 1.5rem;
}

.post-body blockquote {
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 4px solid var(--accent);
  color: var(--text);
  opacity: 0.8;
}

.post-body pre {
  max-width: 100%;
  margin: 2rem 0;
  padding: 20px;
  overflow-x: auto;
  border-radius: 14px;
  background: #111827;
  color: #f9fafb;
  font-size: 0.92rem;
  line-height: 1.65;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.post-body :not(pre) > code {
  padding: 0.15em 0.35em;
  border-radius: 5px;
  background: var(--surface-soft);
}

.post-body table {
  display: block;
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  overflow-x: auto;
}

.post-body th,
.post-body td {
  padding: 12px;
  border: 1px solid var(--card-border);
  text-align: left;
}

.youtube-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 3rem 0;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 20px 50px var(--shadow);
}

.youtube-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.post-body li {
  margin: 0.8em 0;
}

.post-image {
  margin: 3rem 0;
}

.post-image img,
.post-inline-image,
.post-body img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 50px var(--shadow);
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 120px;
  height: fit-content;
}

.post-sidebar-card {
  padding: 32px;
  border-radius: 28px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  box-shadow: 0 20px 50px var(--shadow);
}

.sidebar-label {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  font-family: 'Open Sans', sans-serif;
}

.sidebar-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
}

.sidebar-link:hover {
  text-decoration: underline;
}

.sidebar-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-links-list li a {
  color: var(--text);
  opacity: 0.8;
  text-decoration: none;
  font-size: 0.95rem;
  font-family: 'Open Sans', sans-serif;
  line-height: 1.4;
  display: block;
  transition: all 180ms ease;
}

.sidebar-links-list li a:hover {
  opacity: 1;
  color: var(--accent);
  transform: translateX(4px);
}

@media (max-width: 1100px) {
  .post-content-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .post-sidebar {
    position: static;
    order: 2;
  }

  .post-body {
    order: 1;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .post-hero {
    min-height: 400px;
    padding: 0 20px 48px;
  }
  
  .post-hero-copy {
    padding: 32px;
  }
}

@media (max-width: 640px) {
  .blog-top {
    padding: 48px 18px 28px;
  }

  .post-body {
    padding: 32px 24px;
    font-size: 1.05rem;
  }

  .blog-discovery {
    margin: 0 18px 18px;
    align-items: stretch;
    flex-direction: column;
  }

  #blogStatus {
    margin: 0;
  }
}

