:root {
  color-scheme: light;
  --bg: #f8f8f5;
  --panel: #ffffff;
  --text: #20231f;
  --muted: #62685f;
  --line: #deded6;
  --accent: #176b5a;
  --accent-dark: #0f4d40;
  --soft: #e8eee8;
  --code-bg: #f0f2ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  line-height: 1.7;
}

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

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 15px;
}

nav a:hover,
.section-heading a:hover,
.post-card a:hover,
.back-link:hover {
  color: var(--accent);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  align-content: center;
  padding: 72px 0 76px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  margin-bottom: 20px;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

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

.button.primary {
  background: var(--accent);
  color: white;
}

.button.secondary {
  color: var(--accent-dark);
}

.section,
.content-section,
.page-title,
.article {
  padding: 56px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
}

.page-title p:last-child {
  max-width: 640px;
  margin-top: 14px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.section-heading a {
  color: var(--muted);
  font-weight: 800;
}

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

.post-list.wide {
  grid-template-columns: 1fr;
  max-width: 860px;
  padding-bottom: 56px;
}

.post-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: flex-start;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-card:hover {
  border-color: #bfd3ca;
  box-shadow: 0 10px 28px rgb(32 35 31 / 7%);
}

.post-date {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.post-card h2,
.post-card h3 {
  margin-bottom: 14px;
  line-height: 1.3;
}

.post-card h2 {
  font-size: 25px;
}

.post-card h3 {
  font-size: 23px;
}

.post-card span {
  color: var(--muted);
}

.content-section {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.article {
  max-width: 780px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

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

.article header h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.article header p:last-child {
  color: var(--muted);
  font-size: 18px;
}

.article-body {
  padding-top: 34px;
  font-size: 18px;
}

.article-body h2 {
  margin-top: 48px;
  margin-bottom: 14px;
  font-size: 30px;
  line-height: 1.25;
}

.article-body h3 {
  margin-top: 34px;
  margin-bottom: 10px;
  font-size: 23px;
  line-height: 1.3;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin-bottom: 20px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body code {
  padding: 2px 5px;
  background: var(--code-bg);
  border-radius: 4px;
  font-size: 0.92em;
}

.article-body pre {
  overflow-x: auto;
  padding: 18px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.article-body img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.article-body figure {
  margin: 32px 0;
}

.article-body figure img {
  margin-bottom: 10px;
}

.article-body figcaption {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.site-footer {
  padding: 40px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

  nav {
    gap: 16px;
  }

  .hero {
    padding: 44px 0 52px;
  }

  h1 {
    font-size: clamp(36px, 10vw, 52px);
  }

  .hero-copy {
    font-size: 17px;
  }

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

  .post-card {
    min-height: auto;
    padding: 22px;
  }

  .section,
  .content-section,
  .page-title,
  .article {
    padding: 42px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
