:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #182134;
  --subtext: #4a556d;
  --line: #dbe3f3;
  --link: #1d4ed8;
  --chip-bg: #eef4ff;
  --chip-text: #1b4298;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f9fbff 0%, #f4f7fc 100%);
}

.homepage {
  width: min(92%, 72rem);
  margin: 2.4rem auto 3rem;
}

.profile-header {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.profile-avatar-wrap {
  flex: 0 0 20%;
  max-width: 11rem;
  min-width: 7.5rem;
  aspect-ratio: 1 / 1;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.9rem;
  display: block;
}

.profile-main {
  flex: 1;
  min-width: 0;
}

.profile-kicker {
  margin: 0;
  font-size: 0.82rem;
  color: #6b7895;
  letter-spacing: 0.03em;
}

h1 {
  margin: 0.35rem 0 0.9rem;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.15;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.chip {
  display: inline-block;
  background: var(--chip-bg);
  color: var(--chip-text);
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 0.33rem 0.68rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.contact-block h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.contact-block p {
  margin: 0.2rem 0;
  color: var(--subtext);
  line-height: 1.65;
}

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

a:hover {
  text-decoration: underline;
}

.posts-feed {
  padding-top: 1.35rem;
}

.posts-head {
  margin-bottom: 0.7rem;
}

.posts-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.post-filter-status {
  margin: 0.25rem 0 0;
  color: #5e6f92;
  font-size: 0.85rem;
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.post-item {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.post-cover {
  flex: 0 0 28%;
  aspect-ratio: 16 / 10;
  border-radius: 0.7rem;
}

.post-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-title {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--link);
  text-decoration: underline;
}

.post-meta {
  color: #6d7a96;
  font-size: 0.83rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.post-tag-chip {
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.76rem;
  line-height: 1.2;
  padding: 0.24rem 0.58rem;
  cursor: pointer;
}

.post-tag-chip.active {
  color: #ffffff;
  background: #1f4cb8;
  border-color: #1f4cb8;
}

.post-tag-chip.muted {
  cursor: default;
  opacity: 0.72;
}

@media (max-width: 48rem) {
  .homepage {
    width: min(94%, 72rem);
    margin-top: 1.4rem;
  }

  .profile-header {
    flex-direction: column;
    gap: 0.9rem;
  }

  .profile-avatar-wrap {
    width: min(36%, 10rem);
    max-width: none;
    min-width: 6.5rem;
  }

  .post-item {
    gap: 0.75rem;
  }

  .post-cover {
    flex-basis: 34%;
  }
}
