/* =========================================================
   青城𝓢𝓮𝓹 — personal blog
   Typography-led, dependency-free, light and dark themes.
   ========================================================= */

:root {
  --font-sans: "Avenir Next", Avenir, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
    "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas,
    "Liberation Mono", monospace;

  --bg: #f5f2eb;
  --bg-alt: #ece8df;
  --surface: #fbfaf6;
  --surface-strong: #fffefb;
  --ink: #16201b;
  --ink-soft: #34433d;
  --muted: #52615a;
  --faint: #647169;
  --line: rgba(22, 32, 27, 0.13);
  --line-strong: rgba(22, 32, 27, 0.23);
  --accent: #0f766e;
  --accent-strong: #0a5a54;
  --accent-soft: #d9f2ec;
  --accent-ink: #08423d;
  --warm: #b7791f;
  --danger: #b42318;
  --danger-soft: #fce8e6;
  --header-bg: rgba(245, 242, 235, 0.82);
  --footer-bg: #101a16;
  --footer-ink: #eef4f0;
  --footer-muted: #91a49a;
  --code-bg: #0e1714;
  --code-ink: #d8e5df;
  --shadow-sm: 0 10px 30px rgba(22, 32, 27, 0.06);
  --shadow-md: 0 24px 70px rgba(22, 32, 27, 0.1);
  --shadow-lg: 0 36px 100px rgba(22, 32, 27, 0.16);
  --grid-line: rgba(22, 32, 27, 0.055);
  --max-width: 1240px;
  --header-height: 78px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0b1110;
  --bg-alt: #0e1714;
  --surface: #111c18;
  --surface-strong: #15221d;
  --ink: #edf5f1;
  --ink-soft: #cad8d2;
  --muted: #a7b7af;
  --faint: #82938b;
  --line: rgba(237, 245, 241, 0.12);
  --line-strong: rgba(237, 245, 241, 0.22);
  --accent: #5eead4;
  --accent-strong: #99f6e4;
  --accent-soft: #113a34;
  --accent-ink: #bcf6ec;
  --warm: #f0b35d;
  --danger: #ff867c;
  --danger-soft: #3b1d1a;
  --header-bg: rgba(11, 17, 16, 0.82);
  --footer-bg: #080d0b;
  --footer-ink: #edf5f1;
  --footer-muted: #84978d;
  --code-bg: #080e0c;
  --code-ink: #d8e5df;
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 36px 100px rgba(0, 0, 0, 0.42);
  --grid-line: rgba(237, 245, 241, 0.055);
}

/* Category accents */
.theme-amber {
  --theme: #a96612;
  --theme-soft: #f0dfbc;
  --theme-wash: rgba(169, 102, 18, 0.14);
  --theme-contrast: #422805;
}
.theme-blue {
  --theme: #2868b8;
  --theme-soft: #d8e5f3;
  --theme-wash: rgba(40, 104, 184, 0.14);
  --theme-contrast: #0c2c55;
}
.theme-rose {
  --theme: #af4f67;
  --theme-soft: #f2dce1;
  --theme-wash: rgba(175, 79, 103, 0.14);
  --theme-contrast: #4b1724;
}
.theme-jade {
  --theme: #177d69;
  --theme-soft: #d4ebe4;
  --theme-wash: rgba(23, 125, 105, 0.14);
  --theme-contrast: #093c32;
}
.theme-violet {
  --theme: #7455b7;
  --theme-soft: #e3dcf2;
  --theme-wash: rgba(116, 85, 183, 0.14);
  --theme-contrast: #2f1e55;
}
.theme-slate {
  --theme: #546b64;
  --theme-soft: #e0e6e3;
  --theme-wash: rgba(84, 107, 100, 0.14);
  --theme-contrast: #20302b;
}
.theme-teal {
  --theme: #0f766e;
  --theme-soft: #d5ebe6;
  --theme-wash: rgba(15, 118, 110, 0.14);
  --theme-contrast: #063b37;
}

[data-theme="dark"] .theme-amber {
  --theme: #efb45f;
  --theme-soft: #2e2316;
  --theme-wash: rgba(239, 180, 95, 0.12);
  --theme-contrast: #f7dfbc;
}
[data-theme="dark"] .theme-blue {
  --theme: #86b8ee;
  --theme-soft: #162436;
  --theme-wash: rgba(134, 184, 238, 0.12);
  --theme-contrast: #d7e8fb;
}
[data-theme="dark"] .theme-rose {
  --theme: #eaa2b3;
  --theme-soft: #301d23;
  --theme-wash: rgba(234, 162, 179, 0.12);
  --theme-contrast: #f8dce3;
}
[data-theme="dark"] .theme-jade {
  --theme: #72d7bd;
  --theme-soft: #122a24;
  --theme-wash: rgba(114, 215, 189, 0.12);
  --theme-contrast: #c7f7eb;
}
[data-theme="dark"] .theme-violet {
  --theme: #b7a0eb;
  --theme-soft: #241e35;
  --theme-wash: rgba(183, 160, 235, 0.12);
  --theme-contrast: #e7ddfb;
}
[data-theme="dark"] .theme-slate {
  --theme: #a5bbb3;
  --theme-soft: #1a2421;
  --theme-wash: rgba(165, 187, 179, 0.1);
  --theme-contrast: #e3ece8;
}
[data-theme="dark"] .theme-teal {
  --theme: #5eead4;
  --theme-soft: #102f2a;
  --theme-wash: rgba(94, 234, 212, 0.12);
  --theme-contrast: #ccfbf1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 30px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 260ms ease, color 260ms ease;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

mark {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0.1em 0.25em;
}

.container {
  width: min(calc(100% - 64px), var(--max-width));
  margin-inline: auto;
}

html:not(.js) .js-only {
  display: none !important;
}

[hidden] {
  display: none !important;
}

body.dialog-open {
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.mono-label,
.eyebrow,
.section-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10.5px;
}

.status-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: status-pulse 3.5s infinite ease-in-out;
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  50% {
    box-shadow: 0 0 0 7px transparent;
  }
}

