@import url(tomorrow.css);

:root {
  --bg: #f7f4ee;
  --surface: #fffdf8;
  --surface-soft: rgba(255, 253, 248, 0.78);
  --ink: #171717;
  --muted: #6f6a60;
  --line: rgba(23, 23, 23, 0.12);
  --accent: #9f4d25;
  --accent-strong: #743817;
  --accent-soft: rgba(159, 77, 37, 0.1);
  --tech: #1f6f8b;
  --tech-soft: rgba(31, 111, 139, 0.11);
  --panel: #111827;
  --shadow: 0 18px 46px rgba(52, 39, 25, 0.09);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 8%, rgba(159, 77, 37, 0.12), transparent 28rem),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 56%, #efe7da 100%);
  font-family: ui-serif, "Noto Serif SC", "Songti SC", STSong, Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 78%);
}

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

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

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

:focus-visible {
  outline: 3px solid rgba(159, 77, 37, 0.42);
  outline-offset: 4px;
}

::selection {
  color: #fff;
  background: var(--accent);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

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

.btn-mobile-menu {
  display: none;
}

.panel-cover {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 900;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  background: url("/images/background-cover.jpg") center / cover no-repeat var(--panel);
  transition: width 420ms ease, max-width 420ms ease, min-height 280ms ease;
}

.panel-cover--overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.16), transparent 16rem),
    linear-gradient(145deg, rgba(15, 23, 32, 0.72), rgba(15, 23, 32, 0.94));
}

.panel-cover--collapsed {
  width: 28%;
  max-width: 360px;
}

.panel-main,
.panel {
  display: table;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.panel-main__inner,
.panel__vertical {
  position: relative;
  z-index: 2;
  display: table-cell;
  vertical-align: middle;
  padding: 42px 24px;
}

.panel-main__content {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
}

.panel-title {
  margin: 22px 0 4px;
  font-size: 62px;
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.panel-cover--collapsed .panel-title {
  font-size: 28px;
  letter-spacing: 0;
}

.panel-subtitle {
  color: rgba(255, 255, 255, 0.74);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-cover__description {
  max-width: 460px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.panel-cover--collapsed .panel-cover__description {
  display: none;
}

.panel-cover__divider {
  width: 76px;
  margin: 22px auto;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.26);
}

.panel-cover--collapsed .panel-cover__divider--secondary,
.panel-cover--collapsed .panel-cover__divider {
  display: none;
}

.navigation-wrapper {
  margin-top: 24px;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navigation__item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 750;
  backdrop-filter: blur(14px);
}

.navigation__item a:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.16);
}

.navigation__item a.is-active,
.nav-menu-item a.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.2);
}

.ih-item.circle.effect {
  margin: 0 auto;
  -webkit-perspective: 900px;
  -moz-perspective: 900px;
  perspective: 900px;
}

