@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  src: url('/assets/geist-variable.woff2') format('woff2');
}

:root {
  --blog-accent: #e96f25;
  --blog-bg: #fff;
  --blog-border: #e8e8e8;
  --blog-fill: #f6f6f6;
  --blog-fill-hover: #eeeeee;
  --blog-muted: #6e6e6e;
  --blog-text: #171717;
  color-scheme: light;
}

html[data-theme='dark'] {
  --blog-bg: #111;
  --blog-border: #313131;
  --blog-fill: #1c1c1c;
  --blog-fill-hover: #262626;
  --blog-muted: #a1a1a1;
  --blog-text: #f3f3f3;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--blog-bg);
  color: var(--blog-text);
  font-family: Geist, Arial, sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgb(233 111 37 / 28%);
  outline-offset: 3px;
}

.blog-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 64px;
  border-bottom: 1px solid color-mix(in srgb, var(--blog-border) 76%, transparent);
  background: color-mix(in srgb, var(--blog-bg) 92%, transparent);
  backdrop-filter: blur(18px);
}

.blog-header-inner {
  display: grid;
  width: min(1200px, calc(100% - 40px));
  height: 64px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  margin: auto;
}

.blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.blog-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.blog-brand strong {
  font-size: 19px;
  font-weight: 700;
}

.blog-desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.blog-nav-group {
  position: relative;
}

.blog-nav-group > button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--blog-text);
  cursor: pointer;
  font-size: 14px;
}

.blog-nav-group > button:hover,
.blog-nav-group > button[aria-expanded='true'] {
  background: var(--blog-fill);
}

.blog-nav-group > button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 160ms ease;
}

.blog-nav-group > button[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.blog-dropdown {
  position: absolute;
  top: 46px;
  left: 50%;
  display: grid;
  width: 330px;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: var(--blog-bg);
  box-shadow: 0 16px 40px rgb(0 0 0 / 14%);
  transform: translateX(-50%);
}

.blog-dropdown[hidden] {
  display: none;
}

.blog-dropdown-product,
.blog-dropdown-resource {
  width: 520px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-dropdown-item {
  display: grid;
  min-height: 62px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.blog-dropdown-item-primary {
  min-height: 88px;
  border-color: var(--blog-border);
  background: var(--blog-fill);
}

.blog-dropdown-item:hover,
.blog-dropdown-item:focus-visible {
  border-color: var(--blog-border);
  background: var(--blog-fill-hover);
}

.blog-menu-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--blog-border);
  border-radius: 7px;
  background: var(--blog-bg);
  color: var(--blog-muted);
  font-size: 13px;
  font-weight: 700;
}

.blog-dropdown-item strong,
.blog-dropdown-item small {
  display: block;
}

.blog-dropdown-item strong {
  font-size: 14px;
  font-weight: 600;
}

.blog-dropdown-item small {
  margin-top: 3px;
  color: var(--blog-muted);
  font-size: 12px;
  line-height: 17px;
}

.blog-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.blog-repo-link {
  color: var(--blog-muted);
  font-size: 14px;
}

.blog-repo-link:hover {
  color: var(--blog-text);
}

.blog-start-button {
  display: inline-flex;
  min-width: 88px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border-radius: 7px;
  background: var(--blog-text);
  color: var(--blog-bg);
  font-size: 14px;
  font-weight: 600;
}

.blog-mobile-menu-button,
.blog-mobile-nav {
  display: none;
}

.blog-main,
.blog-article-page {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.blog-category-row {
  display: flex;
  overflow-x: auto;
  align-items: center;
  gap: 5px;
  padding-top: 28px;
  scrollbar-width: none;
}

.blog-category-row::-webkit-scrollbar {
  display: none;
}

.blog-category-row button {
  height: 34px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--blog-muted);
  cursor: pointer;
  font-size: 14px;
}

.blog-category-row button:hover {
  background: var(--blog-fill);
  color: var(--blog-text);
}

.blog-category-row button[aria-selected='true'] {
  border-color: var(--blog-border);
  background: var(--blog-fill);
  color: var(--blog-text);
  font-weight: 600;
}

.blog-index-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 52px 0 34px;
}

