:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --panel: #ffffff;
  --panel-soft: #f6f6f2;
  --text: #1f241f;
  --muted: #71786f;
  --faint: #9aa197;
  --line: #e2e3dd;
  --line-strong: #cfd2c8;
  --accent: #305c47;
  --accent-strong: #162f25;
  --accent-soft: #edf3ed;
  --warm: #b27a2f;
  --ink-soft: #303831;
  --code: #17201b;
  --shadow: 0 14px 34px rgba(37, 42, 34, 0.06);
  --shadow-tight: 0 8px 22px rgba(37, 42, 34, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(48, 92, 71, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, rgba(48, 92, 71, 0.026) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.68;
}

a {
  color: inherit;
  text-decoration-color: rgba(48, 92, 71, 0.35);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

code {
  padding: 0.08rem 0.32rem;
  background: #eef1e9;
  border: 1px solid #dce1d6;
  border-radius: 5px;
  font-size: 0.92em;
}

.site-shell {
  display: grid;
  grid-template-columns: 296px minmax(0, 828px) 244px;
  gap: 28px;
  width: min(100% - 40px, 1420px);
  margin: 0 auto;
  padding: 30px 0 46px;
}

.profile-rail,
.blog-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

.profile-rail {
  display: grid;
  gap: 18px;
}

.avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: #f7faf6;
  background: radial-gradient(circle at 30% 25%, #779b7a, #243b30 72%);
  border: 1px solid rgba(22, 47, 37, 0.18);
  border-radius: 50%;
  box-shadow: var(--shadow);
  font-weight: 800;
  text-decoration: none;
}

.profile-block,
.sidebar-card,
.readme-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-block {
  padding: 18px;
}

.profile-kicker,
.eyebrow,
.sidebar-title {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand {
  display: block;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
}

.handle {
  margin: 5px 0 12px;
  color: var(--faint);
  font-size: 0.92rem;
}

.profile-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.topic-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-list span,
.tags li,
.sidebar-tags a,
.sidebar-tags span,
.readme-status-strip span,
.sidebar-status span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  color: #34463b;
  background: #eef2eb;
  border: 1px solid #d9e0d4;
  border-radius: 999px;
  font-size: 0.82rem;
  text-decoration: none;
}

.rail-nav {
  display: grid;
  gap: 8px;
}

.rail-nav a,
.sidebar-card > a,
.sidebar-post {
  display: block;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.93rem;
  text-decoration: none;
}

.rail-nav a:hover,
.sidebar-card > a:hover,
.sidebar-post:hover,
.post-card:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.content-column {
  min-width: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 4px 2px 18px;
  border-bottom: 1px solid var(--line);
}

.header-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.header-action {
  flex: 0 0 auto;
  padding: 8px 13px;
  color: var(--accent-strong);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

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

.language-switch {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  color: var(--accent-strong);
  background: #eef2eb;
  border: 1px solid #d9e0d4;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.language-switch.is-disabled {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.readme-card {
  overflow: hidden;
  margin-bottom: 18px;
}

.filebar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  background:
    linear-gradient(180deg, #f7f8f4, #eff1ea);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.filebar strong {
  color: var(--ink-soft);
  font-weight: 800;
}

.filebar em {
  overflow: hidden;
  color: var(--faint);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filebar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.filebar span:nth-child(1) {
  background: #d2685f;
}

.filebar span:nth-child(2) {
  background: #d6aa45;
}

.filebar span:nth-child(3) {
  background: #6b9a6c;
  margin-right: 8px;
}

.readme-body,
.page-heading,
.post-header,
.content {
  padding: 26px;
}

.readme-body {
  display: grid;
  gap: 24px;
}

.readme-status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.readme-status-strip span,
.sidebar-status span {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.readme-intro {
  display: grid;
  gap: 12px;
}

.hero-readme h1,
.page-heading h1,
.post-header h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.lead,
.page-heading p,
.summary {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.07rem;
}

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

.stat-grid div {
  min-height: 92px;
  padding: 14px;
  background:
    linear-gradient(180deg, #fbfcf8, var(--panel-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
}

.stat-grid strong {
  display: block;
  color: var(--accent);
  font-size: 1.36rem;
  line-height: 1;
}

.stat-grid span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 0;
}

.section-heading h2,
.post-list > h2 {
  margin: 0;
  font-size: 1.35rem;
}

.post-section > h2 {
  display: none;
}

.section-link {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 7px 11px;
  color: var(--accent-strong);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.section-link:hover {
  background: #ffffff;
  border-color: var(--line-strong);
}

.post-list {
  display: grid;
  gap: 0;
  padding: 12px 22px 24px;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.post-card:first-child {
  border-top: 0;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.82rem;
}

.hash-dot {
  display: inline-grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: #ffffff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
}

.post-card h3 {
  margin: 7px 0 0;
  font-size: 1.28rem;
  line-height: 1.35;
}

.post-card h3 a {
  text-decoration: none;
}

.post-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.post-card-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 36px;
  padding: 7px 12px;
  color: var(--accent-strong);
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.post-card:hover .post-card-open {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.post {
  max-width: none;
}

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

.post-header-tools {
  margin-top: 16px;
}

.knowledge-graph-card {
  position: absolute;
  top: 22px;
  right: 22px;
  width: min(280px, 36%);
  padding: 12px;
  background: rgba(246, 247, 242, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.knowledge-graph-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.knowledge-graph-heading .sidebar-title {
  margin-bottom: 0;
}

.knowledge-graph-heading span {
  color: var(--faint);
  font-size: 0.74rem;
  white-space: nowrap;
}

.knowledge-graph {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.graph-edge {
  stroke: #c6d3c8;
  stroke-width: 1.4;
}

.graph-node {
  fill: #ffffff;
  stroke: #9bb29f;
  stroke-width: 1.5;
}

.graph-node-main {
  fill: #305c47;
  stroke: #203f31;
}

.graph-node-tag {
  fill: #eef4ef;
}

.graph-label {
  fill: #34463b;
  font-size: 9px;
  font-weight: 750;
  pointer-events: none;
}

.graph-label-main {
  fill: #ffffff;
  font-size: 8px;
}

.graph-related {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.graph-related a {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.content {
  max-width: 720px;
  padding-bottom: 52px;
}

.content h2,
.content h3 {
  margin-top: 2rem;
  line-height: 1.25;
}

.content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.content pre {
  overflow-x: auto;
  padding: 16px;
  background: var(--code);
  color: #f3f7f1;
  border-radius: 8px;
}

.content pre code {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
}

.blog-sidebar {
  display: grid;
  gap: 14px;
}

.sidebar-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.sidebar-status {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.sidebar-card form {
  margin: 0;
}

.sidebar-card input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}

.sidebar-post {
  padding: 10px 0;
  background: transparent;
  border-width: 1px 0 0;
  border-radius: 0;
}

.sidebar-post span,
.sidebar-post time {
  display: block;
}

.sidebar-post time,
.sidebar-empty {
  color: var(--faint);
  font-size: 0.8rem;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.site-footer {
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .blog-sidebar {
    grid-column: 2;
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-shell {
    display: block;
    width: min(100% - 24px, 720px);
    padding-top: 18px;
  }

  .profile-rail,
  .blog-sidebar {
    position: static;
  }

  .profile-rail {
    margin-bottom: 18px;
  }

  .blog-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .knowledge-graph-card {
    position: static;
    width: 100%;
    margin-top: 18px;
  }

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

  .section-heading,
  .post-card {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .post-card-open {
    justify-self: start;
  }

  .readme-body,
  .page-heading,
  .post-header,
  .content {
    padding: 20px;
  }
}
