:root {
  --ink: #17201d;
  --ink-soft: #31413c;
  --muted: #66736f;
  --paper: #f6f7f2;
  --surface: #ffffff;
  --surface-soft: #eef3ef;
  --line: #d8ded8;
  --teal: #0f766e;
  --teal-dark: #0b4f49;
  --amber: #b7791f;
  --clay: #9f5135;
  --shadow: 0 18px 48px rgba(23, 32, 29, 0.1);
  --site-width: 1120px;
  --read-width: 820px;
  --frame: min(calc(100% - 48px), var(--site-width));
  --content-frame: min(calc(100% - 48px), var(--read-width));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 247, 242, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner,
.section,
.site-footer {
  width: var(--frame);
  margin: 0 auto;
}

.header-inner {
  width: var(--content-frame);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a {
  text-decoration: none;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: 56px;
  align-items: center;
  width: var(--frame);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 72px 0 84px;
}

.page-hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.82fr);
  gap: 52px;
  min-height: auto;
  padding: 82px 0 54px;
  border-bottom: 1px solid var(--line);
}

.page-hero .hero-copy {
  max-width: 900px;
}

.hero-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 30px;
  line-height: 1.25;
}

.hero-panel p {
  margin: 18px 0 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.hero-panel ul {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.hero-panel .tag-list {
  margin-top: 24px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  font-size: clamp(42px, 5.8vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(38px, 4.5vw, 62px);
}

.lead {
  max-width: 720px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.9;
}

.actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
}

.hero-visual {
  position: relative;
  margin: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-top: -34px;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
}

.proof-strip div {
  min-height: 102px;
  padding: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.proof-strip div:last-child {
  border-right: 0;
}

.proof-strip strong {
  display: block;
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.proof-strip span {
  display: block;
  margin-top: 10px;
  color: #cbd5cf;
  font-size: 13px;
  line-height: 1.5;
}

.section {
  padding: 86px 0;
  border-top: 1px solid var(--line);
}

.section.alt {
  background: var(--surface-soft);
  box-shadow: 0 0 0 100vmax var(--surface-soft);
  clip-path: inset(0 -100vmax);
}

.section.dark {
  background: var(--ink);
  box-shadow: 0 0 0 100vmax var(--ink);
  clip-path: inset(0 -100vmax);
  color: #fff;
}

.section-head {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.18;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.dark .section-head p,
.dark .eyebrow {
  color: #cbd5cf;
}

.capability-grid,
.case-grid,
.post-grid,
.service-grid {
  display: grid;
  gap: 18px;
}

.capability-grid {
  grid-template-columns: repeat(3, 1fr);
}

.case-grid,
.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.capability-card,
.case-card,
.blog-card,
.service-card,
.note-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(23, 32, 29, 0.04);
}

.capability-card,
.service-card,
.note-card {
  padding: 24px;
}

.capability-card h3,
.service-card h3,
.case-card h3,
.blog-card h2,
.note-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 23px;
  line-height: 1.3;
}

.capability-card p,
.service-card p,
.case-card p,
.blog-card p,
.note-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.case-card {
  display: block;
  min-height: 260px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
}

.case-card span,
.case-study-label {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.case-card:hover,
.blog-card:hover {
  border-color: rgba(15, 118, 110, 0.55);
  transform: translateY(-2px);
}

.post-list .blog-card:hover {
  border-color: var(--line);
  transform: none;
}

.blog-card {
  min-height: 0;
  padding: 28px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.blog-card a {
  text-decoration: none;
}

.blog-card a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.blog-card .post-meta {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.blog-card .post-meta time,
.blog-card .post-meta span {
  display: inline;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a {
  color: var(--teal-dark);
  text-underline-offset: 4px;
}

.inline-tags {
  margin-top: 0;
}

.blog-index {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 46px;
}

.blog-page {
  padding-top: 0;
}

.page-first-section {
  max-width: var(--read-width);
  padding-top: 18px;
}

.content-column {
  width: var(--content-frame);
  margin: 0 auto;
}

.page-heading {
  width: var(--content-frame);
  margin: 0 auto;
  padding: 52px 0 18px;
}

.content-column .page-heading {
  width: auto;
  margin: 0;
}

.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  font-size: 30px;
  line-height: 1.25;
}

.page-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.blog-index .section-heading {
  position: sticky;
  top: 104px;
  align-self: start;
}

.blog-index h1,
.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 42px;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.blog-filters button {
  min-height: 36px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.blog-filters button:hover,
.blog-filters button[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.blog-list {
  display: grid;
  gap: 18px;
}

.post-list {
  width: var(--content-frame);
  margin: 0 auto;
  padding: 18px 0 56px;
  border-top: 1px solid var(--line);
}

.content-column .post-list {
  width: auto;
  margin: 0;
}

.content-column .post-list:has(+ .pagination) {
  padding-bottom: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 8px;
  padding: 28px 0 56px;
  font-size: 14px;
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.pagination-link,
.pagination-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 6px;
  text-decoration: none;
}

.pagination-gap {
  min-width: 20px;
  padding: 0;
}

.pagination-link[aria-current="page"] {
  background: var(--teal-dark);
  color: var(--surface);
  font-weight: 700;
}

a.pagination-link:hover {
  background: var(--surface-soft);
  color: var(--teal-dark);
}

a.pagination-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.pagination-link[aria-disabled="true"] {
  color: var(--muted);
  opacity: 0.55;
}

.blog-article {
  display: block;
}

.blog-article article {
  max-width: var(--read-width);
  margin: 0 auto;
}

.blog-article article > .lead {
  margin-bottom: 0;
}

.blog-article article > .post-meta {
  margin: 20px 0;
}

.blog-article article > .markdown-panel {
  display: flow-root;
}

.blog-article .markdown-panel > :first-child,
.blog-article .markdown-panel > h1:first-child + * {
  margin-top: 0;
}

.blog-article h1 {
  margin: 24px 0 18px;
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.18;
}

.blog-article .markdown-panel h1:first-child {
  display: none;
}

.markdown-panel {
  max-width: var(--read-width);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.95;
}

.markdown-panel h1 {
  margin: 0 0 24px;
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 36px;
}

.markdown-panel h2 {
  margin: 38px 0 12px;
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 27px;
  scroll-margin-top: 96px;
}

.markdown-panel h3 {
  margin: 28px 0 10px;
  color: var(--ink);
  font-size: 21px;
  scroll-margin-top: 96px;
}

.markdown-panel p {
  margin: 0 0 16px;
}

.markdown-panel ul,
.markdown-panel ol {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding-left: 24px;
}

.markdown-panel a,
.back-link {
  color: var(--teal-dark);
  font-weight: 800;
  text-underline-offset: 5px;
}

.markdown-panel blockquote {
  margin: 28px 0;
  padding: 8px 0 8px 18px;
  border-left: 4px solid var(--teal);
  color: var(--ink-soft);
}

.markdown-panel pre {
  overflow-x: auto;
  margin: 24px 0;
  padding: 18px;
  background: var(--ink);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.7;
}

.markdown-panel pre.mermaid {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.markdown-panel pre.mermaid svg {
  min-width: 720px;
  height: auto;
}

.markdown-table-wrap {
  overflow-x: auto;
  margin: 26px 0 30px;
}

.markdown-panel table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.7;
}

.markdown-panel th,
.markdown-panel td {
  padding: 14px 16px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-panel th {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.markdown-panel tbody tr:nth-child(even) {
  background: var(--surface-soft);
}

.article-toc[hidden] {
  display: none;
}

.article-toc {
  position: fixed;
  top: 50%;
  left: calc(50% + (var(--read-width) / 2) + 34px);
  z-index: 25;
  width: 268px;
  max-height: min(68vh, 520px);
  color: var(--muted);
  transform: translateY(-50%);
}

.toc-rail {
  position: absolute;
  top: 8px;
  left: 0;
  width: 1px;
  height: 170px;
  background: repeating-linear-gradient(
    to bottom,
    #d7ddd7 0,
    #d7ddd7 8px,
    transparent 8px,
    transparent 16px
  );
}

.toc-panel {
  overflow: auto;
  max-height: inherit;
  margin-left: 14px;
  padding: 8px 10px 12px 0;
  background: rgba(246, 247, 242, 0.96);
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
}

.article-toc:hover .toc-panel,
.article-toc:focus-within .toc-panel,
.article-toc.is-pinned .toc-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.article-toc:hover .toc-rail,
.article-toc:focus-within .toc-rail,
.article-toc.is-pinned .toc-rail {
  background: #e0e4df;
}

.toc-pin {
  position: sticky;
  top: 0;
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 auto 6px;
  padding: 0;
  background: rgba(246, 247, 242, 0.92);
  border: 0;
  color: #a0a6a2;
  cursor: pointer;
}

.toc-pin::before,
.toc-pin::after {
  position: absolute;
  content: "";
}

.toc-pin::before {
  top: 7px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.toc-pin::after {
  top: 12px;
  left: 13px;
  width: 2px;
  height: 8px;
  background: currentColor;
  transform: rotate(-35deg);
  transform-origin: top center;
}

.toc-pin:hover,
.toc-pin[aria-pressed="true"] {
  color: var(--teal-dark);
}

.toc-list {
  display: grid;
  gap: 0;
}

.toc-link {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 29px;
  padding: 4px 8px 4px 16px;
  border-left: 1px solid #e2e6e1;
  color: #737d79;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-link.depth-3 {
  padding-left: 26px;
  font-size: 13px;
  font-weight: 650;
}

.toc-link:hover,
.toc-link.is-active {
  color: #e11d2e;
}

.toc-link.is-active::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -1px;
  width: 2px;
  background: #ff1f2d;
  content: "";
}

.case-study {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.case-study:first-child {
  border-top: 0;
  padding-top: 0;
}

.case-study h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 25px;
  line-height: 1.22;
}

.case-study-meta {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.case-study-body {
  display: grid;
  gap: 18px;
}

.case-study-body h3 {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 16px;
}

.case-study-body p,
.case-study-body li {
  color: var(--ink-soft);
  line-height: 1.8;
}

.case-study-body p {
  margin: 0;
}

.case-study-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.resume-page {
  width: var(--content-frame);
  margin: 0 auto;
  padding: 18px 0 64px;
  border-top: 1px solid var(--line);
}

.resume-block {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.resume-block:first-child {
  border-top: 0;
}

.resume-block h2 {
  margin: 0 0 12px;
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 23px;
  line-height: 1.28;
}

.resume-block p,
.resume-block li {
  color: var(--ink-soft);
  line-height: 1.85;
}

.resume-block p {
  margin: 0 0 8px;
}

.resume-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.resume-block a {
  color: var(--teal-dark);
  font-weight: 800;
  text-underline-offset: 5px;
}

/* About: a personal manual rather than a chronological resume. */
.about-page { width: var(--frame); margin: 0 auto; }
.about-hero { width: 100%; max-width: var(--read-width); margin: 0 auto; padding: 64px 0 56px; }
.about-hero h1 { max-width: 900px; margin: 0; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif; font-size: 30px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.about-hero-detail { max-width: 740px; margin-top: 24px; }
.about-hero-detail p { margin: 0 0 18px; color: var(--ink-soft); font-size: 17px; line-height: 1.95; }
.about-body { width: 100%; max-width: var(--read-width); margin: 0 auto; padding-bottom: 72px; border-top: 1px solid var(--line); }
.about-section { padding: 56px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 88px; }
.about-section h2 { margin: 0 0 30px; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif; font-size: 27px; line-height: 1.2; }
.about-section > p, .practice-item p { margin: 0 0 18px; color: var(--ink-soft); font-size: 17px; line-height: 1.95; }
.about-list { display: grid; gap: 0; margin: 28px 0 32px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.about-list li { position: relative; padding: 17px 12px 17px 34px; border-bottom: 1px solid var(--line); color: var(--ink-soft); line-height: 1.75; }
.about-list li::before { position: absolute; top: 23px; left: 6px; width: 7px; height: 7px; background: var(--teal); border-radius: 50%; content: ""; }
.about-section .about-callout { margin-top: 34px; padding: 25px 28px; background: var(--surface-soft); border-left: 4px solid var(--teal); color: var(--ink); }
.question-list { margin: 30px 0 38px; padding: 0; list-style: none; counter-reset: question; }
.question-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif; font-size: 19px; line-height: 1.55; counter-increment: question; }
.question-list li::before { color: var(--teal); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 800; content: "0" counter(question); }
.practice-item { padding: 24px 0; }
.practice-item h3 { margin: 0 0 20px; font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif; font-size: 21px; line-height: 1.35; }
.capability-table-wrap { overflow-x: auto; margin: 6px 0 34px; }
.capability-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; }
.capability-table th, .capability-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.capability-table th { background: var(--surface-soft); color: var(--ink); font-size: 12px; letter-spacing: .06em; }
.capability-table th:first-child, .capability-table td:first-child { width: 150px; font-weight: 800; }
.beliefs-section ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.beliefs-section li { padding: 22px 0; border-top: 1px solid var(--line); color: var(--ink); font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif; font-size: 20px; line-height: 1.65; }
.info-list { margin: 0 0 44px; }
.info-list div { display: grid; grid-template-columns: 180px minmax(0, 1fr); padding: 15px 0; border-bottom: 1px solid var(--line); }
.info-list dt { color: var(--muted); font-size: 14px; }
.info-list dd { margin: 0; color: var(--ink); font-weight: 700; }
.info-list a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.about-closing { margin-top: 50px; padding: 34px; background: var(--ink); color: #fff; }
.about-closing p { margin: 0 0 18px; font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif; font-size: 19px; line-height: 1.85; }
.about-closing p:last-child { margin-bottom: 0; color: #b9d8d2; }

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 42px;
  align-items: center;
}

.dark h2 {
  max-width: 760px;
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.18;
}

.dark .button.secondary {
  border-color: rgba(255, 255, 255, 0.48);
  color: #fff;
}

.dark .button.primary {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.site-footer {
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #e5e2dc;
  border: 0;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.back-to-top::before {
  width: 0;
  height: 0;
  border-right: 9px solid transparent;
  border-bottom: 10px solid #8f8d87;
  border-left: 9px solid transparent;
  content: "";
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #d8d5cf;
}

@media (max-width: 1180px) {
  .article-toc {
    right: 10px;
    left: auto;
    width: 210px;
  }
}

@media (max-width: 920px) {
  :root {
    --frame: min(calc(100% - 32px), var(--site-width));
    --content-frame: min(calc(100% - 32px), var(--read-width));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .hero,
  .section-head,
  .blog-index,
  .case-study,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 34px;
    padding: 48px 0 62px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .proof-strip,
  .capability-grid,
  .case-grid,
  .post-grid,
  .service-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .proof-strip {
    margin-top: 0;
  }

  .blog-index .section-heading {
    position: static;
  }

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

  .article-toc { display: none; }
}

@media (max-width: 560px) {
  .pagination-pages {
    order: -1;
    flex-basis: 100%;
  }

  .about-page { width: min(calc(100% - 32px), var(--site-width)); }
  .about-hero { padding: 48px 0 42px; }
  .about-section { padding: 48px 0; }
  .about-section > p, .practice-item p { font-size: 16px; }
  .question-list li { grid-template-columns: 32px minmax(0, 1fr); font-size: 17px; }
  .capability-table { min-width: 620px; }
  .info-list div { grid-template-columns: 1fr; gap: 5px; }
  .about-closing { padding: 26px 22px; }

  .hero h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .blog-article h1 {
    font-size: 30px;
  }

  .lead,
  .markdown-panel {
    font-size: 16px;
  }

  .button {
    width: 100%;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 38px;
    height: 38px;
  }
}
