.blog-page {
  background: #07111f;
}

body.blog-page main.blog-main,
body.blog-page main.blog-note-main {
  display: block;
  min-height: 100vh;
  margin-top: 0;
  padding: 0;
}

.blog-page main::before,
.blog-page main::after {
  content: none;
}

.blog-hero {
  min-height: clamp(31rem, 78svh, 45rem);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  padding: clamp(7rem, 14vw, 10rem) clamp(1rem, 6vw, 5rem) clamp(3.5rem, 8vw, 6rem);
  color: #f6faff;
  background:
    radial-gradient(circle at 82% 18%, rgb(106 138 255 / 23%), transparent 27rem),
    radial-gradient(circle at 18% 82%, rgb(123 211 214 / 16%), transparent 31rem),
    #07111f;
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background: radial-gradient(circle at 1rem 1rem, rgb(178 251 255 / 14%) 0 1px, transparent 1.5px) 0 0 / 3.5rem 3.5rem;
  mask-image: linear-gradient(135deg, transparent 8%, black 58%, transparent 96%);
}

.blog-hero__inner,
.blog-index__inner,
.blog-note {
  width: min(100%, 72rem);
  margin-inline: auto;
}

.blog-hero__inner {
  position: relative;
  z-index: 1;
}

.blog-kicker {
  margin: 0 0 1rem;
  color: #7bd3d6;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1;
  text-transform: uppercase;
}

.blog-hero h1,
.blog-note__header h1 {
  max-width: 18ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2.8rem, 8.5vw, 6.7rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .94;
  text-wrap: balance;
}

.blog-title-gradient {
  color: transparent;
  background: var(--fixed-brand-gradient);
  background-clip: text;
  font-weight: 700;
}

.blog-hero__lead,
.blog-note__summary {
  max-width: 42rem;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  color: rgb(246 250 255 / 72%);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.blog-feed-link {
  gap: .55rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.blog-index {
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1rem, 6vw, 5rem) clamp(5rem, 12vw, 9rem);
  color: #142033;
  background: #f7fafc;
}

.blog-index__heading,
.blog-card {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}

.blog-index__heading {
  align-items: end;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.blog-index__heading h2 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -.045em;
  line-height: 1;
}

.blog-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgb(20 32 51 / 20%);
  list-style: none;
}

.blog-language-panel {
  display: none;
}

html:not([lang="fr"]) .blog-language-panel[data-blog-language-panel="en"],
html[lang="fr"] .blog-language-panel[data-blog-language-panel="fr"] {
  display: block;
}

.blog-list__item,
.blog-empty {
  border-bottom: 1px solid rgb(20 32 51 / 20%);
}

.blog-card {
  row-gap: 0;
  padding: clamp(1.8rem, 4.5vw, 3.25rem) 0;
}

.blog-card__thumbnail {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin: 0;
  overflow: hidden;
}

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

.blog-card__meta {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  color: #526173;
  font-size: .7rem;
  font-weight: 600;
}

.blog-card__category {
  padding: .22rem .5rem;
  border: 1px solid rgb(8 123 134 / 24%);
  border-radius: 999px;
  color: #087b86;
}

.blog-card h2 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(1.4rem, 3.4vw, 2.45rem);
  letter-spacing: -.035em;
  line-height: 1.08;
}

.blog-card h2 a {
  color: #142033;
  text-decoration: none;
  transition: color 180ms ease;
}

.blog-card h2 a::after {
  content: " →";
  color: #087b86;
}

.blog-card h2 a:hover,
.blog-card h2 a:focus-visible,
.blog-note a {
  color: #087b86;
}

.blog-card h2 a:focus-visible,
.blog-note a:focus-visible {
  outline: 2px solid #087b86;
  outline-offset: .3rem;
}

.blog-card__description {
  grid-column: 2;
  max-width: 48rem;
  margin: 1rem 0 0;
  color: #526173;
  line-height: 1.65;
}

.blog-empty {
  padding: 2rem 0;
  color: #526173;
}

.blog-empty p {
  margin: .4rem 0;
}

body.blog-note-page {
  --home-header-foreground: #142033;
  --blog-reading-width: 696px;
  background: var(--warm-white);
}

body.blog-note-page > header {
  background: var(--warm-white);
}

body.blog-note-page > header .title-link,
body.blog-note-page > header .title span,
body.blog-note-page > header .nav-link {
  color: #142033;
}

.blog-note-main {
  padding: 80px max(clamp(1rem, 4vw, 4.85rem), env(safe-area-inset-right)) 5rem
    max(clamp(1rem, 4vw, 4.85rem), env(safe-area-inset-left)) !important;
  overflow-x: clip;
  color: #142033;
  background: var(--warm-white);
}

.blog-note-page .blog-note {
  width: 100%;
  max-width: none;
}

.blog-note__header {
  position: relative;
  display: block;
  margin: 0 0 24px;
  padding: 0;
  background: none;
}

.blog-note__cover {
  position: relative;
  height: clamp(180px, calc(100svh - 420px), 560px);
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
}

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

.blog-note__reading {
  display: grid;
  grid-template-columns: 220px minmax(0, var(--blog-reading-width)) 220px;
  justify-content: center;
  align-items: start;
  gap: 24px;
}

.blog-note__content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.blog-note__headline {
  padding-bottom: 24px;
  border-bottom: 1px solid rgb(20 32 51 / 14%);
}

.blog-note__headline h1 {
  margin: 0;
  color: #142033;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.18;
  text-wrap: pretty;
}

