:root {
  --paper: #f5f4ed;
  --ivory: #faf9f5;
  --sand: #e8e6dc;
  --line: #dedbd0;
  --line-soft: #f0eee6;
  --ink: #141413;
  --text: #3d3d3a;
  --muted: #6f6d65;
  --faint: #8a887f;
  --brand: #c96442;
  --brand-soft: #f1d7cb;
  --green: #687864;
  --dark: #30302e;
  --shadow: 0 18px 52px rgba(61, 55, 46, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(201, 100, 66, 0.1), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(104, 120, 100, 0.12), transparent 26%);
}

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

main,
.topbar {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(245, 244, 237, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

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

.topbar nav a,
.button,
.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.topbar nav a:hover,
.button.secondary,
.profile-links a {
  background: var(--sand);
  box-shadow: 0 0 0 1px var(--line);
}

.hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0 22px;
}

.profile-card,
.hero-main,
.overview,
.section {
  background: rgba(250, 249, 245, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.42), var(--shadow);
}

.profile-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
}

.profile-card img {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 24px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(61, 55, 46, 0.1);
}

.label,
.writing-card span,
.content-card span,
.overview span {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.profile-card h1,
.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.profile-card h1 {
  margin-top: 4px;
  font-size: 42px;
  line-height: 1.05;
}

.profile-card p,
.hero-main p,
.overview p,
.writing-card p,
.content-card p {
  margin: 0;
  color: var(--muted);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

.profile-links a:hover,
.button.secondary:hover {
  background: #fff;
  color: var(--ink);
}

.hero-main {
  padding: clamp(24px, 3vw, 34px);
}

.info-list {
  display: grid;
  gap: 18px;
}

.info-list article {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.info-list article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-list span {
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.info-list p,
.info-list li {
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
}

.info-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.button.primary {
  background: var(--brand);
  color: var(--ivory);
  box-shadow: 0 0 0 1px rgba(201, 100, 66, 0.2);
}

.button:hover {
  transform: translateY(-1px);
}

.writing-card h3,
.content-card h3 {
  margin: 14px 0 8px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.22;
}

.writing-card p,
.content-card p {
  font-size: 15px;
}

.overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 22px;
  overflow: hidden;
}

.overview article {
  padding: 20px;
  border-right: 1px solid var(--line-soft);
}

.overview article:last-child {
  border-right: 0;
}

.overview strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.section {
  margin: 22px 0;
  padding: clamp(22px, 4vw, 34px);
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  margin-top: 4px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
}

.writing-card,
.content-card {
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
}

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

.writing-card,
.content-card {
  min-height: 178px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.writing-card.featured {
  grid-column: span 2;
  background: var(--dark);
}

.writing-card.featured h3,
.writing-card.featured p {
  color: var(--ivory);
}

.writing-card.featured p {
  opacity: 0.78;
}

.writing-card.video {
  background: #f6eee6;
}

.content-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.content-card {
  min-height: 210px;
  background:
    linear-gradient(135deg, rgba(241, 215, 203, 0.72), transparent 62%),
    #fff;
}

.content-card.zhihu {
  background:
    linear-gradient(135deg, rgba(104, 120, 100, 0.16), transparent 60%),
    #fff;
}

.writing-card.video {
  min-height: 210px;
}

.writing-card:hover,
.content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(61, 55, 46, 0.1);
}

:focus-visible {
  outline: 3px solid #3898ec;
  outline-offset: 3px;
}

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
  }

  .profile-card img {
    width: 112px;
  }

  .profile-links {
    grid-column: 1 / -1;
  }

  .overview,
  .writing-grid,
  .content-share-grid {
    grid-template-columns: 1fr;
  }

  .overview article {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .overview article:last-child {
    border-bottom: 0;
  }

  .writing-card.featured {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  main,
  .topbar {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    min-height: 64px;
  }

  .topbar nav {
    gap: 0;
  }

  .topbar nav a {
    padding: 0 8px;
    font-size: 13px;
  }

  .hero {
    padding-top: 22px;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .info-list article {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
