:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f8ff;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --text: #243044;
  --muted: #6b7280;
  --border: #d9e0ef;
  --primary: #00589c;
  --primary-soft: rgba(0, 88, 156, 0.1);
  --accent: #667eea;
  --accent-2: #764ba2;
  --code-bg: #f3f6fb;
  --shadow: 0 8px 25px rgba(15, 23, 42, 0.1);
  --header-height: 64px;
  --content-width: 940px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --bg-soft: #0f172a;
  --surface: #182234;
  --surface-alt: #1f2937;
  --text: #e5e7eb;
  --muted: #a4afc1;
  --border: #334155;
  --primary: #1e88e5;
  --primary-soft: rgba(30, 136, 229, 0.16);
  --accent: #8eb2ff;
  --accent-2: #a88be8;
  --code-bg: #0b1220;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111827;
    --bg-soft: #0f172a;
    --surface: #182234;
    --surface-alt: #1f2937;
    --text: #e5e7eb;
    --muted: #a4afc1;
    --border: #334155;
    --primary: #1e88e5;
    --primary-soft: rgba(30, 136, 229, 0.16);
    --accent: #8eb2ff;
    --accent-2: #a88be8;
    --code-bg: #0b1220;
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.68;
}

body::before {
  display: none;
}

body.is-home::before {
  display: block;
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--text), transparent 93%) 1px, transparent 1px 38px) 50% 0 / 38px 38px,
    linear-gradient(color-mix(in srgb, var(--text), transparent 93%) 1px, transparent 1px 38px) 50% 0 / 38px 38px;
  mask: linear-gradient(180deg, white 0, transparent 560px);
  opacity: 0.55;
  z-index: -1;
}

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

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

img,
video {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--surface), transparent 8%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 5px 18px rgba(102, 126, 234, 0.3);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 650;
}

.top-nav a {
  color: var(--muted);
}

.top-nav a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-button {
  display: none;
}

.site-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, var(--content-width)) 250px;
  gap: 28px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.content {
  min-width: 0;
}

.sidebar,
.toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 4%);
}

.sidebar-title,
.toc-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-list,
.sidebar-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  margin: 8px 0;
}

.sidebar-list ul {
  margin: 7px 0 10px 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 0.92rem;
}

.sidebar-list a,
.toc a {
  color: var(--muted);
}

.sidebar-list a:hover,
.toc a:hover {
  color: var(--primary);
}

.toc nav ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.toc nav ul ul {
  padding-left: 14px;
}

.toc li {
  margin: 7px 0;
  font-size: 0.88rem;
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  min-height: 250px;
  margin: 10px 0 26px;
  flex-wrap: wrap;
}

.hero-copy {
  flex: 1 1 320px;
  max-width: 430px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  background-clip: text;
  color: transparent;
  font-size: clamp(2.4rem, 5vw, 3rem);
  font-weight: 850;
  line-height: 1.1;
}

.subtitle {
  position: relative;
  display: inline-block;
  margin: 0 0 26px;
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 650;
}

.hero-underline {
  position: absolute;
  left: 0;
  bottom: 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 26px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  color: var(--accent);
  font-weight: 750;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.pill-button:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  transform: translateY(-2px);
}

.hero-avatar {
  flex: 0 0 220px;
  display: grid;
  place-items: center;
}

.avatar-flip,
.avatar-images {
  position: relative;
  width: 220px;
  height: 220px;
}

.avatar-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ff9edb, #a2d8ff, #a8ffb0, #fff5a8, #ffb0b0, #ff9edb);
  filter: blur(40px);
  opacity: 0.66;
  animation: glow-rotate 15s linear infinite, glow-pulse 4s ease-in-out infinite;
}

.avatar-images {
  z-index: 1;
  perspective: 1200px;
}

.avatar-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  backface-visibility: hidden;
  transition: transform 1s cubic-bezier(.4,2,.6,1);
}

.avatar-images img:nth-child(2) {
  transform: rotateY(180deg);
}

.avatar-images:hover img:first-child {
  transform: rotateY(180deg);
}

.avatar-images:hover img:nth-child(2) {
  transform: rotateY(0deg);
}

@keyframes glow-rotate {
  to { transform: rotate(360deg); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.58; filter: blur(40px) brightness(1); }
  50% { opacity: 0.82; filter: blur(45px) brightness(1.15); }
}

.mobile-motto {
  display: none;
  text-align: center;
}

.mobile-motto h1 {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  background-clip: text;
  color: transparent;
  font-size: 1.6rem;
}

.greeting-box {
  margin: 22px 0;
  padding: 20px;
  text-align: center;
  border: 2px solid rgba(102, 126, 234, 0.28);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

#greeting-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  background-clip: text;
  color: transparent;
  font-size: 1.5rem;
  font-weight: 750;
}

#greeting-text span {
  color: initial;
}

.home-grid,
.post-grid,
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.feature-wide {
  grid-template-columns: 1fr;
}

.feature-card,
.post-card,
.showcase-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 2%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border), transparent 40%);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover,
.post-card:hover,
.showcase-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent), var(--border) 40%);
  box-shadow: var(--shadow);
}

.feature-card h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.feature-card a {
  display: block;
  margin: 9px 0;
  font-weight: 650;
}

.card-icon {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 800;
}

.responsive-image {
  float: right;
  width: min(340px, 45%);
  margin: 0 0 12px 18px;
  border-radius: 2.5em 1.5em 3em 2em / 2em 2.5em 1.5em 3em;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
}

.section-heading h2 {
  margin: 0;
}

.page-head,
.article-header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-head h1,
.article-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.lead-content {
  margin-top: 18px;
}

.article {
  max-width: var(--content-width);
}

.article-meta,
.post-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
}

.article-description {
  color: var(--muted);
  font-size: 1.08rem;
}

.article-cover,
.post-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 18px;
}

.article-cover {
  display: block;
  width: min(100%, 760px);
  max-height: 420px;
  margin: 8px auto 28px;
  object-fit: contain;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 10px;
}

.post-card img {
  max-height: 220px;
  object-fit: cover;
}

.article-body {
  font-size: 0.95rem;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  font-weight: 750;
  line-height: 1.25;
}

.article-body h2 {
  margin-top: 2.2rem;
}

.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  line-height: 1.35;
}

.article-body th,
.article-body td {
  padding: 8px 10px;
  border: 1px solid var(--border);
}

.article-body th {
  background: var(--primary);
  color: white;
}

.article-body tr:nth-child(2n) {
  background: var(--surface-alt);
}

.article-body pre {
  overflow: auto;
  max-height: 520px;
  padding: 16px;
  border-radius: 8px;
  background: var(--code-bg);
}

.article-body code {
  white-space: pre-wrap;
  border-radius: 4px;
  background: var(--code-bg);
  padding: 0.1em 0.28em;
}

.article-body pre code {
  padding: 0;
  background: transparent;
  white-space: pre;
}

.article-body blockquote {
  margin: 1.2rem 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: var(--primary-soft);
  color: color-mix(in srgb, var(--text), var(--muted) 12%);
}

.admonition {
  margin: 1.25rem 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary), var(--surface) 92%);
}

.admonition-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-weight: 800;
  background: color-mix(in srgb, var(--primary), transparent 88%);
}

summary.admonition-title {
  cursor: pointer;
  list-style: none;
}

summary.admonition-title::-webkit-details-marker {
  display: none;
}

