:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #14161a;
  --muted: #5a6370;
  --line: #d9dce2;
  --accent: #2f6286;
  --accent-soft: #e5ebf0;
}

[data-theme="dark"] {
  --bg: #262626;
  --surface: #171b22;
  --text: #e8edf5;
  --muted: #a5b1c2;
  --line: #2a3442;
  --accent: #a9c6df;
  --accent-soft: #202b35;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
}

body {
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.4;
}

.bg-shape-a {
  width: 240px;
  height: 240px;
  background: var(--accent-soft);
  top: -80px;
  right: 8%;
}

.bg-shape-b {
  width: 300px;
  height: 300px;
  background: var(--accent-soft);
  bottom: -140px;
  left: -120px;
}

.container {
  width: min(760px, 92vw);
  margin: 0 auto;
}

.post-single--narrow {
  max-width: 72ch;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(calc(-100% - 1px));
}

.site-header.is-visible {
  transform: translateY(0);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--bg);
  }
}

.site-header__inner {
  width: min(72ch, 92vw);
  margin: 0 auto;
}

.site-header__row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.78rem;
}

.brand {
  color: var(--muted);
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0;
  font-size: 0.94rem;
  font-weight: 500;
}

.site-header__sep {
  color: var(--muted);
  opacity: 0.42;
  font-size: 0.82rem;
  line-height: 1;
}

.site-header nav {
  display: flex;
  gap: 0.72rem;
  align-items: center;
}

.site-header nav a,
.site-header nav button {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1;
  padding: 0;
  opacity: 0.84;
}

.site-header nav a:hover,
.site-header nav button:hover {
  color: var(--text);
  opacity: 1;
}

.site-header nav a[aria-current="page"] {
  color: var(--text);
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-decoration-color: color-mix(in srgb, var(--muted) 72%, transparent);
  text-underline-offset: 0.14em;
}