/* ===== Buttons and links ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.01em;
  transition: background-color 180ms ease, color 180ms ease,
    border-color 180ms ease, transform 240ms var(--ease),
    box-shadow 240ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button svg {
  flex: none;
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 10px 26px rgba(22, 32, 27, 0.16);
}

.button-primary:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.22);
}

[data-theme="dark"] .button-primary {
  background: var(--accent);
  color: #07120f;
  box-shadow: 0 12px 30px rgba(94, 234, 212, 0.12);
}

[data-theme="dark"] .button-primary:hover {
  background: var(--accent-strong);
  color: #07120f;
}

.button-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.button-light {
  background: var(--footer-ink);
  color: var(--footer-bg);
}

.button-light:hover {
  background: var(--accent);
  color: #07120f;
}

.button-outline-light {
  border-color: rgba(238, 245, 240, 0.26);
  background: transparent;
  color: var(--footer-ink);
}

.button-outline-light:hover {
  border-color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  color: var(--accent);
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.5;
  transition: color 160ms ease, border-color 160ms ease;
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.text-link svg {
  transition: transform 200ms var(--ease);
}

.text-link:hover svg {
  transform: translateX(3px);
}

.muted-link {
  color: var(--muted);
  border-color: var(--line);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  transition: background-color 160ms ease, color 160ms ease,
    border-color 160ms ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: border-color 200ms ease, box-shadow 200ms ease,
    background-color 260ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 30px rgba(10, 20, 16, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: transform 300ms var(--ease), background-color 200ms ease;
}

.brand:hover .brand-mark {
  transform: rotate(-6deg);
  background: var(--accent);
  color: #fff;
}

[data-theme="dark"] .brand-mark {
  background: var(--accent);
  color: #07120f;
}

.brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.primary-nav a {
  position: relative;
  padding: 28px 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 160ms ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: translateX(-50%) scale(0.4);
  transition: opacity 160ms ease, transform 200ms var(--ease);
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--ink);
}

.primary-nav a.nav-external {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.primary-nav a.nav-external svg {
  opacity: 0.55;
  transition: transform 180ms var(--ease), opacity 160ms ease;
}

.primary-nav a.nav-external:hover svg {
  opacity: 1;
  transform: translate(1px, -1px);
}

.primary-nav a.is-active::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.header-actions .github-link {
  margin-left: 3px;
}

.menu-toggle {
  display: none;
}

.menu-close-icon {
  display: none;
}

.nav-open .menu-close-icon {
  display: block;
}

.nav-open .menu-open-icon {
  display: none;
}

/* ===== Flash messages ===== */
.flash-container {
  position: fixed;
  z-index: 90;
  top: calc(var(--header-height) + 16px);
  left: 50%;
  width: min(calc(100% - 32px), 520px);
  transform: translateX(-50%);
  pointer-events: none;
}

.flash-stack {
  display: grid;
  gap: 8px;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  font-size: 13px;
  pointer-events: auto;
}

.flash-success {
  border-left: 3px solid var(--accent);
}

.flash-error {
  border-left: 3px solid var(--danger);
}

.flash-info {
  border-left: 3px solid var(--warm);
}

.flash-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.flash-close:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

/* ===== Search dialog ===== */
.search-dialog {
  width: min(calc(100% - 32px), 720px);
  max-width: 720px;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.search-dialog::backdrop {
  background: rgba(6, 12, 9, 0.62);
  backdrop-filter: blur(8px);
}

.search-dialog[open] {
  animation: dialog-in 260ms var(--ease);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-panel {
  padding: 28px;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  color: var(--muted);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.text-button:hover {
  color: var(--ink);
}

kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.search-form-large {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line-strong);
}

.search-form-large input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -0.02em;
}

.search-form-large input::placeholder {
  color: var(--faint);
}

.search-form-icon {
  color: var(--muted);
}

.search-submit {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 650;
}

.search-submit:hover {
  background: var(--accent);
  color: #fff;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 20px;
  font-size: 11px;
  color: var(--muted);
}

.search-suggestions a {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-soft);
  transition: border-color 160ms ease, color 160ms ease;
}

.search-suggestions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 30px;
  padding: 80px 0 28px;
  background: var(--footer-bg);
  color: var(--footer-ink);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -360px;
  right: -140px;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: -160px;
  right: 70px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  pointer-events: none;
}

.footer-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 80px;
  padding-bottom: 70px;
}

.footer-statement .mono-label {
  color: var(--footer-muted);
}

.footer-title {
  margin: 20px 0 28px;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--footer-muted);
  font-size: 12px;
  transition: color 160ms ease, border-color 160ms ease;
}

.footer-mail:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-content: end;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-heading {
  margin-bottom: 8px;
  color: var(--footer-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-column a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d9e4de;
  font-size: 12px;
  transition: color 160ms ease;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--footer-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.footer-built {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-built .status-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
  background: #5eead4;
}

/* ===== Shared section structures ===== */
.section {
  padding: 104px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
}

.section-kicker > span {
  color: var(--accent);
}

.section-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.section-title {
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  font-weight: 620;
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.section-aside {
  max-width: 280px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.8;
  text-align: right;
}

.reveal.will-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.will-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Home hero ===== */
.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 88%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-glow-one {
  top: 25%;
  right: 4%;
  width: 440px;
  height: 440px;
  background: var(--accent-soft);
  opacity: 0.64;
}

.hero-glow-two {
  top: 5%;
  left: -8%;
  width: 360px;
  height: 360px;
  background: var(--theme-soft, var(--bg-alt));
  opacity: 0.35;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(440px, 0.96fr);
  align-items: center;
  gap: 54px;
  padding-top: 72px;
  padding-bottom: 48px;
}

.hero-copy {
  padding: 18px 0 12px;
}

.hero-title {
  max-width: 720px;
  margin: 24px 0 26px;
  font-size: clamp(3.15rem, 5.65vw, 6rem);
  font-weight: 630;
  line-height: 1.06;
  letter-spacing: -0.072em;
}

.hero-title-accent {
  position: relative;
  display: inline-block;
  color: var(--accent);
  letter-spacing: -0.08em;
}

.hero-title-accent::after {
  content: "";
  position: absolute;
  right: 2%;
  bottom: 0;
  left: 0;
  height: 0.12em;
  border-radius: 100%;
  background: var(--accent);
  opacity: 0.18;
  transform: rotate(-0.6deg);
}

.hero-lede {
  max-width: 530px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.95;
  text-wrap: balance;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 34px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.hero-meta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 160ms ease;
}

.hero-meta a:hover {
  color: var(--accent);
}

.meta-divider {
  width: 1px;
  height: 11px;
  background: var(--line-strong);
}

.meta-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

/* Hero art */
.hero-visual {
  position: relative;
  min-height: 570px;
}

.hero-orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit-one {
  top: 2%;
  right: -12%;
  width: 94%;
  aspect-ratio: 1;
}

.hero-orbit-two {
  right: 4%;
  bottom: -8%;
  width: 72%;
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.72;
}

.portrait-card {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 8px;
  width: min(77%, 338px);
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: rotate(1.6deg);
  transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
}

.hero-visual:hover .portrait-card {
  transform: rotate(0.5deg) translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.portrait-head,
.portrait-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 7px 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
}

.portrait-foot {
  padding: 12px 7px 4px;
}

.portrait-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #dbeafe;
}

.portrait-image-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.02);
}

.portrait-grain {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.16),
    transparent 36%,
    rgba(9, 37, 51, 0.06)
  );
  pointer-events: none;
}

