:root {
  --bg: #0a0a0c;
  --bg-elevated: #101013;
  --surface: #141417;
  --surface-strong: #1a1a1e;
  --text: #ece9e4;
  --text-strong: #ffffff;
  --muted: #a39e97;
  --faint: #716d68;
  --line: rgba(236, 233, 228, 0.12);
  --line-strong: rgba(236, 233, 228, 0.22);
  --accent: #b8a98d;
  --accent-strong: #d8c7a5;
  --accent-soft: rgba(184, 169, 141, 0.12);
  --danger: #d99582;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --serif-cjk: "Iowan Old Style", "Songti TC", "Noto Serif TC", "PMingLiU", "Source Han Serif TC", Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --reader-size: 18px;
  --reader-leading: 1.9;
  --content: 1180px;
  --measure: 760px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f1eb;
  --bg-elevated: #faf8f4;
  --surface: #ffffff;
  --surface-strong: #ece7de;
  --text: #282622;
  --text-strong: #11110f;
  --muted: #68635c;
  --faint: #8b857c;
  --line: rgba(40, 38, 34, 0.13);
  --line-strong: rgba(40, 38, 34, 0.24);
  --accent: #806e4d;
  --accent-strong: #5f4d31;
  --accent-soft: rgba(128, 110, 77, 0.1);
  --danger: #a54e3d;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(184, 169, 141, 0.055), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 48px), var(--content));
  min-height: 84px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  image-rendering: pixelated;
  object-fit: cover;
}

.brand-type {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.brand-domain {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-nav a {
  position: relative;
  padding: 31px 0 29px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--text-strong);
}

.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent-strong);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.language-toggle {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.language-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.language-toggle .lang-en,
.language-toggle .lang-zh {
  transition: color 160ms ease;
}

html[lang="en"] .language-toggle .lang-en,
html[lang="zh-Hant"] .language-toggle .lang-zh {
  color: var(--text-strong);
}

.lang-divider {
  color: var(--faint);
}

.hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 42%, transparent 78%);
  content: "";
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 104px 0 92px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 18px 0 20px;
  color: var(--text-strong);
  font-family: var(--serif);
  font-size: clamp(48px, 6.2vw, 78px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-description {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-meta > span,
.hero-meta > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta strong {
  color: var(--text);
  font-weight: 500;
}

.hero-meta a {
  color: var(--accent);
}

.rss-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.constellation {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0.6;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(80% 100% at 78% 42%, #000 0%, transparent 78%);
  mask-image: radial-gradient(80% 100% at 78% 42%, #000 0%, transparent 78%);
}

.constellation svg {
  width: 100%;
  height: 100%;
}

.constellation path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.65;
  opacity: 0.24;
}

.constellation circle {
  fill: var(--accent-strong);
  opacity: 0.55;
}

.blog-shell {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 42px 0 100px;
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  min-width: 0;
  height: 46px;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-elevated);
  transition: border-color 160ms ease, background 160ms ease;
}

.search-field:focus-within {
  border-color: var(--accent);
  background: var(--surface);
}

.search-field svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--faint);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search-field input::placeholder {
  color: var(--faint);
}

.search-field input::-webkit-search-cancel-button {
  cursor: pointer;
}

kbd {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.2;
}

.language-filters {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.filter-chip {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.filter-chip:hover {
  color: var(--text);
}

.filter-chip.is-active {
  background: var(--surface-strong);
  color: var(--text-strong);
}

.active-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--accent-soft);
  font-size: 12px;
}

.active-filter-label {
  color: var(--muted);
}

.active-filter-list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 11px;
}

.active-filter-pill button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.clear-filters {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 68px;
  padding-top: 42px;
}

.year-group + .year-group {
  margin-top: 48px;
}

.year-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.year-heading h2 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.year-heading > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-card {
  border-top: 1px solid var(--line);
}

.post-card-link {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 28px;
  gap: 24px;
  padding: 30px 0 32px;
}

.post-card-link::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transition: width 260ms ease;
}

.post-card-link:hover::before {
  width: 100%;
}

.post-date {
  padding-top: 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-card-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 20px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.language-badge {
  min-width: 21px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--serif-cjk);
  font-size: 11px;
  line-height: 1;
}