.blog-index-heading > div > span,
.blog-related > div > span {
  color: var(--blog-accent);
  font-size: 13px;
  font-weight: 650;
}

.blog-index-heading h1 {
  margin: 6px 0 10px;
  font-size: 48px;
  font-weight: 740;
  line-height: 1.12;
}

.blog-index-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--blog-muted);
  font-size: 17px;
  line-height: 1.65;
}

.blog-index-heading > a {
  flex: 0 0 auto;
  padding-bottom: 4px;
  color: var(--blog-muted);
  font-size: 14px;
}

.blog-index-heading > a:hover {
  color: var(--blog-text);
}

.blog-featured {
  display: grid;
  grid-template-columns: 1.28fr 1fr 1fr;
  gap: 16px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--blog-border);
}

.blog-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: var(--blog-bg);
  transition: border-color 160ms ease, transform 160ms ease;
}

.blog-card:hover {
  border-color: color-mix(in srgb, var(--blog-text) 28%, var(--blog-border));
  transform: translateY(-2px);
}

.blog-card[hidden] {
  display: none;
}

.blog-card-featured {
  display: flex;
  min-height: 408px;
  flex-direction: column;
}

.blog-card-image {
  overflow: hidden;
  min-height: 168px;
  background: var(--blog-fill);
}

.blog-card-featured .blog-card-image {
  height: 210px;
}

.blog-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

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

.blog-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 20px;
}

.blog-category {
  color: var(--blog-accent);
  font-size: 12px;
  font-weight: 650;
}

.blog-card h2 {
  margin: 7px 0 8px;
  font-size: 20px;
  font-weight: 680;
  line-height: 1.35;
}

.blog-card:not(.blog-card-featured) h2 {
  font-size: 22px;
}

.blog-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--blog-muted);
  font-size: 14px;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--blog-muted);
  font-size: 12px;
}

.blog-latest {
  padding: 48px 0 80px;
}

.blog-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.blog-section-title h2 {
  margin: 0;
  font-size: 25px;
}

.blog-section-title span {
  color: var(--blog-muted);
  font-size: 13px;
}

.blog-article-list {
  display: grid;
  gap: 14px;
}

.blog-article-list .blog-card {
  min-height: 190px;
}

.blog-empty {
  padding: 72px 0;
  color: var(--blog-muted);
  text-align: center;
}

.blog-article-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 74px 0 42px;
}

.blog-article-header > a,
.blog-article-header > span {
  color: var(--blog-muted);
  font-size: 13px;
}

.blog-article-header > span {
  margin-left: 8px;
}

.blog-article-header h1 {
  max-width: 860px;
  margin: 18px 0 20px;
  font-size: 54px;
  font-weight: 760;
  line-height: 1.12;
}

.blog-article-header > p {
  max-width: 760px;
  margin: 0;
  color: var(--blog-muted);
  font-size: 19px;
  line-height: 1.7;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--blog-muted);
  font-size: 13px;
}

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

.blog-author-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--blog-text);
  color: var(--blog-bg);
  font-weight: 700;
}

.blog-hero {
  overflow: hidden;
  width: min(1080px, 100%);
  aspect-ratio: 16 / 7.4;
  margin: 0 auto 64px;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: var(--blog-fill);
}

.blog-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-reading-layout {
  display: grid;
  max-width: 1000px;
  grid-template-columns: 210px minmax(0, 700px);
  gap: 70px;
  margin: 0 auto;
}

.blog-toc {
  position: sticky;
  top: 96px;
  display: flex;
  height: max-content;
  flex-direction: column;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--blog-border);
}

.blog-toc strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.blog-toc a {
  color: var(--blog-muted);
  font-size: 13px;
  line-height: 1.45;
}

.blog-toc a:hover,
.blog-toc a[data-active] {
  color: var(--blog-accent);
}

.blog-prose {
  min-width: 0;
  padding-bottom: 72px;
}

.blog-prose section {
  scroll-margin-top: 90px;
  margin-bottom: 56px;
}

