/* ============================================================
   老雷AI 实验室 — 紫色商务主题
   匹配「老雷AI实验室-紫色商务主题.png」设计稿
   浅色商务风：浅灰白底 + 紫色主调 + 深紫 Footer
   ============================================================ */

/* --- CSS Variables（设计令牌）--- */
:root {
    --bg-primary:       #f7f7f8;     /* 页面背景（浅灰白） */
    --bg-secondary:     #f0edf7;     /* 次级背景（浅紫灰） */
    --bg-card:          #ffffff;     /* 卡片背景（白） */
    --bg-card-hover:    #faf8ff;     /* 卡片悬停 */
    --accent:           #6a2fce;     /* 主紫色 */
    --accent-hover:     #5524b0;     /* 紫色悬停 */
    --accent-soft:      rgba(106,47,206,.10);  /* 浅紫背景 */
    --accent-grad-a:    #8050f0;     /* 渐变亮紫 */
    --accent-grad-b:    #6030c0;     /* 渐变深紫 */
    --text-primary:     #1a1230;     /* 主文字（深紫黑） */
    --text-secondary:   #4a4468;     /* 次要文字 */
    --text-muted:       #8b86a3;     /* 弱化文字 */
    --border-color:     #e6e2f0;     /* 边框色（浅紫） */
    --footer-bg:        #101030;     /* Footer 深紫 */
    --radius:           12px;        /* 圆角 */
    --shadow:           0 6px 24px rgba(80,40,180,.08);
    --max-width:        1200px;      /* 内容最大宽度 */
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.container--narrow { max-width: 760px; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 24px; border-radius: 8px; font-weight: 600;
    font-size: .9rem; cursor: pointer; transition: all .25s ease;
    border: none; gap: 6px;
}
.btn--primary {
    background: linear-gradient(135deg, var(--accent-grad-a), var(--accent-grad-b));
    color: #fff;
    box-shadow: 0 4px 16px rgba(106,47,206,.25);
}
.btn--primary:hover { filter: brightness(1.08); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(106,47,206,.35); }
.btn--outline {
    background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.btn--outline:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn--sm { padding: 7px 16px; font-size: .82rem; }

/* ============================================================
   HERO 区域（浅紫渐变）
   ============================================================ */
.hero {
    position: relative; overflow: hidden;
    padding: 20px 0 72px;
    background: linear-gradient(175deg, #f3edff 0%, #ede4fb 40%, #f7f7f8 100%);
}
.hero::before {
    content: ''; position: absolute; top: -220px; right: -160px;
    width: 560px; height: 560px; border-radius: 50%;
    background: radial-gradient(circle, rgba(106,47,206,.10) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; bottom: -180px; left: -140px;
    width: 460px; height: 460px; border-radius: 50%;
    background: radial-gradient(circle, rgba(128,80,240,.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero__nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0; border-bottom: 1px solid rgba(106,47,206,.10);
    flex-wrap: wrap; gap: 12px;
}
.hero__logo {
    font-weight: 800; font-size: 1.15rem; color: var(--text-primary); letter-spacing: -.02em;
}
.hero__nav-links {
    display: flex; list-style: none; gap: 28px;
}
.hero__nav-links a {
    color: var(--text-muted); font-size: .88rem; font-weight: 500;
    transition: color .2s;
}
.hero__nav-links a:hover { color: var(--accent); }

.hero__content {
    padding-top: 56px; text-align: center; max-width: 720px; margin: 0 auto;
    position: relative; z-index: 1;
}
.hero__badge {
    display: inline-block; padding: 5px 16px; border-radius: 50px;
    background: rgba(106,47,206,.08); color: var(--accent);
    font-size: .85rem; font-weight: 600; letter-spacing: .02em;
    border: 1px solid rgba(106,47,206,.18);
    margin-bottom: 24px;
}
.hero__title {
    font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
    color: var(--text-primary); line-height: 1.2; letter-spacing: -.03em;
    margin-bottom: 18px;
}
.hero__subtitle {
    font-size: 1.06rem; color: var(--text-muted); line-height: 1.75;
    margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.hero__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.hero__stats {
    display: flex; justify-content: center; gap: 40px; margin-top: 52px;
    padding-top: 36px; border-top: 1px solid rgba(106,47,206,.10);
}
.stat { text-align: center; }
.stat strong {
    display: block; font-size: 1.65rem; font-weight: 800; color: var(--text-primary);
    letter-spacing: -.03em;
}
.stat span { font-size: .78rem; color: var(--text-muted); margin-top: 2px; display: block; }

/* ============================================================
   SECTION 通用样式
   ============================================================ */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-secondary); }

.section__header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 32px; flex-wrap: wrap; gap: 8px;
}
.section__title {
    font-size: 1.45rem; font-weight: 700; color: var(--text-primary);
    padding-left: 14px; border-left: 3px solid var(--accent);
    letter-spacing: -.01em;
}
.section__more {
    font-size: .84rem; color: var(--text-muted); font-weight: 500;
    white-space: nowrap;
}
.section__more:hover { color: var(--accent); }
.section__empty {
    grid-column: 1 / -1; text-align: center; color: var(--text-muted);
    padding: 40px 0; font-style: italic;
}

/* ============================================================
   CARD GRID（文章卡片 · 白色商务卡片）
   ============================================================ */
.card-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

.card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border-color);
    transition: transform .25s, box-shadow .25s, border-color .25s;
    display: flex; flex-direction: column;
    box-shadow: 0 2px 12px rgba(80,40,180,.05);
}
.card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow);
    border-color: rgba(106,47,206,.35);
}