.portrait-name {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.portrait-role {
  text-align: right;
}

.hero-code-card {
  position: absolute;
  z-index: 3;
  bottom: 36px;
  left: 0;
  width: min(76%, 342px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #0d1714;
  color: var(--code-ink);
  box-shadow: 0 28px 70px rgba(6, 16, 12, 0.32);
  transform: rotate(-1.6deg);
  transition: transform 500ms var(--ease);
}

.hero-visual:hover .hero-code-card {
  transform: rotate(-0.5deg) translateY(4px);
}

.code-window-bar,
.code-window-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #71837a;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.code-window-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 0;
}

.window-dots {
  display: inline-flex;
  gap: 4px;
}

.window-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #385049;
}

.window-dots i:first-child {
  background: #d58961;
}

.window-dots i:nth-child(2) {
  background: #d7b967;
}

.window-dots i:nth-child(3) {
  background: #69a68c;
}

.hero-code-card pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.85;
  white-space: pre;
}

.code-keyword {
  color: #e7a38a;
}

.code-class,
.code-fn {
  color: #8fd9c5;
}

.code-string {
  color: #d9c580;
}

.code-comment {
  color: #63756c;
}

.orbit-label {
  position: absolute;
  z-index: 4;
  right: 8px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
  color: #f5fffc;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  box-shadow: 0 16px 32px rgba(15, 118, 110, 0.2);
  animation: slow-float 7s ease-in-out infinite;
}

[data-theme="dark"] .orbit-label {
  color: #06251f;
}

.orbit-label i {
  width: 12px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

@keyframes slow-float {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

.tech-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tech-strip > span:not(.tech-strip-lead):not(.tech-strip-note) {
  color: var(--ink-soft);
}

.tech-strip i {
  width: 3px;
  height: 3px;
  background: var(--faint);
  transform: rotate(45deg);
}

.tech-strip-lead {
  margin-right: 15px;
  color: var(--accent);
  font-weight: 700;
}

.tech-strip-note {
  margin-left: auto;
  color: var(--faint);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--theme, var(--accent)) 30%, transparent);
  border-radius: 100px;
  background: var(--theme-wash, var(--accent-soft));
  color: var(--theme-contrast, var(--accent-ink));
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ===== Post cards ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 380ms var(--ease), box-shadow 380ms var(--ease),
    border-color 200ms ease;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 205px;
  padding: 21px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 20%, var(--theme-wash), transparent 36%),
    linear-gradient(145deg, var(--theme-soft), var(--surface-strong) 74%);
  isolation: isolate;
}

.card-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -9%;
  bottom: -46%;
  width: 60%;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: 0.5;
}

.card-art::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 3%;
  bottom: -27%;
  width: 38%;
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  opacity: 0.48;
}

.card-art-top,
.card-art-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--theme);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-art-bottom {
  color: var(--muted);
}

.card-symbol {
  align-self: flex-start;
  color: var(--theme);
  font-family: var(--font-mono);
  font-size: clamp(3.2rem, 5.2vw, 4.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.09em;
  transition: transform 500ms var(--ease);
}

.post-card:hover .card-symbol {
  transform: translate(6px, -3px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 25px 22px;
}

.card-title {
  margin: 13px 0 10px;
  font-size: clamp(1.2rem, 1.8vw, 1.48rem);
  font-weight: 630;
  line-height: 1.42;
  letter-spacing: -0.045em;
}

.card-title a {
  transition: color 160ms ease;
}

.card-title a:hover {
  color: var(--theme);
}

.card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 22px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
}

.tag-row a {
  transition: color 160ms ease;
}

.tag-row a:hover {
  color: var(--accent);
}

.featured-mini {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--accent);
  font-size: 8px;
}

.card-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: background-color 180ms ease, color 180ms ease,
    border-color 180ms ease, transform 300ms var(--ease);
}

.card-arrow:hover {
  border-color: var(--theme);
  background: var(--theme);
  color: var(--surface);
  transform: rotate(8deg);
}

/* ===== Home note ===== */
.home-note-section {
  padding-top: 44px;
}

.home-note {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 80px;
  padding: 68px 0 8px;
  border-top: 1px solid var(--line-strong);
}

.home-note blockquote {
  margin-top: 24px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.7vw, 3.4rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.045em;
}

.home-note-side > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.home-note-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
}

/* ===== Page hero ===== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 20%, var(--accent-soft), transparent 25%),
    linear-gradient(to bottom, var(--bg), var(--bg-alt));
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

.page-hero-glow {
  position: absolute;
  top: -70%;
  right: 5%;
  width: 480px;
  height: 480px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero-glow::after {
  content: "";
  position: absolute;
  inset: 50px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}

.page-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.page-index {
  margin-top: -26px;
  color: transparent;
  font-family: var(--font-mono);
  font-size: clamp(5rem, 11vw, 9.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.08em;
  -webkit-text-stroke: 1px var(--line-strong);
  opacity: 0.8;
}

.page-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: end;
  gap: 50px;
  margin-top: 44px;
}

.page-title {
  font-size: clamp(4.4rem, 9vw, 8rem);
  font-weight: 620;
  line-height: 0.9;
  letter-spacing: -0.085em;
}

.title-dot {
  color: var(--accent);
}

.page-intro {
  max-width: 430px;
  margin-left: auto;
  padding-bottom: 7px;
}

.page-intro p {
  max-width: 370px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.post-total {
  display: inline-block;
  margin-top: 18px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===== Blog ===== */
.blog-section {
  padding-top: 58px;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: start;
  gap: 64px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.filter-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  transition: background-color 160ms ease, color 160ms ease,
    border-color 160ms ease;
}

.filter-chip span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.filter-chip:hover {
  background: var(--surface);
  color: var(--ink);
}

.filter-chip.is-active {
  border-color: var(--line);
  background: var(--ink);
  color: var(--bg);
}

.filter-chip.is-active span {
  color: color-mix(in srgb, var(--bg) 62%, transparent);
}

.filter-search {
  flex: none;
  border-color: var(--line);
}

.active-filter-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -12px 0 26px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.active-filter-note strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}

