/* ══════════════════════════════════════════════════════════════════════
   清新版 (Fresh Theme) - 主页
   设计语言：浅蓝为主/浅粉为辅的水墨晕染、圆角矩形毛玻璃卡片、Bento 便当盒布局与胶囊药丸
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f4f8fb;
  --paper: rgba(255, 255, 255, .92);
  --paper-soft: #ebf3f8;
  --ink: #1b252c;
  --muted: #5e707d;
  --faint: #899da9;
  --line: rgba(106, 147, 176, .14);
  --line-strong: rgba(106, 147, 176, .24);
  --accent: #6a93b0;
  --accent-soft: rgba(106, 147, 176, .14);
  --accent-hover: #567e9b;
  --warm: #dfb4c0;
  --warm-soft: rgba(223, 180, 192, .18);
  --signal: #dfb4c0;
  --shadow-sm: 0 6px 20px rgba(60, 85, 105, .05);
  --shadow: 0 16px 44px rgba(60, 85, 105, .08);
  --shadow-lg: 0 28px 80px rgba(60, 85, 105, .15);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 26px;
  --radius-pill: 999px;
}

:root[data-theme="dark"] {
  --bg: #12161a;
  --paper: rgba(25, 31, 37, .92);
  --paper-soft: #1e262e;
  --ink: #ebf2f7;
  --muted: #a6b8c4;
  --faint: #748896;
  --line: rgba(180, 215, 235, .1);
  --line-strong: rgba(180, 215, 235, .2);
  --accent: #92b9d3;
  --accent-soft: rgba(146, 185, 211, .15);
  --accent-hover: #a8cae1;
  --warm: #dfb4c0;
  --warm-soft: rgba(223, 180, 192, .15);
  --signal: #dfb4c0;
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, .2);
  --shadow: 0 16px 44px rgba(0, 0, 0, .3);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .45);
}

/* ── 背景水墨晕染：70% 浅蓝主调 + 30% 柔粉点缀 ── */
body {
  position: relative;
  background: linear-gradient(145deg, #edf4f9 0%, #e6eff6 45%, #f7edf2 100%);
}

:root[data-theme="dark"] body {
  background: linear-gradient(145deg, #15191e, #11161b 50%, #191418);
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  content: "";
  pointer-events: none;
  filter: blur(34px);
  opacity: .75;
}

/* 左上大面积浅蓝光斑 */
body::before {
  width: 58vw;
  height: 44vh;
  left: -10vw;
  top: 6vh;
  border-radius: 43% 57% 61% 39% / 58% 42% 58% 42%;
  background: radial-gradient(ellipse at 52% 48%, rgba(145, 194, 224, .52), rgba(180, 214, 235, .2) 52%, transparent 74%);
  transform: rotate(-12deg);
}

/* 右下点缀柔粉光斑 */
body::after {
  width: 48vw;
  height: 38vh;
  right: -12vw;
  bottom: 4vh;
  border-radius: 62% 38% 46% 54% / 39% 57% 43% 61%;
  background: radial-gradient(ellipse at 42% 48%, rgba(230, 185, 200, .38), rgba(240, 210, 220, .12) 54%, transparent 76%);
  transform: rotate(10deg);
}

.site {
  position: relative;
  z-index: 1;
}

/* ── 侧边栏与导航：毛玻璃与圆形图标 ── */
.rail,
.mobile-top {
  background: color-mix(in srgb, var(--paper) 76%, transparent);
  backdrop-filter: blur(22px) saturate(1.1);
  border-color: var(--line);
}

.rail-mark,
.avatar-mark {
  color: #385366;
  border-radius: 50%;
  border-color: rgba(106, 147, 176, .26);
  background: linear-gradient(135deg, #bfe0f2 0%, #d8e8f4 55%, #eed6df 100%);
  box-shadow: 0 6px 18px rgba(106, 147, 176, .22);
}

.rail-nav a,
.rail-action {
  border-radius: 50%;
}

.rail-nav a:hover,
.rail-nav a:focus-visible,
.rail-action:hover,
.rail-action:focus-visible {
  border-radius: 50%;
  background: var(--paper);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
}

.rail-nav span,
.rail-action span {
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.theme-button,
.page-switch {
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

/* ── 首页主 Hero 看板：26px 大圆角毛玻璃卡片 ── */
.hero {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
}

.hero-cover {
  color: rgba(55, 70, 81, .62);
  background:
    radial-gradient(ellipse at 80% 28%, rgba(235, 190, 204, .42), transparent 38%),
    radial-gradient(ellipse at 18% 70%, rgba(145, 195, 225, .65), transparent 42%),
    linear-gradient(125deg, #b8dcf0 0%, #d0e4f2 50%, #ead3dd 100%);
}

.cover-grid { opacity: .24; mix-blend-mode: multiply; }
.cover-line { background: color-mix(in srgb, var(--accent) 46%, transparent); }
.cover-signal { background: radial-gradient(circle, rgba(255, 255, 255, .78), rgba(215, 170, 185, .48) 34%, transparent 68%); filter: blur(3px); }
.cover-stamp {
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border: 1px solid var(--line);
  color: #4a687d;
}

.hero-body {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
}

.avatar-wrap {
  border-radius: 50%;
  padding: 4px;
  background: var(--paper);
  border: 1px solid rgba(106, 147, 176, .2);
  box-shadow: 0 8px 24px rgba(60, 85, 105, .12);
}

.avatar-mark {
  border-radius: 50%;
  width: 100%;
  height: 100%;
}

.identity-kicker,
.section-code {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(110deg, rgba(160, 205, 232, .38), rgba(235, 195, 208, .28));
  color: #3f6077;
  font-size: 11px;
  letter-spacing: .06em;
  font-family: var(--mono);
}

/* ── 案头索引区：文章与项目（Bento 圆角矩形卡片流） ── */
.desk-grid {
  gap: 22px;
}

.desk-column {
  display: flex;
  flex-direction: column;
}

.column-head {
  padding: 0 4px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.column-head h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
}

.column-head a {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-family: var(--mono);
  transition: all 160ms ease;
}

.column-head a:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(106, 147, 176, .25);
}

/* 文章卡片：18px 圆角矩形卡片 */
.archive-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  min-height: auto;
  border-bottom: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.archive-row time {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(110deg, rgba(160, 205, 232, .48), rgba(235, 195, 208, .32));
  color: #38556a;
  font-size: 11px;
  text-align: center;
  font-family: var(--mono);
}

.archive-row span {
  font-weight: 500;
  color: var(--ink);
}

.archive-row small {
  color: var(--faint);
  font-family: var(--mono);
}

.archive-row:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: var(--shadow);
}

/* 项目卡片：18px 圆角矩形卡片 */
.project-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  min-height: auto;
  border-bottom: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}

.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.project-tags {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 10px;
  margin-top: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(110deg, rgba(160, 205, 232, .48), rgba(235, 195, 208, .32));
  color: #38556a;
  font-size: 11px;
  font-family: var(--mono);
}

.project-row:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: var(--shadow);
}

/* ── 右侧边抽屉：胶囊搜索、置顶卡片与留言板毛玻璃 ── */
.archive-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 胶囊搜索框 */
.quick-search {
  padding-right: 0;
  margin-bottom: 6px;
}

.quick-search input {
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.quick-search input:focus {
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 6px 24px rgba(106, 147, 176, .22);
}

.quick-search-results {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
  padding: 6px;
}

.quick-search-results .search-result {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border-top: 0;
  transition: background 160ms ease;
}

.quick-search-results .search-result:hover {
  background: var(--accent-soft);
}

/* 置顶推荐卡片 */
.archive-aside .pinned-section {
  border-bottom: 0;
  padding: 0;
}

.pinned-minimal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pinned-minimal-head {
  padding: 0 4px 4px;
}

.pinned-minimal-head h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}

.pinned-link {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.pinned-link span {
  display: inline-block;
  padding: 2px 8px;
  margin-bottom: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(110deg, rgba(160, 205, 232, .48), rgba(235, 195, 208, .32));
  color: #38556a;
  font-size: 11px;
  font-family: var(--mono);
}

.pinned-link strong {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.35;
}

.pinned-link small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pinned-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: var(--shadow);
}

/* 匿名留言板：独立 22px 圆角毛玻璃卡片 */
.archive-aside .aside-panel {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.archive-aside .aside-panel + .aside-panel {
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

.archive-aside .aside-panel h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 12px;
}

.echo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.echo-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 75%, transparent);
  box-shadow: 0 4px 12px rgba(60, 85, 105, .03);
}

.echo-item p {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.echo-item span {
  font-size: 11px;
  color: var(--faint);
  font-family: var(--mono);
}

.echo-open {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(106, 147, 176, .3);
  background: linear-gradient(125deg, #b8dcf0 0%, #d2e4f2 60%, #eed5df 100%);
  color: #2e4a5d;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(106, 147, 176, .22);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.echo-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(106, 147, 176, .32);
  filter: brightness(1.02);
}

/* ── 模态弹窗（固定居中遮罩 + 26px 大圆角） ── */
.taste-modal,
.echo-modal,
.search-panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  padding: 26px;
}

.taste-close,
.echo-close,
.search-close {
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  transition: all 160ms ease;
}

.taste-close:hover,
.echo-close:hover,
.search-close:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.taste-modal .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.taste-modal .tab {
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: all 160ms ease;
}

.taste-modal .tab:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.taste-modal .tab.is-active {
  background: linear-gradient(125deg, #b8dcf0, #eed5df);
  color: #2e4a5d;
  font-weight: 600;
  border-color: rgba(106, 147, 176, .28);
  box-shadow: 0 4px 12px rgba(106, 147, 176, .2);
}

.taste-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all 160ms ease;
}

.taste-item:hover {
  background: var(--paper);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.echo-form input,
.echo-form textarea,
.search-box input {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  padding: 10px 14px;
}

.submit-button {
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  background: linear-gradient(125deg, #b8dcf0 0%, #d2e4f2 60%, #eed5df 100%);
  color: #2e4a5d;
  font-weight: 500;
  border: 1px solid rgba(106, 147, 176, .3);
  box-shadow: 0 6px 18px rgba(106, 147, 176, .22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(106, 147, 176, .32);
}

/* ── 移动端适配 ── */
@media (max-width: 760px) {
  .identity h1,
  .identity h1 span {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  
  .hero {
    border-radius: var(--radius-lg);
  }
  
  .archive-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 16px;
  }
  
  .archive-row time {
    align-self: flex-start;
  }
}