.blog-prose h2 {
  margin: 0 0 18px;
  font-size: 31px;
  line-height: 1.25;
}

.blog-prose p,
.blog-prose li {
  color: color-mix(in srgb, var(--blog-text) 84%, var(--blog-muted));
  font-size: 17px;
  line-height: 1.85;
}

.blog-prose p {
  margin: 0 0 18px;
}

.blog-prose ul,
.blog-prose ol {
  padding-left: 24px;
  margin: 16px 0 24px;
}

.blog-prose li + li {
  margin-top: 8px;
}

.blog-prose figure {
  margin: 32px 0;
}

.blog-prose figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: var(--blog-fill);
}

.blog-prose figcaption {
  margin-top: 10px;
  color: var(--blog-muted);
  font-size: 13px;
  text-align: center;
}

.blog-callout,
.blog-checklist {
  display: grid;
  gap: 7px;
  margin: 24px 0;
  padding: 18px;
  border-left: 3px solid var(--blog-accent);
  border-radius: 0 7px 7px 0;
  background: color-mix(in srgb, var(--blog-accent) 7%, var(--blog-fill));
}

.blog-callout strong {
  font-size: 14px;
}

.blog-callout span,
.blog-checklist span {
  color: var(--blog-muted);
  font-size: 14px;
  line-height: 1.65;
}

.blog-prose pre {
  overflow-x: auto;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: #171717;
  color: #f3f3f3;
  font: 14px/1.7 Consolas, monospace;
}

.blog-next-step {
  padding: 28px;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: var(--blog-fill);
}

.blog-next-step > span {
  color: var(--blog-accent);
  font-size: 13px;
  font-weight: 650;
}

.blog-next-step h2 {
  margin-top: 8px;
}

.blog-next-step > div {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.blog-next-step a {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--blog-border);
  border-radius: 7px;
  background: var(--blog-bg);
  font-size: 14px;
  font-weight: 600;
}

.blog-next-step a:first-child {
  border-color: var(--blog-text);
  background: var(--blog-text);
  color: var(--blog-bg);
}

.blog-related {
  padding: 56px 0 90px;
  border-top: 1px solid var(--blog-border);
}

.blog-related > div:first-child {
  margin-bottom: 24px;
}

.blog-related h2 {
  margin: 7px 0 0;
  font-size: 28px;
}

.blog-related > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.blog-related .blog-card {
  display: flex;
  flex-direction: column;
}

.blog-related .blog-card-image {
  height: 150px;
}

.blog-related .blog-card-body {
  flex: 1;
  padding: 16px;
}

.blog-related .blog-card h2 {
  font-size: 17px;
}

.blog-related .blog-card p {
  display: none;
}

.blog-footer {
  display: grid;
  width: min(1200px, calc(100% - 40px));
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 36px;
  margin: auto;
  padding: 32px 0 42px;
  border-top: 1px solid var(--blog-border);
}

.blog-footer > div:first-child {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--blog-muted);
  font-size: 13px;
}

.blog-footer .blog-brand img {
  width: 28px;
  height: 28px;
}

.blog-footer nav {
  display: flex;
  gap: 18px;
  color: var(--blog-muted);
  font-size: 13px;
}

.blog-theme-control {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  padding: 3px;
  border: 1px solid var(--blog-border);
  border-radius: 7px;
}

.blog-theme-control button {
  display: grid;
  width: 32px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--blog-muted);
  cursor: pointer;
}

.blog-theme-control button[aria-pressed='true'] {
  background: var(--blog-fill-hover);
  color: var(--blog-text);
}