.card__image-wrapper {
    aspect-ratio: 16 / 9; overflow: hidden; display: block;
    background: var(--bg-secondary);
}
.card__image-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s;
}
.card:hover .card__image-wrapper img { transform: scale(1.04); }

.card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.card__tag {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    background: rgba(106,47,206,.08); color: var(--accent);
    font-size: .74rem; font-weight: 600; margin-bottom: 10px; align-self: flex-start;
}

.card__title {
    font-size: 1rem; font-weight: 700; line-height: 1.4;
    margin-bottom: 8px; flex-shrink: 0;
}
.card__title a { color: var(--text-primary); }
.card__title a:hover { color: var(--accent); }

.card__excerpt {
    font-size: .86rem; color: var(--text-muted); line-height: 1.65;
    flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   专家团队
   ============================================================ */
.expert-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}

.expert-card {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border-color); padding: 28px 20px;
    text-align: center; transition: transform .25s, box-shadow .25s;
    box-shadow: 0 2px 12px rgba(80,40,180,.05);
}
.expert-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.expert-card__avatar {
    width: 76px; height: 76px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-grad-a), var(--accent-grad-b));
    margin: 0 auto 16px; opacity: .85;
}
.expert-card__name {
    font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px;
}
.expert-card__role {
    font-size: .8rem; color: var(--accent); font-weight: 600; margin-bottom: 10px;
}
.expert-card__bio {
    font-size: .82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px;
}
.expert-card__link {
    font-size: .8rem; font-weight: 600; color: var(--accent);
}
.expert-card__link:hover { text-decoration: underline; }

/* ============================================================
   文章详情页
   ============================================================ */
.post__header { padding: 48px 0 24px; text-align: center; }
.post__tag {
    display: inline-block; padding: 4px 12px; border-radius: 6px;
    background: rgba(106,47,206,.08); color: var(--accent);
    font-size: .78rem; font-weight: 600; margin-bottom: 14px;
}
.post__title {
    font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800;
    color: var(--text-primary); line-height: 1.25; letter-spacing: -.02em;
    margin-bottom: 14px;
}
.post__meta {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; font-size: .84rem; color: var(--text-muted); flex-wrap: wrap;
}
.post__featured-image { margin: 0 auto 40px; max-width: 900px; }
.post__featured-image img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow); }

