/* ============================================================
   AIHub Community — 个人主页 5 套结构性主题
   .aihc-profile[data-layout="aurora|editorial|terminal|sunset|brutalist"]
   调色板来自内联 --pa-* 变量（内置预设或 AI 生成）；结构/字体/装饰由本文件定义。
   ============================================================ */

/* ---- 基座：把 --pa-* 调色板灌到组件用的 --* 变量，卡片/按钮/链接自动跟随 ---- */
.aihc-profile[data-layout] {
  --pa-accent: #7c6bff; --pa-accent2: #22d3ee; --pa-bg: #0a0c16;
  --pa-surface: #141726; --pa-text: #e8ebf5; --pa-radius: 16px;
  --accent: var(--pa-accent);
  --text: var(--pa-text);
  --surface: var(--pa-surface);
  --surface-2: color-mix(in srgb, var(--pa-surface) 70%, var(--pa-bg));
  --border: color-mix(in srgb, var(--pa-text) 14%, transparent);
  --border-strong: color-mix(in srgb, var(--pa-text) 30%, transparent);
  --text-muted: color-mix(in srgb, var(--pa-text) 58%, transparent);
  --accent-weak: color-mix(in srgb, var(--pa-accent) 16%, transparent);
  --accent-grad: linear-gradient(135deg, var(--pa-accent), var(--pa-accent2));
  --radius: var(--pa-radius);
  background-color: var(--pa-bg);
  color: var(--pa-text);
  min-height: 86vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.aihc-profile[data-layout] .aihc-profile-cover { background-color: var(--pa-accent); background-image: var(--accent-grad); }
.aihc-profile[data-layout] .aihc-profile-avatar { border-color: var(--pa-bg); background: var(--pa-surface); }
.aihc-profile[data-layout] .aihc-profile-id h1 { color: var(--pa-text); }
.aihc-profile[data-layout] .aihc-profile-bio,
.aihc-profile[data-layout] .aihc-profile-stats { color: var(--text-muted); }
.aihc-profile[data-layout] .aihc-profile-stats b { color: var(--pa-text); }
.aihc-profile[data-layout] .aihc-profile-posts h2 { color: var(--pa-text); }

/* ============ 1) AURORA — 深空玻璃 · 未来科技 ============ */
.aihc-profile[data-layout="aurora"] {
  background-image:
    radial-gradient(1100px 480px at 15% -12%, color-mix(in srgb, var(--pa-accent) 42%, transparent), transparent 70%),
    radial-gradient(900px 460px at 92% -4%, color-mix(in srgb, var(--pa-accent2) 38%, transparent), transparent 70%);
}
.aihc-profile[data-layout="aurora"] .aihc-profile-cover {
  height: 210px; background-image: var(--accent-grad);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent);
  opacity: .8;
}
.aihc-profile[data-layout="aurora"] .aihc-profile-avatar {
  box-shadow: 0 0 0 3px var(--pa-accent), 0 0 44px color-mix(in srgb, var(--pa-accent) 60%, transparent);
}
.aihc-profile[data-layout="aurora"] .aihc-profile-id h1 {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800; letter-spacing: -.02em;
}
.aihc-profile[data-layout="aurora"] .aihc-card {
  background: color-mix(in srgb, var(--pa-surface) 66%, transparent);
  backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, #fff 10%, transparent);
}
.aihc-profile[data-layout="aurora"] .aihc-card:hover { box-shadow: 0 12px 40px color-mix(in srgb, var(--pa-accent) 22%, transparent); }

/* ============ 2) EDITORIAL — 暖纸衬线 · 无横幅 · 编辑感 ============ */
.aihc-profile[data-layout="editorial"] .aihc-profile-cover { display: none; }
.aihc-profile[data-layout="editorial"] .aihc-profile-head {
  margin-top: 0; padding-top: 56px; max-width: 780px; flex-direction: column; align-items: center; text-align: center; gap: 14px;
}
.aihc-profile[data-layout="editorial"] .aihc-profile-head::before {
  content: "社区作者 · COMMUNITY MEMBER"; letter-spacing: .28em; font-size: 11px; color: var(--pa-accent);
  border-bottom: 1px solid var(--border); padding-bottom: 14px; width: 100%; text-align: center;
}
.aihc-profile[data-layout="editorial"] .aihc-profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--border-strong); }
.aihc-profile[data-layout="editorial"] .aihc-profile-id { text-align: center; }
.aihc-profile[data-layout="editorial"] .aihc-profile-id h1 {
  font-family: Georgia, "Songti SC", "SimSun", serif; font-weight: 700; font-size: 42px; justify-content: center; letter-spacing: -.01em;
}
.aihc-profile[data-layout="editorial"] .aihc-profile-stats { justify-content: center; }
.aihc-profile[data-layout="editorial"] .aihc-profile-posts h2 { font-family: Georgia, serif; border-bottom: 2px solid var(--pa-text); padding-bottom: 8px; }
.aihc-profile[data-layout="editorial"] .aihc-card {
  background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 22px 4px;
}
.aihc-profile[data-layout="editorial"] .aihc-card:hover { transform: none; box-shadow: none; }
.aihc-profile[data-layout="editorial"] .aihc-card-title { font-family: Georgia, "Songti SC", serif; font-weight: 700; }