.post-title {
  margin: 10px 0 11px;
  color: var(--text-strong);
  font-family: var(--serif);
  font-size: clamp(23px, 2.3vw, 30px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  transition: color 160ms ease;
}

.post-card-link:hover .post-title {
  color: var(--accent-strong);
}

.post-excerpt {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
}

.post-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 17px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-tags {
  color: var(--muted);
}

.post-arrow {
  align-self: center;
  color: var(--faint);
  font-size: 20px;
  transition: color 160ms ease, transform 160ms ease;
}

.post-card-link:hover .post-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.empty-state {
  padding: 80px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.empty-state h2 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.empty-state p:not(.eyebrow) {
  color: var(--muted);
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

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

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

.sidebar-section {
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
}

.sidebar-section + .sidebar-section {
  padding-top: 28px;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.sidebar-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-heading > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.collection-list {
  display: grid;
  gap: 8px;
}

.collection-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.collection-row:hover,
.collection-row.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.collection-row strong,
.collection-row small {
  display: block;
}

.collection-row strong {
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.collection-row small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}

.collection-count {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-chip {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.tag-chip > span {
  color: var(--faint);
  font-size: 8px;
}

.tag-chip:hover,
.tag-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.archive-year + .archive-year {
  margin-top: 19px;
}

.archive-year h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.archive-year button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.archive-year button > span:last-child {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.archive-year button:hover,
.archive-year button.is-active {
  color: var(--accent-strong);
}

.rss-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin-top: 28px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: linear-gradient(145deg, var(--accent-soft), transparent);
}

.rss-symbol {
  color: var(--accent);
  font-size: 29px;
  line-height: 1;
}

.rss-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.rss-card p {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}

.rss-card a {
  grid-column: 2;
  width: fit-content;
  margin-top: 5px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}

.footer-inner {
  width: min(calc(100% - 48px), var(--content));
  min-height: 150px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 42px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  image-rendering: pixelated;
}

.footer-name {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
}

.footer-tagline {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--accent-strong);
}

.copyright {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.search-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 64px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.search-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(7px);
}

.search-dialog-shell {
  display: flex;
  flex-direction: column;
  max-height: min(760px, calc(100dvh - 64px));
}

.search-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 26px 18px;
}

.search-dialog-heading h2 {
  margin: 7px 0 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
}

.search-field-large {
  flex: 0 0 auto;
  height: 54px;
  margin: 0 26px;
}

.search-field-large input {
  font-size: 15px;
}

.search-help {
  margin: 12px 26px 18px;
  color: var(--faint);
  font-size: 11px;
}

.search-results {
  min-height: 180px;
  overflow-y: auto;
  padding: 0 14px 18px;
  border-top: 1px solid var(--line);
}

.search-result {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 17px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result.is-selected {
  background: var(--accent-soft);
}

.search-result strong {
  display: block;
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.search-result p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-result time {
  padding-top: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.search-empty {
  padding: 44px 14px;
  color: var(--muted);
  text-align: center;
}

.search-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.article-header {
  border-bottom: 1px solid var(--line);
}

.article-header-inner {
  width: min(calc(100% - 48px), 980px);
  margin: 0 auto;
  padding: 58px 0 50px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 35px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

.collection-badge {
  color: var(--accent);
}

.article-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-header h1 {
  max-width: 900px;
  margin: 18px 0 12px;
  color: var(--text-strong);
  font-family: var(--serif-cjk);
  font-size: clamp(34px, 4.7vw, 56px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.article-english-title {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.45;
}

html[lang="zh-Hant"] .article-english-title {
  display: none;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin-top: 29px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-meta > span {
  display: inline-flex;
  gap: 6px;
}

.article-cover {
  width: min(calc(100% - 48px), var(--content));
  margin: 38px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.article-cover img {
  width: 100%;
  max-height: 620px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-layout {
  width: min(calc(100% - 48px), 1080px);
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) 250px;
  justify-content: space-between;
  gap: 70px;
  margin: 0 auto;
  padding: 64px 0 100px;
}

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

.prose {
  color: var(--text);
  font-family: var(--serif-cjk);
  font-size: var(--reader-size);
  line-height: var(--reader-leading);
  overflow-wrap: anywhere;
}

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

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: var(--text-strong);
  font-family: var(--serif-cjk);
  font-weight: 600;
  line-height: 1.4;
  scroll-margin-top: 110px;
}

.prose h2 {
  margin: 3.2em 0 0.9em;
  padding-bottom: 0.45em;
  border-bottom: 1px solid var(--line);
  font-size: 1.55em;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 2.5em 0 0.8em;
  font-size: 1.24em;
}

.prose h4 {
  margin: 2em 0 0.7em;
  font-size: 1.08em;
}

.prose p {
  margin: 0 0 1.25em;
}

.prose strong {
  color: var(--text-strong);
  font-weight: 650;
}

.prose em {
  color: color-mix(in srgb, var(--text) 88%, var(--accent));
}

.prose a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.5em;
}

.prose li {
  margin: 0.35em 0;
  padding-left: 0.25em;
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  margin: 2em 0;
  padding: 0.2em 0 0.2em 1.35em;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 0.96em;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  width: 80px;
  margin: 3em auto;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.prose img {
  width: 100%;
  height: auto;
  margin: 2.2em 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}

.prose figure {
  margin: 2.2em 0;
}

.prose figcaption {
  margin-top: 9px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
  text-align: center;
}

.prose table {
  width: 100%;
  display: block;
  overflow-x: auto;
  margin: 2em 0;
  border-collapse: collapse;
  font-size: 0.86em;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--surface);
  color: var(--text-strong);
  font-weight: 600;
}

.prose code {
  padding: 0.15em 0.35em;
  border-radius: 3px;
  background: var(--surface-strong);
  font-family: var(--mono);
  font-size: 0.82em;
}

.prose pre {
  overflow-x: auto;
  margin: 2em 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.prose mark {
  padding: 0 2px;
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text-strong);
}

.search-flash {
  animation: search-flash 1.8s ease;
}

@keyframes search-flash {
  0%, 100% { background: transparent; }
  25%, 70% { background: var(--accent-soft); }
}

.article-end {
  margin-top: 54px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.article-end .eyebrow {
  margin-bottom: 13px;
}

.citation-box {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-elevated);
}

.citation-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}

.citation-box summary::-webkit-details-marker {
  display: none;
}

.citation-box summary span:last-child {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.citation-box pre {
  overflow-x: auto;
  margin: 0;
  padding: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.citation-box .button {
  margin: 0 17px 17px;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 58px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.post-nav-link {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-nav-link > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-nav-link strong {
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.post-nav-link:hover strong {
  color: var(--accent-strong);
}

.post-nav-next {
  align-items: flex-end;
  text-align: right;
}

.back-to-blog {
  display: inline-block;
  margin-top: 38px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-sidebar {
  min-width: 0;
  align-self: start;
  position: sticky;
  top: 112px;
}

.article-sidebar .sidebar-section {
  padding-bottom: 24px;
}

.article-sidebar .sidebar-section + .sidebar-section {
  padding-top: 24px;
}

#article-toc {
  display: grid;
  gap: 2px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

#article-toc a {
  padding: 6px 0 6px 11px;
  border-left: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
  transition: color 160ms ease, border-color 160ms ease;
}

#article-toc a[data-level="3"] {
  padding-left: 22px;
  font-size: 10px;
}

#article-toc a:hover,
#article-toc a.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.search-field-small {
  height: 39px;
  padding: 0 10px;
}

.search-field-small input {
  font-size: 11px;
}

.article-search-results {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.article-search-result {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.article-search-result:hover {
  border-color: var(--accent);
  color: var(--text);
}

.article-search-status {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.reader-controls {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.reader-buttons {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 5px;
}

.reader-buttons button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.reader-buttons button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.sidebar-rss {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 0;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-rss > span:last-child {
  margin-left: auto;
  color: var(--faint);
}

.sidebar-rss:hover {
  color: var(--accent-strong);
}

.reading-progress {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  pointer-events: none;
}

.reading-progress span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--accent);
  transition: width 80ms linear;
}

.article-page-body .reading-progress {
  display: block;
}

body:not(.article-page-body) .reading-progress {
  display: none;
}

.copy-status {
  margin-left: 10px;
  color: var(--accent);
  font-size: 10px;
}

@media (max-width: 1040px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    display: none;
  }

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

  .post-card-link {
    grid-template-columns: 86px minmax(0, 1fr) 20px;
    gap: 18px;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 42px;
  }
}

@media (max-width: 820px) {
  .header-inner,
  .hero-inner,
  .blog-shell,
  .article-header-inner,
  .article-cover,
  .article-layout,
  .footer-inner {
    width: min(calc(100% - 36px), var(--content));
  }

  .header-inner {
    min-height: 72px;
  }

  .hero {
    min-height: 420px;
  }

  .hero-inner {
    padding: 78px 0 70px;
  }

  .hero-description {
    font-size: 18px;
  }

  .blog-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .language-filters {
    width: fit-content;
  }

  .blog-layout {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-top: 32px;
  }

  .blog-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .sidebar-section + .sidebar-section {
    padding-top: 0;
  }

  .archive-section {
    grid-column: 1 / -1;
  }

  .rss-card {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .article-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-top: 44px;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    order: -1;
    width: 100%;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--line);
  }

  .article-sidebar .sidebar-section + .sidebar-section {
    padding-top: 0;
  }

  .toc-section {
    grid-column: 1 / -1;
  }

  #article-toc {
    max-height: 210px;
  }

  .reader-controls,
  .sidebar-rss {
    margin-top: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 28px 0;
  }

  .copyright {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .hero-inner,
  .blog-shell,
  .article-header-inner,
  .article-cover,
  .article-layout,
  .footer-inner {
    width: calc(100% - 28px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-domain {
    font-size: 8px;
  }

  .header-actions {
    gap: 2px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .language-toggle {
    height: 34px;
    padding: 0 9px;
    font-size: 9px;
  }

  .hero-inner {
    padding: 66px 0 58px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-description {
    font-size: 17px;
  }

  .hero-meta {
    gap: 13px 18px;
    font-size: 9px;
  }

  .blog-shell {
    padding-top: 26px;
  }

  .search-field kbd {
    display: none;
  }

  .language-filters {
    width: 100%;
  }

  .filter-chip {
    flex: 1;
    padding: 0 8px;
    font-size: 10px;
  }

  .post-card-link {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 24px 0;
  }

  .post-date {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .post-title {
    font-size: 24px;
  }

  .post-excerpt {
    font-size: 15px;
  }

  .post-arrow {
    grid-column: 2;
    grid-row: 2;
  }

  .blog-sidebar,
  .article-sidebar {
    grid-template-columns: 1fr;
  }

  .archive-section,
  .rss-card,
  .toc-section {
    grid-column: auto;
  }

  .article-header-inner {
    padding: 38px 0 36px;
  }

  .breadcrumbs {
    margin-bottom: 27px;
  }

  .article-header h1 {
    font-size: 34px;
  }

  .article-english-title {
    font-size: 17px;
  }

  .article-cover {
    margin-top: 24px;
  }

  .article-cover img {
    aspect-ratio: 4 / 3;
  }

  .article-layout {
    padding-top: 36px;
  }

  .prose {
    --reader-size: 17px;
  }

  .prose h2 {
    font-size: 1.4em;
  }

  .post-navigation {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .post-nav-next {
    align-items: flex-start;
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .copyright {
    grid-column: auto;
  }

  .search-dialog-heading {
    padding: 20px 18px 15px;
  }

  .search-field-large {
    margin: 0 18px;
  }

  .search-help {
    margin-right: 18px;
    margin-left: 18px;
  }

  .search-result {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .article-sidebar,
  .article-end,
  .citation-box,
  .post-navigation,
  .back-to-blog,
  .reading-progress,
  .search-dialog {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .article-header-inner,
  .article-cover,
  .article-layout {
    width: 100%;
  }

  .article-layout {
    display: block;
    padding: 20px 0;
  }

  .prose {
    color: #111;
    font-size: 11pt;
  }

  .prose h2,
  .prose h3,
  .prose strong {
    color: #111;
  }

  .prose img {
    break-inside: avoid;
  }
}
