:root {
  --bg: #f4efe7;
  --paper: rgba(255, 251, 245, 0.92);
  --paper-strong: #fffaf2;
  --ink: #18231f;
  --muted: #5f6d68;
  --line: rgba(24, 35, 31, 0.12);
  --accent: #1e6b52;
  --accent-soft: #d7ebe2;
  --highlight: #c67f2a;
  --shadow: 0 24px 60px rgba(18, 34, 29, 0.12);
  --sans: "IBM Plex Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(198, 127, 42, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(30, 107, 82, 0.18), transparent 30%),
    linear-gradient(180deg, #efe8dc 0%, var(--bg) 45%, #ebe4d8 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(24, 35, 31, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 35, 31, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  background: rgba(255, 248, 240, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header,
.site-footer,
.hero,
.featured,
.posts,
.notes {
  animation: rise 0.8s ease both;
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #2f8e6d);
  color: #fdf8f0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand h1,
.section-heading h3,
.post-card h4,
.note-item h4,
.footer-title {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.top-nav a,
.post-card a {
  color: var(--ink);
  text-decoration: none;
}

.top-nav a {
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.post-card a:hover,
.post-card a:focus-visible {
  color: var(--accent);
  border-color: currentColor;
}

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

.hero-copy h2 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-text,
.feature-card p,
.post-card p,
.note-item p,
.site-footer p,
.hero-panel li {
  color: var(--muted);
  line-height: 1.8;
}

.hero-text {
  max-width: 58ch;
  margin: 20px 0 0;
  font-size: 1.05rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--ink);
  color: #fff7ed;
  box-shadow: 0 16px 30px rgba(24, 35, 31, 0.18);
}

.button.ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
}

.hero-panel,
.feature-card,
.post-card,
.note-item {
  border: 1px solid var(--line);
  background: var(--paper);
}

.hero-panel {
  padding: 22px;
  border-radius: 24px;
}

.panel-label,
.feature-meta,
.post-tag,
.note-index {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-label,
.post-tag {
  color: var(--highlight);
}

.hero-panel ul {
  margin: 16px 0 0;
  padding-left: 18px;
}

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

.section-heading h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.featured,
.posts,
.notes {
  padding: 20px 0 10px;
}

.feature-card {
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(246, 239, 228, 0.94));
}

.feature-meta {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--accent);
}

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

.post-card {
  padding: 22px;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover,
.post-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(24, 35, 31, 0.12);
}

.post-card h4 {
  margin: 14px 0 10px;
  font-size: 1.15rem;
}

.post-card a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
}

.note-list {
  display: grid;
  gap: 16px;
}

.note-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
}

.note-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-title {
  margin-bottom: 10px;
  font-size: 1rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .hero,
  .post-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

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

  .hero-copy h2 {
    max-width: 11ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 16px, 100%);
    margin: 8px auto;
    padding: 18px;
    border-radius: 22px;
  }

  .site-header {
    align-items: start;
    flex-direction: column;
  }

  .hero {
    padding-top: 26px;
  }

  .hero-copy h2 {
    max-width: none;
    font-size: clamp(2rem, 11vw, 3.1rem);
  }

  .note-item {
    grid-template-columns: 1fr;
  }

  .note-index {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
}
