/* =========================================================================
   我的小家 · 首页与内容页样式（Hero / 精选 / 文章列表 / 侧栏 / 正文）
   ========================================================================= */

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; padding: clamp(48px, 8vw, 104px) 0 clamp(36px, 6vw, 72px); text-align: center; }
.hero__eyebrow {
  color: var(--brand); letter-spacing: .34em; text-transform: uppercase;
  font-size: 12px; margin-bottom: 12px;
}
.hero__title {
  font-size: clamp(2.4rem, 7.5vw, 5rem);
  background: linear-gradient(100deg, var(--text) 8%, var(--brand) 52%, var(--brand-2) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 14px;
}
.hero__sub { color: var(--muted); max-width: 620px; margin: 0 auto 18px;
             font-size: clamp(1rem, 1.6vw, 1.1rem); }
/* 亮色模式下品牌色压白底不够读，端点整体加深到 4.5:1 以上 */
html[data-theme="light"] .hero__eyebrow { color: #3d4fbe; }
html[data-theme="light"] .hero__title {
  background: linear-gradient(100deg, var(--text) 8%, #3d4fbe 52%, #7a62e8 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="light"] .hero__sub { color: #4d5874; }
.hero__meta { color: var(--muted); font-size: 14px; display: flex; gap: 10px;
              justify-content: center; align-items: center; }
.hero__meta strong { color: var(--text); font-size: 17px; }
.hero__meta .dot { opacity: .5; }

.hero__scroll {
  margin-top: 34px; display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 12px; letter-spacing: .1em;
  animation: floaty 2.2s ease-in-out infinite;
}
.hero__scroll svg { width: 20px; height: 20px; }
@keyframes floaty { 0%,100% { transform: translateY(0); opacity: .75; }
                    50% { transform: translateY(7px); opacity: 1; } }

/* --------------------------------------------------------------- 区块 */
.section { padding: 34px 0 12px; }
.section__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section__title { font-size: 20px; position: relative; padding-left: 14px; }
.section__title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.section__hint { color: var(--muted); font-size: 13.5px; }

/* --------------------------------------------------------------- 卡片 */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s;
}
.card + .card { margin-top: 16px; }
.card--center { text-align: center; }
.card__title { font-size: 15px; margin-bottom: 12px; }
.card__muted { color: var(--muted); font-size: 13px; }
.card__foot { color: var(--muted); font-size: 12px; margin-top: 12px;
              padding-top: 12px; border-top: 1px dashed var(--line); }

/* ------------------------------------------------------------- 精选横滑 */
.featured-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 340px);
  gap: 16px; overflow-x: auto; padding: 4px 4px 14px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.featured-row::-webkit-scrollbar { height: 6px; }
.featured-row::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.feature-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-solid);
  scroll-snap-align: start; box-shadow: var(--shadow);
  transition: transform .32s cubic-bezier(.2,.7,.2,1), border-color .3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(109, 140, 255, .5); }
.feature-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%;
                    transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.feature-card:hover img { transform: scale(1.06); }
.feature-card__body {
  position: absolute; inset: auto 0 0 0; padding: 16px;
  background: linear-gradient(180deg, transparent, rgba(6, 10, 20, .88));
}
.feature-card__body h3 {
  color: #fff; font-size: 15.5px; margin: 8px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feature-card__body time { color: rgba(255, 255, 255, .65); font-size: 12px; }

/* ------------------------------------------------------------ 分类筛选 */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.tab {
  white-space: nowrap; padding: 7px 15px; border-radius: 999px; font-size: 13.5px;
  color: var(--muted); border: 1px solid var(--line); background: var(--panel);
  transition: color .2s, border-color .2s, background .2s;
}
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab.is-active {
  color: #fff; border-color: transparent;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
}

/* -------------------------------------------------------------- 文章项 */
.post-list { display: flex; flex-direction: column; gap: 16px; }

.post-item {
  display: grid; grid-template-columns: 34px 190px 1fr; gap: 16px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: var(--shadow); position: relative;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s;
}
.post-item:hover { transform: translateY(-3px); border-color: rgba(109, 140, 255, .45); }

.post-item__no {
  font-size: 13px; font-weight: 700; color: var(--muted); opacity: .65;
  font-variant-numeric: tabular-nums; padding-top: 4px;
}

.post-item__cover { border-radius: var(--radius-sm); overflow: hidden; display: block;
                    border: 1px solid var(--line); }
.post-item__cover img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%;
                        transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.post-item:hover .post-item__cover img { transform: scale(1.06); }

.post-item__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.post-item__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
                   color: var(--muted); font-size: 12.5px; }
.post-item__meta .sep { opacity: .5; }

.post-item__title { font-size: 17px; }
.post-item__title a { transition: color .2s; }
.post-item__title a:hover { color: var(--brand); }

