@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --page-bg: #ffffff;
  --page-bg-strong: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --border: #dde4ef;
  --border-strong: #cfd8e6;
  --text-main: #172033;
  --text-subtle: #637086;
  --text-soft: #8c97ab;
  --accent: #2e6ff2;
  --accent-soft: #e7efff;
  --shadow-lg: 0 20px 48px rgba(23, 32, 51, 0.09);
  --shadow-md: 0 12px 28px rgba(23, 32, 51, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-copy: 760px;
  --font-blog-sans: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
  --font-blog-mono: "D2Coding", "JetBrains Mono", Menlo, Consolas, monospace;
  --control-bg: rgba(255, 255, 255, 0.82);
  --control-bg-hover: #ffffff;
  --control-border: rgba(207, 216, 230, 0.9);
  --control-icon: #6b778c;
  --control-icon-strong: #172033;
  --control-shadow: 0 8px 22px rgba(23, 32, 51, 0.08);
  --preview-hover-bg: #f5f6f7;
  --preview-hover-border: #bcc2ca;
}

:root[data-theme="dark"] {
  --page-bg: #0f141c;
  --page-bg-strong: #121925;
  --surface: rgba(20, 27, 38, 0.88);
  --surface-strong: #182130;
  --border: #293448;
  --border-strong: #33425a;
  --text-main: #edf2fb;
  --text-subtle: #a9b5c9;
  --text-soft: #7d8aa1;
  --accent: #7aa6ff;
  --accent-soft: rgba(122, 166, 255, 0.16);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.22);
  --control-bg: rgba(24, 33, 48, 0.9);
  --control-bg-hover: rgba(30, 42, 61, 0.98);
  --control-border: rgba(63, 78, 101, 0.95);
  --control-icon: #d2d9e6;
  --control-icon-strong: #ffffff;
  --control-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  --preview-hover-bg: #19212c;
  --preview-hover-border: #657184;
}

body.blog-page {
  min-height: 100vh;
  font-family: var(--font-blog-sans);
  background: var(--page-bg);
  color: var(--text-main);
}

.site-header {
  background: color-mix(in srgb, var(--page-bg-strong) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  backdrop-filter: blur(18px);
}

.site-nav {
  gap: 1.25rem;
}

@media (max-width: 767px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .site-nav .site-brand {
    margin-left: 0;
  }

  .site-nav .site-nav-actions {
    margin-left: 0;
  }

  .site-nav #menu {
    display: flex;
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 0;
    text-align: left;
    gap: 1.5rem;
  }

  .site-nav #menu .site-nav-link {
    margin: 0;
    padding: 0.35rem 0;
  }

  .site-nav .site-nav-actions,
  .site-nav .site-search-shell {
    position: static;
  }

  .site-nav .search-cont {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    transform: none;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface-strong);
  }

  .site-nav .search-cont label {
    display: block;
    width: 100%;
  }

  .site-nav .search-input {
    min-width: 0;
    width: 100%;
    padding-right: 5rem;
    font-size: 16px;
  }

  .site-nav .search-cont .btn-cont {
    right: 1.5rem;
  }
}

.site-nav-link {
  position: relative;
  color: var(--text-subtle);
  transition: color 0.2s ease;
}

.site-nav-link:hover {
  color: var(--text-main);
}

.site-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.9rem;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--text-main);
  transition: transform 0.2s ease;
}

.site-nav-link:hover::after {
  transform: scaleX(1);
}

.mobile-nav-link {
  color: var(--text-main);
  font-weight: 600;
}

.site-brand {
  margin-left: 1rem;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.blog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
}

.blog-main {
  min-width: 0;
}

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-shell.is-wide-view {
  grid-template-columns: minmax(0, 1fr);
}