.blog-note__headline,
.blog-note__body,
.blog-note__toc,
.blog-note__project {
  overflow-wrap: anywhere;
}

.blog-note__summary {
  margin: 16px 0 0;
  color: #526173;
  font-size: 18px;
  line-height: 1.65;
}

.blog-note__byline,
.blog-note__modified {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1rem 0 0;
  color: #526173;
  font-size: .82rem;
}

.blog-note__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.blog-note__tags li {
  padding: .25rem .55rem;
  border: 1px solid rgb(8 123 134 / 24%);
  border-radius: 999px;
  color: #087b86;
  font-size: .72rem;
}

.blog-note__toc {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  font-size: 13px;
  line-height: 1.45;
}

.blog-note__toc details,
.blog-note__project-card {
  position: sticky;
  top: 80px;
  display: block;
}

.blog-note__toc details {
  max-height: calc(100svh - 104px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.blog-note__toc summary {
  color: #142033;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 16px;
}

.blog-note__toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-note__toc li { margin: 0; }
.blog-note__toc [data-level="2"] { padding-left: .4rem; }
.blog-note__toc [data-level="3"] { padding-left: .8rem; }
.blog-note__toc [data-level="4"] { padding-left: 1.2rem; }
.blog-note__toc [data-level="5"] { padding-left: 1.6rem; }
.blog-note__toc [data-level="6"] { padding-left: 2rem; }

.blog-note__toc a {
  display: block;
  padding: 8px 0;
  color: #526173;
  text-decoration: none;
}

.blog-note__toc a[aria-current="location"] {
  color: #142033;
  font-weight: 600;
}

.blog-note__project {
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
}

.blog-note__project-card {
  text-decoration: none;
}

.blog-note__project .project-capability-swarm {
  overflow: hidden;
  border-radius: 4px;
  background: #e8f2f8;
}

.blog-note__project .project-capability-swarm img,
.blog-note__project .project-entry__swarm {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-note__project .has-swarm img { display: none; }

.blog-note__project-name {
  margin: 14px 0 4px;
  color: #142033;
  font-size: 18px;
}

.blog-note__project-description {
  margin: 0;
  color: #526173;
  font-size: 13px;
  line-height: 1.5;
}

.blog-note__body {
  min-width: 0;
  margin-top: 24px;
  color: #142033;
  font-size: 18px;
  line-height: 1.65;
}

.blog-note__body h1,
.blog-note__body h2,
.blog-note__body h3,
.blog-note__body h4,
.blog-note__body h5,
.blog-note__body h6 {
  margin: 1.8em 0 .65em;
  color: #142033;
  scroll-margin-top: 110px;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.blog-note__body > :first-child { margin-top: 0; }
.blog-note__body h1 { font-size: clamp(28px, 3vw, 36px); }
.blog-note__body h2 { font-size: clamp(26px, 2.8vw, 34px); }
.blog-note__body h3 { font-size: clamp(22px, 2vw, 26px); }
.blog-note__body h4 { font-size: 22px; }
.blog-note__body h5 { font-size: 20px; }
.blog-note__body h6 { font-size: 18px; }

@media (width < 1200px) {
  .blog-note__reading { display: flex; flex-direction: column; gap: 24px; }
  .blog-note__content,
  .blog-note__toc,
  .blog-note__project { width: min(100%, var(--blog-reading-width)); margin-inline: auto; }
  .blog-note__toc details,
  .blog-note__project-card { position: static; max-height: none; }
  .blog-note__project-card { max-width: 220px; }
}

@media (width <= 640px) {
  .blog-note-main { padding-top: 72px !important; }
  .blog-note__cover { height: auto; aspect-ratio: 4 / 3; }
  .blog-note__summary { font-size: 16px; }
  .blog-note__body { font-size: 17px; }
}

.blog-note__body pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border-radius: .75rem;
  color: #e8f0fb;
  background: #101c2b;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.blog-note__body pre:focus-visible,
.blog-table-wrapper:focus-visible {
  outline: 2px solid #087b86;
  outline-offset: .2rem;
}

.blog-note__body img {
  max-width: 100%;
  height: auto;
}

.blog-table-wrapper {
  overflow-x: auto;
}

.blog-note__body table {
  width: 100%;
  border-collapse: collapse;
}

.blog-note__body th,
.blog-note__body td {
  padding: .7rem;
  border-bottom: 1px solid rgb(20 32 51 / 20%);
  text-align: left;
}

.blog-note__body .align-center { text-align: center; }
.blog-note__body .align-right { text-align: right; }

.blog-note__translation {
  width: min(100%, var(--blog-reading-width));
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgb(20 32 51 / 20%);
  font-weight: 700;
}

@media (width <= 720px) {
  .blog-hero { min-height: 36rem; padding-inline: 1rem; }
  .blog-index { padding-inline: 1rem; }
  .blog-index__heading,
  .blog-card { grid-template-columns: 1fr; }
  .blog-index__heading { gap: .65rem; }
  .blog-index__heading h2,
  .blog-card__thumbnail,
  .blog-card__meta,
  .blog-card h2,
  .blog-card__description { grid-column: 1; grid-row: auto; }
  .blog-card__thumbnail {
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
  }
  .blog-card__meta { flex-flow: row wrap; align-items: center; }
  .blog-note-main {
    --blog-note-top-space: 7rem;
    --blog-note-cover-height: 66.667vh;
    --blog-note-cover-height: 66.667dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card h2 a { transition: none; }
}
