@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);
}

: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);
}

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;
}

.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 {
  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, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.5rem;
}

.hero-card,
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  background:
    radial-gradient(circle at top right, rgba(46, 111, 242, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92));
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(46, 111, 242, 0.08);
  filter: blur(10px);
}

.hero-kicker {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  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.85rem, 3.7vw, 3.05rem);
  line-height: 1.05;
  letter-spacing: -0.065em;
  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;
  z-index: 1;
}

.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 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(221, 228, 239, 0.9);
}

.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 color-mix(in srgb, var(--border-strong) 78%, white 22%);
  border-radius: 999px;
  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: color-mix(in srgb, var(--text-main) 18%, var(--border-strong) 82%);
  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: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-panel-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero-feature {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f6f9ff);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hero-feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(46, 111, 242, 0.18);
}

.hero-feature-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  object-fit: cover;
  background: #ecf1f8;
}

.hero-feature-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  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;
  justify-content: center;
  width: fit-content;
  padding: 0.9rem 1.2rem;
  border-radius: 14px;
  background: var(--text-main);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.blog-card,
.blog-card-featured {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

.blog-card:hover,
.blog-card-featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(46, 111, 242, 0.18);
}

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

.blog-card {
  grid-column: span 4;
  border-radius: 28px;
  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: 26px;
}

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

.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.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  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: 500;
  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;
  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) {
  .blog-sidebar {
    position: sticky;
    top: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .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;
  }

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

  .hero-card {
    padding: 1.4rem;
  }

  .hero-title {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
    font-size: clamp(1.9rem, 8.4vw, 2.7rem);
    line-height: 1.08;
  }

  .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"] .hero-stat,
:root[data-theme="dark"] .blog-card-category,
:root[data-theme="dark"] .blog-card-category-large,
:root[data-theme="dark"] .hero-feature-category,
:root[data-theme="dark"] .hero-category-pill,
: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: rgba(122, 166, 255, 0.34);
  color: #f4f7ff;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .hero-card,
:root[data-theme="dark"] .hero-panel,
:root[data-theme="dark"] .hero-feature,
:root[data-theme="dark"] .blog-card,
:root[data-theme="dark"] .blog-card-featured,
: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"] .hero-card {
  background:
    radial-gradient(circle at top right, rgba(122, 166, 255, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(24, 33, 48, 0.98), rgba(18, 25, 37, 0.96));
}

: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"] .hero-action {
  background: rgba(24, 33, 48, 0.96);
  border: 1px solid var(--border);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .hero-action:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

: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"] .hero-feature-thumb,
: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);
}
