:root {
  --bg: #f4efe7;
  --surface: rgba(255, 252, 247, 0.92);
  --surface-strong: #fffdf9;
  --surface-muted: #efe7dc;
  --text: #2c241d;
  --text-soft: #6b5d51;
  --border: rgba(44, 36, 29, 0.12);
  --accent: #b85c38;
  --accent-deep: #8f4123;
  --accent-soft: #f4d7c6;
  --shadow: 0 24px 60px rgba(63, 39, 25, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 92, 56, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(106, 142, 127, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f3ec 0%, #f1e8dd 100%);
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.75;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

code,
pre,
.site-mono {
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;
}

.site-shell {
  min-height: 100vh;
  padding: 24px;
}

.site-frame {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 36px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 252, 247, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
  transition: 0.2s ease;
}

.site-nav a:hover {
  color: var(--accent-deep);
  background: rgba(184, 92, 56, 0.08);
}

.site-main {
  padding: 0 32px 40px;
}

.hero {
  padding: 56px 0 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: stretch;
}

.hero-panel,
.hero-note,
.post-card,
.article-shell,
.taxonomy-shell,
.not-found-shell {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(84, 59, 43, 0.08);
}

.hero-panel {
  padding: 42px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 92, 56, 0.18), transparent 68%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--accent-deep);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 18px 0 12px;
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  line-height: 1.02;
}

.hero-description {
  max-width: 42rem;
  margin: 0;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-soft);
  background: rgba(244, 239, 231, 0.8);
}

.hero-note {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.hero-note-title {
  margin: 0;
  font-size: 1.15rem;
}

.hero-note p {
  margin: 0;
  color: var(--text-soft);
}

.posts-section {
  padding-top: 18px;
}

.posts-grid {
  display: grid;
  gap: 22px;
}

.post-card {
  padding: 28px;
}

.post-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.post-card-title {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.18;
}

.post-date {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.post-summary {
  color: var(--text-soft);
}

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

.post-summary > :last-child {
  margin-bottom: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.92rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-weight: 600;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.article-shell,
.taxonomy-shell,
.not-found-shell {
  margin-top: 42px;
  padding: 44px clamp(22px, 4vw, 56px);
}

.article-header {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.article-title,
.taxonomy-title,
.not-found-title {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.article-lead {
  margin: 16px 0 0;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--text-soft);
}

.article-content {
  font-size: 1.08rem;
}

.article-toc {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: #fbf6f1;
  border: 1px solid var(--border);
}

.article-toc-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.toc-link {
  display: block;
  padding: 6px 0;
  color: var(--text-soft);
}

.toc-link-sub {
  padding-left: 16px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.2;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre,
.article-content table {
  margin: 1.05em 0;
}

.article-content blockquote {
  margin-left: 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: #fbf4ee;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft);
}

.article-content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #2b211b;
  color: #f8f1ea;
}

.article-content .mermaid {
  overflow-x: auto;
  padding: 10px 0;
}

.article-content code {
  padding: 0.15em 0.4em;
  border-radius: 8px;
  background: #efe7dd;
  font-size: 0.92em;
}

.article-content pre code {
  padding: 0;
  background: transparent;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.taxonomy-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.taxonomy-list a,
.taxonomy-list .term-card {
  display: block;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #fbf6f1;
  border: 1px solid var(--border);
}

.taxonomy-posts {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.post-nav-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fbf6f1;
}

.post-nav-card-next {
  text-align: right;
}

.post-nav-card-empty {
  visibility: hidden;
}

.post-nav-label {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.sitemap-section + .sitemap-section {
  margin-top: 36px;
}

.sitemap-table-wrap {
  overflow-x: auto;
}

.sitemap-table {
  width: 100%;
  border-collapse: collapse;
  background: #fffdfa;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

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

.sitemap-table th {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.sitemap-pages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.sitemap-pages li a {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fbf6f1;
}

.sitemap-tag {
  display: inline-flex;
  align-items: center;
  margin: 0 8px 8px 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.9rem;
}

.page-content input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font: inherit;
  background: #fffdfa;
}

.page-content #results-container {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 14px;
}

.page-content #results-container li {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fbf6f1;
}

.page-content #results-container p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.site-footer {
  padding: 26px 32px 36px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.site-footer-inner > p:first-child {
  justify-self: start;
}

.site-footer-inner > p:last-child {
  justify-self: end;
  text-align: right;
}

.site-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.site-footer-center p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-deep);
}

@media (max-width: 900px) {
  .site-shell {
    padding: 12px;
  }

  .site-header-inner,
  .site-main,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .post-card-header {
    flex-direction: column;
  }

  .pagination {
    flex-direction: column;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer-inner > p:first-child,
  .site-footer-inner > p:last-child {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-panel,
  .hero-note,
  .post-card,
  .article-shell,
  .taxonomy-shell,
  .not-found-shell {
    border-radius: 22px;
  }

  .hero-panel {
    padding: 28px 22px;
  }

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