.theme-toggle {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle__icon {
  position: absolute;
  width: 1rem;
  height: 1rem;
  transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(70deg) scale(0.55);
}

[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(-70deg) scale(0.55);
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle.is-animating {
  animation: theme-toggle-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes theme-toggle-pop {
  0% { transform: scale(1); }
  45% { transform: scale(0.85); }
  75% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }

  .theme-toggle,
  .theme-toggle__icon {
    transition: none;
  }

  .theme-toggle.is-animating {
    animation: none;
  }
}

main {
  padding: 2.5rem 0 4rem;
}

.main--taxonomy {
  padding-top: 1.55rem;
}

.main--taxonomy .intro--minimal {
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
}

.main--taxonomy .feed-switch {
  margin-top: 0.65rem;
}

.main--taxonomy .feed-switch + .post-list--minimal,
.main--taxonomy .feed-switch + .taxonomy-list--minimal {
  margin-top: 0.4rem;
}

.main--taxonomy .taxonomy-list__heading {
  margin-top: 0.45rem;
}

.taxonomy-back-link {
  display: inline-block;
  margin: 0 0 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.76rem;
  letter-spacing: 0.015em;
  opacity: 0.72;
}

.taxonomy-back-link:hover {
  color: var(--text);
  opacity: 0.9;
}

.intro h1 {
  margin-top: 0.4rem;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
}

.intro--minimal h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.7vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.intro--minimal {
  margin: 0 0 1.8rem;
  padding: 0 0 1.15rem;
  position: relative;
}

.intro--minimal .intro-copy {
  margin: 0.3rem 0 0;
  max-width: 62ch;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  font-size: clamp(0.98rem, 1.55vw, 1.07rem);
  line-height: 1.72;
  color: color-mix(in srgb, var(--text) 86%, #9e5e2f 14%);
  letter-spacing: 0.003em;
}

.intro--minimal .intro-copy__lead {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  font-size: clamp(1.07rem, 1.8vw, 1.2rem);
  font-weight: 540;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--text) 88%, #8b4f2a 12%);
}

.intro--minimal .intro-copy__outro {
  margin: 0.35rem 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  font-size: clamp(0.96rem, 1.45vw, 1.04rem);
  font-style: italic;
  color: var(--muted);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin: 0;
}

.post-card,
.post-single {
  margin-bottom: 1rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
}

.post-single {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.post-card h2,
.post-title {
  margin-top: 0;
  line-height: 1.25;
}

.post-title,
.post-single .content h1,
.post-single .content h2,
.post-single .content h3,
.post-single .content h4,
.post-single .content h5,
.post-single .content h6 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  font-synthesis: none;
}

.post-title {
  margin-bottom: 0.35rem;
  font-size: clamp(1.7rem, 3vw, 2rem);
  font-weight: 480;
  letter-spacing: -0.012em;
}

.post-single > header .meta {
  margin: 0;
}

.post-single > header .tags {
  margin: 0.3rem 0 0;
}

.about-page__image {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  margin: 0 0 1rem;
  border: 1px solid #e5e9ef;
  /* filter: grayscale(0.8) brightness(1.4) contrast(1.10); */
}

.post-single--about .content a,
.post-single--about .content a:visited,
.post-single--about .content a:hover,
.post-single--about .content a:focus {
  text-decoration: none;
}

.post-single .content h1 {
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  font-weight: 440;
  letter-spacing: -0.008em;
  margin-top: 1.3em;
  margin-bottom: 0.38em;
}

.post-single .content h2 {
  font-weight: 440;
  letter-spacing: -0.008em;
  margin-top: 1.35em;
  margin-bottom: 0.38em;
}

.post-single .content h3,
.post-single .content h4 {
  font-weight: 420;
  margin-top: 1.25em;
  margin-bottom: 0.34em;
}

.post-single .content h5,
.post-single .content h6 {
  font-weight: 410;
}

.post-single .content h1[id],
.post-single .content h2[id],
.post-single .content h3[id],
.post-single .content h4[id],
.post-single .content h5[id],
.post-single .content h6[id] {
  scroll-margin-top: 1rem;
}

.heading-anchor {
  margin-left: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity 0.15s ease, color 0.15s ease;
  position: relative;
}

.post-single .content h1[id]:hover .heading-anchor,
.post-single .content h2[id]:hover .heading-anchor,
.post-single .content h3[id]:hover .heading-anchor,
.post-single .content h4[id]:hover .heading-anchor,
.post-single .content h5[id]:hover .heading-anchor,
.post-single .content h6[id]:hover .heading-anchor,
.post-single .content h1[id]:focus-within .heading-anchor,
.post-single .content h2[id]:focus-within .heading-anchor,
.post-single .content h3[id]:focus-within .heading-anchor,
.post-single .content h4[id]:focus-within .heading-anchor,
.post-single .content h5[id]:focus-within .heading-anchor,
.post-single .content h6[id]:focus-within .heading-anchor {
  opacity: 1;
}

.heading-anchor:hover,
.heading-anchor:focus-visible,
.heading-anchor[data-state="copied"] {
  color: var(--accent);
  opacity: 1;
}

.heading-anchor[data-state="copied"]::after {
  content: "Copied";
  margin-left: 0.38rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.8;
  vertical-align: middle;
}

.post-single .content blockquote {
  margin: 1.25rem 0;
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.post-single .content blockquote p:first-child {
  margin-top: 0;
}

.post-single .content blockquote p:last-child {
  margin-bottom: 0;
}

[data-theme="light"] .post-single .content img[src*="/assets/diagrams/"] {
  mix-blend-mode: multiply;
  opacity: 0.96;
}

[data-theme="dark"] .post-single .content img[src*="/assets/diagrams/"] {
  filter: invert(1) hue-rotate(180deg) saturate(1.28) contrast(1.12) brightness(1.04);
  mix-blend-mode: screen;
  opacity: 1;
}

.post-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-list--minimal {
  margin-top: 2.45rem;
}

.post-list--tag-term {
  margin-top: 0.72rem;
}

.feed-switch {
  margin-top: 1.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.feed-switch a {
  color: var(--muted);
  text-decoration: none;
  opacity: 0.72;
}

.feed-switch a:hover {
  color: var(--text);
  opacity: 0.92;
}

.feed-switch a[aria-current="page"] {
  color: var(--text);
  opacity: 1;
  font-weight: 500;
  text-decoration: none;
}

.feed-switch span[aria-hidden="true"] {
  opacity: 0.56;
}

.feed-switch + .post-list--minimal,
.feed-switch + .taxonomy-list--minimal {
  margin-top: 0.8rem;
}

.taxonomy-list--minimal ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.taxonomy-list__heading {
  margin: 1.35rem 0 0.45rem;
  color: var(--text);
  font-size: clamp(1rem, 1.45vw, 1.14rem);
  letter-spacing: 0.01em;
  font-weight: 500;
  font-family: inherit;
}

.taxonomy-list__item {
  margin: 0;
  padding: 0.6rem 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.35rem;
}

.taxonomy-list__item a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-family: inherit;
}

.taxonomy-list__item a:hover {
  color: var(--accent);
}

.taxonomy-list__count {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.62;
}

.taxonomy-list--inline ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem 0.62rem;
}

.taxonomy-list__item--inline {
  padding: 0;
  gap: 0.26rem;
}

.taxonomy-list__item--inline a {
  font-size: 0.94rem;
  line-height: 1.2;
}

.taxonomy-list__item--inline .taxonomy-list__count {
  font-size: 0.68rem;
}

.home-layout {
  display: grid;
  gap: 2rem;
}

.home-layout__main {
  max-width: 72ch;
  margin: 0 auto;
}

.about-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.profile-card {
  margin-top: 1.4rem;
  padding: 0;
  text-align: left;
}

.profile-card--minimal {
  background: transparent;
  border: 0;
  border-radius: 0;
  position: static;
  top: auto;
}

.about-layout .profile-card {
  margin-top: 0;
  text-align: center;
}

.profile-card__image {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.8rem;
  border: 1px solid var(--line);
}

.profile-card__name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.profile-card__bio {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.55rem 0 0.8rem;
  line-height: 1.5;
}

.profile-card__links {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.profile-card__links li + li {
  margin-top: 0;
}

.profile-card__links a {
  color: var(--text);
  text-decoration: none;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.profile-card__links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.profile-card__links svg {
  width: 1rem;
  height: 1rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-row {
  margin: 0;
  padding: 0.7rem 0;
}

.post-row:first-child {
  border-top: 0;
}

.post-row__title {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.3;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.post-row__title a {
  color: var(--text);
  text-decoration: none;
}

.post-row__title a:hover {
  color: var(--accent);
}

.post-row .meta {
  margin: 0.42rem 0 0;
  font-size: 0.71rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.55;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.post-row__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.post-row__meta-item svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-row__tags-inline a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 0.35rem;
}

.post-row__tags-inline a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.post-row__excerpt {
  margin: 0.48rem 0 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 66ch;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.tags a {
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--accent);
  margin-right: 0.45rem;
}

.post-single > header .tags > span:first-child {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  margin-right: 0.28rem;
}

.post-single > header .tags > span[aria-hidden="true"] {
  color: var(--muted);
  font-size: 0.76rem;
  opacity: 0.8;
  margin: 0 0.2rem;
}

.content a,
.content a:visited,
.content a:hover,
.content a:focus {
  color: var(--accent);
}

.post-tags-inline {
  margin: 1.35rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.post-tags-inline > span:first-child {
  letter-spacing: 0.02em;
  margin-right: 0.28rem;
}

.post-tags-inline a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
}

.post-tags-inline > span[aria-hidden="true"] {
  color: var(--muted);
  opacity: 0.75;
  margin: 0 0.2rem;
}

.post-toc {
  margin: 1.2rem 0 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.post-toc__label {
  margin: 0 0 0.52rem;
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  font-weight: 440;
  letter-spacing: -0.008em;
  text-transform: none;
  opacity: 1;
}

.post-toc #TableOfContents > ul {
  margin: 0;
  padding: 0;
}

.post-toc li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-toc li + li {
  margin-top: 0.12rem;
}

.post-toc #TableOfContents a {
  color: color-mix(in srgb, var(--text) 66%, var(--muted) 34%);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.5;
  letter-spacing: 0.002em;
  transition: color 150ms ease, opacity 150ms ease;
  opacity: 0.88;
}

.post-toc #TableOfContents a:hover,
.post-toc #TableOfContents a:focus-visible {
  color: color-mix(in srgb, var(--text) 82%, var(--accent) 18%);
  opacity: 1;
}

.post-toc #TableOfContents a[aria-current="true"] {
  color: color-mix(in srgb, var(--text) 86%, var(--accent) 14%);
  opacity: 1;
}

.post-toc #TableOfContents ul ul {
  margin-top: 0.1rem;
  margin-left: 0.64rem;
  padding-left: 0.64rem;
  border-left: 0;
}

.content .footnotes a,
.content .footnotes a:visited,
.content .footnotes a:hover,
.content .footnotes a:focus,
.content .footnote-ref a,
.content .footnote-ref a:visited,
.content .footnote-ref a:hover,
.content .footnote-ref a:focus,
.content a.footnote-backref,
.content a.footnote-backref:visited,
.content a.footnote-backref:hover,
.content a.footnote-backref:focus {
  color: var(--accent);
}

.content .footnotes hr {
  display: none;
}

.content .footnotes-heading-mobile {
  margin-top: 2.1rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  font-weight: 440;
  letter-spacing: -0.008em;
}

@media (min-width: 1180px) {
  .post-single .content.has-sidenotes {
    position: relative;
    padding-bottom: var(--sidenote-extra-space, 0);
    --sidenote-gap: 1rem;
  }

  .post-single .content.has-sidenotes .sidenote-layer {
    position: absolute;
    top: 0;
    left: calc(100% + var(--sidenote-gap));
    width: min(16rem, 20vw);
    pointer-events: none;
  }

  .post-single .content.has-sidenotes .sidenote {
    position: absolute;
    left: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.55;
    opacity: 0.9;
    pointer-events: auto;
  }

  .post-single .content.has-sidenotes .sidenote p {
    margin: 0;
  }

  .post-single .content.has-sidenotes .sidenote p + p {
    margin-top: 0.3rem;
  }

  .post-single .content.has-sidenotes .footnotes {
    display: none;
  }

  .content .footnotes-heading-mobile {
    display: none;
  }
}

@media (min-width: 1360px) {
  .post-single .content.has-sidenotes {
    --sidenote-gap: 3.25rem;
  }
}

@media (min-width: 1560px) {
  .post-single .content.has-sidenotes {
    --sidenote-gap: 5rem;
  }
}

@media (min-width: 1800px) {
  .post-single .content.has-sidenotes {
    --sidenote-gap: 6.5rem;
  }
}

.content strong,
.content b {
  font-weight: 610;
  letter-spacing: 0.003em;
}

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

.content img.lightbox-image {
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.content img.lightbox-image:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 18, 0.78);
  backdrop-filter: blur(2px);
}

.image-lightbox__figure {
  position: relative;
  margin: 0;
  max-width: min(94vw, 1500px);
  max-height: 90vh;
  transform: scale(0.97) translateY(6px);
  transition: transform 260ms ease;
}

.image-lightbox.is-open .image-lightbox__figure {
  transform: scale(1) translateY(0);
}

.image-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 2.25rem);
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.image-lightbox__caption {
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.78rem;
  color: #f6f8fb;
  letter-spacing: 0.01em;
}