details.admonition > summary.admonition-title::after {
  content: "⌄";
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.2s ease;
}

details.admonition[open] > summary.admonition-title::after {
  transform: rotate(180deg);
}

.admonition-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.78rem;
}

.admonition-icon::before {
  content: "i";
}

.admonition-body {
  padding: 12px 14px;
}

.admonition-body > :first-child {
  margin-top: 0;
}

.admonition-body > :last-child {
  margin-bottom: 0;
}

.admonition-warning,
.admonition-danger,
.admonition-error {
  border-left-color: #ef4444;
}

.admonition-warning .admonition-title,
.admonition-danger .admonition-title,
.admonition-error .admonition-title {
  background: rgba(239, 68, 68, 0.12);
}

.admonition-warning .admonition-icon,
.admonition-danger .admonition-icon,
.admonition-error .admonition-icon {
  background: #ef4444;
}

.admonition-warning .admonition-icon::before,
.admonition-danger .admonition-icon::before,
.admonition-error .admonition-icon::before {
  content: "!";
}

.admonition-tip,
.admonition-success {
  border-left-color: #16a34a;
}

.admonition-tip .admonition-title,
.admonition-success .admonition-title {
  background: rgba(22, 163, 74, 0.12);
}

.admonition-tip .admonition-icon,
.admonition-success .admonition-icon {
  background: #16a34a;
}

.admonition-tip .admonition-icon::before,
.admonition-success .admonition-icon::before {
  content: "✓";
}

.mk-tabs {
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.mk-tabs > .mk-tab-panel:not(:first-of-type) {
  display: none;
}

.mk-tabs.is-ready > .mk-tab-panel {
  display: block;
}

.mk-tabs.is-ready > .mk-tab-panel[hidden] {
  display: none;
}

.mk-tab-list {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 8px 8px 0;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.mk-tab-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  white-space: nowrap;
}

.mk-tab-button[aria-selected="true"] {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.mk-tab-panel {
  padding: 16px;
}

.mk-tab-panel > :first-child {
  margin-top: 0;
}

.mk-tab-panel > :last-child {
  margin-bottom: 0;
}

.article-body pre {
  position: relative;
}

.code-block {
  position: relative;
  margin: 1.1rem 0;
}

.article-body .code-block pre {
  margin: 0;
  padding-top: 42px;
}

.copy-code-button {
  position: sticky;
  left: calc(100% - 64px);
  top: 8px;
  float: right;
  min-width: 58px;
  min-height: 30px;
  margin: -8px -8px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
}

.code-block > .copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
  z-index: 2;
  float: none;
  margin: 0;
}

.copy-code-button:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.mk-icon {
  display: inline-grid;
  min-width: 1.35em;
  height: 1.35em;
  place-items: center;
  margin: 0 0.12em;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.88em;
  font-weight: 850;
  vertical-align: -0.12em;
}

.mermaid {
  margin: 1.5rem 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow-x: auto;
  text-align: center;
}

.mermaid-unavailable {
  white-space: pre;
  text-align: left;
}

.content-figure {
  margin: 1.5rem 0;
  text-align: center;
}

.content-figure img {
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.content-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tags a,
.tags span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.post-card {
  padding: 0;
  overflow: hidden;
}

.post-card-body {
  padding: 18px;
}

.post-card h2 {
  margin: 6px 0 8px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.small-tags {
  margin-top: 14px;
}

.showcase-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.showcase-card {
  color: var(--text);
}

.showcase-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.showcase-card p {
  min-height: 58px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.showcase-card img,
.showcase-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  color: var(--primary);
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 12vh 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.search-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

#search-input {
  min-height: 46px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
}

.search-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  max-height: 54vh;
  overflow: auto;
}

.search-results a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-alt);
}

.search-results span {
  color: var(--muted);
  font-size: 0.88rem;
}

.empty-note {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.top-button.is-visible,
.top-button.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.top-button:hover {
  border-color: var(--primary);
}

.footer-links {
  display: flex;
  gap: 14px;
}

@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    background: var(--bg);
  }

  body::before {
    display: none;
  }

  .top-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
  }

  .site-shell {
    display: block;
    padding: 20px 16px 48px;
  }

  .sidebar {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    z-index: 30;
    max-height: calc(100vh - var(--header-height));
    border-radius: 0;
  }

  .sidebar.is-open {
    display: block;
  }

  .home-hero {
    display: none;
  }

  .mobile-motto {
    display: block;
  }

  .greeting-box {
    padding: 15px;
  }

  #greeting-text {
    font-size: 1.25rem;
  }

  .responsive-image {
    display: none;
  }

  .site-footer {
    flex-direction: column;
    padding: 20px 16px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 0 12px;
  }

  .brand-text {
    display: none;
  }

  .feature-card,
  .post-card-body,
  .showcase-card {
    padding: 18px;
  }

  .page-head h1,
  .article-header h1 {
    font-size: 2rem;
  }
}

/* Chirpy-aligned shell. The local reference lives in themes/hugo-theme-chirpy. */
:root {
  --main-bg: #ffffff;
  --mask-bg: #c1c3c5;
  --main-border-color: #f3f3f3;
  --text-color: #34343c;
  --text-muted-color: #757575;
  --heading-color: #2a2a2a;
  --link-color: #0056b2;
  --button-bg: #ffffff;
  --btn-border-color: #e9ecef;
  --btn-backtotop-color: #686868;
  --sidebar-bg: #f6f8fa;
  --sidebar-border-color: #efefef;
  --sidebar-active-color: #1d1d1d;
  --sidebar-hover-bg: rgba(223, 233, 241, 0.64);
  --sidebar-btn-bg: #ffffff;
  --sidebar-btn-color: #8e8e8e;
  --site-title-color: rgb(113, 113, 113);
  --site-subtitle-color: #717171;
  --avatar-border-color: #ffffff;
  --topbar-bg: rgba(255, 255, 255, 0.72);
  --topbar-text-color: rgb(78, 78, 78);
  --toc-highlight: #0550ae;
  --card-bg: #ffffff;
  --card-shadow: rgba(104, 104, 104, 0.05) 0 2px 6px 0, rgba(211, 209, 209, 0.15) 0 0 0 1px;
  --highlight-bg-color: #f6f8fa;
  --inline-code-bg: rgba(25, 25, 28, 0.05);
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --content-width: 900px;
}