/* ============ 3) TERMINAL — 等宽 · 网格 · 极客 ============ */
.aihc-profile[data-layout="terminal"] {
  font-family: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
  background-image: linear-gradient(color-mix(in srgb, var(--pa-accent) 8%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--pa-accent) 8%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
}
.aihc-profile[data-layout="terminal"] .aihc-profile-cover { height: 96px; opacity: .5; }
.aihc-profile[data-layout="terminal"] .aihc-profile-avatar { border-radius: 3px; border: 1px solid var(--pa-accent); }
.aihc-profile[data-layout="terminal"] .aihc-profile-id h1 { font-family: inherit; font-weight: 700; }
.aihc-profile[data-layout="terminal"] .aihc-profile-id h1::before { content: "> "; color: var(--pa-accent); }
.aihc-profile[data-layout="terminal"] .aihc-profile-id h1::after { content: "_"; color: var(--pa-accent); animation: aihc-caret 1.1s step-end infinite; }
@keyframes aihc-caret { 50% { opacity: 0; } }
.aihc-profile[data-layout="terminal"] .aihc-profile-stats { font-family: inherit; }
.aihc-profile[data-layout="terminal"] .aihc-profile-stats span::before { content: "["; color: var(--pa-accent); }
.aihc-profile[data-layout="terminal"] .aihc-profile-stats span::after { content: "]"; color: var(--pa-accent); }
.aihc-profile[data-layout="terminal"] .aihc-card { border: 1px solid color-mix(in srgb, var(--pa-accent) 26%, transparent); }
.aihc-profile[data-layout="terminal"] .aihc-card-title,
.aihc-profile[data-layout="terminal"] .aihc-card-meta { font-family: inherit; }

/* ============ 4) SUNSET — 暖调渐变 · 大圆角 · 柔和 ============ */
.aihc-profile[data-layout="sunset"] .aihc-profile-cover { height: 240px; border-bottom-left-radius: 40px; border-bottom-right-radius: 40px; }
.aihc-profile[data-layout="sunset"] .aihc-profile-avatar { width: 132px; height: 132px; border-width: 6px; box-shadow: 0 10px 30px color-mix(in srgb, var(--pa-accent) 30%, transparent); }
.aihc-profile[data-layout="sunset"] .aihc-profile-id h1 { font-weight: 800; letter-spacing: -.01em; }
.aihc-profile[data-layout="sunset"] .aihc-profile-stats span {
  background: var(--pa-surface); padding: 6px 14px; border-radius: 999px; box-shadow: 0 2px 10px color-mix(in srgb, var(--pa-accent) 14%, transparent);
}
.aihc-profile[data-layout="sunset"] .aihc-card { border: 0; box-shadow: 0 8px 24px color-mix(in srgb, var(--pa-accent) 12%, transparent); border-radius: 22px; }

/* ============ 5) BRUTALIST — 高对比 · 粗边 · 硬阴影 ============ */
.aihc-profile[data-layout="brutalist"] { --border: var(--pa-text); --border-strong: var(--pa-text); }
.aihc-profile[data-layout="brutalist"] .aihc-profile-cover { height: 150px; background-image: none; background-color: var(--pa-accent); border-bottom: 3px solid var(--pa-text); }
.aihc-profile[data-layout="brutalist"] .aihc-profile-avatar { border-radius: 0; border: 3px solid var(--pa-text); box-shadow: 7px 7px 0 var(--pa-text); }
.aihc-profile[data-layout="brutalist"] .aihc-profile-id h1 { font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; font-size: 34px; }
.aihc-profile[data-layout="brutalist"] .aihc-profile-stats b { font-family: ui-monospace, Consolas, monospace; }
.aihc-profile[data-layout="brutalist"] .aihc-card {
  border: 2px solid var(--pa-text); border-radius: 0; box-shadow: 5px 5px 0 var(--pa-text); background: var(--pa-surface);
}
.aihc-profile[data-layout="brutalist"] .aihc-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--pa-text); }

@media (prefers-reduced-motion: reduce) {
  .aihc-profile[data-layout="terminal"] .aihc-profile-id h1::after { animation: none; }
}
