*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: oklch(21% 0.006 47);
  --coral: oklch(68.9% 0.14 34.5);
  --coral-deep: oklch(59% 0.15 32);
  --coral-soft: oklch(94.5% 0.035 38);
  --cloud: oklch(97.8% 0.006 75);
  --hairline: oklch(91% 0.008 60);
  --muted: oklch(53% 0.018 45);
  --faint: oklch(67% 0.014 45);
  --white: oklch(100% 0 0);
}

body {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--coral-deep);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--ink);
}

/* ── Header (matches landing page) ── */

.blog-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: oklch(100% 0 0 / 80%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.blog-header-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 5rem;
}

@media (min-width: 640px) {
  .blog-header-inner { padding: 0 2.5rem; }
}

@media (min-width: 1024px) {
  .blog-header-inner { padding: 0 3.5rem; }
}

.blog-header-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
}

.blog-header-logo:hover {
  color: var(--ink);
}

.blog-header-mark {
  width: 23px;
  height: 29px;
  color: var(--ink);
}

.blog-header-name {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.blog-header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.blog-header-nav a {
  color: var(--muted);
}

.blog-header-nav a:hover,
.blog-header-nav a.active {
  color: var(--ink);
}

@media (min-width: 768px) {
  .blog-header-nav { display: flex; }
}

.blog-header-cta {
  display: none;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  transition: background 0.2s;
}

.blog-header-cta:hover {
  background: var(--coral-deep);
  color: var(--white);
}

@media (min-width: 768px) {
  .blog-header-cta { display: inline-block; }
}

/* ── Main content ── */

.blog-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 1.5rem 6rem;
}

/* ── Listing ── */

.blog-listing-header {
  margin-bottom: 2.5rem;
}

.blog-listing-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-listing-header p {
  color: var(--muted);
  font-size: 1rem;
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 4px 16px oklch(0% 0 0 / 6%);
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: var(--ink);
}

.blog-card-link:hover {
  color: var(--ink);
}

.blog-card-img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
}

.blog-card-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.blog-card-date {
  font-size: 0.75rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card-body h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.125rem;
}

.blog-card-body p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-read-more {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--coral-deep);
  margin-top: auto;
  padding-top: 0.5rem;
}

.blog-card:hover .blog-read-more {
  color: var(--ink);
}

/* ── Article ── */

.blog-article {
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1rem;
  color: var(--muted);
}

.blog-article > :first-child {
  margin-top: 0;
}

.blog-article h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.blog-article h2 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  position: relative;
}

.blog-article h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--coral-soft);
}

.blog-article h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.blog-article p {
  margin-bottom: 1.5rem;
}

.blog-article ul, .blog-article ol {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.blog-article li {
  margin-bottom: 0.5rem;
}

.blog-article li strong {
  color: var(--ink);
}

.blog-article strong {
  color: var(--ink);
  font-weight: 600;
}

.blog-article a {
  color: var(--coral-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.blog-article a:hover {
  border-bottom-color: var(--coral);
}

.blog-article code {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.875em;
  background: var(--coral-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.blog-article pre {
  background: var(--cloud);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.875rem;
  line-height: 1.65;
}

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

.blog-article img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin: 2.5rem 0;
  display: block;
}

.blog-article blockquote {
  border-left: 4px solid var(--coral);
  padding-left: 1.25rem;
  margin: 2.5rem 0;
  color: var(--faint);
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.blog-article blockquote p:last-child {
  margin-bottom: 0;
}

.blog-article blockquote strong {
  color: var(--muted);
}

.blog-article hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 3.5rem 0;
}

.blog-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.blog-article table th {
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--hairline);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.blog-article table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--hairline);
}

.blog-article-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  color: var(--faint);
}

/* ── Page footer (matches landing page) ── */

.blog-page-footer {
  border-top: 1px solid var(--hairline);
  padding: 3rem 1.5rem 2.5rem;
}

.blog-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .blog-footer-inner {
    grid-template-columns: 1.5fr 1fr auto;
    gap: 3rem;
  }
}

.blog-footer-brand .blog-header-logo {
  margin-bottom: 0.75rem;
}

.blog-footer-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 16rem;
}

.blog-footer-label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.blog-footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-footer-nav a,
.blog-footer-contact a {
  font-size: 0.875rem;
  color: var(--muted);
}

.blog-footer-nav a:hover,
.blog-footer-contact a:hover {
  color: var(--ink);
}

.blog-footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-footer-addr {
  font-size: 0.875rem;
  color: var(--muted);
}

.blog-footer-bottom {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--faint);
}

@media (min-width: 640px) {
  .blog-footer-bottom {
    flex-direction: row;
  }
}

.blog-footer-bottom a {
  color: var(--faint);
}

.blog-footer-bottom a:hover {
  color: var(--ink);
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .blog-main {
    padding: 7rem 1.5rem 5rem;
  }

  .blog-article {
    font-size: 0.9375rem;
  }

  .blog-article h1 {
    font-size: 1.625rem;
  }

  .blog-article h2 {
    font-size: 1.25rem;
    margin-top: 2.5rem;
  }

  .blog-article h3 {
    font-size: 1.0625rem;
    margin-top: 2rem;
  }

  .blog-article img {
    margin: 2rem 0;
  }

  .blog-article blockquote {
    margin: 2rem 0;
    font-size: 0.9375rem;
  }

  .blog-article pre {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
  }

  .blog-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 540px) {
  .blog-main {
    padding: 6rem 1.25rem 4rem;
  }

  .blog-article {
    font-size: 0.9375rem;
  }

  .blog-article h1 {
    font-size: 1.375rem;
    margin-bottom: 1.25rem;
  }

  .blog-article h2 {
    font-size: 1.125rem;
    margin-top: 2rem;
  }

  .blog-article h3 {
    font-size: 1rem;
    margin-top: 1.5rem;
  }

  .blog-article p {
    margin-bottom: 1rem;
  }

  .blog-article ul, .blog-article ol {
    padding-left: 1rem;
  }

  .blog-article img {
    margin: 1.5rem 0;
    border-radius: 0.375rem;
  }

  .blog-article blockquote {
    margin: 1.5rem 0;
    padding-left: 1rem;
  }

  .blog-article hr {
    margin: 2.5rem 0;
  }

  .blog-article pre {
    margin: 1.25rem -0.5rem;
    border-radius: 0;
    padding: 1rem;
  }

  .blog-article table {
    font-size: 0.875rem;
    display: block;
    overflow-x: auto;
  }

  .blog-article table th,
  .blog-article table td {
    padding: 0.375rem 0.5rem;
  }

  .blog-cards {
    grid-template-columns: 1fr;
  }

  .blog-card-img {
    height: 8rem;
  }

  .blog-article-footer {
    margin-top: 2.5rem;
  }
}
