:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --line: #e2e8f0;
  --line-soft: rgba(226, 232, 240, 0.72);
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.blog-shell {
  display: flex;
  min-height: 100vh;
}

.blog-mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 16px;
  backdrop-filter: blur(14px);
}

.blog-kicker {
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.blog-mobile-title {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 900;
}

.blog-mobile-menu-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.blog-mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.blog-mobile-overlay {
  display: none;
}

.blog-sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  width: 288px;
  height: 100vh;
  flex: 0 0 288px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 20px;
}

.blog-home-wrap {
  display: flex;
  flex-direction: column;
  margin: 8px 0 32px;
}

.blog-home-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 16px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: all 200ms ease;
}

.blog-home-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.1);
}

.blog-home-card__mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 950;
}

.blog-home-card__label {
  white-space: nowrap;
}

.blog-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.blog-nav__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-nav__section {
  margin: 0 0 8px;
  padding: 0 12px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  transition: all 200ms ease;
}

.blog-nav__link:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.blog-nav__link--active {
  background: var(--blue-soft);
  color: #1d4ed8;
}

.blog-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  padding: 8px 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  transition: all 200ms ease;
}

.blog-category-link:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.blog-category-link--active {
  background: var(--blue-soft);
  color: #1d4ed8;
}

.blog-category-link__count {
  display: grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.blog-category-link--active .blog-category-link__count {
  background: #dbeafe;
  color: #1d4ed8;
}

.blog-nav__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: currentColor;
}

.blog-nav__svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-main {
  width: 100%;
  min-width: 0;
  flex: 1;
  padding: 16px;
}

.blog-canvas {
  min-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.blog-index {
  padding: clamp(32px, 5vw, 72px);
}

.blog-index__hero {
  max-width: 860px;
  margin-bottom: clamp(48px, 8vw, 84px);
}

.blog-index__hero h1 {
  max-width: 780px;
  margin: 16px 0 24px;
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #020617;
}

.blog-index__hero p,
.blog-lead {
  max-width: 680px;
  margin: 0;
  color: #475569;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.7;
}

.blog-post-list {
  display: grid;
  max-width: 980px;
  border-top: 1px solid var(--line-soft);
}

.blog-post-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  border-bottom: 1px solid var(--line-soft);
  padding: 32px 24px;
  margin: 0 -24px;
  border-radius: 20px;
  transition: all 300ms cubic-bezier(0.2, 0, 0, 1);
}

.blog-post-row:hover {
  background: var(--surface-muted);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.08);
  border-bottom-color: transparent;
}

.blog-post-row__date {
  display: grid;
  align-content: start;
  gap: 12px;
  color: var(--faint);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.blog-post-row__category {
  width: fit-content;
  border-radius: 8px;
  background: var(--blue-soft);
  padding: 4px 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.blog-post-row__body {
  display: grid;
  gap: 10px;
}

.blog-post-row__body strong {
  color: #0f172a;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  transition: color 200ms ease;
}

.blog-post-row:hover .blog-post-row__body strong {
  color: var(--blue);
}

.blog-post-row__body small {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

.blog-empty {
  display: grid;
  gap: 12px;
  border: 2px dashed var(--line-soft);
  border-radius: 24px;
  background: var(--surface-muted);
  padding: 40px;
  text-align: center;
  color: var(--muted);
  margin-top: 24px;
}

.blog-empty strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
}

.blog-pagination {
  display: flex;
  max-width: 980px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.blog-pagination__summary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.blog-pagination__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-pagination__item {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: all 200ms ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.blog-pagination__item:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--surface);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.blog-pagination__item--active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.blog-pagination__item--active:hover {
  color: white;
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: none;
}

.blog-category-back {
  display: inline-flex;
  margin-top: 28px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.blog-article {
  padding: clamp(28px, 5vw, 72px);
}

.blog-article__header,
.blog-prose {
  max-width: 780px;
  margin: 0 auto;
}

.blog-back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-meta a {
  color: var(--blue);
}

.blog-article h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 950;
  line-height: 0.98;
}

.blog-article__cover {
  margin: 30px 0 0;
}

.blog-article__cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

.blog-article__cover figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.blog-prose {
  margin-top: 48px;
  color: #1e293b;
  font-size: 18px;
  line-height: 1.8;
  word-wrap: break-word;
}

.blog-prose > * + * {
  margin-top: 1.5em;
}

.blog-prose h2,
.blog-prose h3,
.blog-prose h4,
.blog-prose h5 {
  color: #020617;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.blog-prose h2 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  font-size: clamp(28px, 3.5vw, 36px);
}

.blog-prose h3 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-size: clamp(22px, 2.5vw, 26px);
}

.blog-prose h4 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: 20px;
}

.blog-prose h5 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: 18px;
  font-weight: 700;
}