.blog-theme-control svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (max-width: 900px) {
  .blog-desktop-nav,
  .blog-repo-link {
    display: none;
  }

  .blog-header-inner {
    width: min(100% - 28px, 720px);
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .blog-mobile-menu-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-content: center;
    gap: 4px;
    padding: 0;
    border: 1px solid var(--blog-border);
    border-radius: 7px;
    background: var(--blog-bg);
    cursor: pointer;
  }

  .blog-mobile-menu-button span {
    width: 16px;
    height: 1.5px;
    background: var(--blog-text);
  }

  .blog-mobile-nav {
    position: absolute;
    top: 64px;
    right: 14px;
    display: grid;
    width: min(330px, calc(100vw - 28px));
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    background: var(--blog-bg);
    box-shadow: 0 16px 40px rgb(0 0 0 / 16%);
  }

  .blog-mobile-nav[hidden] {
    display: none;
  }

  .blog-mobile-nav strong {
    grid-column: 1 / -1;
    padding: 8px 8px 4px;
    color: var(--blog-muted);
    font-size: 12px;
  }

  .blog-mobile-nav a {
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
  }

  .blog-mobile-nav a:hover {
    background: var(--blog-fill);
  }

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

  .blog-card-featured {
    min-height: 0;
  }

  .blog-card-featured .blog-card-image {
    height: 240px;
  }

  .blog-reading-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .blog-toc {
    position: static;
    display: flex;
    overflow-x: auto;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 40px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid var(--blog-border);
    scrollbar-width: none;
  }

  .blog-toc strong {
    display: none;
  }

  .blog-toc a {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--blog-border);
    border-radius: 6px;
  }

  .blog-related > div:last-child {
    grid-template-columns: 1fr;
  }

  .blog-related .blog-card {
    display: grid;
    grid-template-columns: 180px 1fr;
  }

  .blog-related .blog-card-image {
    height: 100%;
  }
}

@media (max-width: 640px) {
  .blog-header,
  .blog-header-inner {
    height: 58px;
  }

  .blog-header-inner {
    width: calc(100% - 24px);
  }

  .blog-brand strong {
    font-size: 17px;
  }

  .blog-brand img {
    width: 30px;
    height: 30px;
  }

  .blog-start-button {
    min-width: 82px;
    height: 36px;
    padding: 0 13px;
  }

  .blog-mobile-menu-button {
    width: 36px;
    height: 36px;
  }

  .blog-mobile-nav {
    top: 58px;
    right: 12px;
  }

  .blog-main,
  .blog-article-page {
    width: calc(100% - 32px);
  }

  .blog-category-row {
    padding-top: 24px;
  }

  .blog-index-heading {
    display: block;
    padding: 34px 0 25px;
  }

  .blog-index-heading h1 {
    margin-top: 5px;
    font-size: 34px;
  }

  .blog-index-heading p {
    font-size: 15px;
  }

  .blog-index-heading > a {
    display: none;
  }

  .blog-featured {
    gap: 13px;
    padding-bottom: 42px;
  }

  .blog-card-featured .blog-card-image {
    height: 190px;
  }

  .blog-card-body {
    padding: 17px;
  }

  .blog-card h2,
  .blog-card:not(.blog-card-featured) h2 {
    font-size: 20px;
  }

  .blog-card p {
    font-size: 13px;
  }

  .blog-latest {
    padding: 40px 0 64px;
  }

  .blog-card:not(.blog-card-featured) {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .blog-article-list .blog-card-image {
    height: 188px;
  }

  .blog-article-header {
    padding: 48px 0 30px;
  }

  .blog-article-header h1 {
    margin: 15px 0 16px;
    font-size: 36px;
    line-height: 1.16;
  }

  .blog-article-header > p {
    font-size: 16px;
  }

  .blog-article-meta {
    flex-wrap: wrap;
    row-gap: 7px;
  }

  .blog-hero {
    aspect-ratio: 16 / 9;
    margin-bottom: 38px;
  }

  .blog-prose h2 {
    font-size: 26px;
  }

  .blog-prose p,
  .blog-prose li {
    font-size: 16px;
  }

  .blog-next-step {
    padding: 22px;
  }

  .blog-related {
    padding-bottom: 64px;
  }

  .blog-related .blog-card {
    display: flex;
  }

  .blog-related .blog-card-image {
    height: 170px;
  }

  .blog-footer {
    width: calc(100% - 32px);
    grid-template-columns: 1fr auto;
    gap: 20px;
  }

  .blog-footer > div:first-child > span,
  .blog-footer nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