.post__content {
    font-size: 1.05rem; line-height: 1.85; color: var(--text-secondary);
}
.post__content h2, .post__content h3 { color: var(--text-primary); margin: 32px 0 12px; }
.post__content p { margin-bottom: 18px; }
.post__content code {
    background: var(--bg-secondary); padding: 2px 7px; border-radius: 4px;
    font-size: .9em; color: var(--accent);
}
.post__content pre {
    background: #1a1430; border: 1px solid var(--border-color);
    border-radius: 8px; padding: 20px; overflow-x: auto; margin: 24px 0;
}
.post__content pre code { background: none; padding: 0; color: #d6d0f0; }
.post__content img { border-radius: 8px; margin: 24px 0; box-shadow: var(--shadow); }
.post__content blockquote {
    border-left: 3px solid var(--accent); padding-left: 20px;
    margin: 24px 0; color: var(--text-muted); font-style: italic;
    background: var(--accent-soft); border-radius: 0 8px 8px 0;
}

.post__tags { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border-color); }
.post__tags h4 { color: var(--text-primary); margin-bottom: 12px; font-size: .95rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    padding: 5px 14px; border-radius: 50px; background: var(--bg-card);
    border: 1px solid var(--border-color); font-size: .82rem; color: var(--text-secondary);
    transition: all .2s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }

.post__nav {
    display: flex; justify-content: space-between; gap: 20px;
    margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border-color);
}
.post__nav-link {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 20px; background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border-color); transition: all .2s; max-width: 45%;
    box-shadow: 0 2px 10px rgba(80,40,180,.04);
}
.post__nav-link span { font-size: .78rem; color: var(--text-muted); }
.post__nav-link strong { color: var(--text-primary); font-size: .92rem; }
.post__nav-link:hover { border-color: var(--accent); }

/* ============================================================
   全局 Header（白色毛玻璃导航）
   ============================================================ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.88); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 58px; flex-wrap: wrap; gap: 12px;
}
.site-header__logo {
    font-weight: 800; font-size: 1.1rem; color: var(--text-primary);
}
.site-header__nav { display: flex; gap: 24px; list-style: none; }
.site-header__nav a {
    color: var(--text-muted); font-size: .88rem; font-weight: 500;
    transition: color .2s;
}
.site-header__nav a:hover { color: var(--accent); }

/* ============================================================
   Footer（深紫商务风）
   ============================================================ */
.site-footer {
    background: var(--footer-bg); border-top: 1px solid rgba(255,255,255,.06);
    padding: 48px 0 28px; margin-top: 40px;
}
.site-footer__grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.site-footer__brand h3 { color: #fff; font-size: 1.1rem; margin-bottom: 10px; }
.site-footer__brand p { font-size: .86rem; color: #b8b2d8; line-height: 1.6; margin-bottom: 16px; }
.site-footer__copyright { font-size: .78rem !important; color: #8b86a3 !important; opacity: .8; }
.site-footer__icp { margin-top: 4px; font-size: .78rem; }
.site-footer__icp a { color: #8b86a3; transition: color .2s; }
.site-footer__icp a:hover { color: #c9b8ff; }
.site-footer__links h4 { color: #fff; font-size: .9rem; margin-bottom: 14px; }
.site-footer__links ul { list-style: none; }
.site-footer__links li { margin-bottom: 8px; }
.site-footer__links a { color: #b8b2d8; font-size: .84rem; }
.site-footer__links a:hover { color: #c9b8ff; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .expert-grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .hero__stats { gap: 24px; }
    .hero__nav-links { display: none; }
}
@media (max-width: 640px) {
    .card-grid { grid-template-columns: 1fr; }
    .expert-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
    .hero__title { font-size: 1.75rem; }
    .hero__stats { flex-direction: column; gap: 16px; }
    .post__nav { flex-direction: column; }
    .post__nav-link { max-width: 100%; }
    .site-header__nav { display: none; }
    .section { padding: 44px 0; }
}

/* --- Ghost Koenig Editor Card Styles (required by gscan) --- */
.kg-width-wide {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
