/*
 * Clean Blog — Hexo port of Start Bootstrap's Clean Blog (v6).
 * Typography: Lora (serif) for long-form, system font stack for UI.
 * Palette: white background, #212529 ink, #0085a1 teal accent.
 * Layout: masthead hero + readable content column with selective side panels.
 */

/* ============ Reset / base ============ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lora", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: #0085a1;
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .18em;
  transition: color .2s ease;
}
a:hover { color: #00657b; }

hr { border: 0; border-top: 1px solid rgba(0,0,0,.10); margin: 2rem 0; }
hr.section-divider { margin: 0; border-top: 1px solid rgba(0,0,0,.08); }
hr.post-divider { border-top: 1px solid rgba(0,0,0,.12); margin: 2.5rem 0; }

/* ============ Utility ============ */
.container { width: 100%; max-width: 100%; padding-right: 1.5rem; padding-left: 1.5rem; margin: 0 auto; }
.row { display: flex; flex-wrap: wrap; margin-right: -.75rem; margin-left: -.75rem; }
.row > .col { flex: 0 0 100%; max-width: 100%; padding-right: .75rem; padding-left: .75rem; }
.justify-content-center { justify-content: center; }

@media (min-width: 768px) {
  .container { max-width: 720px; }
  .row > .col { flex: 0 0 83.333%; max-width: 83.333%; margin: 0 auto; }
}
@media (min-width: 992px) {
  .container { max-width: 960px; }
  .row > .col { flex: 0 0 66.666%; max-width: 66.666%; }
}
@media (min-width: 1200px) {
  .container { max-width: 1140px; }
  .row > .col { flex: 0 0 58.333%; max-width: 58.333%; }
}

.mb-4 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ Navbar ============ */
#mainNav {
  position: absolute;
  z-index: 1039;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  transition: background-color .25s ease, padding .25s ease, box-shadow .25s ease, border-color .25s ease;
  padding: 1.25rem 0;
}

.navbar-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1140px;
  padding: 0 1.5rem;
  margin: 0 auto;
}