.blog-prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.blog-prose a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.2);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: all 200ms ease;
}

.blog-prose a:hover {
  text-decoration-color: var(--blue);
  background: var(--blue-soft);
  border-radius: 2px;
}

.blog-prose ul,
.blog-prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.6em;
}

.blog-prose li {
  margin-top: 0.5em;
}

.blog-prose li > ul,
.blog-prose li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.blog-prose blockquote {
  margin: 2em 0;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 0 12px 12px 0;
  padding: 16px 24px;
  color: #334155;
  font-style: italic;
  font-size: 19px;
  line-height: 1.7;
}

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

.blog-prose blockquote > :last-child {
  margin-bottom: 0;
}

.blog-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85em;
  font-weight: 500;
  background: #f1f5f9;
  color: #db2777;
  padding: 0.2em 0.4em;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.blog-prose pre {
  margin: 1.75em 0;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.blog-prose pre code {
  display: block;
  background: transparent;
  color: #e2e8f0;
  border: none;
  padding: 20px 24px;
  font-size: 0.85em;
  line-height: 1.6;
  overflow-x: auto;
}

.blog-prose table {
  width: 100%;
  margin: 2em 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.blog-prose thead {
  background: var(--surface-muted);
}

.blog-prose th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}

.blog-prose td {
  padding: 14px 16px;
  color: #475569;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}

.blog-prose tbody tr:last-child td {
  border-bottom: none;
}

.blog-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2.5em auto;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.blog-prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
  margin: 3em 0;
}

@media (min-width: 640px) {
  .blog-main {
    padding: 24px;
  }

  .blog-canvas {
    min-height: calc(100vh - 48px);
  }
}

@media (min-width: 1024px) {
  .blog-main {
    padding: 32px;
  }

  .blog-canvas {
    min-height: calc(100vh - 64px);
  }
}

@media (max-width: 900px) {
  body.blog-menu-open {
    overflow: hidden;
  }

  .blog-shell {
    display: block;
  }

  .blog-mobile-header {
    display: flex;
  }

  .blog-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -100vw;
    z-index: 50;
    width: min(86vw, 320px);
    height: 100vh;
    height: 100svh;
    flex: 0 0 auto;
    transform: none;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 24px 20px;
    box-shadow: none;
    pointer-events: none;
    transition: none;
  }

  .blog-menu-open .blog-sidebar {
    left: 0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
    pointer-events: auto;
  }

  .blog-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    border: 0;
    background: rgba(2, 6, 23, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  .blog-menu-open .blog-mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .blog-home-card {
    margin-bottom: 0;
  }

  .blog-nav {
    display: flex;
  }

  .blog-nav__items {
    display: flex;
    flex-direction: column;
  }

  .blog-nav__items--categories {
    margin-top: 0;
  }

  .blog-category-link {
    justify-content: space-between;
    padding: 8px 12px;
    text-align: left;
  }

  .blog-nav__section {
    display: block;
  }

  .blog-nav__link {
    justify-content: center;
    gap: 8px;
    padding: 10px 8px;
    text-align: center;
  }

  .blog-nav__icon {
    display: none;
  }

  .blog-post-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 20px;
    margin: 0 -20px;
  }

  .blog-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .blog-main {
    padding: 12px;
  }

  .blog-canvas {
    min-height: calc(100vh - 65px - 24px);
    border-radius: 24px;
  }

  .blog-index,
  .blog-article {
    padding: 28px 20px;
  }

  .blog-index__hero h1,
  .blog-article h1 {
    font-size: clamp(34px, 11vw, 46px);
  }
}
