:root {
  --bg: #ffffff;
  --bg-soft: #faf7f0;
  --panel: rgba(255, 255, 255, 0.92);
  --ink: #111111;
  --muted: #5f5a52;
  --line: rgba(17, 17, 17, 0.1);
  --line-strong: rgba(184, 137, 45, 0.28);
  --accent: #b8892d;
  --accent-deep: #8e6514;
  --accent-soft: rgba(184, 137, 45, 0.12);
  --shadow: 0 24px 64px rgba(17, 17, 17, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --wrap: min(1180px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 137, 45, 0.16), transparent 28%),
    radial-gradient(circle at 100% 0, rgba(17, 17, 17, 0.06), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f9f6ef 100%);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.75;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.site-header-inner {
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #111111 0%, #2a2a2a 100%);
  color: #f7d995;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(247, 217, 149, 0.25);
}

.brand-wordmark {
  width: auto;
  min-width: 126px;
  padding: 0 18px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav a:hover {
  text-decoration: none;
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.page-main {
  flex: 1;
  padding: 42px 0 80px;
}

.hero,
.page-banner,
.post-card,
.feature-card,
.article-shell,
.info-card,
.toc-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero,
.page-banner,
.article-shell {
  border-radius: var(--radius-xl);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 28px;
  padding: 42px;
}

.eyebrow,
.meta,
.info-label {
  margin: 0 0 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
}

.hero h1,
.page-banner h1,
.article-header h1,
.section-heading h2,
.feature-card h2,
.post-card h2,
.post-card h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.7rem);
  max-width: 10ch;
}

.lead,
.banner-content,
.article-summary {
  font-size: 1.08rem;
  color: #28231d;
  max-width: 46rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.button:hover,
.section-link:hover {
  text-decoration: none;
}

.button.primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.hero-aside,
.hero-stats {
  display: grid;
  gap: 18px;
}

.info-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
}

.accent-card {
  background: linear-gradient(135deg, rgba(17, 17, 17, 0.97) 0%, rgba(33, 33, 33, 0.94) 100%);
  border-color: rgba(247, 217, 149, 0.22);
  color: #f9f1df;
}

.accent-card .info-label,
.accent-card .info-value {
  color: inherit;
}

.info-value {
  margin: 0;
  font-size: 1.36rem;
  line-height: 1.35;
}

.feature-grid,
.post-list {
  display: grid;
  gap: 18px;
}

.feature-grid {
  margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.post-card {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.feature-card {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, rgba(250, 247, 240, 0.92) 100%);
  border-color: var(--line-strong);
}

.feature-card p:last-child,
.post-card .summary,
.banner-content > *:last-child {
  margin-bottom: 0;
}

.section-heading {
  margin: 52px 0 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.archive-year {
  max-width: 820px;
  margin-bottom: 30px;
}

.archive-year:last-child {
  margin-bottom: 0;
}

.archive-year-header {
  margin-bottom: 12px;
  padding: 0 2px;
}

.archive-year-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.archive-list {
  max-width: none;
}

.section-link,
.text-link {
  color: var(--accent-deep);
  font-weight: 700;
}

.post-list {
  grid-template-columns: 1fr;
  max-width: 820px;
}

.post-card h2,
.post-card h3 {
  margin-bottom: 8px;
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  line-height: 1.22;
}

.post-card {
  height: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card .summary {
  color: #312c26;
  font-size: 0.87rem;
  line-height: 1.52;
  margin: 0 0 10px;
  overflow: hidden;
}

.post-card .meta {
  margin-bottom: 8px;
  font-size: 0.68rem;
}

.post-card p {
  margin-top: 0;
}

.post-card .text-link {
  margin-top: auto;
}

.page-banner,
.article-shell {
  padding: 34px;
}

.page-banner {
  margin-bottom: 22px;
}

.home-banner {
  max-width: 820px;
}

.article-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.article-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 26px;
  padding-top: 28px;
}

.article-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.toc-sidebar {
  position: relative;
}

.toc-card {
  position: sticky;
  top: 104px;
  padding: 22px 22px 10px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
}

#TableOfContents ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

#TableOfContents ul ul {
  padding-left: 14px;
  margin-top: 8px;
}

#TableOfContents li {
  margin: 0 0 10px;
  line-height: 1.45;
}

#TableOfContents a {
  color: var(--muted);
}

#TableOfContents a:hover {
  color: var(--ink);
}

.content {
  min-width: 0;
  font-size: 1.02rem;
}

.content h2,
.content h3,
.content h4 {
  margin-top: 2.3em;
  margin-bottom: 0.7em;
  line-height: 1.2;
}

.content p,
.content ul,
.content ol,
.content blockquote,
.content pre {
  margin: 1.1em 0;
}

.content blockquote {
  margin-left: 0;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--accent-soft);
}

.content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #121212;
  color: #f5f1e8;
}

.content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.content :not(pre) > code {
  padding: 0.18em 0.42em;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #5b3b00;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

.content th,
.content td {
  padding: 12px 14px;
  border: 1px solid var(--line);
}

.content th {
  background: var(--bg-soft);
}

.site-footer {
  padding: 0 0 28px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

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

@media (max-width: 940px) {
  .hero,
  .feature-grid,
  .post-list,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header-inner,
  .section-heading,
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-main {
    padding-top: 28px;
  }

  .hero,
  .page-banner,
  .article-shell,
  .feature-card,
  .post-card {
    padding: 24px;
    border-radius: 22px;
  }

  .hero h1 {
    max-width: none;
  }
}
