:root {
  --bg: #f7fafb;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5d6b76;
  --line: #d9e4e8;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --blue: #2563eb;
  --orange: #d97706;
  --code-bg: #f2f6f8;
  --max: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
}

.skip-link:focus {
  left: 8px;
  z-index: 100;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1rem;
}

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

.brand-mark {
  width: 18px;
  height: 18px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  text-decoration: none;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 310px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  max-width: 720px;
  padding: 54px 0;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-sub {
  max-width: 560px;
  margin: 0;
  color: #33505b;
  font-size: 1.05rem;
}

.post-section {
  padding: 40px 0 72px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.search-box {
  display: block;
  margin-bottom: 18px;
}

.search-box input {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.search-box input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.post-date {
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-item h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.post-item h2 a {
  color: var(--ink);
}

.post-item h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-summary {
  margin: 0 0 10px;
  color: var(--muted);
}

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

.tag {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #42525d;
  font-size: 0.78rem;
}

.post-page,
.simple-page {
  max-width: 820px;
  padding: 34px 0 72px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

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

.post-head {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.post-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
}

.post-head h1 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.post-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.post-body {
  font-size: 1.02rem;
}

.post-body h2 {
  margin: 36px 0 12px;
  font-size: 1.35rem;
}

.post-body h3 {
  margin: 26px 0 10px;
  font-size: 1.12rem;
}

.post-body p {
  margin: 0 0 16px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 18px;
  padding-left: 1.4rem;
}

.post-body li {
  margin-bottom: 6px;
}

.post-body code {
  padding: 2px 6px;
  border: 1px solid #e2ebee;
  border-radius: 6px;
  background: var(--code-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.post-body pre {
  margin: 0 0 18px;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid #dbe7ea;
  border-radius: 8px;
  background: #f1f6f8;
}

.post-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-body blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: #fffaf0;
  color: #4b4b47;
}

.post-adj {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.adj-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.adj-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.adj-link span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.adj-link strong {
  font-size: 0.95rem;
}

.adj-link.next {
  text-align: right;
}

.adj-link.empty {
  visibility: hidden;
}

.simple-page {
  padding-top: 56px;
}

.simple-page h1 {
  margin: 0 0 18px;
  font-size: 2rem;
  letter-spacing: 0;
}

.simple-page p {
  margin: 0 0 16px;
  color: #44535d;
}

.button {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
}

.site-footer {
  margin-top: auto;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--muted);
}

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

@media (max-width: 700px) {
  .hero {
    min-height: 260px;
  }

  .hero-content {
    padding: 36px 0;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}