.active-filter-note a {
  margin-left: auto;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.blog-post-grid {
  gap: 26px;
}

.blog-post-grid .card-art {
  min-height: 175px;
}

.blog-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-profile {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.sidebar-profile img {
  width: 64px;
  height: 64px;
  margin-bottom: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
}

.sidebar-profile .mono-label {
  color: var(--faint);
  font-size: 8px;
}

.sidebar-profile h2 {
  margin: 7px 0 9px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.sidebar-profile > p:not(.mono-label) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.sidebar-profile .text-link {
  margin-top: 17px;
  font-size: 11px;
}

.sidebar-block {
  padding: 21px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-count {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-cloud a {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10.5px;
  transition: border-color 160ms ease, color 160ms ease,
    background-color 160ms ease;
}

.tag-cloud a sup {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
}

.tag-cloud a:hover,
.tag-cloud a.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.sidebar-note {
  position: relative;
  overflow: hidden;
  padding: 25px 24px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--bg);
}

.sidebar-note-symbol {
  display: block;
  margin-bottom: 17px;
  color: var(--accent);
  font-size: 20px;
}

.sidebar-note p {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.8;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 3px 4px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11.5px;
  transition: color 160ms ease;
}

.sidebar-links a:hover {
  color: var(--accent);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.page-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 550;
  transition: color 160ms ease;
}

.page-button:hover {
  color: var(--accent);
}

.page-button.is-disabled {
  color: var(--faint);
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 3px;
}

.page-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  transition: border-color 160ms ease, color 160ms ease;
}

.page-number:hover {
  border-color: var(--line);
  color: var(--ink);
}

.page-number.is-active {
  border-color: var(--line-strong);
  background: var(--ink);
  color: var(--bg);
}

.page-ellipsis {
  padding: 0 5px;
  color: var(--faint);
  font-size: 10px;
}

/* Empty states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 60px 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.empty-mark {
  margin-bottom: 25px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.08em;
  opacity: 0.7;
}

.empty-state h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 620;
  letter-spacing: -0.04em;
}

.empty-state > p {
  max-width: 430px;
  margin: 10px 0 25px;
  color: var(--muted);
  font-size: 13px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Article ===== */
.reading-progress {
  position: fixed;
  z-index: 70;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 80ms linear;
}

.article-header {
  position: relative;
  overflow: hidden;
  padding: 68px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 4%, var(--theme-wash), transparent 33%),
    linear-gradient(to bottom, var(--bg), var(--bg));
}

.article-header-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 85%);
  pointer-events: none;
}