:root[data-theme="dark"] {
  --main-bg: rgb(27, 27, 30);
  --main-border-color: rgb(44, 45, 45);
  --text-color: rgb(175, 176, 177);
  --text-muted-color: #868686;
  --heading-color: #cccccc;
  --link-color: rgb(138, 180, 248);
  --button-bg: #1e1e1e;
  --btn-border-color: #2e2f31;
  --sidebar-bg: #1e1e1e;
  --sidebar-border-color: #292929;
  --sidebar-active-color: rgba(255, 255, 255, 0.95);
  --sidebar-hover-bg: #262626;
  --sidebar-btn-bg: #232328;
  --sidebar-btn-color: #787878;
  --site-title-color: #b8b8b8;
  --site-subtitle-color: #868686;
  --avatar-border-color: rgba(206, 206, 206, 0.9);
  --topbar-bg: rgba(27, 27, 30, 0.72);
  --topbar-text-color: var(--text-color);
  --toc-highlight: rgb(116, 178, 243);
  --card-bg: #1e1e1e;
  --card-shadow: rgba(21, 21, 21, 0.72) 0 6px 18px 0, rgba(137, 135, 135, 0.24) 0 0 0 1px;
  --highlight-bg-color: #151515;
  --inline-code-bg: rgba(255, 255, 255, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --main-bg: rgb(27, 27, 30);
    --main-border-color: rgb(44, 45, 45);
    --text-color: rgb(175, 176, 177);
    --text-muted-color: #868686;
    --heading-color: #cccccc;
    --link-color: rgb(138, 180, 248);
    --button-bg: #1e1e1e;
    --btn-border-color: #2e2f31;
    --sidebar-bg: #1e1e1e;
    --sidebar-border-color: #292929;
    --sidebar-active-color: rgba(255, 255, 255, 0.95);
    --sidebar-hover-bg: #262626;
    --sidebar-btn-bg: #232328;
    --sidebar-btn-color: #787878;
    --site-title-color: #b8b8b8;
    --site-subtitle-color: #868686;
    --avatar-border-color: rgba(206, 206, 206, 0.9);
    --topbar-bg: rgba(27, 27, 30, 0.72);
    --topbar-text-color: var(--text-color);
    --toc-highlight: rgb(116, 178, 243);
    --card-bg: #1e1e1e;
    --card-shadow: rgba(21, 21, 21, 0.72) 0 6px 18px 0, rgba(137, 135, 135, 0.24) 0 0 0 1px;
    --highlight-bg-color: #151515;
    --inline-code-bg: rgba(255, 255, 255, 0.05);
  }
}

body {
  background: var(--main-bg);
  color: var(--text-color);
}

body::before,
body.is-home::before {
  display: none;
}

a {
  color: var(--link-color);
}

.site-header {
  display: none;
}

#sidebar.chirpy-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  overflow-y: auto;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border-color);
  scrollbar-width: none;
}

#sidebar.chirpy-sidebar::-webkit-scrollbar {
  display: none;
}

.profile-wrapper {
  width: 100%;
  margin: 3rem 0 2rem;
  padding: 0 1.25rem 0 2.5rem;
}

#avatar {
  width: 6.75rem;
  height: 6.75rem;
  display: block;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: var(--avatar-border-color) 0 0 0 2px;
}

#avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

#avatar:hover img {
  transform: scale(1.14);
}

.site-title {
  display: block;
  width: fit-content;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--site-title-color);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.2;
}

.site-title:hover {
  color: var(--sidebar-active-color);
}

.site-subtitle {
  margin: 0;
  color: var(--site-subtitle-color);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sidebar-nav {
  width: 100%;
  flex: 1 1 auto;
}

.sidebar-nav .nav {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.sidebar-nav .nav-item {
  width: 100%;
  padding: 0 1.5rem;
  opacity: 0.92;
}

.sidebar-nav .nav-item + .nav-item {
  margin-top: 0.25rem;
}

.sidebar-nav .nav-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: 0.75rem;
  color: var(--text-muted-color);
  font-weight: 650;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-item.active .nav-link {
  color: var(--sidebar-active-color);
  background: var(--sidebar-hover-bg);
}

.sidebar-nav .nav-link i {
  width: 1.1rem;
  margin: 0 1.45rem 0 1rem;
  text-align: center;
  opacity: 0.82;
}

.sidebar-nav .nav-link span {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.sidebar-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0 1rem 1.5rem 2rem;
}

.sidebar-bottom a,
.sidebar-action {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--sidebar-btn-bg);
  color: var(--sidebar-btn-color);
  box-shadow: var(--sidebar-border-color) 0 0 0 1px;
  cursor: pointer;
}

.sidebar-bottom a:hover,
.sidebar-action:hover {
  color: var(--sidebar-active-color);
  background: var(--sidebar-hover-bg);
}

.icon-border {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sidebar-btn-color);
}

#main-wrapper.main-wrapper {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  background: var(--main-bg);
}

.main-container {
  max-width: 1260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 0 2.25rem;
}

#topbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-height);
  flex: 0 0 var(--topbar-height);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
}

#topbar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--topbar-text-color);
}

#breadcrumb {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 0.5rem;
  color: var(--text-muted-color);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#breadcrumb span:not(:last-child)::after {
  content: "›";
  padding: 0 0.35rem;
}

#topbar-title {
  display: none;
  flex: 1 1 auto;
  text-align: center;
  font-weight: 650;
}

.topbar-button {
  width: 2.4rem;
  height: 2.4rem;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text-muted-color);
  cursor: pointer;
}

.topbar-button:hover {
  color: var(--link-color);
}

.content-row {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, var(--content-width)) 260px;
  gap: 2.5rem;
}

.content {
  min-width: 0;
  padding: 2.75rem 0 4rem;
}

#panel-wrapper {
  position: static;
  align-self: auto;
  max-height: none;
  overflow: visible;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#toc-wrapper,
.home-panel section {
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  margin-top: 2rem;
  overflow: auto;
  padding-left: 1rem;
  border-left: 1px solid var(--main-border-color);
}

.home-panel a {
  display: block;
  margin: 0.55rem 0;
  color: var(--text-muted-color);
}

.toc-title {
  margin-bottom: 0.85rem;
  color: var(--text-muted-color);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc nav ul ul {
  padding-left: 0.75rem;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 0.36rem 0;
  color: var(--text-muted-color);
  font-size: 0.85rem;
  line-height: 1.35;
}

.toc a:hover {
  color: var(--toc-highlight);
}

.page-head,
.article-header {
  margin-bottom: 2rem;
}

.page-head h1,
.article-header h1,
.article-body h1,
.article-body h2,
.article-body h3 {
  color: var(--heading-color);
}

.page-head h1,
.article-header h1 {
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  letter-spacing: 0;
}

.article-meta,
.post-meta {
  color: var(--text-muted-color);
  text-decoration: none;
}

.article-description {
  color: var(--text-muted-color);
}

.greeting-box {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--main-border-color);
  border-radius: 0.75rem;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  text-align: left;
}

#greeting-text {
  background: none;
  color: var(--text-muted-color);
  font-size: 1rem;
  font-weight: 650;
}

.section-heading {
  margin: 2.25rem 0 1rem;
}

.post-grid,
.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.post-card,
.feature-card,
.showcase-card {
  border-color: var(--main-border-color);
  border-radius: 0.75rem;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.post-card:hover,
.feature-card:hover,
.showcase-card:hover {
  transform: none;
  border-color: var(--btn-border-color);
}

.post-card-body {
  padding: 1.15rem 1.25rem;
}

.post-card h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.25rem;
}

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

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

.post-card p {
  color: var(--text-muted-color);
  font-size: 0.95rem;
}

.tags a,
.tags span,
.tag-cloud a {
  border-color: var(--btn-border-color);
  background: transparent;
  color: var(--text-muted-color);
}

.article-cover {
  width: min(100%, 760px);
  max-height: 360px;
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  object-fit: contain;
}

.article-body {
  color: var(--text-color);
  font-size: 1rem;
}

.article-body pre {
  background: var(--highlight-bg-color);
}

.article-body code {
  background: var(--inline-code-bg);
}

.article-body pre code {
  background: transparent;
}

.site-footer {
  max-width: none;
  margin: 0;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--main-border-color);
}

.top-button {
  right: 1.5rem;
  bottom: 1.5rem;
  border-radius: 0.5rem;
  color: var(--btn-backtotop-color);
}

.mask {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.35);
}

