:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --text: #1e2528;
  --muted: #667174;
  --line: #d8d3ca;
  --paper: #fffdfa;
  --accent: #2f6f67;
  --accent-dark: #1f514b;
  --rust: #a8552d;
  --gold: #c49a40;
  --shadow: 0 18px 50px rgba(38, 45, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(47, 111, 103, 0.08), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
  line-height: 1.7;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(216, 211, 202, 0.78);
  background: rgba(245, 243, 238, 0.88);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}

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

.nav-links a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: end;
  max-width: 1120px;
  margin: 0 auto;
  padding: 92px 24px 56px;
}

.hero-content {
  max-width: 760px;
}

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

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

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.35;
}

.hero-copy {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
}

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

.button,
.filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
}

.button:hover,
.filter:hover,
.post-card:hover {
  transform: translateY(-2px);
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: rgba(255, 253, 250, 0.76);
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow: var(--shadow);
}

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.metric:last-child {
  border-bottom: 0;
}

.metric span {
  color: var(--accent-dark);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.metric small {
  color: var(--muted);
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px;
}

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

.search {
  width: min(100%, 340px);
}

.search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0 14px;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 103, 0.14);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter {
  min-height: 38px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--muted);
}

.filter.active {
  border-color: var(--accent);
  background: rgba(47, 111, 103, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
}

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

.post-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
  box-shadow: 0 10px 34px rgba(38, 45, 43, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.post-card:hover {
  box-shadow: var(--shadow);
}

.post-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  border-radius: 999px;
  background: rgba(196, 154, 64, 0.16);
  color: #765517;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.read-button {
  align-self: flex-start;
  margin-top: 22px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

.about,
.contact {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  border-top: 1px solid var(--line);
}

.about-body,
.contact-list {
  color: var(--muted);
  font-size: 17px;
}

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-list a {
  color: var(--accent-dark);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 42px;
  color: var(--muted);
}

.post-dialog {
  width: min(860px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 40px));
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
}

.post-dialog::backdrop {
  background: rgba(30, 37, 40, 0.48);
}

.dialog-card {
  position: relative;
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 8px;
  background: var(--paper);
  padding: 34px;
  box-shadow: var(--shadow);
}

.icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-content {
  color: #344044;
  font-size: 17px;
}

.dialog-content p {
  margin-bottom: 16px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.68);
  color: var(--muted);
  padding: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

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

  .hero {
    padding-top: 64px;
  }

  .hero-panel {
    max-width: 440px;
  }

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

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
  }

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

  .hero,
  .section {
    padding-right: 18px;
    padding-left: 18px;
  }

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

  .site-footer {
    flex-direction: column;
    gap: 8px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .dialog-card {
    padding: 28px 20px;
  }
}