.blog-shell.is-wide-view .blog-sidebar {
  display: none;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.sidebar-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.sidebar-card-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.sidebar-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

#category-list,
.sidebar-post-list,
.sidebar-tag-list,
.sidebar-stat-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sidebar-category-item,
.sidebar-post-link,
.sidebar-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(241, 245, 252, 0.72);
  color: var(--text-main);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sidebar-category-item:hover,
.sidebar-post-link:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.sidebar-category-item.is-active {
  border-color: rgba(46, 111, 242, 0.28);
  background: var(--accent-soft);
}

.sidebar-category-name,
.sidebar-post-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: left;
}

.sidebar-category-count,
.sidebar-post-date,
.sidebar-stat-label,
.sidebar-post-meta {
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.sidebar-intro {
  background:
    linear-gradient(145deg, rgba(46, 111, 242, 0.1), rgba(255, 255, 255, 0.88)),
    var(--surface);
}

.sidebar-intro-title {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  font-family: var(--font-blog-sans);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.sidebar-intro-text {
  margin: 0;
  line-height: 1.7;
  color: var(--text-subtle);
}

.sidebar-tag-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.42rem;
}

.sidebar-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f0f4fb;
  color: var(--text-subtle);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  white-space: normal;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sidebar-tag:hover,
.sidebar-tag:focus-visible {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.sidebar-tag:focus-visible {
  outline: 0;
}

.sidebar-tag-label {
  flex: 1;
  min-width: 0;
}

.sidebar-tag-count {
  flex-shrink: 0;
  margin-left: auto;
  text-align: right;
}

.home-hero {
  display: block;
}

.home-hero.is-hidden {
  display: none;
}

.home-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.hero-card,
.hero-panel {
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 1rem;
}

.hero-intro-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

.hero-intro-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.hero-updated {
  margin: 0;
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.5;
}

.hero-updated strong {
  font-weight: inherit;
}

.hero-card .hero-summary {
  margin: 0;
}

.hero-card::after {
  content: none;
}

.hero-kicker {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-blog-sans);
  font-weight: 600;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.hero-summary {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 1rem 0 1.5rem;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-subtle);
}

.hero-meta-row,
.hero-stat-grid,
.hero-category-list {
  position: relative;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.3rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(46, 111, 242, 0.12);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-subtle);
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.hero-stat {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-stat span {
  color: var(--text-subtle);
  font-size: 0.84rem;
}

.hero-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 2.5rem;
  padding: 0.65rem 1.05rem;
  appearance: none;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface-strong) 92%, #f8fbff 8%);
  color: var(--accent);
  font-size: 0.94rem;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.06);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hero-category-pill:hover,
.hero-category-pill:focus-visible {
  background: color-mix(in srgb, var(--text-main) 12%, var(--surface-strong) 88%);
  border-color: var(--accent);
  color: color-mix(in srgb, var(--accent) 80%, var(--text-main) 20%);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(23, 32, 51, 0.12);
}

.hero-category-pill:focus-visible {
  outline: 0;
}

.hero-category-pill:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(23, 32, 51, 0.08);
}

.hero-panel {
  padding: 2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-panel-label {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-feature {
  --hero-feature-padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: var(--hero-feature-padding);
}


.hero-feature-thumb {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  background: transparent;
}

.hero-feature-thumb.media-placeholder {
  display: flex;
  min-height: 10rem;
}

.hero-feature-title,
.blog-card-title,
.blog-card-featured-title,
.post-title,
.related-card-title,
.post-pager-title {
  font-family: var(--font-blog-sans);
  font-weight: 600;
}

.hero-feature-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-feature-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.hero-feature-summary {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.7;
}

.hero-feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.hero-action {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.25rem 0;
  color: var(--accent);
  font-weight: 700;
}

.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.3rem;
  margin-bottom: 2rem;
}

.blog-card,
.blog-card-featured {
  min-width: 0;
}


.blog-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  padding: 1.1rem;
}

