/* ========== Blog Profile Page ========== */
.page-blog {
  background: var(--bg-page);
}

.blog-layout {
  display: flex;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  /* 底部留白放在右侧主栏，避免 sticky 左栏在滚到底时被父级 padding 顶上去 */
  padding: calc(var(--header-height) + 16px) 16px 0;
  align-items: flex-start;
}

/* Left profile panel */
.profile-panel {
  flex: 0 0 300px;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  /* 上下各留 16px：顶距导航、底距视口下沿对称 */
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-panel::-webkit-scrollbar {
  width: 4px;
}

.profile-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.profile-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 20px 16px;
}

.profile-header {
  text-align: center;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-age {
  font-size: var(--font-md);
  color: var(--text-muted);
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-actions--secondary {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.btn-action {
  padding: 6px 20px;
  border-radius: 4px;
  font-size: var(--font-md);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary-sm {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.btn-primary-sm:hover {
  background: var(--primary-hover);
}

.btn-outline-sm {
  background: var(--bg-white);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline-sm:hover {
  background: var(--primary-light);
}

.btn-text-sm {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px 12px;
  font-size: var(--font-md);
}

.btn-text-sm:hover {
  color: var(--primary);
}

.profile-stats {
  margin-bottom: 12px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-row--triple {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-label {
  display: block;
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-primary);
}

.stat-total {
  text-align: center;
  font-size: var(--font-md);
  color: var(--text-secondary);
  padding: 8px 0;
}

.stat-mini {
  flex: 1;
  text-align: center;
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.stat-mini strong {
  display: block;
  font-size: var(--font-base);
  color: var(--text-primary);
  font-weight: 600;
}

.profile-ip,
.profile-join {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-bottom: 6px;
}

.profile-section {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.profile-section--compact p {
  font-size: var(--font-md);
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.profile-section-title {
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.profile-desc {
  font-size: var(--font-md);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.profile-link {
  font-size: var(--font-md);
  color: var(--primary);
}

.badge-expert {
  display: inline-block;
  padding: 1px 6px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 3px;
  font-size: var(--font-xs);
  margin-right: 4px;
}

.achievement-list li {
  font-size: var(--font-md);
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 12px;
  position: relative;
}

.achievement-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.timeline-list li {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-md);
  color: var(--text-secondary);
  padding: 4px 0;
}

.timeline-count {
  color: var(--primary);
  font-weight: 500;
}

.medal-row {
  display: flex;
  gap: 8px;
}

.medal-icon {
  font-size: var(--font-xl);
  cursor: default;
}

.column-list li {
  margin-bottom: 6px;
}

.column-list a {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-md);
  color: var(--text-secondary);
  transition: color var(--transition);
}

.column-list a:hover {
  color: var(--primary);
}

.column-list span {
  color: var(--text-muted);
  font-size: var(--font-sm);
}

.btn-expand {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: var(--font-md);
  font-family: inherit;
  cursor: pointer;
}

.interest-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interest-group {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 6px 10px;
  background: var(--bg-page);
  border-radius: 4px;
}

.link-list li {
  margin-bottom: 6px;
}

.link-list a {
  font-size: var(--font-md);
  color: var(--primary);
}

.link-list a:hover {
  text-decoration: underline;
}

/* Right main content */
.blog-main {
  flex: 1;
  min-width: 0;
  margin-bottom: 32px;
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
}

.blog-tabs-wrap {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.blog-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.blog-tabs::-webkit-scrollbar {
  display: none;
}

.blog-tab {
  flex-shrink: 0;
  padding: 14px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: var(--font-base);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.blog-tab:hover {
  color: var(--primary);
}

.blog-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 500;
}

.blog-tabs-more {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--font-md);
  font-family: inherit;
  cursor: pointer;
  padding: 14px 8px;
}

.blog-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
}

.blog-search {
  display: flex;
  gap: 8px;
  max-width: 400px;
}

.blog-search input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: var(--font-base);
  font-family: inherit;
  outline: none;
}

.blog-search input:focus {
  border-color: var(--primary);
}

.blog-search button {
  padding: 0 14px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: var(--font-md);
  font-family: inherit;
  cursor: pointer;
}

.blog-search .btn-cancel {
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* 右侧文章区：复用首页 feed-card，背景与首页信息流一致 */
.blog-content {
  padding: 12px 16px 8px;
  background: var(--bg-page);
}

.blog-article-feed.article-feed {
  gap: 12px;
}

.blog-article-feed .feed-card {
  border: 1px solid var(--border);
}

.blog-content .feed-footer {
  padding-bottom: 4px;
}

/* Responsive */
@media (max-width: 992px) {
  .blog-layout {
    flex-direction: column;
  }

  .profile-panel {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .blog-layout {
    padding-top: calc(var(--header-height) + 8px);
    padding-left: 8px;
    padding-right: 8px;
  }

  .blog-tabs-wrap {
    padding: 0 8px;
  }

  .blog-tab {
    padding: 12px 10px;
    font-size: var(--font-md);
  }

  .blog-content {
    padding: 10px 12px 8px;
  }
}

/* 本人主页：审核状态 */
.feed-status {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.feed-status--pending {
  background: #fff8e1;
  color: #f57f17;
}
.feed-status--rejected {
  background: #ffebee;
  color: #c62828;
}
.feed-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.feed-status-btn {
  display: inline-block;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  text-decoration: none;
}
.feed-status-btn--danger {
  border-color: #ef9a9a;
  color: #c62828;
}