.article-header-glow {
  position: absolute;
  top: -310px;
  right: 2%;
  width: 700px;
  height: 700px;
  border: 1px solid color-mix(in srgb, var(--theme) 20%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.article-header-glow::after {
  content: "";
  position: absolute;
  inset: 100px;
  border: 1px dashed color-mix(in srgb, var(--theme) 15%, transparent);
  border-radius: 50%;
}

.article-header-inner {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 38px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.breadcrumb a {
  color: var(--muted);
  transition: color 160ms ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.article-title {
  max-width: 1000px;
  margin: 25px 0 24px;
  font-size: clamp(2.5rem, 5.7vw, 5.1rem);
  font-weight: 620;
  line-height: 1.14;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.article-deck {
  max-width: 760px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.9;
}

.article-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.byline-author {
  display: flex;
  align-items: center;
  gap: 11px;
}

.byline-author img {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.byline-author > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.byline-name {
  font-size: 11px;
  font-weight: 650;
}

.byline-date {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.byline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.inline-admin-link {
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--accent);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 240px;
  justify-content: space-between;
  gap: 72px;
  padding-top: 58px;
  padding-bottom: 64px;
}

.article-main {
  min-width: 0;
}

.article-sidebar {
  align-self: start;
  padding-top: 4px;
}

.mobile-toc {
  display: none;
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mobile-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  list-style: none;
}

.mobile-toc summary::-webkit-details-marker {
  display: none;
}

.mobile-toc summary span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.mobile-toc .toc {
  padding: 0 16px 14px;
}

/* Prose */
.prose {
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.95;
  word-wrap: break-word;
}

.prose > *:first-child {
  margin-top: 0 !important;
}

.prose > *:last-child {
  margin-bottom: 0 !important;
}

.prose p {
  margin: 1.35em 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: var(--ink);
  font-weight: 640;
  line-height: 1.35;
  letter-spacing: -0.045em;
  scroll-margin-top: calc(var(--header-height) + 32px);
}

.prose h1 {
  margin: 1.8em 0 0.7em;
  font-size: 2.15em;
}

.prose h2 {
  margin: 2.5em 0 0.8em;
  padding-top: 0.1em;
  font-size: 1.72em;
  letter-spacing: -0.05em;
}

.prose h3 {
  margin: 2.1em 0 0.65em;
  font-size: 1.3em;
}

.prose h4 {
  margin: 1.8em 0 0.5em;
  font-size: 1.08em;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0.8em;
}

.prose a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 32%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.prose a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.prose em {
  font-family: var(--font-serif);
}

.prose ul,
.prose ol {
  margin: 1.25em 0;
  padding-left: 1.45em;
}

.prose ul {
  list-style: none;
}

.prose ul > li {
  position: relative;
  padding-left: 0.2em;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  top: 0.83em;
  left: -1.05em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.prose ol {
  list-style: decimal;
}

.prose ol > li {
  padding-left: 0.2em;
}

.prose ol > li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: 600;
}

.prose li {
  margin: 0.48em 0;
  padding-left: 0.1em;
}

.prose li > ul,
.prose li > ol {
  margin: 0.45em 0;
}

.prose blockquote {
  position: relative;
  margin: 2em 0;
  padding: 1.2em 1.6em 1.2em 1.8em;
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 1.03em;
  line-height: 1.9;
}

.prose blockquote p {
  margin: 0.4em 0;
}

.prose blockquote p:first-child {
  margin-top: 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  margin: 3em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose img {
  margin: 2em auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.prose figure {
  margin: 2em 0;
}

.prose figcaption {
  margin-top: 10px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

.prose code {
  padding: 0.15em 0.4em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.83em;
  word-break: break-word;
}

.prose .codehilite {
  position: relative;
  margin: 2em 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: var(--code-bg);
  box-shadow: 0 18px 42px rgba(6, 16, 12, 0.14);
}

.prose .codehilite pre {
  margin: 0;
  padding: 22px 22px 21px;
  overflow-x: auto;
  background: transparent;
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  tab-size: 4;
  -webkit-overflow-scrolling: touch;
}

.prose .codehilite code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

.prose > pre {
  margin: 2em 0;
  padding: 22px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
}

.code-copy {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  min-width: 48px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(14, 23, 20, 0.84);
  color: #9fb3aa;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 160ms ease, color 160ms ease, border-color 160ms ease;
}

.codehilite:hover .code-copy,
.code-copy:focus-visible {
  opacity: 1;
}

.code-copy:hover {
  border-color: rgba(94, 234, 212, 0.4);
  color: #5eead4;
}

.prose table {
  display: block;
  width: 100%;
  margin: 2em 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.88em;
}

.prose th,
.prose td {
  padding: 10px 13px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 650;
}

.prose tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-alt) 45%, transparent);
}

.prose kbd {
  font-size: 0.72em;
}

.prose details {
  margin: 1.6em 0;
  padding: 1em 1.2em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.prose summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}

.prose .footnote {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--line);
  font-size: 0.84em;
}

.prose .footnote-ref {
  font-family: var(--font-mono);
  font-size: 0.78em;
}

.prose .footnote-backref {
  margin-left: 5px;
  text-decoration: none;
}

/* Pygments tokens */
.codehilite .hll {
  background-color: #263a32;
}
.codehilite .c,
.codehilite .ch,
.codehilite .cm,
.codehilite .cp,
.codehilite .cpf,
.codehilite .c1,
.codehilite .cs {
  color: #8aa096;
  font-style: italic;
}
.codehilite .k,
.codehilite .kc,
.codehilite .kd,
.codehilite .kn,
.codehilite .kp,
.codehilite .kr,
.codehilite .kt {
  color: #e7a38a;
}
.codehilite .o,
.codehilite .ow {
  color: #a9bdb3;
}
.codehilite .p,
.codehilite .punctuation {
  color: #c2d2ca;
}
.codehilite .n,
.codehilite .na,
.codehilite .nb,
.codehilite .nc,
.codehilite .nd,
.codehilite .ne,
.codehilite .nf,
.codehilite .nl,
.codehilite .nn,
.codehilite .nt,
.codehilite .nv {
  color: #d7e3dd;
}
.codehilite .nc,
.codehilite .nf,
.codehilite .nn {
  color: #8fd9c5;
}
.codehilite .na {
  color: #d9c580;
}
.codehilite .s,
.codehilite .sa,
.codehilite .sb,
.codehilite .sc,
.codehilite .dl,
.codehilite .sd,
.codehilite .s2,
.codehilite .se,
.codehilite .sh,
.codehilite .si,
.codehilite .sx,
.codehilite .sr,
.codehilite .s1,
.codehilite .ss {
  color: #d9c580;
}
.codehilite .m,
.codehilite .mb,
.codehilite .mf,
.codehilite .mh,
.codehilite .mi,
.codehilite .mo,
.codehilite .il {
  color: #9abff0;
}
.codehilite .bp {
  color: #9abff0;
}
.codehilite .nf {
  color: #8fd9c5;
}
.codehilite .mi,
.codehilite .nb {
  color: #9abff0;
}
.codehilite .gd {
  color: #f4a4a4;
}
.codehilite .gi {
  color: #8fd9c5;
}

/* Article TOC */
.toc-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.toc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.toc-count {
  color: var(--faint);
}

.toc-card .toc {
  font-size: 11px;
  line-height: 1.65;
}

.toc-card .toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-card .toc > ul > li {
  margin: 3px 0;
}

.toc-card .toc li ul {
  margin: 2px 0 6px 9px;
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.toc-card .toc a {
  display: block;
  padding: 3px 0;
  color: var(--muted);
  transition: color 160ms ease, padding-left 160ms ease;
}

.toc-card .toc a:hover {
  color: var(--ink);
}

.toc-card .toc a.is-active {
  padding-left: 7px;
  color: var(--accent);
}

.toc-card .toc a.is-active::before {
  content: "•";
  margin-left: -10px;
  margin-right: 5px;
  color: var(--accent);
}

.toc-card-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.toc-card-foot a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  transition: color 160ms ease;
}

.toc-card-foot a:hover {
  color: var(--accent);
}

.article-side-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: 28px;
  padding: 0 4px;
}

.article-side-meta .mono-label {
  margin-top: 13px;
  color: var(--faint);
  font-size: 7.5px;
}

.article-side-meta p:not(.mono-label) {
  color: var(--muted);
  font-size: 10px;
}

/* Article end */
.article-end {
  margin-top: 58px;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.article-end-head {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--faint);
}

.article-end-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.article-end-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: 24px;
}

.article-end-label {
  margin-bottom: 11px;
  color: var(--faint);
  font-size: 10px;
}

.tag-row-large {
  gap: 8px;
}

.tag-row-large a {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 9px;
}

.tag-row-large a:hover {
  border-color: var(--accent);
}

.article-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-after {
  padding-bottom: 84px;
}

.post-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.switch-card {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 180ms ease, transform 260ms var(--ease),
    box-shadow 260ms var(--ease);
}

.switch-card:not(.switch-empty):hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.switch-next {
  text-align: right;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.switch-next .switch-label {
  justify-content: flex-end;
}

.switch-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.switch-meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.switch-empty {
  border-style: dashed;
  background: transparent;
}

.switch-empty .switch-title {
  color: var(--muted);
}

.switch-empty:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.related-section {
  padding-top: 72px;
}

.section-head-compact {
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, var(--theme-wash), transparent 60%),
    var(--surface);
  transition: border-color 180ms ease, transform 260ms var(--ease);
}

.related-card:hover {
  border-color: color-mix(in srgb, var(--theme) 40%, var(--line));
  transform: translateY(-3px);
}

.related-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--theme);
  font-family: var(--font-mono);
  font-size: 8px;
}

.related-card h3 {
  margin: 20px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.article-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Preview */
.preview-banner {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 24px;
  background: #10201b;
  color: #dbe8e2;
  font-size: 11px;
}

.preview-badge {
  padding: 2px 6px;
  border: 1px solid #5eead4;
  border-radius: 3px;
  color: #5eead4;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.preview-banner a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5eead4;
}

.preview-layout {
  padding-top: 54px;
  padding-bottom: 72px;
}

.preview-layout .prose {
  max-width: 760px;
}

.preview-back {
  margin-top: 40px;
}

/* ===== About ===== */
.about-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 76% 18%, var(--accent-soft), transparent 28%),
    linear-gradient(160deg, var(--bg) 30%, var(--bg-alt));
}

.about-hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: radial-gradient(circle at 70% 50%, black, transparent 70%);
  pointer-events: none;
}

.about-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 80px;
}

.about-title {
  margin: 24px 0 26px;
  font-size: clamp(3.2rem, 6.8vw, 6.2rem);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.075em;
}

.about-name {
  color: var(--accent);
  letter-spacing: -0.08em;
}

.about-lede {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 2;
}

.about-lede strong {
  color: var(--ink);
  font-weight: 650;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.about-portrait {
  position: relative;
  max-width: 380px;
  margin-left: auto;
}

.about-portrait-frame {
  position: relative;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: rotate(2deg);
  transition: transform 500ms var(--ease);
}

.about-portrait:hover .about-portrait-frame {
  transform: rotate(0deg);
}

.about-portrait-frame img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  object-fit: cover;
  filter: saturate(0.93);
}

.about-portrait-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 6px 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

.about-stamp {
  position: absolute;
  right: -34px;
  bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  transform: rotate(8deg);
}

.about-stamp i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.about-sticker {
  position: absolute;
  top: 22px;
  left: -34px;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--accent);
  color: #f5fffc;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  transform: rotate(-10deg);
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.18);
}