.post-item__excerpt {
  color: var(--muted); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.post-item__foot { margin-top: auto; display: flex; align-items: center; gap: 14px;
                   color: var(--muted); font-size: 12.5px; }
.stat { display: inline-flex; align-items: center; gap: 5px; }
.stat svg { width: 15px; height: 15px; }
.read-more { margin-left: auto; color: var(--brand); font-weight: 600; font-size: 13px; }
.read-more:hover { text-decoration: underline; }

.chip {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px;
  background: rgba(109, 140, 255, .16); color: var(--brand);
  border: 1px solid rgba(109, 140, 255, .28);
}
.chip--sm { padding: 2px 8px; font-size: 11.5px; }

/* 封面图上的角标：渐变上必须实心，保证 4.5:1 以上对比 */
.feature-card .chip {
  background: #fff; color: #2f3fc4; border-color: transparent; font-weight: 600;
}

.empty {
  padding: 40px 20px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty a { color: var(--brand); }

/* ------------------------------------------------------------ 加载更多 */
.load-more { display: flex; justify-content: center; padding: 22px 0 8px; }
.btn {
  padding: 12px 26px; min-height: 44px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: transform .25s, box-shadow .25s, background .25s, opacity .25s;
}
.btn--primary { background: linear-gradient(100deg, var(--brand), var(--brand-2)); color: #0b0f19; }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); background: var(--panel); }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(109, 140, 255, .28); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--sm { padding: 7px 16px; font-size: 13px; }

/* -------------------------------------------------------------- 侧栏块 */
.profile { text-align: center; }
.profile__avatar { margin: 0 auto 10px; border-radius: 50%; border: 2px solid var(--line-strong); }
.profile__name { display: block; font-size: 16px; }
.profile__desc { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.profile__links { display: flex; justify-content: center; gap: 10px; }
.profile__links a {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); color: var(--muted); transition: .2s;
}
.profile__links a:hover { color: var(--text); border-color: var(--brand); }

.conn { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.conn__avatar { border-radius: 10px; }
.conn__main strong { display: block; font-size: 14px; }
.conn__main small { color: var(--muted); font-size: 12.5px; }
.conn--bili { border-top: 1px dashed var(--line); margin-top: 8px; }

.repo-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex;
             flex-direction: column; gap: 6px; }
.repo-list a {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius-sm); background: rgba(127, 127, 127, .07); font-size: 13px;
  transition: background .2s;
}
.repo-list a:hover { background: rgba(109, 140, 255, .14); }
.repo-list__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-list__star { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.weather { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.weather__main { display: flex; align-items: baseline; gap: 8px; }
.weather__main strong { font-size: 26px; }
.weather__main span { color: var(--muted); font-size: 13px; }
.weather small { color: var(--muted); font-size: 12px; }

.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-list__btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; color: var(--muted);
  transition: background .2s, color .2s;
}
.cat-list__btn:hover { background: var(--panel); color: var(--text); }
.cat-list__n {
  font-size: 12px; color: var(--brand); background: rgba(109, 140, 255, .14);
  padding: 1px 8px; border-radius: 999px; font-variant-numeric: tabular-nums;
}

.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.recent-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px;
                  align-items: baseline; font-size: 13.5px; }
.recent-list__no { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; opacity: .7; }
.recent-list a { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
                 overflow: hidden; transition: color .2s; }
.recent-list a:hover { color: var(--brand); }
.recent-list time { color: var(--muted); font-size: 12px; }

.qr { margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); }

/* -------------------------------------------------------------- 文章正文 */
.article { padding: 8px 0 40px; }
.article__cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
                  margin-bottom: 22px; }
.article__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article__head { margin-bottom: 22px; }
.article__title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 12px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
                 color: var(--muted); font-size: 13px; }

.prose { font-size: 16.5px; line-height: 1.85; }
.prose h2 { font-size: 1.4rem; margin: 34px 0 12px; }
.prose h3 { font-size: 1.15rem; margin: 26px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); margin: 18px 0; }
.prose blockquote {
  margin: 18px 0; padding: 12px 18px; color: var(--muted);
  border-left: 3px solid var(--brand); background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em; padding: 2px 6px; border-radius: 6px;
  background: rgba(127, 127, 127, .16);
}
.prose pre {
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; margin: 0 0 18px;
}
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--panel); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

.article__foot { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
                 display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* -------------------------------------------------------------- 小窝 */
.us-lock {
  min-height: 52vh; display: flex; align-items: center; justify-content: center;
  padding: 30px 0;
}
.us-lock__card {
  width: min(420px, 100%); text-align: center; padding: 34px 28px;
}
.us-lock__icon { font-size: 34px; margin-bottom: 8px; }
.us-lock__title { font-size: 22px; margin-bottom: 8px; }
.us-lock__sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.us-lock__card form { text-align: left; }

.us-item__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.us-item__title { font-size: 17px; margin-bottom: 8px; }
.us-item__body { color: var(--text); font-size: 14.5px; line-height: 1.8; }
.us-item__media {
  margin-top: 12px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.us-item__media img {
  width: 100%; border-radius: 12px; border: 1px solid var(--line);
  display: block;
}
.us-item__media audio, .us-item__media video { width: 100%; border-radius: 12px; }
