:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #25211b;
  --muted: #756f66;
  --line: #d8d0c3;
  --accent: #246a73;
  --accent-dark: #174c52;
  --warm: #a4542a;
  --code: #eee7dc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.75;
}

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

.wrap {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 241, 234, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.muted,
.meta {
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 6px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
}

.nav a.active,
.nav a:hover {
  color: var(--ink);
  background: #e7dfd2;
}

.hero {
  padding: 54px 0 28px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(36, 106, 115, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(36, 106, 115, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 42px;
  align-items: start;
}

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

.hero h1,
.page-head h1,
.about-main h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: #514a41;
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 700;
}

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

.profile-panel,
.feature-post,
.post-card,
.about-side {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(43, 35, 25, 0.06);
}

.profile-panel {
  padding: 24px;
}

.avatar {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  background: var(--warm);
  border-radius: 8px;
  font-size: 30px;
  font-weight: 800;
}

.profile-panel h2,
.about-side h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

dl {
  margin: 18px 0 0;
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 0 0 10px;
}

.featured {
  padding: 34px 0 0;
}

.feature-post {
  padding: 26px;
}

.feature-post h2 {
  margin: 8px 0 10px;
  font-size: 28px;
  line-height: 1.35;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 0 58px;
}

.post-card {
  min-height: 286px;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.post-card h3 {
  margin: 8px 0 10px;
  font-size: 21px;
  line-height: 1.38;
}

.post-card p,
.feature-post p {
  color: #514a41;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.tags span {
  padding: 3px 8px;
  color: var(--accent-dark);
  background: #e3eee9;
  border: 1px solid #c5dad3;
  border-radius: 5px;
  font-size: 12px;
}

.page-head {
  padding: 54px 0 22px;
}

.page-head p {
  color: var(--muted);
}

.archive {
  padding-bottom: 64px;
}

.archive-year {
  margin-top: 26px;
}

.archive-year h2 {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.archive-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 130px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.archive-item time,
.archive-item em {
  color: var(--muted);
  font-style: normal;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  padding: 54px 0 70px;
}

.about-main,
.article {
  max-width: 820px;
}

.about-main h2,
.article-body h2 {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 25px;
}

.about-side {
  align-self: start;
  padding: 22px;
}

.article {
  padding: 48px 0 72px;
}

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

.article-head h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

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

.article-body h1 {
  display: none;
}

.article-body p {
  margin: 18px 0;
}

blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  color: #4c473e;
  background: #eee7dc;
  border-left: 4px solid var(--warm);
}

code {
  padding: 2px 5px;
  background: var(--code);
  border-radius: 4px;
}

.site-footer {
  padding: 28px 0;
  color: var(--muted);
  background: #e5ded2;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.site-footer p {
  margin: 4px 0;
}

@media (max-width: 860px) {
  .header-inner,
  .hero-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

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

  .archive-item {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .archive-item em {
    display: none;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 24px, 1080px);
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1,
  .page-head h1,
  .about-main h1 {
    font-size: 34px;
  }

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

  .article-body {
    font-size: 16px;
  }
}