.blog-card {
  grid-column: span 4;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.blog-card-image,
.blog-card-featured-image {
  width: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

.blog-card-featured-image {
  height: 100%;
  min-height: 300px;
  border-radius: 0;
}

.blog-card-image {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.media-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px dashed var(--border-strong);
  background: linear-gradient(180deg, #f5f8fd, #edf2fa);
  color: var(--text-soft);
}

.media-placeholder-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-subtle);
  font-size: 0.78rem;
  font-weight: 700;
}

.media-placeholder-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
  word-break: break-all;
}

.blog-card-body,
.blog-card-featured-body {
  display: flex;
  flex-direction: column;
}

.blog-card-featured-body {
  justify-content: center;
  padding: 1rem 1.4rem 1rem 1.8rem;
}

.blog-card-body {
  padding: 1rem 0.2rem 0.25rem;
  gap: 0.75rem;
  flex: 1;
}

.blog-card-category,
.blog-card-category-large {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.blog-card-title {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.38;
  letter-spacing: -0.04em;
}

.blog-card-featured-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.05em;
}

.blog-card-description,
.blog-card-featured-description {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.7;
}

.blog-card-featured-description {
  font-size: 1rem;
  margin-top: 0.9rem;
  margin-bottom: 1.2rem;
}

.blog-card-meta,
.blog-card-featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  color: var(--text-soft);
  font-size: 0.84rem;
}

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

.blog-card-author img,
.post-author-avatar,
.author-card-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.blog-card-author-name,
.blog-card-date,
.post-meta-author,
.post-meta-text {
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.post-author-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--text-main);
}

.content-view {
  width: 100%;
}

.content-view > .post-prose,
.content-view > .notebook-prose,
.content-view > [data-about-me-page] {
  width: 100%;
}

.post-prose,
.notebook-prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 36px;
  box-shadow: var(--shadow-lg);
  padding: clamp(1.4rem, 3vw, 2.6rem);
}

.post-header {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.post-title {
  max-width: 16ch;
  margin: 0.95rem 0 0.75rem;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.post-summary {
  max-width: 52rem;
  margin: 0 0 1.1rem;
  color: var(--text-subtle);
  font-size: 1.04rem;
  line-height: 1.8;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin-bottom: 1rem;
}

.post-author-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--text-main);
}

.post-meta-text {
  font-size: 0.92rem;
  color: var(--text-subtle);
}

.post-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.post-info-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #f1f5fb;
  color: var(--text-subtle);
  font-size: 0.84rem;
  font-weight: 700;
}

.post-cover {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 28px;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

.post-prose-h1,
.post-prose-h2,
.post-prose-h3,
.post-prose-h4,
.post-prose-h5,
.post-prose-h6 {
  max-width: var(--max-copy);
  margin-left: auto;
  margin-right: auto;
  color: var(--text-main);
  letter-spacing: -0.05em;
}

.post-prose-h1 {
  margin-top: 3.3rem;
  margin-bottom: 1rem;
  font-size: 2.4rem;
  line-height: 1.16;
}

.post-prose-h2 {
  margin-top: 3rem;
  margin-bottom: 1.05rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.9rem;
  line-height: 1.2;
}

.post-prose-h3 {
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  font-size: 1.45rem;
  line-height: 1.3;
}

.post-prose-h4 {
  margin-top: 1.7rem;
  margin-bottom: 0.65rem;
  font-size: 1.2rem;
  line-height: 1.35;
}

.post-prose-h5,
.post-prose-h6 {
  margin-top: 1.45rem;
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
  line-height: 1.45;
}

.post-paragraph,
.post-list,
.post-list-item,
.post-blockquote,
.post-pre,
.post-table-wrap,
.post-table,
.post-horizontal-rule,
.post-emphasis,
.post-strong {
  max-width: var(--max-copy);
  margin-left: auto;
  margin-right: auto;
}

.post-paragraph {
  margin-top: 1.15rem;
  margin-bottom: 1.15rem;
  font-size: 1.02rem;
  line-height: 1.9;
  color: #2f3b52;
}

.post-image {
  display: block;
  max-width: min(100%, 920px);
  margin: 2.2rem auto;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: #eff4fa;
}

.post-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

.post-link:hover {
  color: #2359c6;
}

.post-list {
  padding-left: 1.2rem;
  color: #2f3b52;
}

.post-list-item {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.8;
}

.post-blockquote {
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
  padding: 1.1rem 1.3rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 18px 18px 0;
  background: linear-gradient(90deg, rgba(46, 111, 242, 0.08), rgba(46, 111, 242, 0.02));
  color: var(--text-subtle);
}

.post-pre {
  position: relative;
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
  padding: 1.25rem;
  border-radius: 22px;
  background: #f4f7fb;
  border: 1px solid var(--border);
  overflow: auto;
  color: #243145;
}

.post-code {
  background: transparent;
  font-size: 0.95rem;
}

.post-pre,
.post-code,
.notebook-prose pre,
.notebook-prose code {
  font-family: var(--font-blog-mono);
}

.post-table-wrap {
  overflow-x: auto;
  margin-top: 1.7rem;
  margin-bottom: 1.7rem;
}

.post-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.post-table thead th {
  background: #f4f7fb;
  color: var(--text-main);
}

.post-table th,
.post-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.92rem;
}