@media (max-width: 1199px) {
  .content-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #panel-wrapper {
    display: none;
  }
}

@media (max-width: 991px) {
  #sidebar.chirpy-sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    transition: transform 0.2s ease;
  }

  #sidebar.chirpy-sidebar.is-open {
    transform: translateX(0);
  }

  #main-wrapper.main-wrapper {
    margin-left: 0;
  }

  .main-container {
    padding: 0 1rem;
  }

  #breadcrumb {
    display: none;
  }

  #topbar-title {
    display: block;
  }

  .topbar-button {
    display: grid;
  }

  .content {
    padding-top: 1.75rem;
  }
}

@media (max-width: 560px) {
  .page-head h1,
  .article-header h1 {
    font-size: 2rem;
  }

  .post-card-body {
    padding: 1rem;
  }
}

/* Keep the article polish, but restore the original site's navigation geometry. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--card-bg), transparent 8%);
  border-bottom: 1px solid var(--main-border-color);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--heading-color);
}

.top-nav {
  display: flex;
}

.site-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, var(--content-width)) 250px;
  gap: 2rem;
  max-width: 1500px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow: auto;
  padding: 1.1rem;
  border: 1px solid var(--main-border-color);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--card-bg), transparent 3%);
  box-shadow: var(--card-shadow);
}

.sidebar-list,
.sidebar-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  margin: 0.45rem 0;
}

.sidebar-list ul {
  margin: 0.45rem 0 0.6rem 0.75rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--main-border-color);
}

.sidebar-list a {
  color: var(--text-muted-color);
}

.sidebar-list a:hover {
  color: var(--link-color);
}

#panel-wrapper {
  display: block;
}

#toc-wrapper {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  max-height: calc(100vh - var(--header-height) - 3rem);
  margin-top: 0;
}

/* Brighter Material-like feature blocks. */
.admonition {
  --adm: #0969da;
  --adm-title: rgba(9, 105, 218, 0.16);
  --adm-body: rgba(9, 105, 218, 0.075);
  border-color: color-mix(in srgb, var(--adm), white 68%);
  border-left-color: var(--adm);
  background: var(--adm-body);
}

.admonition-title {
  color: var(--heading-color);
  background: var(--adm-title);
}

.admonition-icon {
  background: var(--adm);
}

.admonition-info,
.admonition-note,
.admonition-abstract,
.admonition-summary {
  --adm: #0969da;
  --adm-title: rgba(9, 105, 218, 0.18);
  --adm-body: rgba(9, 105, 218, 0.075);
}

.admonition-tip,
.admonition-success {
  --adm: #16a34a;
  --adm-title: rgba(22, 163, 74, 0.18);
  --adm-body: rgba(22, 163, 74, 0.075);
}

.admonition-warning,
.admonition-danger,
.admonition-error,
.admonition-failure {
  --adm: #ef4444;
  --adm-title: rgba(239, 68, 68, 0.16);
  --adm-body: rgba(239, 68, 68, 0.065);
}

.admonition-question,
.admonition-example {
  --adm: #7c3aed;
  --adm-title: rgba(124, 58, 237, 0.16);
  --adm-body: rgba(124, 58, 237, 0.065);
}

.admonition-bug {
  --adm: #d97706;
  --adm-title: rgba(217, 119, 6, 0.16);
  --adm-body: rgba(217, 119, 6, 0.065);
}

.admonition-quote {
  --adm: #64748b;
  --adm-title: rgba(100, 116, 139, 0.16);
  --adm-body: rgba(100, 116, 139, 0.065);
}

.admonition-info .admonition-icon::before,
.admonition-note .admonition-icon::before,
.admonition-abstract .admonition-icon::before,
.admonition-summary .admonition-icon::before {
  content: "i";
}

.admonition-question .admonition-icon::before {
  content: "?";
}

.admonition-example .admonition-icon::before {
  content: "›";
}

/* Tables and diagrams tuned for both light and dark. */
.article-body table {
  border-radius: 0.5rem;
  box-shadow: 0 0 0 1px var(--main-border-color);
}

.article-body th,
.article-body td {
  border-color: var(--main-border-color);
}

.article-body th {
  background: color-mix(in srgb, var(--link-color), var(--card-bg) 18%);
  color: #fff;
}

.article-body tr:nth-child(2n) {
  background: color-mix(in srgb, var(--link-color), transparent 92%);
}

.mermaid {
  background: color-mix(in srgb, var(--link-color), var(--card-bg) 93%);
  border-color: color-mix(in srgb, var(--link-color), var(--main-border-color) 70%);
}

/* Class-based Chroma styles; Hugo no longer emits hard-coded light backgrounds. */
.bg,
.chroma {
  color: #24292f;
  background-color: var(--highlight-bg-color);
}