[data-theme="dark"] .about-sticker {
  color: #06251f;
}

.about-intro {
  padding-top: 86px;
  padding-bottom: 90px;
}

.about-intro-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 200px;
  align-items: start;
  gap: 60px;
}

.about-intro-copy {
  max-width: 700px;
}

.about-intro-copy p {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.9;
}

.about-intro-copy p + p {
  margin-top: 1.3em;
}

.about-intro-copy strong {
  color: var(--accent);
  font-weight: 600;
}

.about-numbers {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 5px;
}

.about-numbers > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.about-numbers strong {
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.07em;
}

.about-numbers span {
  color: var(--faint);
  font-size: 9px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.focus-card {
  display: flex;
  min-height: 375px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
}

.focus-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.focus-card-accent {
  background: #12221c;
  color: #eef5f1;
  border-color: transparent;
}

.focus-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.focus-card-accent .focus-card-head {
  border-color: rgba(255, 255, 255, 0.12);
  color: #8fa79c;
}

.focus-card-head span:first-child {
  color: var(--accent);
}

.focus-card-accent .focus-card-head span:first-child {
  color: #5eead4;
}

.focus-card h3 {
  margin: 35px 0 18px;
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.055em;
}

.focus-card p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}

.focus-card-accent p {
  color: #a7b9b0;
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 32px;
}

.focus-tags span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.focus-card-accent .focus-tags span {
  border-color: rgba(255, 255, 255, 0.14);
  color: #a7b9b0;
}

.about-details {
  padding-top: 0;
}

.about-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  align-items: start;
  gap: 90px;
  padding-top: 74px;
  border-top: 1px solid var(--line-strong);
}

.about-principles .section-title {
  margin-top: 5px;
  font-size: clamp(2rem, 3.7vw, 3.35rem);
}

.principle-list {
  margin-top: 38px;
  list-style: none;
}

.principle-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.principle-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.principle-list span {
  padding-top: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
}

.principle-list p {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.7;
}

.stack-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.stack-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}

.stack-card-head .mono-label {
  color: var(--faint);
  font-size: 8px;
}

.stack-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.stack-group {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding: 18px 23px;
  border-bottom: 1px solid var(--line);
}

.stack-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.stack-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.stack-group > div span {
  color: var(--ink-soft);
  font-size: 11px;
}

.stack-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 23px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-size: 10px;
  transition: color 160ms ease, background-color 160ms ease;
}

.stack-card-foot:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.contact-section {
  padding-top: 24px;
}

.contact-panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
  overflow: hidden;
  padding: 58px 60px;
  border-radius: var(--radius-lg);
  background: #12221c;
  color: #eef5f1;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: -60%;
  right: 12%;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.contact-panel::after {
  content: "";
  position: absolute;
  top: -20%;
  right: 26%;
  width: 280px;
  height: 280px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.contact-panel-copy {
  position: relative;
  z-index: 1;
}

.contact-panel .section-kicker {
  color: #849c91;
}

.contact-panel .section-kicker > span {
  color: #5eead4;
}

.contact-panel .section-kicker::before {
  background: rgba(255, 255, 255, 0.17);
}

.contact-panel h2 {
  margin: 18px 0;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.065em;
}

.contact-panel-copy > p:not(.section-kicker) {
  max-width: 480px;
  color: #9eb0a7;
  font-size: 13px;
  line-height: 1.9;
}

.contact-panel-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 5px;
}

.contact-social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.contact-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(238, 245, 240, 0.18);
  border-radius: 4px;
  color: #b7c8bf;
  font-size: 10px;
  transition: border-color 160ms ease, color 160ms ease,
    background-color 160ms ease;
}

.contact-social:hover {
  border-color: rgba(94, 234, 212, 0.48);
  background: rgba(94, 234, 212, 0.07);
  color: #5eead4;
}

.qq-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.contact-subtle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9eb0a7;
  font-size: 10px;
  transition: color 160ms ease;
}

.contact-subtle:hover {
  color: #5eead4;
}

.contact-decoration {
  position: absolute;
  right: 2.5%;
  bottom: -30%;
  color: rgba(255, 255, 255, 0.035);
  font-family: var(--font-serif);
  font-size: 300px;
  line-height: 1;
  pointer-events: none;
}

/* ===== Search page ===== */
.search-page-hero {
  padding: 92px 0 62px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 12%, var(--accent-soft), transparent 26%),
    linear-gradient(to bottom, var(--bg), var(--bg-alt));
}

.search-page-title {
  max-width: 860px;
  margin: 24px 0 38px;
  font-size: clamp(3rem, 6.6vw, 5.6rem);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.075em;
}

.search-page-form {
  display: flex;
  max-width: 820px;
  align-items: center;
  gap: 14px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--line-strong);
}

.search-page-form > span {
  color: var(--muted);
}

.search-page-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
}

.search-page-form input::placeholder {
  color: var(--faint);
}

.search-page-form button {
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
}

.search-page-form button:hover {
  background: var(--accent);
  color: #fff;
}

.search-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.search-hints a {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  transition: border-color 160ms ease, color 160ms ease;
}

.search-hints a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.search-results-section {
  padding-top: 56px;
  min-height: 400px;
}

.search-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.search-results-head .mono-label {
  margin-bottom: 10px;
  color: var(--faint);
}

.search-results-head h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 620;
  letter-spacing: -0.045em;
}

.search-results-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.search-result-list {
  display: flex;
  flex-direction: column;
}

.search-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  gap: 22px;
  padding: 24px 6px;
  border-bottom: 1px solid var(--line);
  transition: background-color 180ms ease, padding 240ms var(--ease);
}

.search-result:hover {
  padding-left: 14px;
  padding-right: 10px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.search-result-index {
  padding-top: 2px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.search-result-main {
  min-width: 0;
}

.search-result h3 {
  margin: 8px 0 5px;
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  font-weight: 620;
  line-height: 1.45;
  letter-spacing: -0.035em;
}

.search-result p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result .tag-row {
  margin-top: 11px;
}

.search-result-arrow {
  align-self: center;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease;
}

.search-result:hover .search-result-arrow {
  background: var(--ink);
  color: var(--bg);
}

.search-empty-decor {
  display: flex;
  min-height: 380px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.search-empty-glyph {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 1;
  opacity: 0.4;
}

/* ===== Error ===== */
.page-error {
  overflow: hidden;
}

.error-section {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 90px 0;
  overflow: hidden;
}

.error-glow {
  position: absolute;
  top: 50%;
  right: 5%;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(100px);
  opacity: 0.55;
  transform: translateY(-50%);
}

.error-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: 80px;
}

.error-code {
  margin: 16px 0 6px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(7rem, 17vw, 15rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.14em;
}

.error-message {
  max-width: 470px;
  margin-bottom: 32px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-art {
  position: relative;
}

.error-terminal {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
}

.error-terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #71837a;
  font-family: var(--font-mono);
  font-size: 8px;
}

.error-terminal pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.9;
}

.error-stamp {
  display: inline-block;
  margin-top: 22px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.04fr) minmax(400px, 0.96fr);
    gap: 30px;
  }

  .hero-title {
    font-size: clamp(3rem, 5.4vw, 5.3rem);
  }

  .hero-code-card {
    width: min(78%, 320px);
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 48px;
  }

  .blog-layout {
    gap: 44px;
  }

  .about-details-grid {
    gap: 60px;
  }
}