.post-horizontal-rule {
  margin-top: 2.4rem;
  margin-bottom: 2.4rem;
  border: none;
  border-top: 1px solid var(--border);
}

.post-emphasis {
  font-style: italic;
  color: var(--text-subtle);
}

.post-strong {
  font-weight: 800;
  color: var(--text-main);
}

.post-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  padding: 0.8rem 1.15rem;
  border-radius: 14px;
  background: var(--text-main);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.post-footer-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 100%;
  margin-top: 2.5rem;
}

.post-module {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 255, 0.88));
  padding: 1.45rem;
}

.post-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-module-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.post-module-title {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.category-stream {
  display: flex;
  flex-direction: column;
}

.category-stream-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(221, 228, 239, 0.9);
  cursor: pointer;
}

.category-stream-item:first-child {
  padding-top: 0;
  border-top: none;
}

.category-stream-title {
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.category-stream-desc {
  margin-top: 0.25rem;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.category-stream-date,
.category-stream-badge {
  font-size: 0.84rem;
  color: var(--text-soft);
}

.category-stream-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #f1f5fb;
}

.post-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.post-pager-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  min-height: 108px;
  width: 100%;
  padding: 1.05rem 1.15rem;
  border: 1px solid rgba(221, 228, 239, 0.95);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 253, 0.96));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.post-pager-item.is-next {
  text-align: right;
}

.post-pager-item.is-disabled {
  visibility: hidden;
  pointer-events: none;
}

.post-pager-arrow {
  flex: 0 0 auto;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-soft);
}

.post-pager-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
}

.post-pager-label {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.post-pager-title {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-soft);
}

.post-pager-item:hover,
.post-pager-item:focus-visible {
  border-color: rgba(46, 111, 242, 0.22);
  box-shadow: 0 14px 28px rgba(46, 111, 242, 0.12);
  transform: translateY(-1px);
}

.post-pager-item:focus-visible {
  outline: none;
}

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

.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.8rem;
  border-radius: 22px;
  border: 1px solid rgba(221, 228, 239, 0.9);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(46, 111, 242, 0.2);
}

.related-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

.related-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  letter-spacing: -0.03em;
}

.related-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.author-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.author-card-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.author-card-body p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.7;
}

.author-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface-strong) 92%, white 8%);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.author-card-action:hover,
.author-card-action:focus-visible {
  background: var(--text-main);
  border-color: var(--text-main);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.author-card-action:focus-visible {
  outline: 0;
}

.author-card-action:active {
  transform: translateY(0);
  box-shadow: none;
}

.pagination-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0 4rem;
}