.chroma .err { color: #f6f8fa; background-color: #82071e; }
.chroma .lnlinks { outline: none; text-decoration: none; color: inherit; }
.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
.chroma .hl { background-color: #dedede; }
.chroma .lnt,
.chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em; color: #7f7f7f; }
.chroma .line { display: flex; }
.chroma .k,
.chroma .kc,
.chroma .kd,
.chroma .kn,
.chroma .kp,
.chroma .kr,
.chroma .kt { color: #cf222e; }
.chroma .no,
.chroma .nd,
.chroma .nt,
.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .il,
.chroma .mo,
.chroma .o,
.chroma .ow { color: #0550ae; }
.chroma .ni,
.chroma .nb,
.chroma .nf,
.chroma .fm { color: #6639ba; }
.chroma .nv,
.chroma .vc,
.chroma .vg,
.chroma .vi,
.chroma .vm { color: #953800; }
.chroma .s,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .dl,
.chroma .sd,
.chroma .s2,
.chroma .se,
.chroma .sh,
.chroma .si,
.chroma .sx,
.chroma .sr,
.chroma .s1,
.chroma .ss { color: #0a3069; }
.chroma .c,
.chroma .ch,
.chroma .cm,
.chroma .c1,
.chroma .cs,
.chroma .cp,
.chroma .cpf { color: #57606a; }
.chroma .gd { color: #82071e; background-color: #ffebe9; }
.chroma .gi { color: #116329; background-color: #dafbe1; }

:root[data-theme="dark"] .bg,
:root[data-theme="dark"] .chroma {
  color: #f8f8f2;
  background-color: #171c28;
}

:root[data-theme="dark"] .chroma .hl { background-color: #2d3546; }
:root[data-theme="dark"] .chroma .k,
:root[data-theme="dark"] .chroma .kc,
:root[data-theme="dark"] .chroma .kn,
:root[data-theme="dark"] .chroma .kp,
:root[data-theme="dark"] .chroma .kr,
:root[data-theme="dark"] .chroma .o,
:root[data-theme="dark"] .chroma .ow { color: #ff7ab6; }
:root[data-theme="dark"] .chroma .kd,
:root[data-theme="dark"] .chroma .kt,
:root[data-theme="dark"] .chroma .nb,
:root[data-theme="dark"] .chroma .nv,
:root[data-theme="dark"] .chroma .vc,
:root[data-theme="dark"] .chroma .vg,
:root[data-theme="dark"] .chroma .vi,
:root[data-theme="dark"] .chroma .vm { color: #8be9fd; }
:root[data-theme="dark"] .chroma .na,
:root[data-theme="dark"] .chroma .nc,
:root[data-theme="dark"] .chroma .nf,
:root[data-theme="dark"] .chroma .fm { color: #50fa7b; }
:root[data-theme="dark"] .chroma .s,
:root[data-theme="dark"] .chroma .sa,
:root[data-theme="dark"] .chroma .sb,
:root[data-theme="dark"] .chroma .sc,
:root[data-theme="dark"] .chroma .dl,
:root[data-theme="dark"] .chroma .sd,
:root[data-theme="dark"] .chroma .s2,
:root[data-theme="dark"] .chroma .se,
:root[data-theme="dark"] .chroma .sh,
:root[data-theme="dark"] .chroma .si,
:root[data-theme="dark"] .chroma .sx,
:root[data-theme="dark"] .chroma .sr,
:root[data-theme="dark"] .chroma .s1,
:root[data-theme="dark"] .chroma .ss { color: #f1fa8c; }
:root[data-theme="dark"] .chroma .m,
:root[data-theme="dark"] .chroma .mb,
:root[data-theme="dark"] .chroma .mf,
:root[data-theme="dark"] .chroma .mh,
:root[data-theme="dark"] .chroma .mi,
:root[data-theme="dark"] .chroma .il,
:root[data-theme="dark"] .chroma .mo { color: #bd93f9; }
:root[data-theme="dark"] .chroma .c,
:root[data-theme="dark"] .chroma .ch,
:root[data-theme="dark"] .chroma .cm,
:root[data-theme="dark"] .chroma .c1,
:root[data-theme="dark"] .chroma .cs { color: #8b98c8; }

.article-body .code-block pre,
.article-body pre {
  background: var(--highlight-bg-color) !important;
}

:root[data-theme="dark"] .article-body .code-block pre,
:root[data-theme="dark"] .article-body pre {
  background: #171c28 !important;
}

.copy-code-button {
  background: var(--button-bg);
  color: var(--text-muted-color);
  border-color: var(--btn-border-color);
}

.md-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin: 0.25rem 0.35rem 0.25rem 0;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--link-color);
  border-radius: 0.45rem;
  color: var(--link-color);
  font-weight: 700;
}

.md-button:hover,
.md-button--primary {
  background: var(--link-color);
  color: #fff;
}

abbr[title] {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 0.18em;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bg,
  :root:not([data-theme="light"]) .chroma {
    color: #f8f8f2;
    background-color: #171c28;
  }

  :root:not([data-theme="light"]) .chroma .hl { background-color: #2d3546; }
  :root:not([data-theme="light"]) .chroma .k,
  :root:not([data-theme="light"]) .chroma .kc,
  :root:not([data-theme="light"]) .chroma .kn,
  :root:not([data-theme="light"]) .chroma .kp,
  :root:not([data-theme="light"]) .chroma .kr,
  :root:not([data-theme="light"]) .chroma .o,
  :root:not([data-theme="light"]) .chroma .ow { color: #ff7ab6; }
  :root:not([data-theme="light"]) .chroma .kd,
  :root:not([data-theme="light"]) .chroma .kt,
  :root:not([data-theme="light"]) .chroma .nb,
  :root:not([data-theme="light"]) .chroma .nv,
  :root:not([data-theme="light"]) .chroma .vc,
  :root:not([data-theme="light"]) .chroma .vg,
  :root:not([data-theme="light"]) .chroma .vi,
  :root:not([data-theme="light"]) .chroma .vm { color: #8be9fd; }
  :root:not([data-theme="light"]) .chroma .na,
  :root:not([data-theme="light"]) .chroma .nc,
  :root:not([data-theme="light"]) .chroma .nf,
  :root:not([data-theme="light"]) .chroma .fm { color: #50fa7b; }
  :root:not([data-theme="light"]) .chroma .s,
  :root:not([data-theme="light"]) .chroma .sa,
  :root:not([data-theme="light"]) .chroma .sb,
  :root:not([data-theme="light"]) .chroma .sc,
  :root:not([data-theme="light"]) .chroma .dl,
  :root:not([data-theme="light"]) .chroma .sd,
  :root:not([data-theme="light"]) .chroma .s2,
  :root:not([data-theme="light"]) .chroma .se,
  :root:not([data-theme="light"]) .chroma .sh,
  :root:not([data-theme="light"]) .chroma .si,
  :root:not([data-theme="light"]) .chroma .sx,
  :root:not([data-theme="light"]) .chroma .sr,
  :root:not([data-theme="light"]) .chroma .s1,
  :root:not([data-theme="light"]) .chroma .ss { color: #f1fa8c; }
  :root:not([data-theme="light"]) .chroma .m,
  :root:not([data-theme="light"]) .chroma .mb,
  :root:not([data-theme="light"]) .chroma .mf,
  :root:not([data-theme="light"]) .chroma .mh,
  :root:not([data-theme="light"]) .chroma .mi,
  :root:not([data-theme="light"]) .chroma .il,
  :root:not([data-theme="light"]) .chroma .mo { color: #bd93f9; }
  :root:not([data-theme="light"]) .chroma .c,
  :root:not([data-theme="light"]) .chroma .ch,
  :root:not([data-theme="light"]) .chroma .cm,
  :root:not([data-theme="light"]) .chroma .c1,
  :root:not([data-theme="light"]) .chroma .cs { color: #8b98c8; }

  :root:not([data-theme="light"]) .article-body .code-block pre,
  :root:not([data-theme="light"]) .article-body pre {
    background: #171c28 !important;
  }
}

@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  #panel-wrapper {
    display: none;
  }
}

@media (max-width: 900px) {
  .top-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
  }

  .site-shell {
    display: block;
    padding: 1.25rem 1rem 3rem;
  }

  .sidebar {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    z-index: 40;
    max-height: calc(100vh - var(--header-height));
    border-radius: 0;
  }

  .sidebar.is-open {
    display: block;
  }
}

/* MkDocs Material compatibility polish. */
body.is-home::before {
  display: block;
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--text-color, var(--text)), transparent 92%) 1px, transparent 1px 38px) 50% 0 / 38px 38px,
    linear-gradient(color-mix(in srgb, var(--text-color, var(--text)), transparent 92%) 1px, transparent 1px 38px) 50% 0 / 38px 38px;
  mask: linear-gradient(180deg, white 0, transparent 620px);
  opacity: 0.5;
  z-index: -1;
}

.article-body .grid.cards > ul,
.article-body .grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  padding-left: 0;
  list-style: none;
}

.article-body .grid.cards > ul > li,
.article-body .grid.cards > li {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--main-border-color, var(--border));
  border-radius: 8px;
  background: var(--card-bg, var(--surface));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--main-border-color, var(--border)), transparent 35%);
}

.article-body .grid.cards hr {
  margin: 0.75rem 0;
  border: 0;
  border-top: 1px solid var(--main-border-color, var(--border));
}

.article-body .grid.cards p {
  margin: 0.5rem 0 0;
}

.article-body .grid.cards .mk-icon {
  min-width: 1.8rem;
  min-height: 1.8rem;
  margin-right: 0.35rem;
}

.mk-icon.is-lg,
.article-body .grid.cards .mk-icon.is-lg {
  min-width: 2rem;
  min-height: 2rem;
  font-size: 0.92rem;
}

.mk-icon.is-middle {
  vertical-align: middle;
}

.article-body table {
  display: table;
  width: auto;
  max-width: 100%;
  overflow: visible;
  margin: 1rem 0 1.5rem;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #c9d7ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.article-body th,
.article-body td {
  padding: 0.65rem 0.9rem;
  border: 0;
  border-right: 1px solid #c9d7ec;
  border-bottom: 1px solid #c9d7ec;
}

.article-body th:last-child,
.article-body td:last-child {
  border-right: 0;
}

.article-body tbody tr:last-child td {
  border-bottom: 0;
}

.article-body th {
  background: #2f86d6;
  color: #ffffff;
  font-weight: 800;
}

.article-body tbody tr:nth-child(odd) {
  background: #fbfdff;
}

.article-body tbody tr:nth-child(even) {
  background: #edf5ff;
}

.article-body th[style*="center"],
.article-body td[style*="center"] {
  background-image: linear-gradient(90deg, transparent, rgba(47, 134, 214, 0.08), transparent);
}

.article-body th[style*="right"],
.article-body td[style*="right"] {
  font-variant-numeric: tabular-nums;
}

.admonition {
  border-color: color-mix(in srgb, var(--adm), var(--main-border-color, var(--border)) 64%);
  border-left-width: 4px;
  background: var(--adm-body);
}

.admonition-body {
  background: var(--adm-body);
}

.chroma .ln {
  display: inline-block;
  min-width: 2.4rem;
  margin-right: 0.8rem;
  padding-right: 0.8rem;
  color: #8b949e;
  text-align: right;
  border-right: 1px solid rgba(139, 148, 158, 0.25);
}

.chroma .hl {
  display: block;
  width: 100%;
  margin: 0 -1rem;
  padding: 0 1rem;
  background: rgba(255, 220, 102, 0.24);
}

.chroma .line.hl {
  display: flex;
}

.math-display {
  overflow-x: auto;
  margin: 1.1rem 0;
  padding: 0.45rem 0;
  text-align: center;
}

.mermaid {
  color: var(--text-color, var(--text));
}

.mermaid svg {
  max-width: 100%;
  height: auto;
}

#toc-wrapper a {
  display: block;
  border-left: 2px solid transparent;
  padding-left: 0.55rem;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#toc-wrapper a.is-active {
  color: var(--toc-highlight, var(--primary));
  border-left-color: var(--toc-highlight, var(--primary));
  background: color-mix(in srgb, var(--toc-highlight, var(--primary)), transparent 90%);
  font-weight: 800;
}

:root[data-theme="dark"] .article-body table {
  border-color: #334155;
  background: #161a22;
}

:root[data-theme="dark"] .article-body th {
  background: #3f6ea8;
  color: #ffffff;
}

:root[data-theme="dark"] .article-body th,
:root[data-theme="dark"] .article-body td {
  border-color: #334155;
}

:root[data-theme="dark"] .article-body tbody tr:nth-child(odd) {
  background: #171a20;
}

:root[data-theme="dark"] .article-body tbody tr:nth-child(even) {
  background: #202735;
}

:root[data-theme="dark"] .admonition {
  border-color: color-mix(in srgb, var(--adm), transparent 36%);
  box-shadow: none;
}

:root[data-theme="dark"] .admonition-body {
  background: color-mix(in srgb, var(--adm), #151922 87%);
}

:root[data-theme="dark"] .chroma .ln {
  color: #93a4bd;
  border-right-color: rgba(147, 164, 189, 0.25);
}

:root[data-theme="dark"] .chroma .hl {
  background: rgba(99, 102, 241, 0.22);
}

:root[data-theme="dark"] .mermaid {
  background: #20242b;
  border-color: #596579;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .article-body table {
    border-color: #334155;
    background: #161a22;
  }

  :root:not([data-theme="light"]) .article-body th {
    background: #3f6ea8;
    color: #ffffff;
  }

  :root:not([data-theme="light"]) .article-body th,
  :root:not([data-theme="light"]) .article-body td {
    border-color: #334155;
  }

  :root:not([data-theme="light"]) .article-body tbody tr:nth-child(odd) {
    background: #171a20;
  }

  :root:not([data-theme="light"]) .article-body tbody tr:nth-child(even) {
    background: #202735;
  }

  :root:not([data-theme="light"]) .admonition {
    border-color: color-mix(in srgb, var(--adm), transparent 36%);
    box-shadow: none;
  }

  :root:not([data-theme="light"]) .admonition-body {
    background: color-mix(in srgb, var(--adm), #151922 87%);
  }

  :root:not([data-theme="light"]) .chroma .ln {
    color: #93a4bd;
    border-right-color: rgba(147, 164, 189, 0.25);
  }

  :root:not([data-theme="light"]) .chroma .hl {
    background: rgba(99, 102, 241, 0.22);
  }

  :root:not([data-theme="light"]) .mermaid {
    background: #20242b;
    border-color: #596579;
  }
}

/* Final Material-style layout rules. */
.navigation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 36%);
  align-items: center;
  gap: 2rem;
}

.navigation-card h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.check-list {
  margin: 1.2rem 0;
  padding-left: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 0.65rem 0;
  padding-left: 2rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: inline-grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  border-radius: 50%;
  background: #12c972;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.navigation-card mark {
  background: #fff875;
  color: #111827;
  padding: 0 0.12em;
}

.mini-tabs {
  display: flex;
  gap: 1.6rem;
  margin-top: 1.8rem;
  border-bottom: 1px solid var(--main-border-color, var(--border));
  font-weight: 800;
}

.mini-tabs span {
  padding: 0.7rem 0.6rem 0.55rem;
  color: var(--text-muted-color, var(--muted));
}

.mini-tabs .is-active {
  color: var(--heading-color, var(--text));
  border-bottom: 3px solid currentColor;
}

.navigation-card-image {
  float: none;
  width: 100%;
  max-height: 235px;
  margin: 0;
  object-fit: cover;
  filter: grayscale(1);
}

:where(.article-body, .lead-content, .section-index) .grid.cards,
:where(.article-body, .lead-content, .section-index) .grid.cards > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.9rem;
  width: 100%;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

:where(.article-body, .lead-content, .section-index) .grid.cards > ul > li,
:where(.article-body, .lead-content, .section-index) .grid.cards > li {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--main-border-color, var(--border));
  border-radius: 8px;
  background: var(--card-bg, var(--surface));
  box-shadow: var(--card-shadow, none);
  list-style: none;
}

:where(.article-body, .lead-content, .section-index) .grid.cards > ul > li::marker,
:where(.article-body, .lead-content, .section-index) .grid.cards > li::marker {
  content: "";
}

:where(.article-body, .lead-content, .section-index) .grid.cards p {
  margin: 0.55rem 0 0;
}

:where(.article-body, .lead-content, .section-index) .grid.cards hr {
  margin: 0.8rem 0;
  border: 0;
  border-top: 1px solid var(--main-border-color, var(--border));
}

:where(.article-body, .lead-content, .section-index) .grid.cards a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.3rem;
  font-weight: 650;
}

:where(.article-body, .lead-content, .section-index) .grid.cards > ul > li > p:first-child,
:where(.article-body, .lead-content, .section-index) .grid.cards > li > p:first-child {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0;
  font-weight: 850;
}

:where(.article-body, .lead-content, .section-index) .grid.cards .mk-icon {
  display: inline-grid;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--link-color, var(--primary)), transparent 84%);
  color: var(--link-color, var(--primary));
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

:where(.article-body, .lead-content, .section-index) .grid.cards .mk-icon.is-lg {
  min-width: 2.1rem;
  height: 2.1rem;
  font-size: 0.9rem;
}

.article-body a.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
  text-decoration: none;
}

.code-actions {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  display: flex;
  gap: 0.4rem;
}

.code-actions .copy-code-button,
.code-actions .select-code-button {
  position: static;
  inset: auto;
  min-width: 4.2rem;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--btn-border-color, var(--border));
  border-radius: 8px;
  background: var(--button-bg, var(--surface));
  color: var(--text-muted-color, var(--muted));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.code-actions .copy-code-button:hover,
.code-actions .select-code-button:hover {
  color: var(--link-color, var(--primary));
  border-color: var(--link-color, var(--primary));
}

.code-block.is-selected pre {
  outline: 2px solid color-mix(in srgb, var(--link-color, var(--primary)), transparent 35%);
  outline-offset: 2px;
}

.article-body .code-block pre {
  padding-top: 3.1rem;
}

.article-body .chroma .line {
  display: block;
  min-width: max-content;
  padding-right: 1rem;
}

.article-body .chroma .line.hl {
  background: color-mix(in srgb, var(--link-color, var(--primary)), transparent 86%);
  box-shadow: inset 3px 0 0 var(--link-color, var(--primary));
}

.article-body .chroma .line.is-selected {
  background: color-mix(in srgb, #22c55e, transparent 84%);
  box-shadow: inset 3px 0 0 #22c55e;
}

.article-body .chroma .lnlinks {
  cursor: pointer;
  text-decoration: none;
}

.article-body .chroma .lnlinks:hover {
  color: var(--link-color, var(--primary));
}

.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--main-border-color, var(--border));
  border-radius: 8px;
  background: var(--card-bg, var(--surface));
}

.article-body th {
  background: #dbeafe;
  color: #172033;
  font-weight: 850;
}

.article-body th,
.article-body td {
  border-color: var(--main-border-color, var(--border));
}

.article-body tbody tr:nth-child(odd) {
  background: color-mix(in srgb, var(--card-bg, var(--surface)), #ffffff 35%);
}

.article-body tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--card-bg, var(--surface)), var(--link-color, var(--primary)) 5%);
}

.article-body th[style*="text-align:center"],
.article-body td[style*="text-align:center"] {
  text-align: center !important;
}

.article-body th[style*="text-align:right"],
.article-body td[style*="text-align:right"] {
  text-align: right !important;
}

.mermaid {
  padding: 1rem;
  border: 1px solid #a8bdd8;
  border-radius: 8px;
  background: #eef5fc;
}

.mermaid svg {
  display: block;
  margin: 0 auto;
}

.mermaid svg .node rect,
.mermaid svg .node circle,
.mermaid svg .node ellipse,
.mermaid svg .node polygon,
.mermaid svg .node path {
  stroke-width: 1.5px !important;
}

.mermaid svg text,
.mermaid svg .label,
.mermaid svg .nodeLabel,
.mermaid svg .edgeLabel {
  color: #111827 !important;
  fill: #111827 !important;
}

.mermaid svg .node rect,
.mermaid svg .node circle,
.mermaid svg .node ellipse,
.mermaid svg .node polygon,
.mermaid svg .node path {
  fill: #f5f7ff !important;
  stroke: #7f9bd2 !important;
}

.mermaid svg .edgePath .path,
.mermaid svg marker path {
  stroke: #334155 !important;
  fill: #334155 !important;
}

.top-button {
  right: 1.25rem;
  bottom: 4.5rem;
}

.site-footer {
  padding-right: 6rem;
}

:root[data-theme="dark"] .mermaid {
  background: #1f252e;
  border-color: #5f7189;
}

:root[data-theme="dark"] .article-body th {
  background: #26384d;
  color: #eef4ff;
}

:root[data-theme="dark"] .article-body tbody tr:nth-child(odd) {
  background: #171b22;
}

:root[data-theme="dark"] .article-body tbody tr:nth-child(even) {
  background: #1f2631;
}

:root[data-theme="dark"] .article-body .chroma .line.hl {
  background: rgba(96, 165, 250, 0.18);
  box-shadow: inset 3px 0 0 #60a5fa;
}

:root[data-theme="dark"] .article-body .chroma .line.is-selected {
  background: rgba(34, 197, 94, 0.16);
  box-shadow: inset 3px 0 0 #22c55e;
}

:root[data-theme="dark"] .mermaid svg text,
:root[data-theme="dark"] .mermaid svg .label,
:root[data-theme="dark"] .mermaid svg .nodeLabel,
:root[data-theme="dark"] .mermaid svg .edgeLabel {
  color: #e8eef8 !important;
  fill: #e8eef8 !important;
}

:root[data-theme="dark"] .mermaid svg .node rect,
:root[data-theme="dark"] .mermaid svg .node circle,
:root[data-theme="dark"] .mermaid svg .node ellipse,
:root[data-theme="dark"] .mermaid svg .node polygon,
:root[data-theme="dark"] .mermaid svg .node path {
  fill: #273241 !important;
  stroke: #89aee4 !important;
}

:root[data-theme="dark"] .mermaid svg .edgePath .path,
:root[data-theme="dark"] .mermaid svg marker path {
  stroke: #b8c4d6 !important;
  fill: #b8c4d6 !important;
}

:root[data-theme="dark"] .mermaid svg .edgeLabel,
:root[data-theme="dark"] .mermaid svg .labelBkg {
  background-color: #1f2733 !important;
  fill: #1f2733 !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mermaid {
    background: #1f252e;
    border-color: #5f7189;
  }

  :root:not([data-theme="light"]) .article-body th {
    background: #26384d;
    color: #eef4ff;
  }

  :root:not([data-theme="light"]) .article-body tbody tr:nth-child(odd) {
    background: #171b22;
  }

  :root:not([data-theme="light"]) .article-body tbody tr:nth-child(even) {
    background: #1f2631;
  }

  :root:not([data-theme="light"]) .article-body .chroma .line.hl {
    background: rgba(96, 165, 250, 0.18);
    box-shadow: inset 3px 0 0 #60a5fa;
  }

  :root:not([data-theme="light"]) .article-body .chroma .line.is-selected {
    background: rgba(34, 197, 94, 0.16);
    box-shadow: inset 3px 0 0 #22c55e;
  }

  :root:not([data-theme="light"]) .mermaid svg text,
  :root:not([data-theme="light"]) .mermaid svg .label,
  :root:not([data-theme="light"]) .mermaid svg .nodeLabel,
  :root:not([data-theme="light"]) .mermaid svg .edgeLabel {
    color: #e8eef8 !important;
    fill: #e8eef8 !important;
  }

  :root:not([data-theme="light"]) .mermaid svg .node rect,
  :root:not([data-theme="light"]) .mermaid svg .node circle,
  :root:not([data-theme="light"]) .mermaid svg .node ellipse,
  :root:not([data-theme="light"]) .mermaid svg .node polygon,
  :root:not([data-theme="light"]) .mermaid svg .node path {
    fill: #273241 !important;
    stroke: #89aee4 !important;
  }

  :root:not([data-theme="light"]) .mermaid svg .edgePath .path,
  :root:not([data-theme="light"]) .mermaid svg marker path {
    stroke: #b8c4d6 !important;
    fill: #b8c4d6 !important;
  }

  :root:not([data-theme="light"]) .mermaid svg .edgeLabel,
  :root:not([data-theme="light"]) .mermaid svg .labelBkg {
    background-color: #1f2733 !important;
    fill: #1f2733 !important;
  }
}

@media (max-width: 768px) {
  .navigation-card {
    display: block;
  }

  .navigation-card-image {
    display: none;
  }
}

/* Final layout fixes for Hugo pages without a right TOC. */
body.no-toc .site-shell {
  grid-template-columns: 260px minmax(0, min(1080px, calc(100vw - 360px)));
  max-width: 1380px;
}

body.no-toc .content {
  font-size: 1rem;
}

body.no-toc .article,
body.no-toc .page-head,
body.no-toc .showcase-grid {
  width: 100%;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.5rem 1.25rem;
  text-align: center;
}

.site-footer > span:first-child {
  grid-column: 2;
  justify-self: center;
}

.site-footer .footer-links {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  gap: 1rem;
  white-space: nowrap;
}

.code-block {
  position: relative;
}

.code-block .code-actions {
  top: 0.75rem;
  right: 0.75rem;
  left: auto;
}

.code-block .code-actions .copy-code-button,
.code-block .code-actions .select-code-button {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
}

.code-block.selecting-lines pre {
  cursor: cell;
}

.code-block.selecting-lines .line:hover {
  background: color-mix(in srgb, var(--link-color, var(--primary)), transparent 88%);
}

.section-tree {
  margin-top: 1.3rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), var(--primary) 3%);
}

.section-tree-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.section-tree-head h2 {
  margin: 0;
  font-size: 1rem;
}

.section-tree ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-tree li ul {
  margin: 0.35rem 0 0.35rem 1.1rem;
}

.section-tree a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem 0.65rem;
  align-items: baseline;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  color: var(--text);
}

