:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #e6e8eb;
  --text: #1a1a1a;
  --muted: #8590a6;
  --sub: #5f6b7a;
  --brand: #0066ff;
  --brand-dark: #0052cc;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(18, 18, 18, 0.04), 0 6px 20px rgba(18, 18, 18, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───── 顶栏 ───── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(150deg, #0066ff, #00c2ff);
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 800;
}

/* 右上角用户区 */
.user-area { display: flex; align-items: center; gap: 12px; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost {
  background: transparent;
  color: var(--sub);
  border-color: var(--line);
}
.btn.ghost:hover { background: #f0f2f5; color: var(--text); }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: pointer;
  background: #e9edf2;
  transition: transform .15s;
}
.avatar:hover { transform: scale(1.06); }

.avatar-btn {
  display: flex; align-items: center; gap: 9px;
  background: none; border: none; cursor: pointer;
  padding: 4px 6px; border-radius: 999px;
}
.avatar-btn:hover { background: #f0f2f5; }
.avatar-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  max-width: 140px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ───── 布局 ───── */
.wrap { max-width: 940px; margin: 0 auto; padding: 32px 24px 80px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}

.hero { text-align: center; padding: 56px 26px 48px; }
.hero h1 { margin: 0 0 12px; font-size: 30px; letter-spacing: -.3px; }
.hero p { margin: 0 auto 24px; max-width: 540px; color: var(--sub); }

.footer {
  text-align: center; margin-top: 32px; padding-bottom: 8px;
  font-size: 13px; color: var(--sub);
}
.footer a { color: var(--brand); margin: 0 6px; }
.footer a:hover { text-decoration: underline; }
.footer .fine { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.privacy {
  max-width: 520px; margin: 0 auto 22px;
  text-align: left; font-size: 13.5px; color: #4b5563;
  background: #fafbfc; border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 20px;
}
.privacy li { margin: 7px 0; }
.privacy ul { margin: 0; padding-left: 18px; }
.privacy strong { color: var(--text); }

h2.section {
  font-size: 17px; margin: 34px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
h2.section .count {
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: #f0f2f5; padding: 2px 9px; border-radius: 999px;
}

/* ───── 列表 ───── */
.list { display: flex; flex-direction: column; gap: 12px; }

.item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.item:hover { border-color: #d0d5dc; box-shadow: var(--shadow); }

.item-title {
  font-size: 15px; font-weight: 600; margin: 0 0 6px;
  display: block; color: var(--text);
}
.item-title:hover { color: var(--brand); text-decoration: none; }

.item-summary {
  margin: 0 0 10px; color: var(--sub); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12.5px; color: var(--muted);
}

.tag {
  display: inline-block; font-size: 11.5px;
  padding: 1px 8px; border-radius: 4px;
  background: #eef4ff; color: #3b7dff; font-weight: 600;
}
.tag.gray { background: #f0f2f5; color: var(--muted); }

/* 关注的人 */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.person {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}
.person img { width: 42px; height: 42px; border-radius: 50%; background: #e9edf2; flex-shrink: 0; }
.person-name { font-weight: 600; font-size: 14.5px; }
.person-headline {
  font-size: 12.5px; color: var(--muted); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* 收藏夹 */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.folder {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.folder:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.folder.active { border-color: var(--brand); background: #f7faff; }
.folder-title { font-weight: 600; margin-bottom: 4px; }
.folder-desc { font-size: 12.5px; color: var(--muted); }

/* ───── 标签页 ───── */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  margin: 30px 0 20px;
}
.tab {
  appearance: none; background: none; border: none;
  padding: 10px 18px; font-size: 14.5px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ───── 状态 ───── */
.state {
  text-align: center; padding: 48px 20px; color: var(--muted);
  background: var(--card); border: 1px dashed var(--line); border-radius: 12px;
}
.state strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 15px; }

.notice {
  font-size: 12.5px; color: var(--muted);
  background: #fffbe6; border: 1px solid #ffe58f;
  border-radius: 8px; padding: 9px 14px; margin-bottom: 14px;
}

.loadmore { display: flex; justify-content: center; margin-top: 18px; }

.skeleton {
  height: 74px; border-radius: 12px; margin-bottom: 12px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e6e9ee 37%, #f0f2f5 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ───── 个人页头部 ───── */
.profile-head {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow);
}
.profile-head img {
  width: 84px; height: 84px; border-radius: 50%;
  background: #e9edf2; border: 1px solid var(--line);
}
.profile-name { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.profile-headline { color: var(--sub); margin: 0 0 10px; }
.profile-desc { color: var(--muted); font-size: 13.5px; margin: 0; white-space: pre-wrap; }
.profile-meta { display: flex; gap: 18px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.profile-meta code {
  background: #f0f2f5; padding: 1px 7px; border-radius: 5px;
  font-size: 12px; color: var(--sub);
}

@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .wrap { padding: 22px 16px 60px; }
  .profile-head { flex-direction: column; align-items: center; text-align: center; }
  .avatar-name { display: none; }
}