@media (max-width: 1020px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 58px;
  }

  .hero-copy {
    max-width: 760px;
    padding-bottom: 0;
  }

  .hero-visual {
    width: min(100%, 620px);
    min-height: 540px;
    margin: 14px auto 0;
  }

  .portrait-card {
    width: min(65%, 320px);
    right: 4%;
  }

  .hero-code-card {
    width: min(68%, 330px);
    bottom: 24px;
  }

  .orbit-label {
    right: 5%;
  }

  .hero-title {
    font-size: clamp(3.4rem, 7.5vw, 5.7rem);
  }

  .page-hero {
    padding: 72px 0 58px;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
  }

  .sidebar-note {
    display: none;
  }

  .sidebar-links {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 18px;
    padding: 4px;
  }

  .sidebar-links a {
    justify-content: flex-start;
    gap: 7px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    max-width: 850px;
    padding-top: 38px;
  }

  .article-sidebar {
    display: none;
  }

  .mobile-toc {
    display: block;
  }

  .article-header {
    padding-top: 52px;
  }

  .about-hero-layout {
    gap: 50px;
  }

  .about-sticker {
    left: -20px;
  }

  .about-intro-grid {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 40px;
  }

  .about-numbers {
    grid-column: 2;
    flex-direction: row;
    gap: 28px;
    padding-top: 14px;
  }

  .about-numbers > div {
    flex: 1;
    border-bottom: 0;
    padding-bottom: 0;
  }

  .about-details-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .focus-grid {
    gap: 12px;
  }

  .focus-card {
    padding: 22px;
  }

  .contact-panel {
    padding: 48px;
  }

  .error-layout {
    gap: 42px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 16px;
  }

  .primary-nav {
    order: 3;
    display: flex;
    flex-basis: 100%;
    gap: 22px;
    margin-left: 0;
    padding: 0 0 14px;
    border-top: 1px solid var(--line);
  }

  .primary-nav a {
    padding: 11px 0 4px;
    font-size: 11px;
  }

  .primary-nav a::after {
    bottom: 0;
  }

  html.js .primary-nav {
    position: fixed;
    z-index: 55;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: flex;
    flex-basis: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 13px 24px 25px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 220ms var(--ease),
      visibility 180ms ease;
  }

  html.js .site-header.nav-open .primary-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  html.js .primary-nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
  }

  html.js .primary-nav a:last-child {
    border-bottom: 0;
  }

  html.js .primary-nav a::after {
    right: 0;
    bottom: 50%;
    left: auto;
    transform: translateY(50%);
  }

  html.js .primary-nav a.is-active::after {
    opacity: 1;
    transform: translateY(50%) scale(1);
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: 2px;
    border-color: var(--line);
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions .social-link {
    display: none;
  }

  .section {
    padding: 78px 0;
  }

  .section-head {
    align-items: flex-start;
    gap: 24px;
  }

  .section-aside {
    max-width: 220px;
    font-size: 13px;
  }

  .home-note {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 48px;
  }

  .post-grid {
    gap: 18px;
  }

  .card-art {
    min-height: 175px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 50px;
  }

  .footer-columns {
    max-width: 400px;
  }

  .page-hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .page-intro {
    margin-left: 0;
  }

  .page-intro p {
    max-width: 500px;
  }

  .page-index {
    display: none;
  }

  .about-hero {
    padding: 72px 0 60px;
  }

  .about-hero-layout {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    width: min(100%, 360px);
    margin: 35px auto 0;
  }

  .about-intro-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .about-intro-copy {
    max-width: 100%;
  }

  .about-numbers {
    grid-column: auto;
    flex-direction: row;
    gap: 20px;
    padding-top: 6px;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .focus-card {
    min-height: 280px;
  }

  .focus-card h3 {
    margin-top: 26px;
  }

  .focus-tags {
    padding-top: 26px;
  }

  .contact-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding: 40px;
  }

  .contact-panel-actions {
    align-items: flex-start;
  }

  .about-title {
    font-size: clamp(3rem, 9vw, 5.4rem);
  }

  .article-title {
    font-size: clamp(2.4rem, 7vw, 4.4rem);
  }

  .error-layout {
    grid-template-columns: 1fr;
  }

  .error-art {
    display: none;
  }

  .search-results-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 40px), var(--max-width));
  }

  :root {
    --header-height: 66px;
  }

  .brand-text {
    font-size: 13px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    font-size: 16px;
  }

  .header-inner {
    min-height: var(--header-height);
  }

  .hero-layout {
    padding-top: 42px;
    padding-bottom: 30px;
  }

  .hero-title {
    margin-top: 18px;
    font-size: clamp(2.65rem, 12vw, 4.3rem);
    line-height: 1.1;
    letter-spacing: -0.07em;
  }

  .hero-lede {
    font-size: 14.5px;
    line-height: 1.85;
  }

  .hero-actions {
    margin-top: 27px;
  }

  .button {
    min-height: 45px;
    padding: 0 18px;
    font-size: 12px;
  }

  .hero-meta {
    gap: 9px;
    margin-top: 28px;
    font-size: 8px;
  }

  .hero-meta .meta-divider:nth-of-type(2),
  .hero-meta span:last-child {
    display: none;
  }

  .hero-visual {
    min-height: 420px;
    margin-top: 8px;
  }

  .portrait-card {
    width: min(72%, 285px);
    right: 0;
  }

  .portrait-name {
    font-size: 14px;
  }

  .hero-code-card {
    bottom: 0;
    width: min(78%, 292px);
  }

  .hero-code-card pre {
    padding: 13px 14px 15px;
    font-size: 9px;
  }

  .code-window-bar,
  .code-window-foot {
    padding: 8px 11px;
    font-size: 7px;
  }

  .orbit-label {
    right: 1%;
    bottom: 81px;
    width: 62px;
    height: 62px;
    gap: 4px;
    font-size: 7px;
  }

  .tech-strip {
    gap: 9px;
    font-size: 7.5px;
  }

  .tech-strip-lead {
    margin-right: 3px;
  }

  .tech-strip-note {
    display: none;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
  }

  .section-title {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
  }

  .section-aside {
    display: none;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card-art {
    min-height: 165px;
  }

  .card-body {
    padding: 21px 21px 20px;
  }

  .card-title {
    font-size: 1.23rem;
  }

  .home-note {
    gap: 28px;
  }

  .home-note blockquote {
    font-size: clamp(1.7rem, 7vw, 2.5rem);
  }

  .home-note-side > p {
    font-size: 13px;
  }

  .page-hero {
    padding: 54px 0 44px;
  }

  .page-hero-grid {
    margin-top: 30px;
  }

  .page-title {
    font-size: clamp(3.7rem, 17vw, 5.7rem);
  }

  .page-intro p {
    font-size: 13px;
  }

  .blog-section {
    padding-top: 35px;
  }

  .filter-bar {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 26px;
    padding-bottom: 16px;
  }

  .filter-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -20px;
    padding-right: 20px;
    scrollbar-width: none;
  }

  .filter-scroll::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: none;
  }

  .filter-search {
    display: none;
  }

  .blog-post-grid {
    gap: 16px;
  }

  .blog-sidebar {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .sidebar-links {
    flex-direction: column;
    gap: 11px;
  }

  .pagination {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 36px;
  }

  .page-numbers {
    order: -1;
    width: 100%;
    justify-content: center;
  }

  .page-button {
    font-size: 9.5px;
  }

  .article-header {
    padding: 38px 0 38px;
  }

  .breadcrumb {
    margin-bottom: 25px;
    font-size: 8px;
  }

  .article-kicker {
    gap: 8px;
    font-size: 8px;
  }

  .article-title {
    margin: 17px 0 17px;
    font-size: clamp(2.1rem, 9vw, 3rem);
    line-height: 1.2;
    letter-spacing: -0.055em;
  }

  .article-deck {
    font-size: 14px;
    line-height: 1.8;
  }

  .article-byline {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 26px;
    padding-top: 18px;
  }

  .article-layout {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .prose {
    font-size: 15.5px;
    line-height: 1.92;
  }

  .prose h2 {
    font-size: 1.5em;
    margin-top: 2em;
  }

  .prose h3 {
    font-size: 1.21em;
  }

  .prose blockquote {
    margin: 1.6em 0;
    padding: 1em 1.15em;
    font-size: 0.98em;
  }

  .prose .codehilite {
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 8px;
  }

  .prose .codehilite pre {
    padding: 18px 16px;
    font-size: 11px;
  }

  .code-copy {
    opacity: 1;
  }

  .article-end-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-end-actions {
    width: 100%;
  }

  .article-end-actions .button {
    flex: 1;
  }

  .post-switcher {
    grid-template-columns: 1fr;
  }

  .switch-next {
    text-align: left;
  }

  .switch-next .switch-label {
    justify-content: flex-start;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-card {
    min-height: 145px;
  }

  .related-section {
    padding-top: 50px;
  }

  .article-back {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 38px;
  }

  .mobile-toc {
    margin-bottom: 24px;
  }

  .preview-layout {
    padding-top: 30px;
  }

  .about-hero {
    padding: 56px 0 48px;
  }

  .about-lede {
    font-size: 14.5px;
  }

  .about-actions {
    flex-direction: column;
  }

  .about-actions .button {
    width: 100%;
  }

  .about-sticker {
    top: 12px;
    left: -12px;
    width: 62px;
    height: 62px;
    font-size: 11px;
  }

  .about-stamp {
    right: -12px;
    bottom: 28px;
    padding: 10px 6px;
    font-size: 6px;
  }

  .about-intro {
    padding: 55px 0;
  }

  .about-numbers {
    flex-wrap: wrap;
  }

  .about-numbers > div {
    min-width: 100px;
  }

  .about-numbers strong {
    font-size: 23px;
  }

  .focus-card {
    min-height: 265px;
  }

  .about-details-grid {
    padding-top: 50px;
  }

  .about-principles .section-title {
    font-size: 2rem;
  }

  .principle-list p {
    font-size: 15px;
  }

  .stack-group {
    grid-template-columns: 75px 1fr;
  }

  .contact-panel {
    padding: 30px 24px;
    border-radius: 16px;
  }

  .contact-panel h2 {
    font-size: 2.2rem;
  }

  .contact-panel-actions {
    width: 100%;
    align-items: flex-start;
  }

  .contact-panel-actions .button {
    width: 100%;
  }

  .contact-social-row {
    justify-content: flex-start;
  }

  .search-page-hero {
    padding: 56px 0 42px;
  }

  .search-page-title {
    margin: 19px 0 28px;
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .search-page-form {
    gap: 10px;
  }

  .search-page-form input {
    font-size: 13px;
  }

  .search-page-form button {
    min-height: 36px;
    padding: 0 14px;
  }

  .search-results-section {
    padding-top: 38px;
  }

  .search-result {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 12px;
    padding: 19px 2px;
  }

  .search-result-arrow {
    display: none;
  }

  .search-result p {
    font-size: 11.5px;
  }

  .search-result:hover {
    padding-left: 8px;
  }

  .empty-state {
    padding: 38px 22px;
  }

  .error-section {
    min-height: auto;
    padding: 50px 0 70px;
  }

  .error-code {
    font-size: clamp(6rem, 30vw, 10rem);
  }

  .error-message {
    font-size: 1rem;
  }

  .search-panel {
    padding: 21px;
  }

  .search-panel-head {
    margin-bottom: 16px;
  }

  .search-form-large {
    flex-wrap: wrap;
  }

  .search-form-large input {
    font-size: 16px;
  }

  .search-submit {
    margin-left: auto;
  }

  .site-footer {
    padding-top: 58px;
  }

  .footer-title {
    font-size: 2.8rem;
  }

  .footer-columns {
    gap: 28px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .flash-container {
    top: calc(var(--header-height) + 10px);
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 2.45rem;
  }

  .hero-meta > span:not(.meta-divider):nth-last-child(1) {
    display: none;
  }

  .portrait-card {
    width: 78%;
  }

  .hero-code-card {
    width: 84%;
  }

  .hero-orbit {
    display: none;
  }
}

/* ===== Motion and print preferences ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal.will-reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --ink: #111;
    --ink-soft: #222;
    --muted: #555;
    --line: #ddd;
  }

  .site-header,
  .site-footer,
  .article-sidebar,
  .mobile-toc,
  .reading-progress,
  .article-after,
  .preview-banner,
  .flash-container {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .article-header {
    padding: 20px 0;
    background: #fff;
  }

  .article-header-glow,
  .article-header-grid {
    display: none;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  .article-layout {
    display: block;
    padding: 20px 0;
  }

  .prose {
    color: #222;
    font-size: 11pt;
  }

  .prose a {
    color: #111;
  }

  .prose .codehilite {
    border: 1px solid #ddd;
    box-shadow: none;
  }
}