.section-tree a:hover {
  background: color-mix(in srgb, var(--primary), transparent 90%);
  color: var(--primary);
}

.section-tree small {
  grid-column: 2;
  color: var(--muted);
}

.tree-kind {
  min-width: 3.4rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary), transparent 86%);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.section-tree .is-folder > a .tree-kind {
  background: color-mix(in srgb, #f59e0b, transparent 84%);
  color: #b45309;
}

@media (max-width: 1100px) {
  body.no-toc .site-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer > span:first-child,
  .site-footer .footer-links {
    grid-column: 1;
    justify-self: center;
  }
}

.showcase-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.showcase-card img,
.showcase-card video {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.chill-page,
.seasonal-page {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.chill-card {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: clamp(1.3rem, 3vw, 2.4rem);
  border: 1px solid rgba(244, 167, 185, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 84% 12%, rgba(244, 167, 185, 0.28), transparent 34%),
    radial-gradient(circle at 10% 86%, rgba(77, 217, 172, 0.14), transparent 32%),
    #140d0a;
  color: #fce4ec;
  box-shadow: 0 24px 80px rgba(20, 13, 10, 0.35);
}

.chill-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(244, 167, 185, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.chill-brand > span {
  display: inline-grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(244, 167, 185, 0.16);
  color: #f4a7b9;
  font-weight: 900;
}

.chill-brand p,
.chill-intro,
.chill-player span {
  color: rgba(252, 228, 236, 0.62);
}

.chill-page .eyebrow {
  margin-top: 4rem;
  color: #f4a7b9;
}

.chill-page h1 {
  width: min(620px, 100%);
  margin: 0.5rem 0 1rem;
  color: #fff7fb;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  line-height: 0.95;
}

.chill-intro {
  width: min(560px, 100%);
  font-size: 1.08rem;
}

.chill-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 140px;
  gap: 1rem;
  align-items: center;
  width: min(720px, 100%);
  margin-top: 2rem;
  padding: 0.85rem;
  border: 1px solid rgba(244, 167, 185, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.chill-play {
  height: 2.8rem;
  padding: 0 1.1rem;
  border: 1px solid rgba(244, 167, 185, 0.5);
  border-radius: 10px;
  background: rgba(244, 167, 185, 0.14);
  color: #fce4ec;
  font-weight: 850;
  cursor: pointer;
}

.chill-player.is-playing .chill-play {
  background: #f4a7b9;
  color: #140d0a;
}

.chill-volume {
  width: 100%;
}

.chill-window {
  position: absolute;
  right: clamp(1rem, 6vw, 5rem);
  bottom: clamp(1rem, 6vw, 4rem);
  width: min(300px, 38vw);
  aspect-ratio: 1 / 1.12;
  border: 10px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(#201724, #0e1118);
}

.rain {
  position: absolute;
  top: 12%;
  width: 2px;
  height: 70%;
  background: linear-gradient(transparent, rgba(244, 167, 185, 0.55), transparent);
  animation: rain-slide 1.8s linear infinite;
}

.r1 { left: 25%; }
.r2 { left: 50%; animation-delay: -0.6s; }
.r3 { left: 75%; animation-delay: -1.1s; }

@keyframes rain-slide {
  from { transform: translateY(-30%); opacity: 0; }
  30% { opacity: 1; }
  to { transform: translateY(38%); opacity: 0; }
}

.chill-cat {
  position: absolute;
  left: 18%;
  bottom: 12%;
  width: 42%;
  height: 18%;
  border-radius: 999px;
  background: #1d1b22;
  box-shadow: 0 0 0 1px rgba(244, 167, 185, 0.18);
}

.chill-cat span {
  position: absolute;
  right: 4%;
  bottom: 48%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #1d1b22;
}

.seasonal-page {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(244, 167, 185, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 12%, rgba(244, 167, 185, 0.24), transparent 36%),
    radial-gradient(circle at 18% 88%, rgba(77, 217, 172, 0.14), transparent 30%),
    #0d1117;
  color: #fce4ec;
}

.seasonal-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.2rem;
}

.seasonal-top h1 {
  margin: 0;
  color: #fff7fb;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.seasonal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.seasonal-badges span {
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(244, 167, 185, 0.28);
  border-radius: 8px;
  color: #f4a7b9;
  background: rgba(244, 167, 185, 0.08);
  font-weight: 800;
}

.seasonal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.season-card {
  min-height: 170px;
  padding: 1.1rem;
  border: 1px solid rgba(244, 167, 185, 0.22);
  border-radius: 16px;
  background: rgba(255, 192, 203, 0.1);
  backdrop-filter: blur(16px);
}

.season-card span {
  color: rgba(252, 228, 236, 0.58);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.season-card strong {
  display: block;
  margin: 0.7rem 0 0.3rem;
  color: #fff7fb;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.season-card p {
  color: rgba(252, 228, 236, 0.62);
}

.season-card.clock {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .chill-player,
  .seasonal-grid {
    grid-template-columns: 1fr;
  }

  .chill-window {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(300px, 100%);
    margin-top: 2rem;
  }

  .season-card.clock {
    grid-column: auto;
  }
}

.content-image-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 1.35rem auto;
  border-radius: 0.75rem;
  overflow: hidden;
  line-height: 0;
  cursor: zoom-in;
}

.content-image-link img {
  display: block;
  margin: 0;
}

.article-cover-link {
  width: 100%;
}

.article-cover-link .article-cover {
  width: 100%;
}

.code-block .code-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  top: 0.75rem;
  right: 0.75rem;
  line-height: 1;
}

.code-block .code-actions .copy-code-button,
.code-block .code-actions .select-code-button {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 2rem;
  min-width: 4.25rem;
  margin: 0;
  padding: 0 0.85rem;
  line-height: 1;
  vertical-align: top;
}