.navbar-brand {
  margin-right: 1rem;
  color: #fff;
  font-family: "Lora", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
}
.navbar-brand:hover { color: #fff; }

.navbar-nav {
  display: flex;
  flex-direction: row;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item { margin-left: .5rem; }
.nav-link {
  display: inline-block;
  padding: .5rem 1rem;
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 15.5rem;
  margin: 0 .5rem 0 auto;
}

.site-search-input {
  width: 100%;
  min-height: 2.3rem;
  padding: .45rem 2.55rem .45rem .95rem;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  outline: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.site-search-input::placeholder { color: rgba(255,255,255,.72); }
.site-search-input:focus {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.82);
  box-shadow: 0 12px 34px rgba(0,0,0,.12), 0 0 0 3px rgba(0,133,161,.18);
}

.site-search-button {
  position: absolute;
  right: .22rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  color: #fff;
  background: rgba(255,255,255,.18);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.site-search-button:hover { transform: translateY(-1px); background: rgba(255,255,255,.28); }
.site-search-icon { width: 1rem; height: 1rem; fill: currentColor; }

.site-search-results {
  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  width: min(32rem, calc(100vw - 3rem));
  max-height: min(28rem, 72vh);
  overflow: auto;
  padding: .45rem;
  color: #212529;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 1.1rem;
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
  backdrop-filter: blur(14px);
}
.site-search-results[hidden] { display: none; }

.site-search-result,
.site-search-status {
  display: block;
  padding: .75rem .85rem;
  border-radius: .8rem;
  text-decoration: none;
}
.site-search-result {
  color: #212529;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.site-search-result:hover,
.site-search-result.is-active {
  color: #00657b;
  background: rgba(0,133,161,.09);
  transform: translateX(2px);
}
.site-search-title {
  display: block;
  font-family: "Lora", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}
.site-search-excerpt {
  display: block;
  margin-top: .25rem;
  color: #6c757d;
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
}
.site-search-meta {
  display: block;
  margin-top: .3rem;
  color: #0085a1;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-search-status {
  color: #6c757d;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.5;
}

.search-page-container {
  max-width: 920px;
}

.search-page-form {
  margin: 0 0 1.1rem;
}

.search-page-box {
  display: flex;
  gap: .65rem;
  align-items: center;
}

.search-page-input {
  width: 100%;
  min-height: 3.1rem;
  padding: .7rem 1rem;
  color: #212529;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.16);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-page-input:focus {
  border-color: #0085a1;
  box-shadow: 0 0 0 3px rgba(0,133,161,.14);
}

.search-page-button {
  flex: 0 0 auto;
  min-height: 3.1rem;
  padding: .7rem 1.25rem;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .08em;
  background: #0085a1;
  border: 1px solid #0085a1;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.search-page-button:hover {
  background: #00657b;
  border-color: #00657b;
  transform: translateY(-1px);
}

.search-page-status {
  min-height: 1.6rem;
  margin: 0 0 1.2rem;
  color: #6c757d;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .92rem;
  font-weight: 700;
}

.search-page-results {
  display: grid;
  gap: 1rem;
}

.search-page-result {
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 6px;
  background: #fff;
}

.search-page-result-title {
  display: inline-block;
  color: #212529;
  font-family: "Lora", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}
.search-page-result-title:hover { color: #0085a1; }

.search-page-result-excerpt {
  margin: .55rem 0 0;
  color: #495057;
  font-size: .95rem;
  line-height: 1.7;
}

.search-page-result-meta {
  margin-top: .55rem;
  color: #0085a1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 575.98px) {
  .search-page-box { align-items: stretch; flex-direction: column; }
  .search-page-button { width: 100%; }
}

/* Shrunken — frosted glass (scrolled past hero) */
#mainNav.is-shrunk,
#mainNav.nav-solid {
  position: fixed;
  padding: .5rem 0;
  background-color: rgba(255,255,255,.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: rgba(0,0,0,.08);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
#mainNav.is-shrunk .navbar-brand,
#mainNav.nav-solid .navbar-brand { color: #212529; }
#mainNav.is-shrunk .nav-link,
#mainNav.nav-solid .nav-link { color: #212529; }
#mainNav.is-shrunk .nav-link:hover,
#mainNav.is-shrunk .nav-link.active,
#mainNav.nav-solid .nav-link:hover,
#mainNav.nav-solid .nav-link.active { color: #0085a1; }
#mainNav.is-shrunk .site-search-input,
#mainNav.nav-solid .site-search-input {
  color: #212529;
  background: rgba(0,0,0,.035);
  border-color: rgba(0,0,0,.14);
  box-shadow: none;
}
#mainNav.is-shrunk .site-search-input::placeholder,
#mainNav.nav-solid .site-search-input::placeholder { color: rgba(33,37,41,.5); }
#mainNav.is-shrunk .site-search-input:focus,
#mainNav.nav-solid .site-search-input:focus {
  background: #fff;
  border-color: rgba(0,133,161,.45);
  box-shadow: 0 0 0 3px rgba(0,133,161,.13);
}
#mainNav.is-shrunk .site-search-button,
#mainNav.nav-solid .site-search-button {
  color: #0085a1;
  background: rgba(0,133,161,.1);
}
#mainNav.is-shrunk .site-search-button:hover,
#mainNav.nav-solid .site-search-button:hover { background: rgba(0,133,161,.16); }

/* Every page has a masthead hero, so the navbar overlaps it by default (already
   position: absolute above) and becomes fixed/solid once the user scrolls past it. */

/* Mobile toggler */
.navbar-toggler {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  padding: .5rem .75rem;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 4px;
  cursor: pointer;
}
#mainNav.is-shrunk .navbar-toggler,
#mainNav.nav-solid .navbar-toggler {
  color: #212529;
  border-color: rgba(0,0,0,.25);
}
.navbar-toggler-icon { display: inline-flex; flex-direction: column; gap: 3px; }
.navbar-toggler-icon span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 1px; }

.navbar-collapse {
  display: flex;
  flex-basis: auto;
  flex-grow: 1;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 1199.98px) {
  .site-search { width: 12.75rem; }
  .nav-link { padding-right: .75rem; padding-left: .75rem; }
}

@media (max-width: 991.98px) {
  #mainNav { padding: .75rem 0; }
  .navbar-toggler { display: inline-flex; }
  .navbar-collapse {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    align-items: stretch;
    justify-content: flex-start;
    transition: max-height .28s ease;
  }
  .navbar-collapse.is-open { max-height: 42rem; }
  .site-search {
    width: 100%;
    margin: 1rem 0 .25rem;
  }
  .site-search-results {
    position: static;
    width: 100%;
    max-height: 18rem;
    margin-top: .5rem;
  }
  .navbar-nav { flex-direction: column; width: 100%; margin: .5rem 0 .5rem; }
  .nav-item { margin: 0; border-top: 1px solid rgba(255,255,255,.15); }
  .nav-link { padding: .9rem .25rem; }
  #mainNav.is-shrunk .nav-item,
  #mainNav.nav-solid .nav-item { border-top-color: rgba(0,0,0,.08); }
}

/* ============ Masthead hero ============ */
.masthead {
  position: relative;
  margin-bottom: 3rem;
  padding: 12rem 0 6rem;
  background: #212529 no-repeat center center;
  background-size: cover;
  color: #fff;
  text-align: center;
}
.masthead-overlay {
  position: absolute;
  inset: 0;
  background: rgba(33,37,41,.5);
}
.masthead-container {
  position: relative;
  width: 100%;
  max-width: 1140px;
  padding: 0 1.5rem;
  margin: 0 auto;
}
.masthead-inner { max-width: 46rem; margin: 0 auto; }

.masthead .site-heading h1,
.masthead .post-heading h1,
.masthead .page-heading h1 {
  font-family: "Lora", Georgia, serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0;
  color: #fff;
}

.masthead .site-heading h1 { font-size: 3.25rem; }
.masthead .site-heading .subheading {
  display: block;
  margin: 1rem auto 0;
  max-width: 38rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255,255,255,.92);
}