.page-move-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.page-number-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-number-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  color: var(--text-subtle);
  font-size: 0.95rem;
  font-weight: 600;
}

.page-number-button.is-active {
  background: var(--text-main);
  color: #fff;
}

.site-footer-credit {
  width: min(1240px, calc(100% - 2rem));
  margin: 1.25rem auto 2rem;
  padding: 1.1rem 0 0.15rem;
  text-align: center;
  border-top: 1px solid rgba(221, 228, 239, 0.9);
}

.site-footer-credit-main {
  margin: 0;
  color: #5e6779;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.55;
}

.site-footer-credit-sub {
  margin: 0.2rem 0 0;
  color: #8b94a6;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

@media (max-width: 1200px) {
  .blog-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .blog-card {
    grid-column: span 6;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  /* Both images start in the same grid row, below the introduction title. */
  .home-hero-shell {
    grid-template-rows: auto auto;
    gap: 1.25rem 2.5rem;
    padding-top: 2rem;
  }

  .hero-card {
    display: grid;
    grid-column: 1;
    grid-row: 1 / span 2;
    grid-template-rows: subgrid;
    padding: 0 1rem 2rem;
  }

  .hero-intro-body {
    /* Match the featured link's reserved 1px border. */
    padding-top: 1px;
  }

  .hero-panel {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
  }

  .hero-feature {
    /* Extend the hover area upward without moving the aligned thumbnail. */
    margin-top: calc(-1 * var(--hero-feature-padding));
  }

  .blog-sidebar {
    position: sticky;
    top: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .hero-panel {
    padding-top: 0;
  }

  .home-hero-shell,
  .blog-shell,
  .blog-card-featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-card-featured-image {
    display: block;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .blog-card-featured-body {
    grid-column: 1 / -1;
  }

  .blog-sidebar {
    position: static;
  }

  .blog-card-featured-body {
    padding: 1.1rem 0.2rem 0.2rem;
  }
}

@media (max-width: 768px) {
  .site-main {
    padding-top: 1.5rem;
  }

  .home-hero-shell {
    gap: 1rem;
  }

  .post-prose,
  .notebook-prose,
  .sidebar-card {
    border-radius: 24px;
  }

  .hero-card {
    padding: 1.4rem 1rem;
  }

  .hero-panel {
    padding-top: 0;
  }

  .hero-title {
    font-size: clamp(1.125rem, 5vw, 1.5rem);
  }

  .hero-stat-grid {
    grid-template-columns: 1fr;
  }

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

  .blog-card,
  .blog-card-featured {
    grid-column: auto;
  }

  .post-title {
    max-width: none;
  }

  .category-stream-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-pager {
    grid-template-columns: 1fr;
  }

  .post-pager-item,
  .post-pager-item.is-next {
    justify-content: flex-start;
    text-align: left;
  }

  .post-pager-title {
    max-width: calc(100vw - 8.5rem);
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .author-card {
    grid-template-columns: auto 1fr;
  }

  .author-card-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-footer-credit {
    width: calc(100% - 2rem);
    margin: 0.9rem auto 1.5rem;
    padding-top: 0.95rem;
  }

  .site-footer-credit-main {
    font-size: 0.96rem;
  }

  .site-footer-credit-sub {
    font-size: 0.86rem;
  }
}

:root[data-theme="dark"] .sidebar-tag,
:root[data-theme="dark"] .hero-chip,
:root[data-theme="dark"] .post-pill,
:root[data-theme="dark"] .pagination-shell,
:root[data-theme="dark"] .page-number-button,
:root[data-theme="dark"] .media-placeholder-badge,
:root[data-theme="dark"] .search-input-shell {
  background: rgba(24, 33, 48, 0.88);
  color: var(--text-subtle);
  border-color: var(--border);
}

:root[data-theme="dark"] .hero-category-pill:hover,
:root[data-theme="dark"] .hero-category-pill:focus-visible {
  background: rgba(37, 49, 69, 0.98);
  border-color: var(--accent);
  color: #f4f7ff;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .post-module,
:root[data-theme="dark"] .post-prose,
:root[data-theme="dark"] .notebook-prose,
:root[data-theme="dark"] .related-card,
:root[data-theme="dark"] .sidebar-card,
:root[data-theme="dark"] .toc-panel,
:root[data-theme="dark"] .content-empty,
:root[data-theme="dark"] .site-footer-credit {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}


:root[data-theme="dark"] .sidebar-intro,
:root[data-theme="dark"] .content-empty,
:root[data-theme="dark"] .media-placeholder,
:root[data-theme="dark"] .post-download-button,
:root[data-theme="dark"] .post-info-chip,
:root[data-theme="dark"] .sidebar-stat-item {
  background:
    linear-gradient(145deg, rgba(122, 166, 255, 0.14), rgba(24, 33, 48, 0.94)),
    var(--surface);
}

:root[data-theme="dark"] .post-link,
:root[data-theme="dark"] .blog-card-title,
:root[data-theme="dark"] .post-title,
:root[data-theme="dark"] .hero-feature-title,
:root[data-theme="dark"] .media-placeholder-name,
:root[data-theme="dark"] .related-title,
:root[data-theme="dark"] .site-footer-credit-main,
:root[data-theme="dark"] .site-footer-credit-sub {
  color: var(--text-main);
}

:root[data-theme="dark"] .hero-summary,
:root[data-theme="dark"] .hero-feature-summary,
:root[data-theme="dark"] .hero-feature-meta,
:root[data-theme="dark"] .hero-stat span,
:root[data-theme="dark"] .media-placeholder {
  color: var(--text-subtle);
}

:root[data-theme="dark"] .hero-stat strong,
:root[data-theme="dark"] .hero-chip {
  color: var(--text-main);
}



:root[data-theme="dark"] .author-card-action:hover,
:root[data-theme="dark"] .author-card-action:focus-visible {
  background: rgba(24, 33, 48, 0.96);
  border-color: rgba(122, 166, 255, 0.34);
  color: #f4f7ff;
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .post-link:hover,
:root[data-theme="dark"] .sidebar-post-link:hover,
:root[data-theme="dark"] .sidebar-category-item:hover,
:root[data-theme="dark"] .sidebar-tag:hover,
:root[data-theme="dark"] .sidebar-tag:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

:root[data-theme="dark"] .blog-card-image,
:root[data-theme="dark"] .blog-card-featured-image {
  background: #101722;
}

:root[data-theme="dark"] .post-blockquote {
  background: linear-gradient(90deg, rgba(122, 166, 255, 0.12), rgba(122, 166, 255, 0.03));
  color: var(--text-subtle);
}

:root[data-theme="dark"] .post-paragraph,
:root[data-theme="dark"] .post-list,
:root[data-theme="dark"] .post-list-item,
:root[data-theme="dark"] .notebook-prose p,
:root[data-theme="dark"] .notebook-prose li,
:root[data-theme="dark"] .notebook-prose td,
:root[data-theme="dark"] .notebook-prose th {
  color: #d7e0f0;
}

:root[data-theme="dark"] .notebook-prose strong,
:root[data-theme="dark"] .post-strong {
  color: #f4f7ff;
}

:root[data-theme="dark"] .post-link {
  color: #8fb5ff;
}

:root[data-theme="dark"] .post-link:hover {
  color: #bfd5ff;
}

:root[data-theme="dark"] .category-stream-badge {
  background: rgba(24, 33, 48, 0.92);
  border: 1px solid rgba(122, 166, 255, 0.18);
  color: #c9d7ee;
}

:root[data-theme="dark"] .post-pre,
:root[data-theme="dark"] .post-code,
:root[data-theme="dark"] .notebook-prose pre,
:root[data-theme="dark"] .notebook-prose code {
  background: #111823;
  border-color: var(--border);
  color: #edf2fb;
}

:root[data-theme="dark"] .post-table th,
:root[data-theme="dark"] .post-table td {
  border-color: var(--border);
}

:root[data-theme="dark"] .post-table thead th {
  background: rgba(24, 33, 48, 0.94);
}

/* Editorial previews: these rules never target article bodies or related posts. */
.post-preview {
  min-width: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-main);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color 160ms ease, border-color 160ms ease;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .post-preview:hover {
    background-color: var(--preview-hover-bg);
    border-color: var(--preview-hover-border);
  }
}

.post-preview:focus-visible {
  background-color: var(--preview-hover-bg);
  border-color: var(--preview-hover-border);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

:root .post-preview .media-placeholder {
  border: 0;
  border-radius: 0;
  background: var(--page-bg-strong);
}

:root .post-preview .media-placeholder-badge {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.hero-action::after {
  content: "→";
  margin-left: 0.6rem;
}

.home-topics {
  margin-top: 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-section-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .post-preview {
    transition: none;
  }
}
/* Category navigation uses the same flat surfaces as the home previews. */
:root[data-theme] .category-overview-panel {
  position: absolute;
  right: 0;
  top: 0;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: none;
  transform: translateX(100%);
  transition: transform 160ms ease;
}

:root[data-theme] .category-overview-overlay.is-open .category-overview-panel {
  transform: translateX(0);
}

.category-overview-head {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

:root[data-theme] .category-overview-list .sidebar-category-item,
:root[data-theme] .category-overview-close {
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

:root[data-theme] .category-overview-list .sidebar-category-item.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (hover: hover) and (pointer: fine) {
  :root[data-theme] .category-overview-list .sidebar-category-item:hover,
  :root[data-theme] .category-overview-close:hover {
    border-color: var(--accent);
    background: var(--preview-hover-bg);
    box-shadow: none;
    transform: none;
  }
}

:root[data-theme] .category-overview-list .sidebar-category-item:focus-visible,
:root[data-theme] .category-overview-close:focus-visible,
.post-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  :root[data-theme] .category-overview-panel,
  :root[data-theme] .category-overview-list .sidebar-category-item,
  :root[data-theme] .category-overview-close {
    transition: none;
  }
}

/* Article pages share the home's open surfaces and rectangular interactions. */
.blog-shell.is-post-view {
  --max-copy: 1040px;
}

.blog-shell.is-post-view .content-view {
  min-width: 0;
  overflow-wrap: anywhere;
}

.blog-shell.is-post-view .post-prose,
.blog-shell.is-post-view .notebook-prose,
.blog-shell.is-post-view .post-module {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.blog-shell.is-post-view .post-prose,
.blog-shell.is-post-view .notebook-prose {
  padding: clamp(1rem, 2vw, 2rem);
}

.blog-shell.is-post-view .content-view > .post-header {
  padding: clamp(1rem, 2vw, 2rem);
}

.blog-shell.is-post-view .post-title {
  max-width: 100%;
  font-size: clamp(1.8rem, 3.4vw, 2.75rem);
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.blog-shell.is-post-view :is(.post-prose-h1, .post-prose-h2, .post-prose-h3,
  .post-prose-h4, .post-prose-h5, .post-prose-h6, .post-module-title) {
  font-family: var(--font-blog-sans);
  font-weight: 600;
}

.blog-shell.is-post-view :is(.post-cover, .post-image, .related-card-thumb) {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.blog-shell.is-post-view .post-cover {
  height: auto;
  width: auto;
  max-width: 100%;
  margin: 1.5rem auto 0;
}

.blog-shell.is-post-view .post-image,
.blog-shell.is-post-view .notebook-prose img {
  max-width: 100%;
  height: auto;
}

.blog-shell.is-post-view :is(.post-pill, .post-info-chip, .post-download-button,
  .copy-button, .post-pre, .post-blockquote, .author-card-action) {
  border-radius: 0;
}

.blog-shell.is-post-view .post-pill {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.blog-shell.is-post-view .post-pill:focus-visible {
  background: color-mix(in srgb, var(--text-main) 12%, var(--surface-strong) 88%);
  color: color-mix(in srgb, var(--accent) 80%, var(--text-main) 20%);
}

@media (hover: hover) and (pointer: fine) {
  .blog-shell.is-post-view .post-pill:hover {
    background: color-mix(in srgb, var(--text-main) 12%, var(--surface-strong) 88%);
    color: color-mix(in srgb, var(--accent) 80%, var(--text-main) 20%);
  }

  :root[data-theme="dark"] .blog-shell.is-post-view .post-pill:hover {
    background: rgba(37, 49, 69, 0.98);
    color: #f4f7ff;
  }
}

:root[data-theme="dark"] .blog-shell.is-post-view .post-pill:focus-visible {
  background: rgba(37, 49, 69, 0.98);
  color: #f4f7ff;
}

.blog-shell.is-post-view .post-info-chip {
  padding: 0;
  background: transparent;
  color: var(--text-subtle);
}

.blog-shell.is-post-view .post-module {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.blog-shell.is-post-view :is(.related-card, .post-pager-item, .author-card-action) {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: var(--text-main);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.blog-shell.is-post-view .related-card {
  padding: 1rem;
}

.blog-shell.is-post-view .post-pager-label {
  font-weight: 600;
  color: var(--accent);
}

.blog-shell.is-post-view .post-pager-title {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.blog-shell.is-post-view .notebook-prose {
  overflow-x: auto;
}

.blog-shell.is-post-view mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .blog-shell.is-post-view :is(.related-card, .post-pager-item, .author-card-action):hover {
    background: var(--preview-hover-bg);
    border-color: var(--preview-hover-border);
  }
}

.blog-shell.is-post-view :is(.related-card, .post-pager-item, .author-card-action):focus-visible {
  background: var(--preview-hover-bg);
  border-color: var(--preview-hover-border);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .blog-shell.is-post-view .post-pill,
  .blog-shell.is-post-view :is(.related-card, .post-pager-item, .author-card-action) {
    transition: none;
  }
}

/* Shared search occupies its own top-layer surface, outside the blurred header. */
body.mobile-search-open { overflow: hidden; }
#mobile-search-dialog {
  margin: 0; padding: max(1.25rem, env(safe-area-inset-top)) 1rem 2rem;
  width: 100vw; box-sizing: border-box; max-width: none; height: 100vh; height: 100dvh;
  max-height: none; border: 0; border-radius: 0;
  background: var(--page-bg); color: var(--text-main); overflow-y: auto;
}
#mobile-search-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
#mobile-search-dialog > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) {
  #mobile-search-dialog { padding: 3rem 2rem; }
}
.mobile-search-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.mobile-search-head h2 { font-size: 1.4rem; font-weight: 600; }
#mobile-search-close { width: 44px; height: 44px; color: var(--text-main); }
#mobile-search-form { display: flex; gap: 0.5rem; }
#mobile-search-input { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--border-strong); border-radius: 0; background: var(--surface-strong); color: var(--text-main); padding: 0.8rem; font-size: 16px; }
#mobile-search-form button { flex-shrink: 0; background: var(--accent); color: var(--page-bg); padding: 0.75rem 1rem; }
.mobile-search-topics-title { margin: 2rem 0 1rem; font-weight: 600; }
#mobile-search-topics { display: flex; flex-wrap: wrap; gap: 0.65rem; }
#mobile-search-topics button { border: 1px solid var(--accent); padding: 0.6rem 0.8rem; color: var(--accent); background: transparent; }
#mobile-search-dialog :is(input, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
