/* ── Container ─────────────────────────────────────────────── */

.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* ── Page header ───────────────────────────────────────────── */

.blog-header {
  padding: clamp(48px, 8vw, 96px) 0 clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.blog-title {
  font-family: "Bugatti Headline", "Helvetica Neue", Helvetica, sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--gray-900);
  margin-bottom: 20px;
}

/* ── Topic filter dropdown ─────────────────────────────────── */

.blog-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.blog-filter-wrap::after {
  content: "";
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--gray-500);
}

.blog-filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  color: var(--gray-900);
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 36px 8px 18px;
  transition: border-color 180ms;
}

.blog-filter-select:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.blog-filter-select:focus {
  outline: 2px solid var(--blue-700);
  outline-offset: 2px;
}

.blog-filter-select option {
  background: #0d1524;
  color: var(--gray-900);
}

/* ── Tag pill ──────────────────────────────────────────────── */

.post-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-500);
  background: rgba(110, 231, 255, 0.08);
  border: 1px solid rgba(110, 231, 255, 0.2);
  border-radius: 100px;
  padding: 3px 11px;
  width: fit-content;
}

/* ── Post meta ─────────────────────────────────────────────── */

.post-meta {
  font-size: 0.78rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Blog card grid ────────────────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding-bottom: clamp(64px, 10vw, 112px);
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.36);
  border-color: rgba(255, 255, 255, 0.2);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(47, 123, 255, 0.12), rgba(110, 231, 255, 0.04));
}

.blog-card-image--placeholder {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(47, 123, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #0d1a30, #0a1220);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.blog-card:hover .blog-card-image img { transform: scale(1.05); }

.blog-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.38;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--gray-500);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Empty state ───────────────────────────────────────────── */

.blog-empty {
  text-align: center;
  padding: 100px 20px;
  color: var(--gray-500);
  font-size: 1.05rem;
}

/* ── Article page ──────────────────────────────────────────── */

.article-wrapper {
  padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 10vw, 112px);
}

.article-hero {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 52px;
}

.article-hero img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.article-container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-700);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 36px;
  transition: gap var(--dur) var(--ease), color var(--dur);
}

.article-back:hover { gap: 10px; color: var(--blue-500); }

.article-header { margin-bottom: 48px; }

.article-header h1 {
  font-family: "Bugatti Headline", "Helvetica Neue", Helvetica, sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--gray-900);
  margin: 16px 0 20px;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--gray-700);
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 2.2em 0 0.65em;
  line-height: 1.28;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 1.8em 0 0.5em;
}

.article-body p { margin-bottom: 1.5em; }

.article-body a {
  color: var(--blue-500);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(110, 231, 255, 0.35);
  transition: text-decoration-color var(--dur);
}

.article-body a:hover { text-decoration-color: var(--blue-500); }

.article-body ul,
.article-body ol { margin: 0 0 1.5em 1.6em; }

.article-body li { margin-bottom: 0.5em; }

.article-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 2em 0;
}

.article-body blockquote {
  border-left: 3px solid var(--blue-700);
  padding: 4px 0 4px 22px;
  color: var(--gray-500);
  font-style: italic;
  margin: 2em 0;
}

.article-body pre {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  overflow-x: auto;
  margin: 1.8em 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875em;
}

.article-body code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875em;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 6px;
}

.article-body pre code { background: none; border: none; padding: 0; }

.article-body hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 2.8em 0;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article-hero { border-radius: var(--radius-md); max-height: 240px; }
  .article-hero img { height: 240px; }
}