.masthead .page-heading h1 { font-size: 3rem; }
.masthead .page-heading .subheading {
  display: block;
  margin: 1rem auto 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: rgba(255,255,255,.92);
}

.post-title-line {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .85rem 1rem;
  text-align: left;
}
.masthead .post-heading h1 {
  flex: 1 1 28rem;
  margin: 0;
  font-size: 3rem;
  text-align: left;
}
.post-reading-stats {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .55rem;
  margin-top: .42rem;
  padding: .42rem .72rem;
  color: rgba(255,255,255,.9);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0,0,0,.16);
  backdrop-filter: blur(10px);
}
.post-reading-stats span + span::before {
  content: "";
  display: inline-block;
  width: .28rem;
  height: .28rem;
  margin: 0 .55rem .12rem 0;
  vertical-align: middle;
  background: rgba(255,255,255,.58);
  border-radius: 50%;
}
.masthead .post-heading .subheading {
  margin-top: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255,255,255,.92);
  text-align: left;
}
.masthead .post-heading .meta {
  display: block;
  margin-top: 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-style: italic;
  font-size: 1.125rem;
  color: rgba(255,255,255,.82);
  text-align: left;
}
.masthead .post-heading .meta a { color: inherit; text-decoration: underline; }
.masthead .post-heading .meta a:hover { color: #fff; }

.masthead-post { padding: 12rem 0 6rem; }

@media (min-width: 768px) {
  .masthead { padding: 14rem 0 8rem; }
  .masthead .site-heading h1 { font-size: 5rem; }
  .masthead .page-heading h1 { font-size: 4rem; }
  .masthead .post-heading h1 { font-size: 3.5rem; }
}

@media (max-width: 575.98px) {
  .masthead { padding: 9rem 0 4.5rem; }
  .masthead .site-heading h1 { font-size: 2.25rem; }
  .masthead .site-heading .subheading { font-size: 1.15rem; }
  .masthead .post-heading h1 { font-size: 2rem; }
  .post-reading-stats {
    width: 100%;
    justify-content: center;
    margin-top: .1rem;
    white-space: normal;
  }
  .masthead .post-heading .subheading { font-size: 1.15rem; }
}

/* Full-screen home hero; fixed-height page heroes. */
.masthead-site {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 0;
  padding-bottom: 0;
}

.masthead-site .masthead-container {
  flex: 0 0 auto;
}

.masthead-page {
  display: flex;
  align-items: center;
  height: 21.35rem;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.masthead-page .masthead-container {
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .masthead-page {
    height: 26.45rem;
  }
}

@media (max-width: 575.98px) {
  .masthead-page {
    height: 16rem;
  }
}

/* ============ Post preview (index) ============ */
.home-container { max-width: 900px; }
.home-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.home-posts { min-width: 0; }
.home-posts .post-preview:first-child { padding-top: 0; }

.post-preview { padding: 2rem 0 0; }
.post-preview > a { display: block; color: inherit; text-decoration: none; }
.post-preview > a:hover .post-title,
.post-preview > a:focus .post-title { color: #0085a1; }

.post-title {
  margin: 0 0 .5rem;
  font-family: "Lora", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: #212529;
  transition: color .2s ease;
}

.post-subtitle {
  margin: 0 0 .8rem;
  font-family: "Lora", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #6c757d;
}

.post-meta {
  margin: 0 0 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  font-style: italic;
  color: #6c757d;
}
.post-meta a { color: #212529; text-decoration: none; }
.post-meta a:hover { color: #0085a1; text-decoration: underline; }
.post-meta-sep { margin: 0 .4rem; opacity: .6; }
.post-meta-cat { margin-right: .3rem; text-transform: none; }

@media (min-width: 768px) {
  .post-preview { padding: 2.5rem 0 0; }
  .post-title { font-size: 2.25rem; }
  .post-subtitle { font-size: 1.5rem; }
}

/* ============ Article body ============ */
.article { margin-top: 1rem; }
.article-page .post-body,
.article-post .post-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #212529;
}

.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 {
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: #212529;
  margin: 2.2rem 0 1rem;
}
.post-body h1 { font-size: 2rem; }
.post-body h2 { font-size: 1.7rem; }
.post-body h3 { font-size: 1.4rem; }
.post-body h4 { font-size: 1.2rem; }
.post-body h5 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
.post-body h6 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: #6c757d; }

.post-body p { margin: 0 0 1.3rem; }
.post-body strong { color: #111; }
.post-body em { font-style: italic; }

.post-body ul, .post-body ol { padding-left: 1.6rem; margin: 0 0 1.3rem; }
.post-body li { margin-bottom: .35rem; }
.post-body li > p { margin: 0 0 .35rem; }

.post-body blockquote {
  margin: 1.8rem 0;
  padding: .6rem 1.3rem;
  border-left: 4px solid #0085a1;
  background: #f7f8fa;
  color: #495057;
  font-style: italic;
  font-size: 1rem;
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body img { margin: 1.5rem auto; border-radius: 2px; }
.post-body figure { margin: 1.5rem 0; text-align: center; }
.post-body figcaption { margin-top: .4rem; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: .9rem; color: #6c757d; }

.post-body table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .95rem;
}
.post-body th, .post-body td {
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
  text-align: left;
}
.post-body th {
  font-weight: 700;
  border-bottom-width: 2px;
  border-bottom-color: rgba(0,0,0,.2);
  background: #fafbfc;
}
.post-body tbody tr:hover { background: #fafbfc; }

/* Inline code */
.post-body :not(pre) > code {
  padding: .15em .4em;
  background: #f1f3f5;
  border-radius: 3px;
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .88em;
  color: #c0392b;
}

/* Code blocks (Prism) */
.code-block {
  position: relative;
  margin: 1.5rem 0;
}
.post-body pre {
  margin: 0;
  padding: 2.25rem 1.1rem 1rem;
  overflow-x: auto;
  background: #1f2329;
  color: #e6edf3;
  border-radius: 4px;
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .88rem;
  line-height: 1.65;
}
.post-body pre code {
  display: block;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}
.post-body pre.line-numbers {
  position: relative;
  padding-left: 4.25rem;
  counter-reset: linenumber;
}
.post-body pre.line-numbers > code { position: relative; }
.post-body pre.line-numbers .line-numbers-rows {
  position: absolute;
  top: 0;
  left: -3.25rem;
  width: 2.45rem;
  border-right: 1px solid rgba(255,255,255,.12);
  pointer-events: none;
  user-select: none;
}
.post-body pre.line-numbers .line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}
.post-body pre.line-numbers .line-numbers-rows > span::before {
  content: counter(linenumber);
  display: block;
  padding-right: .75rem;
  color: #6c7a89;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.code-copy-button {
  position: absolute;
  top: .65rem;
  right: .65rem;
  z-index: 2;
  padding: .32rem .62rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(15,23,32,.82);
  color: #dce6ef;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease, color .2s ease;
}
.code-block:hover .code-copy-button,
.code-copy-button:focus-visible {
  opacity: 1;
  transform: translateY(0);
}
.code-copy-button:hover,
.code-copy-button.is-copied {
  background: #0085a1;
  color: #fff;
}
@media (hover: none) {
  .code-copy-button {
    opacity: 1;
    transform: translateY(0);
  }
}
.code-language {
  position: absolute;
  top: .72rem;
  left: .85rem;
  z-index: 2;
  color: #7f8793;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

figure.highlight {
  margin: 1.5rem 0;
  background: #1f2329;
  color: #e6edf3;
  border-radius: 4px;
  overflow: hidden;
  font-size: .88rem;
  line-height: 1.65;
}
figure.highlight table { margin: 0; width: 100%; }
figure.highlight td { padding: .35rem .9rem; border: 0; vertical-align: top; }
figure.highlight .gutter { width: 1%; color: #6c7a89; text-align: right; user-select: none; border-right: 1px solid rgba(255,255,255,.08); }
figure.highlight .gutter pre, figure.highlight .code pre { margin: 0; padding: 0; background: transparent; color: inherit; }
figure.highlight figcaption {
  padding: .4rem .9rem;
  background: rgba(255,255,255,.04);
  color: #9ba3af;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
figure.highlight figcaption a { color: inherit; text-decoration: underline; }

/* Prism colours on dark background */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #7f8793; font-style: italic; }
.token.punctuation { color: #c9d1d9; }
.token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol, .token.deleted { color: #f59e9e; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #a5d6a7; }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: #f0b5a1; }
.token.atrule, .token.attr-value, .token.keyword { color: #7fb8ff; }
.token.function, .token.class-name { color: #ffd98c; }
.token.regex, .token.important, .token.variable { color: #f5b66b; }
.token.important, .token.bold { font-weight: 700; }
.token.italic { font-style: italic; }

/* KaTeX display math spacing */
.katex-display { margin: 1.4rem 0; overflow-x: auto; overflow-y: hidden; }

/* ============ Post footer widgets ============ */
.post-tags {
  margin: 2.5rem 0 0;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(0,0,0,.08);
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .9rem;
  color: #6c757d;
}
.post-tags-label { margin-right: .6rem; font-weight: 700; color: #212529; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.post-tag { margin-right: .5rem; color: #0085a1; text-decoration: none; }
.post-tag:hover { text-decoration: underline; }

.post-pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 2rem 0 0;
}
.post-pager-item {
  flex: 1;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #212529;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}
.post-pager-item:hover { border-color: #0085a1; background: #f7f9fb; color: #0085a1; }
.post-pager-next { text-align: right; }
.post-pager-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #6c757d; margin-bottom: .25rem; }
.post-pager-title { display: block; font-family: "Lora", Georgia, serif; font-size: 1rem; font-weight: 700; }

.post-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(0,0,0,.08); }

/* ============ Archive / taxonomy ============ */
.empty-state {
  margin: 3rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-style: italic;
  color: #6c757d;
  text-align: center;
}

.archive-list { margin: 0; padding: 0; }
.archive-year {
  padding: 1rem 0 2rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.archive-year:last-child { border-bottom: 0; }
.archive-year-title {
  margin: 0 0 1rem;
  font-family: "Lora", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #212529;
}
.archive-posts { list-style: none; margin: 0; padding: 0; }
.archive-post {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .5rem 0;
  font-family: "Lora", Georgia, serif;
}
.archive-post-date {
  flex: 0 0 auto;
  width: 3.2rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .85rem;
  color: #6c757d;
}
.archive-post-title {
  font-size: 1.08rem;
  color: #212529;
  text-decoration: none;
  transition: color .2s ease;
}
.archive-post-title:hover { color: #0085a1; }

/* Categories / tags index */
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}
.taxonomy-item a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 4px;
  text-decoration: none;
  color: #212529;
  transition: border-color .2s ease, background .2s ease;
}
.taxonomy-item a:hover { border-color: #0085a1; background: #f7f9fb; color: #0085a1; }
.taxonomy-name { font-family: "Lora", Georgia, serif; font-size: 1.15rem; font-weight: 700; }
.taxonomy-count {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .85rem;
  color: #6c757d;
  background: #f1f3f5;
  padding: .15rem .5rem;
  border-radius: 999px;
}
.taxonomy-item a:hover .taxonomy-count { background: #0085a1; color: #fff; }

.row > .tag-page-col {
  flex-basis: 100%;
  max-width: 860px;
}

.tag-cloud { list-style: none; margin: 2rem 0; padding: 0; text-align: center; line-height: 2.2; }
.tag-cloud-item { display: inline; }
.tag-cloud-item a {
  display: inline-block;
  margin: .1rem .45rem;
  font-family: "Lora", Georgia, serif;
  font-size: 1rem;
  color: #1f4f5f;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease, text-shadow .2s ease;
}
.tag-cloud-level-1 { font-size: .9rem; }
.tag-cloud-level-2 { font-size: 1rem; }
.tag-cloud-level-3 { font-size: 1.1rem; }
.tag-cloud-level-4 { font-size: 1.2rem; }
.tag-cloud-level-5 { font-size: 1.33rem; }
.tag-cloud-level-6 { font-size: 1.48rem; }
.tag-cloud-level-7 { font-size: 1.64rem; }
.tag-cloud-level-8 { font-size: 1.82rem; }
.tag-cloud-color-0 { color: #1f4ed8; }
.tag-cloud-color-1 { color: #26a269; }
.tag-cloud-color-2 { color: #c026d3; }
.tag-cloud-color-3 { color: #0f766e; }
.tag-cloud-color-4 { color: #7c3aed; }
.tag-cloud-color-5 { color: #dc2626; }
.tag-cloud-color-6 { color: #16a34a; }
.tag-cloud-color-7 { color: #2563eb; }
.tag-cloud-item a:hover {
  color: #0085a1;
  transform: translateY(-2px);
  text-shadow: 0 8px 18px rgba(0,133,161,.18);
}
.tag-cloud-count {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .72em;
  color: #6c757d;
  vertical-align: super;
}
.tag-cloud--home {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .45rem .7rem;
  margin: .5rem 0 0;
  line-height: 1.25;
}
.tag-cloud--home .tag-cloud-item { display: inline-flex; }
.tag-cloud--home .tag-cloud-item a {
  margin: 0;
  padding: .12rem .22rem;
  border-radius: 999px;
}
.tag-cloud--home .tag-cloud-item:nth-child(3n+1) a { transform: rotate(-2deg); }
.tag-cloud--home .tag-cloud-item:nth-child(4n+2) a { transform: rotate(2deg); }
.tag-cloud--home .tag-cloud-item:nth-child(5n+3) a { transform: translateY(3px); }
.tag-cloud--home .tag-cloud-item a:hover {
  transform: translateY(-3px) scale(1.03);
}

.tag-cloud-figure {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  margin: .4rem auto 0;
  aspect-ratio: 43 / 31;
}
.tag-cloud-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.tag-cloud-glow {
  opacity: .42;
}
.tag-cloud-glow ellipse:first-child {
  fill: rgba(0,133,161,.06);
  stroke: rgba(0,133,161,.16);
  stroke-width: 1;
  stroke-dasharray: 8 10;
}
.tag-cloud-glow ellipse:nth-child(2) { fill: rgba(245,182,107,.12); }
.tag-cloud-glow ellipse:nth-child(3) { fill: rgba(127,184,255,.11); }
.tag-cloud-svg-link {
  text-decoration: none;
  outline: none;
}
.tag-cloud-word,
.tag-cloud-lift {
  transform-box: fill-box;
  transform-origin: center;
}
.tag-cloud-word {
  transition: transform .24s cubic-bezier(.2,.9,.2,1);
  will-change: transform;
}
.tag-cloud-figure.is-resetting .tag-cloud-word {
  transition: none;
}
.tag-cloud-lift {
  transition: transform .18s ease;
  will-change: transform;
}
@keyframes tagCloudHoverFloat {
  0%, 100% { transform: translateY(calc(var(--tcf-rise, 6px) * -0.5)) scale(1.02); }
  50% { transform: translateY(calc(var(--tcf-rise, 6px) * -0.75)) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .tag-cloud-word,
  .tag-cloud-lift {
    animation: none !important;
    transition: none !important;
  }
}
.tag-cloud-svg text {
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255,255,255,.92);
  stroke-width: 2.35px;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill .2s ease, fill-opacity .2s ease, filter .2s ease, transform .2s ease;
}
.tag-cloud-svg-link:hover .tag-cloud-lift,
.tag-cloud-svg-link:focus-visible .tag-cloud-lift,
.tag-cloud-svg-link.is-active .tag-cloud-lift {
  animation: tagCloudHoverFloat 1.2s ease-in-out infinite;
}
.tag-cloud-svg-link:hover text,
.tag-cloud-svg-link:focus-visible text,
.tag-cloud-svg-link.is-active text {
  fill: #0085a1;
  fill-opacity: 1;
  filter: drop-shadow(0 8px 12px rgba(0,133,161,.18));
}
.tag-cloud-svg-link.is-repelled text {
  fill-opacity: .88;
}

.page-extra { margin-top: 2.5rem; }

/* ============ Pagination ============ */
.pager {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin: 3rem 0 1rem;
}
.pager .btn {
  display: inline-block;
  padding: .7rem 1.3rem;
  border: 1px solid #212529;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: #212529;
  text-decoration: none;
  background: #fff;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pager .btn:hover {
  background: #212529;
  color: #fff;
}

/* ============ Load More ============ */
.load-more-wrap {
  text-align: center;
  margin: 3rem 0 1rem;
}
.load-more-btn {
  display: inline-block;
  padding: .75rem 2.5rem;
  border: 1px solid #212529;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: #212529;
  background: #fff;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.load-more-btn:hover {
  background: #212529;
  color: #fff;
}
.load-more-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ============ Footer ============ */
.site-footer {
  padding: 3rem 0 2.5rem;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.site-footer-inner {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.social-list { list-style: none; margin: 0 0 1rem; padding: 0; display: inline-flex; gap: .65rem; flex-wrap: wrap; justify-content: center; }
.social-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  background: #212529;
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background .2s ease;
}
.social-list-item a { text-decoration: none; color: inherit; }
.social-list-item a:hover .social-circle { background: #0085a1; }
.social-label { line-height: 1; }

.site-footer-copy {
  font-style: italic;
  font-size: .9rem;
  color: #6c757d;
}
.site-footer-dot { margin: 0 .4rem; opacity: .5; font-style: normal; }
.site-footer-copy a { color: inherit; text-decoration: underline; }
.site-footer-copy a:hover { color: #0085a1; }

/* ============ Reading progress (on top) ============ */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: #0085a1;
  z-index: 2000;
  transition: width .12s ease;
}

/* ============ Back-to-top ============ */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.75rem; height: 2.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  background: #212529;
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  transition: background .2s ease, transform .2s ease;
  z-index: 1040;
}
.back-to-top:hover { background: #0085a1; transform: translateY(-2px); }
.back-to-top.is-visible { display: inline-flex; }

/* ============ Selection ============ */
::selection { background: rgba(0,133,161,.22); color: #00404a; }

/* ============ Small responsive tweaks ============ */
@media (max-width: 575.98px) {
  .post-pager { flex-direction: column; }
  .post-pager-next { text-align: left; }
  .pager { justify-content: space-between; }
  .load-more-btn { width: 100%; }
  .post-body { font-size: 1rem; line-height: 1.75; }
}

/* ============ Article TOC Sidebar ============ */
.article-container {
  max-width: 100%;
}

.article-layout {
  display: block;
}

.article-content-col {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.post-body h2[id],
.post-body h3[id] {
  scroll-margin-top: 5.5rem;
}

.article-toc-sidebar[hidden],
.toc-fab[hidden],
.toc-drawer[hidden] {
  display: none !important;
}

.article-toc-sidebar {
  display: none;
}

.article-toc {
  width: 100%;
  padding: .85rem .7rem;
  color: #212529;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: width .3s cubic-bezier(0.4, 0, 0.2, 1), padding .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 2rem;
  margin-bottom: .35rem;
}

.article-toc-title,
.toc-drawer-header h2 {
  margin: 0;
  color: #212529;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-toc-collapse,
.toc-drawer-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  color: #6c757d;
  background: rgba(0,0,0,.035);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.article-toc-collapse:hover,
.article-toc-collapse:focus-visible,
.toc-drawer-close:hover,
.toc-drawer-close:focus-visible {
  color: #0085a1;
  background: rgba(0,133,161,.1);
  border-color: rgba(0,133,161,.2);
  outline: none;
}

.article-toc-collapse span,
.toc-drawer-close span {
  position: relative;
  display: block;
  width: .68rem;
  height: .68rem;
}

.article-toc-collapse span::before {
  content: "";
  position: absolute;
  inset: .08rem .02rem .08rem .2rem;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.toc-drawer-close span::before,
.toc-drawer-close span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .78rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.toc-drawer-close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.toc-drawer-close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.article-toc-scroll {
  max-height: calc(100vh - 9rem);
  overflow: auto;
  padding-right: .2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.18) transparent;
}

.article-toc-list,
.article-toc-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc-item {
  min-width: 0;
}

.article-toc-link {
  display: block;
  overflow: hidden;
  padding: .36rem .5rem .36rem .72rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  color: #495057;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .3s cubic-bezier(0.4, 0, 0.2, 1), background-color .3s cubic-bezier(0.4, 0, 0.2, 1), border-color .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-toc-link[data-toc-level="3"] {
  padding-left: 1.35rem;
  color: #6c757d;
  font-size: .76rem;
}

.article-toc-link:hover,
.article-toc-link:focus-visible {
  color: #0085a1;
  background: rgba(0,133,161,.06);
  outline: none;
}

.article-toc-link.is-active {
  color: #212529;
  border-left-color: #0085a1;
  background: rgba(0,133,161,.07);
  font-weight: 600;
}

.article-layout.toc-is-collapsed .article-toc {
  padding: .7rem .45rem;
}

.article-layout.toc-is-collapsed .article-toc-header {
  flex-direction: column;
  justify-content: center;
  margin-bottom: 0;
}

.article-layout.toc-is-collapsed .article-toc-title {
  overflow: hidden;
  max-height: 5.6rem;
  color: #6c757d;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.article-layout.toc-is-collapsed .article-toc-collapse {
  transform: rotate(180deg);
}

.article-layout.toc-is-collapsed .article-toc-scroll {
  display: none;
}

.toc-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 5rem;
  z-index: 1038;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: #0085a1;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  cursor: pointer;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: color .2s ease, background-color .2s ease, transform .35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .2s ease;
}

.toc-fab:hover,
.toc-fab:focus-visible {
  color: #fff;
  background: #0085a1;
  box-shadow: 0 16px 48px rgba(0,0,0,.16);
  outline: none;
  transform: translateY(-2px);
}

.toc-fab-icon {
  display: grid;
  gap: .22rem;
  width: 1.08rem;
}

.toc-fab-icon span {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  margin-left: .18rem;
  background: currentColor;
  border-radius: 999px;
}

.toc-fab-icon span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -.36rem;
  width: .18rem;
  height: .18rem;
  background: currentColor;
  border-radius: 999px;
  transform: translateY(-50%);
}

.toc-drawer {
  position: fixed;
  inset: 0;
  z-index: 1045;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s cubic-bezier(0.4, 0, 1, 1);
}

.toc-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transition-duration: .3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33,37,41,.28);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.toc-drawer-panel {
  position: relative;
  width: min(100%, 40rem);
  max-height: min(72vh, 36rem);
  overflow: hidden;
  padding: 1rem 1rem 1.1rem;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 16px 48px rgba(0,0,0,.16);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transform: translate3d(0, 1.5rem, 0);
  transition: transform .3s cubic-bezier(0.2, 0, 0, 1);
}

.toc-drawer.is-open .toc-drawer-panel {
  transform: translate3d(0, 0, 0);
}

.toc-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .1rem .1rem .8rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.toc-drawer-scroll {
  max-height: calc(min(72vh, 36rem) - 4.25rem);
  overflow: auto;
  padding: .65rem .1rem .1rem 0;
}

.toc-drawer-list .article-toc-link {
  padding-top: .46rem;
  padding-bottom: .46rem;
  font-size: .9rem;
}

.toc-drawer-list .article-toc-link[data-toc-level="3"] {
  font-size: .82rem;
}

body.toc-drawer-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  .article-content-col {
    max-width: 600px;
  }
}

@media (min-width: 992px) {
  .article-content-col {
    max-width: 640px;
  }
}

@media (min-width: 1200px) {
  .article-container {
    max-width: 1140px;
  }

  .article-content-col {
    max-width: 665px;
  }

  .article-layout.has-toc {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 700px);
    gap: 3rem;
    align-items: start;
    justify-content: center;
  }

  .article-layout.has-toc.toc-is-collapsed {
    grid-template-columns: 3.25rem minmax(0, 700px);
    gap: 2rem;
  }

  .article-layout.has-toc .article-toc-sidebar {
    position: sticky;
    top: 5rem;
    display: block;
    max-height: calc(100vh - 7rem);
  }

  .article-layout.has-toc .article-content-col {
    max-width: 700px;
    margin: 0;
  }
}

@media (max-width: 1199.98px) {
  .toc-fab:not([hidden]) {
    display: inline-flex;
  }
}

@media (max-width: 575.98px) {
  .toc-fab {
    right: 1rem;
    bottom: 4.75rem;
    width: 2.55rem;
    height: 2.55rem;
  }

  .toc-drawer-panel {
    max-height: 78vh;
    padding: .9rem .9rem 1rem;
  }

  .toc-drawer-scroll {
    max-height: calc(78vh - 4.25rem);
  }
}

/* ============ Post Preview Entrance ============ */
.post-preview[data-animate-card="true"] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s cubic-bezier(0.2, 0, 0, 1), transform .5s cubic-bezier(0.2, 0, 0, 1);
}

.post-preview[data-animate-card="true"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.post-divider[data-animate-divider="true"] {
  opacity: 0;
}

.post-divider[data-animate-divider="true"].is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .post-preview[data-animate-card="true"],
  .post-preview[data-animate-card="true"].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .post-divider[data-animate-divider="true"] {
    opacity: 1;
  }
}

/* ============ Masthead Photography Depth ============ */
.masthead {
  overflow: hidden;
  isolation: isolate;
  background-color: #212529;
}

.masthead::before {
  content: "";
  position: absolute;
  inset: -6% 0;
  z-index: 0;
  background-image: inherit;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translate3d(0, var(--masthead-bg-y, 0px), 0) scale(var(--masthead-bg-scale, 1));
  transform-origin: center top;
  transition: transform .12s linear;
}

.masthead.is-parallax-ready::before {
  will-change: transform;
}

.masthead-overlay {
  z-index: 1;
  background: rgba(17,20,24,.58);
}

.masthead-container {
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .article-toc,
  .article-toc-link,
  .article-toc-collapse,
  .toc-fab,
  .toc-drawer,
  .toc-drawer-panel,
  .masthead::before {
    transition: none !important;
  }

  .masthead::before {
    transform: none;
  }
}