.image-lightbox__close {
  position: absolute;
  top: -0.6rem;
  right: -0.6rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.82);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .image-lightbox {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content img.lightbox-image,
  .image-lightbox,
  .image-lightbox__figure {
    transition: none;
  }
}

.content :not(pre) > code {
  padding: 0.08em 0.36em;
  font-size: 0.92em;
  color: var(--text);
  background-color: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.content .highlight,
.content .chroma {
  background: #313131;
  color: #eeffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.content .highlight pre,
.content .chroma pre {
  margin: 0;
  padding: 0.8rem;
  background: transparent;
}

.content .chroma .ln,
.content .chroma .lnt {
  color: #566c76;
}

.content .chroma .c,
.content .chroma .ch,
.content .chroma .cm,
.content .chroma .c1,
.content .chroma .cs {
  color: #566c76;
}

.content .chroma .err {
  color: #fffc5b;
}

.content .chroma .k,
.content .chroma .kc,
.content .chroma .kd,
.content .chroma .kn,
.content .chroma .kp,
.content .chroma .kr,
.content .chroma .kt {
  color: #00dbf8;
}

.content .chroma .o,
.content .chroma .ow {
  color: #ff0077;
}

.content .chroma .na,
.content .chroma .nc,
.content .chroma .ne,
.content .chroma .no,
.content .chroma .nt {
  color: #6bff77;
}

.content .chroma .nb,
.content .chroma .nf,
.content .chroma .fm {
  color: #3cea82;
}

.content .chroma .m,
.content .chroma .mb,
.content .chroma .mf,
.content .chroma .mh,
.content .chroma .mi,
.content .chroma .mo,
.content .chroma .il {
  color: #f78c6c;
}

.content .chroma .s,
.content .chroma .sa,
.content .chroma .sb,
.content .chroma .sc,
.content .chroma .dl,
.content .chroma .sd,
.content .chroma .s2,
.content .chroma .se,
.content .chroma .sh,
.content .chroma .si,
.content .chroma .sx,
.content .chroma .sr,
.content .chroma .s1,
.content .chroma .ss {
  color: #ffd258;
}

.content pre {
  overflow: auto;
  padding: 0.8rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg), #000 3%);
}

.related-posts {
  margin-top: 4.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.related-posts__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.related-posts__list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
}

.related-posts__item + .related-posts__item {
  margin-top: 0.95rem;
}

.related-posts__title {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.45;
}

.related-posts__title:hover {
  color: var(--accent);
}

.related-posts__meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.post-share {
  margin-top: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.post-share + .related-posts {
  margin-top: 4.4rem;
}

.post-share a {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.48rem;
  font-size: 0.76rem;
}

.post-share a:hover {
  border-color: var(--accent);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.pagination a {
  text-decoration: none;
  color: var(--muted);
  opacity: 0.8;
}

.pagination a:hover {
  color: var(--text);
  opacity: 1;
}

.terms ul {
  list-style: none;
  padding: 0;
}

.terms li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.terms a {
  text-decoration: none;
  color: var(--text);
}

.site-footer {
  padding: 0.8rem 0 1.2rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
}

.site-footer__social {
  list-style: none;
  margin: 0 0 0.45rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-footer__social a {
  color: var(--text);
  text-decoration: none;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.site-footer__social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.site-footer__social svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer p {
  margin: 0;
  opacity: 0.82;
}

@media (min-width: 930px) {
  .container {
    width: min(900px, 92vw);
  }

  .post-single--about .about-page__image {
    float: right;
    margin: -1.1rem 0.45rem 0.95rem 0.9rem;
  }

  .about-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

  .about-layout .profile-card--minimal {
    position: sticky;
    top: 1rem;
  }
}

@media (max-width: 700px) {
  .site-header__row {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
  }

}