.ih-item.circle.effect .img {
  z-index: 11;
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.ih-item.circle.effect .info {
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.ih-item.circle.effect .info .info-back {
  display: block;
  opacity: 1;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  background: #333333;
  line-height: 1;
}

.ih-item.circle.effect .info h2 {
  color: #fff;
  position: relative;
  font-size: 18px;
  margin: 0 auto;
  padding-top: 34px;
  height: auto;
  line-height: 18px;
  text-shadow: 0 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ih-item.circle.effect .info p {
  color: #bbb;
  margin: 8px 0 0;
  padding: 0;
  font-style: italic;
  padding-left: 0;
  font-size: 10px;
  line-height: 12px;
}

.ih-item.circle.effect.right_to_left .img {
  -webkit-transform-origin: 0% 50%;
  -moz-transform-origin: 0% 50%;
  -ms-transform-origin: 0% 50%;
  -o-transform-origin: 0% 50%;
  transform-origin: 0% 50%;
}

.ih-item.circle.effect.right_to_left a:hover .img,
.ih-item.circle.effect.right_to_left a:focus-visible .img {
  -webkit-transform: rotate3d(0, 1, 0, -180deg);
  -moz-transform: rotate3d(0, 1, 0, -180deg);
  -ms-transform: rotate3d(0, 1, 0, -180deg);
  -o-transform: rotate3d(0, 1, 0, -180deg);
  transform: rotate3d(0, 1, 0, -180deg);
}

.ih-item a {
  color: #333;
}

.ih-item a:hover {
  text-decoration: none;
}

.ih-item img {
  width: 100%;
  height: 100%;
}

.ih-item.circle {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
}

.ih-item.circle .img {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
}

.ih-item.circle .img:before {
  position: absolute;
  display: block;
  content: '';
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -webkit-transition: all 0.35s ease-in-out;
  -moz-transition: all 0.35s ease-in-out;
  transition: all 0.35s ease-in-out;
}

.ih-item.circle .img img {
  border-radius: 50%;
}

.ih-item.circle .info {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  border-radius: 50%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@media all and (max-width: 780px) {
  .ih-item.circle .img {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }

  .ih-item.circle {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }

  .ih-item.circle .info .info-back h2 {
    font-size: 0.9em;
  }
}

.panel-title a {
  color: #fff;
}

.panel-title a:hover {
  color: rgba(255, 255, 255, 0.82);
}

.content-wrapper {
  position: relative;
  z-index: 1;
  width: 72%;
  margin-left: 28%;
}

.content-wrapper__inner {
  width: min(calc(100% - 64px), 1040px);
  margin: 0 auto;
  padding: 64px 0 72px;
}

.section-heading {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.post-hero h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1.08;
  letter-spacing: 0;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.featured-posts {
  margin-bottom: 38px;
}

.featured-list {
  display: grid;
  max-width: 1040px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.featured-card {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 20px;
  border: 1px solid rgba(31, 111, 139, 0.18);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--tech-soft), rgba(255, 253, 248, 0.82));
  box-shadow: 0 12px 30px rgba(52, 39, 25, 0.06);
}

.featured-card:hover {
  color: var(--ink);
  border-color: rgba(31, 111, 139, 0.34);
  background: #fff;
}

.featured-card time {
  color: var(--tech);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.featured-card strong {
  font-size: 19px;
  line-height: 1.32;
}

.featured-card span {
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.58;
}

.post-card {
  display: flex;
  min-height: 284px;
  height: 100%;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: 0 12px 34px rgba(52, 39, 25, 0.065);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(159, 77, 37, 0.3);
  box-shadow: var(--shadow);
}

.post-card__main {
  display: block;
  flex: 1;
  padding: 26px 26px 8px;
}

.post-card time,
.post-meta,
.archive-item time {
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.post-card__meta span::before {
  content: "· ";
}

.post-card h2 {
  margin: 16px 0 12px;
  font-size: 25px;
  line-height: 1.22;
  letter-spacing: 0;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.72;
}

.search-result-list {
  grid-template-columns: 1fr;
}

.search-result-list .post-card {
  min-height: 0;
}

.search-result-list .post-card__main {
  padding-bottom: 16px;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 26px 24px;
}

.tag-pill {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tag-pill,
.read-more,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 999px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 760;
}

.tag-pill {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.tag-pill:hover,
.tag-pill:focus-visible {
  color: var(--accent-strong);
  background: rgba(159, 77, 37, 0.16);
}

.tag-pill--meta {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.read-more,
.button {
  color: #fff;
  background: var(--ink);
}

.read-more:hover,
.button:hover {
  color: #fff;
  background: var(--accent-strong);
}

.button--ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
}

.button--ghost:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-layout,
.post-layout {
  padding: 0;
}

.page-hero,
.post-hero {
  margin-bottom: 28px;
}

.page-summary {
  max-width: 780px;
  margin: -10px 0 24px;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

.post-search {
  max-width: 780px;
  margin: 0 0 24px;
}

.post-search--page {
  margin-bottom: 18px;
}

.post-search__label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.post-search__control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-search__input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.88);
  font: inherit;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.post-search__input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.post-search__clear {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.post-search__clear:hover {
  background: var(--accent-strong);
}

.post-search__status {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.post-search__shortcut {
  color: #403b34;
  font-weight: 700;
}

.post-card mark,
.tag-pill mark {
  padding: 0 0.12em;
  border-radius: 4px;
  color: inherit;
  background: rgba(31, 111, 139, 0.2);
}

.search-result-list {
  max-width: 780px;
}

.search-guide {
  display: grid;
  max-width: 780px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}

.search-guide > div {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: 0 14px 42px rgba(52, 39, 25, 0.07);
}

.search-guide h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.3;
}

.tag-cloud--compact {
  margin-bottom: 0;
}

.tag-cloud--compact a {
  min-height: 38px;
  padding: 8px 12px;
}

.search-guide__posts {
  display: grid;
  gap: 10px;
}

.search-guide__posts a {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.search-guide__posts a:last-child {
  border-bottom: 0;
}

.search-guide__posts time {
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
}

.search-guide__posts span {
  font-weight: 750;
  line-height: 1.4;
}

.post-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 780px);
  gap: 18px;
  align-items: start;
}

.back-link {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--accent-strong);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 750;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.post-meta > span:not(.post-meta__tags)::before {
  content: "· ";
}

.post-meta__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prose {
  max-width: 780px;
  color: #26211b;
  font-size: 18px;
}

.page-content,
.post-content,
.toc-card {
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.post-content {
  width: 100%;
}

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

.prose > *:last-child {
  margin-bottom: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin: 0 0 1.2em;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 1.8em 0 0.7em;
  color: #17130f;
  line-height: 1.2;
  letter-spacing: 0;
}

.prose h2 {
  font-size: 30px;
}

.prose h3 {
  font-size: 24px;
}

.prose h4 {
  font-size: 20px;
}

.prose a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose blockquote {
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #4b4035;
  background: var(--accent-soft);
}

.note-card {
  margin-top: 1.5em;
  padding: 18px 20px;
  border: 1px solid rgba(159, 77, 37, 0.18);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(159, 77, 37, 0.08), rgba(255, 253, 248, 0.72));
}

.note-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.note-card p {
  margin: 0;
}

.prose code {
  padding: 0.18em 0.36em;
  border-radius: 7px;
  color: #7c2d12;
  background: rgba(159, 77, 37, 0.12);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.prose pre {
  position: relative;
  overflow-x: auto;
  padding: 48px 18px 18px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: var(--radius-md);
  background: #1f252b;
  color: #f8fafc;
}

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

.post-bottom-tags {
  display: grid;
  gap: 12px;
  margin-top: 2em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
}

.post-bottom-tags strong {
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.copy-code-button {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 32, 0.78);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.copy-code-button:hover,
.copy-code-button:focus-visible {
  background: rgba(159, 77, 37, 0.9);
}

.prose img {
  width: auto;
  margin: 1.5em auto;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 23, 23, 0.08);
}

.prose img[loading="lazy"] {
  background: rgba(255, 253, 248, 0.76);
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-spacing: 0;
}

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

.toc-card {
  max-width: 780px;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.toc-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.toc-card ul {
  margin: 0;
  padding-left: 18px;
}

.toc-card a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
  line-height: 1.45;
}

.toc-card a.is-active {
  color: var(--accent-strong);
  font-weight: 800;
}

.archive-list,
.tag-sections,
.tag-cloud {
  max-width: 780px;
}

.archive-list,
.tag-sections {
  padding: 6px 0 0;
}

.tag-filter-status {
  display: flex;
  max-width: 780px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(159, 77, 37, 0.18);
  border-radius: var(--radius-sm);
  color: #4b4035;
  background: var(--accent-soft);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.tag-filter-status[hidden] {
  display: none;
}

.archive-list h2,
.tag-section h2 {
  margin: 34px 0 12px;
  font-size: 28px;
  letter-spacing: 0;
}

.archive-list h2:first-child,
.tag-section:first-child h2 {
  margin-top: 0;
}

.archive-year,
.tag-section {
  display: grid;
  gap: 10px;
}

.archive-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 54px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 248, 0.78);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.archive-item span {
  font-weight: 700;
  line-height: 1.35;
}

.archive-item:hover {
  transform: translateX(3px);
  border-color: rgba(159, 77, 37, 0.3);
  background: #fff;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.tag-cloud a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 750;
  transition: background 160ms ease, transform 160ms ease;
}

.tag-cloud a:hover {
  transform: translateY(-2px);
  background: rgba(159, 77, 37, 0.15);
}

.tag-cloud a.is-active {
  color: #fff;
  background: var(--accent-strong);
}

.tag-cloud span {
  color: var(--muted);
  font-size: 12px;
}

.post-nav-wrap,
.post-comments {
  display: grid;
  width: min(100%, 780px);
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin: 26px 0 4px;
}

.post-nav {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.post-nav__item {
  position: relative;
  min-height: 112px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: 0 12px 30px rgba(52, 39, 25, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.post-nav__item:hover {
  color: var(--ink);
  transform: translateY(-2px);
  border-color: rgba(159, 77, 37, 0.3);
  box-shadow: 0 16px 42px rgba(52, 39, 25, 0.1);
}

.post-nav__item:only-child {
  grid-column: 1 / -1;
}

.post-nav__item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.post-nav__item strong {
  display: block;
  font-size: 17px;
  line-height: 1.38;
}

.post-comments {
  margin: 26px 0 0;
}

.post-comments__panel {
  width: 100%;
  min-width: 0;
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.post-comments__header {
  margin-bottom: 16px;
}

.post-comments__header h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.post-comments__header p {
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.comment-status {
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.comment-status a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#twikoo,
#twikoo .tk-comments,
#twikoo .tk-submit,
#twikoo .tk-content,
#twikoo .tk-row,
#twikoo textarea,
#twikoo input {
  max-width: 100%;
}

#twikoo,
#twikoo .tk-comments,
#twikoo .tk-submit {
  width: 100%;
  min-width: 0;
}

#twikoo .tk-content {
  overflow-wrap: anywhere;
}

.post-empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-soft);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  text-align: center;
}

.project-list {
  display: grid;
  max-width: 780px;
  gap: 14px;
}

.project-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: 0 12px 34px rgba(52, 39, 25, 0.065);
}

.project-card::after {
  content: "打开";
  justify-self: start;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.project-card:hover {
  color: var(--ink);
  border-color: rgba(31, 111, 139, 0.3);
  background: #fff;
}

.project-card strong {
  font-size: 20px;
}

.project-card span:not(.project-card__meta) {
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.project-card__meta {
  color: var(--tech);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: 0 16px 38px rgba(23, 23, 23, 0.18);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--accent-strong);
}

.back-to-top[hidden] {
  display: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: 72%;
  margin-left: 28%;
  padding: 0 0 42px;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  width: min(calc(100% - 64px), 980px);
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.site-footer p {
  margin: 0;
}

.site-footer__meta {
  display: grid;
  gap: 6px;
}

.site-stats {
  color: #403b34;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.66);
  color: #403b34;
  font-weight: 700;
}

.footer-social-link img {
  width: 18px;
  height: 18px;
}

.footer-social-link:hover {
  color: var(--accent-strong);
  border-color: rgba(159, 77, 37, 0.28);
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}

@media (min-width: 1260px) {
  .post-layout {
    max-width: 1040px;
  }

  .post-body-grid {
    grid-template-columns: 220px minmax(0, 780px);
  }

  .post-nav-wrap {
    width: min(100%, 1040px);
    grid-template-columns: 220px minmax(0, 780px);
  }

  .post-comments {
    width: min(100%, 1040px);
    grid-template-columns: 220px minmax(0, 780px);
  }

  .post-nav,
  .post-comments__panel {
    grid-column: 2;
  }

  .toc-card {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin-bottom: 0;
    padding: 16px 18px;
    box-shadow: 0 12px 34px rgba(52, 39, 25, 0.08);
  }
}

@media (max-width: 1100px) {
  .btn-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(17, 24, 39, 0.86);
    backdrop-filter: blur(16px);
  }

  .btn-mobile-menu::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 42px;
    pointer-events: none;
    content: "";
    background: linear-gradient(90deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.92));
  }

  .nav-menu-item {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    width: min(calc(100% - 24px), 760px);
    margin: 0 auto;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu-item a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.8);
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  .nav-menu-item a.is-active {
    background: rgba(255, 255, 255, 0.18);
  }

  .panel-cover,
  .panel-cover--collapsed {
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 58vh;
  }

  .panel-cover--collapsed {
    min-height: 260px;
  }

  .panel-main,
  .panel {
    min-height: inherit;
  }

  .panel-main__inner {
    padding-top: 78px;
  }

  .panel-cover--collapsed .panel-main__inner {
    padding: 76px 20px 34px;
  }

  .panel-cover--collapsed .panel-cover__description {
    display: none;
  }

  .navigation-wrapper {
    display: none;
  }

  .ih-item.circle.effect,
  .ih-item.circle.effect .info {
    perspective: none;
    transform-style: flat;
  }

  .ih-item.circle.effect .info {
    display: none;
  }

  .ih-item.circle.effect.right_to_left a:hover .img,
  .ih-item.circle.effect.right_to_left a:focus-visible .img {
    transform: none;
  }

  .content-wrapper,
  .site-footer,
  .post-nav-wrap,
  .post-comments {
    width: 100%;
    margin-left: 0;
  }

  .content-wrapper__inner,
  .site-footer__inner {
    width: min(calc(100% - 32px), 820px);
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .featured-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .navigation {
    flex-wrap: wrap;
  }

  .panel-title {
    font-size: 38px;
  }

  .section-heading h2,
  .page-hero h1,
  .post-hero h1 {
    font-size: 34px;
  }

  .panel-cover__description {
    font-size: 16px;
  }

  .ih-item.circle {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }

  .ih-item.circle .img {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }

  .content-wrapper__inner {
    padding: 36px 0 54px;
  }

  .post-card {
    min-height: 240px;
    border-radius: 16px;
  }

  .post-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .featured-posts {
    margin-bottom: 30px;
  }

  .featured-card {
    min-height: 0;
  }

  .post-card__main {
    padding: 22px 22px 8px;
  }

  .post-card__footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 22px 22px;
  }

  .post-search__control,
  .tag-filter-status {
    align-items: stretch;
    flex-direction: column;
  }

  .search-guide {
    grid-template-columns: 1fr;
  }

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

  .page-content,
  .post-content {
    padding: 24px;
    border-radius: 22px;
  }

  .prose {
    font-size: 17px;
  }

  .archive-item,
  .post-nav {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    flex-direction: column;
  }
}
