/* ==========================================================================
   python222 Python知识分享网 - 全站主样式表
   风格：科技教育（深空蓝 + 电光青 + Python 黄）
   技术：HTML5 + CSS3，响应式，兼容移动端
   ========================================================================== */

/* -------------------- 1. 设计变量 -------------------- */
:root {
    /* 主色板 */
    --c-ink: #0a1024;          /* 深空底色 */
    --c-ink-2: #121a35;        /* 深空次级色 */
    --c-brand: #2f6bff;        /* 品牌蓝 */
    --c-brand-d: #1d4fd8;      /* 品牌蓝（深） */
    --c-cyan: #1fc8f0;         /* 电光青 */
    --c-teal: #14d3b6;         /* 科技绿松 */
    --c-yellow: #ffc83d;       /* Python 黄 */
    --c-red: #ff4d63;          /* 强调红 */
    --c-purple: #8b5cf6;       /* 辅助紫 */

    /* 文字 */
    --t-title: #0d1733;
    --t-body: #46536f;
    --t-mute: #7a89a8;
    --t-inv: #ffffff;
    --t-inv-mute: #a8bcdf;

    /* 背景与描边 */
    --bg-page: #f4f7fd;
    --bg-card: #ffffff;
    --bd: #e5ebf6;
    --bd-soft: #eef2fa;

    /* 渐变 */
    --g-brand: linear-gradient(135deg, #2f6bff 0%, #1fb6ff 55%, #16e0c8 100%);
    --g-warm: linear-gradient(135deg, #ffc83d 0%, #ff8a3c 100%);
    --g-text: linear-gradient(90deg, #2f6bff 0%, #12b5e5 55%, #14d3b6 100%);

    /* 阴影 */
    --sd-sm: 0 2px 8px rgba(16, 33, 74, .06);
    --sd-md: 0 10px 30px rgba(16, 33, 74, .08);
    --sd-lg: 0 20px 50px rgba(16, 33, 74, .12);
    --sd-brand: 0 10px 26px rgba(47, 107, 255, .32);

    /* 尺寸 */
    --w-max: 1300px;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --h-header: 72px;
}

/* -------------------- 2. 基础重置 -------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
        "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--t-body);
    background: var(--bg-page);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--t-title);
    line-height: 1.35;
    font-weight: 700;
}

p { margin: 0 0 1em; }

a {
    color: var(--c-brand);
    text-decoration: none;
    transition: color .25s ease;
}

a:hover { color: var(--c-cyan); }

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

code, .mono {
    font-family: Consolas, "SFMono-Regular", Monaco, "Courier New", monospace;
}

/* 通用容器：自适应浏览器宽度 */
.wrap {
    width: 100%;
    max-width: var(--w-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* 渐变文字 */
.grad-text {
    background: var(--g-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* -------------------- 3. 顶部通栏 -------------------- */
.topbar {
    background: var(--c-ink);
    color: var(--t-inv-mute);
    font-size: 13px;
    line-height: 38px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.topbar .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { color: var(--c-yellow); }

.topbar .slogan {
    color: var(--c-yellow);
    font-weight: 600;
    letter-spacing: 1px;
}

/* -------------------- 4. 头部与导航 -------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--bd);
    transition: box-shadow .3s ease;
}

.header.is-stuck { box-shadow: var(--sd-md); }

.header .wrap {
    height: var(--h-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo { display: block; flex: none; }
.logo img { height: 46px; width: auto; }

/* 主导航：单行排布，不换行 */
.nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
}

.nav > li { position: relative; }

.nav a {
    display: block;
    padding: 8px 11px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--t-title);
    border-radius: var(--r-sm);
    white-space: nowrap;
    transition: all .25s ease;
}

.nav a::after {
    content: "";
    display: block;
    height: 3px;
    width: 0;
    margin: 4px auto 0;
    border-radius: 3px;
    background: var(--g-brand);
    transition: width .28s ease;
}

.nav a:hover { color: var(--c-brand); background: #f0f5ff; }
.nav a:hover::after,
.nav a.active::after { width: 60%; }
.nav a.active { color: var(--c-brand); }

/* 高亮菜单项 */
.nav a.hot { color: var(--c-red); }
.nav a.hot:hover { color: var(--c-red); background: #fff1f3; }

/* 外链小箭头 */
.nav a.out::before {
    content: "↗";
    font-size: 12px;
    margin-right: 3px;
    opacity: .65;
}

/* 移动端汉堡按钮 */
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    background: #fff;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--t-title);
    border-radius: 2px;
    margin: 0 auto;
    transition: transform .3s ease, opacity .2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: relative;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 4px; }

.nav-toggle.on span { background: transparent; }
.nav-toggle.on span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.on span::after { transform: translateY(-6px) rotate(-45deg); }

/* -------------------- 5. 首页首屏（绚丽背景） -------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(1200px 600px at 12% -10%, #1b3b8f 0%, transparent 60%),
                radial-gradient(1000px 520px at 88% 0%, #0d7d8f 0%, transparent 58%),
                linear-gradient(160deg, #070c1e 0%, #0d1533 45%, #0a1024 100%);
    color: #fff;
    padding: 84px 0 96px;
}

/* 极光光斑 */
.hero-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-aurora i {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    animation: drift 18s ease-in-out infinite alternate;
}

.hero-aurora i:nth-child(1) {
    width: 420px; height: 420px; top: -90px; left: -60px;
    background: #2f6bff;
}
.hero-aurora i:nth-child(2) {
    width: 380px; height: 380px; top: 40px; right: -80px;
    background: #16e0c8; animation-duration: 22s; animation-delay: -4s;
}
.hero-aurora i:nth-child(3) {
    width: 320px; height: 320px; bottom: -120px; left: 38%;
    background: #8b5cf6; animation-duration: 26s; animation-delay: -9s;
}
.hero-aurora i:nth-child(4) {
    width: 240px; height: 240px; top: 46%; left: 18%;
    background: #ffc83d; opacity: .22; animation-duration: 20s; animation-delay: -6s;
}

@keyframes drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(40px, -30px, 0) scale(1.14); }
    100% { transform: translate3d(-30px, 36px, 0) scale(.94); }
}

/* 网格底纹 */
.hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 25%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 25%, transparent 78%);
}

/* 粒子画布 */
#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .7;
}

.hero .wrap { position: relative; z-index: 2; }

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 56px;
    align-items: center;
}

/* 栅格子项默认 min-width:auto 会被长代码撑宽，这里统一允许收缩 */
.hero-inner > *,
.teacher > *,
.profile-card > *,
.footer-main > *,
.cta > * {
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 13px;
    color: #d8e6ff;
    margin-bottom: 22px;
}

.hero-badge em {
    font-style: normal;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-teal);
    box-shadow: 0 0 0 4px rgba(20, 211, 182, .22);
}

.hero h1 {
    font-size: 46px;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero h1 .hl {
    background: linear-gradient(90deg, #7fd8ff 0%, #6ef0d2 50%, #ffd76a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 16.5px;
    line-height: 2;
    color: #c6d6f2;
    max-width: 620px;
    margin-bottom: 26px;
}

.hero-desc b { color: #fff; }

/* 关键词标签 */
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-tags li {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: #cfe2ff;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    transition: all .25s ease;
}

.hero-tags li:hover {
    color: #fff;
    border-color: rgba(127, 216, 255, .7);
    transform: translateY(-2px);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}

.btn-main {
    background: var(--g-brand);
    color: #fff;
    box-shadow: var(--sd-brand);
}

.btn-main:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(47, 107, 255, .42);
}

.btn-ghost {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
}

.btn-ghost:hover {
    color: #0a1024;
    background: #fff;
    transform: translateY(-3px);
}

.btn-warm {
    background: var(--g-warm);
    color: #5a3b00;
    box-shadow: 0 10px 26px rgba(255, 154, 60, .35);
}

.btn-warm:hover { color: #5a3b00; transform: translateY(-3px); }

.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* 首屏右侧代码卡片 */
.code-card {
    min-width: 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: rgba(9, 15, 35, .72);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: floatY 6s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

.code-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .05);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.code-bar i {
    width: 11px; height: 11px; border-radius: 50%; display: block;
}
.code-bar i:nth-child(1) { background: #ff5f57; }
.code-bar i:nth-child(2) { background: #febc2e; }
.code-bar i:nth-child(3) { background: #28c840; }
.code-bar span {
    margin-left: auto;
    font-size: 12px;
    color: #7f92b8;
}

.code-card pre {
    margin: 0;
    padding: 20px 22px;
    font-family: Consolas, "SFMono-Regular", Monaco, "Courier New", monospace;
    font-size: 13.5px;
    line-height: 1.95;
    color: #cbd8f5;
    overflow-x: auto;
}

.tk-kw { color: #ff7ab2; }
.tk-fn { color: #7fd8ff; }
.tk-str { color: #a5e887; }
.tk-num { color: #ffc83d; }
.tk-cm { color: #6b7fa8; font-style: italic; }

/* 数据条 */
.hero-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 58px;
}

.hero-stats li {
    text-align: center;
    padding: 20px 10px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform .28s ease, background .28s ease;
}

.hero-stats li:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, .12);
}

.hero-stats b {
    display: block;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 800;
    background: linear-gradient(90deg, #7fd8ff, #6ef0d2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-stats span {
    font-size: 13.5px;
    color: #b6c8e8;
}

/* -------------------- 6. 通用区块 -------------------- */
.section { padding: 76px 0; }
.section-alt { background: #fff; }

.sec-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 46px;
}

.sec-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--c-brand);
    background: #eaf1ff;
    margin-bottom: 14px;
}

.sec-head h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.sec-head p {
    color: var(--t-mute);
    font-size: 15.5px;
    margin: 0;
}

/* -------------------- 7. 特色卡片 -------------------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feature {
    position: relative;
    padding: 30px 26px;
    background: var(--bg-card);
    border: 1px solid var(--bd);
    border-radius: var(--r-lg);
    box-shadow: var(--sd-sm);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.feature::before {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 4px;
    background: var(--g-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}

.feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--sd-lg);
    border-color: #cfe0ff;
}

.feature:hover::before { transform: scaleX(1); }

.feature .ico {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
    background: #eaf1ff;
    color: var(--c-brand);
}

.feature .ico.c2 { background: #e6fbf6; color: #0fae95; }
.feature .ico.c3 { background: #fff4e0; color: #e08b12; }
.feature .ico.c4 { background: #f3ecff; color: #7c4ddb; }
.feature .ico.c5 { background: #ffeef1; color: #e23a55; }
.feature .ico.c6 { background: #e8f7ff; color: #1187c4; }

.feature h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature p {
    margin: 0;
    font-size: 14.5px;
    color: var(--t-mute);
    line-height: 1.85;
}

/* -------------------- 8. 讲师介绍 -------------------- */
.teacher {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 50px;
    align-items: center;
}

.teacher-photo {
    position: relative;
    border-radius: var(--r-xl);
    padding: 12px;
    background: var(--g-brand);
    box-shadow: var(--sd-lg);
}

.teacher-photo img {
    width: 100%;
    border-radius: 20px;
    display: block;
}

.teacher-photo .ribbon {
    position: absolute;
    right: -14px;
    bottom: 26px;
    padding: 9px 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--t-title);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: var(--sd-md);
    white-space: nowrap;
}

.teacher-info h2 {
    font-size: 30px;
    margin-bottom: 8px;
}

.teacher-info .sub {
    color: var(--c-brand);
    font-weight: 600;
    margin-bottom: 18px;
}

.teacher-info p {
    font-size: 15.5px;
    line-height: 2.05;
}

.teacher-info p b { color: var(--t-title); }

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 24px;
}

.chip {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-brand);
    background: #eef4ff;
    border: 1px solid #d9e6ff;
}

.chip.y { color: #b97800; background: #fff6e2; border-color: #ffe4b0; }
.chip.g { color: #0f9c85; background: #e8fbf6; border-color: #b8efe4; }
.chip.p { color: #7c4ddb; background: #f4eeff; border-color: #ddcfff; }

.site-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    padding-top: 18px;
    border-top: 1px dashed var(--bd);
    font-size: 14.5px;
}

.site-links span { color: var(--t-mute); }
.site-links a { font-weight: 600; }

/* -------------------- 9. 学习路线卡片 -------------------- */
.road-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.road {
    position: relative;
    padding: 28px 24px;
    border-radius: var(--r-lg);
    background: #fff;
    border: 1px solid var(--bd);
    box-shadow: var(--sd-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}

.road:hover { transform: translateY(-6px); box-shadow: var(--sd-lg); }

.road .step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    background: var(--g-brand);
    margin-bottom: 16px;
    box-shadow: var(--sd-brand);
}

.road:nth-child(2) .step { background: linear-gradient(135deg, #14d3b6, #10b1d8); box-shadow: 0 10px 24px rgba(20, 211, 182, .3); }
.road:nth-child(3) .step { background: var(--g-warm); color: #5a3b00; box-shadow: 0 10px 24px rgba(255, 154, 60, .3); }
.road:nth-child(4) .step { background: linear-gradient(135deg, #8b5cf6, #d946ef); box-shadow: 0 10px 24px rgba(139, 92, 246, .3); }

.road h3 { font-size: 18px; margin-bottom: 10px; }

.road ul li {
    position: relative;
    padding-left: 18px;
    font-size: 14.5px;
    color: var(--t-mute);
    line-height: 2;
}

.road ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-cyan);
}

/* -------------------- 10. 行动号召 -------------------- */
.cta {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
    padding: 52px 46px;
    color: #fff;
    background: radial-gradient(700px 320px at 10% 0%, #2f6bff 0%, transparent 62%),
                radial-gradient(600px 300px at 92% 100%, #14d3b6 0%, transparent 60%),
                linear-gradient(135deg, #101a3c, #0a1024);
    box-shadow: var(--sd-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.cta h2 { color: #fff; font-size: 27px; margin-bottom: 10px; }
.cta p { color: #bdcfef; margin: 0; font-size: 15px; }
.cta .cta-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* -------------------- 11. 内页头部 -------------------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 48px;
    color: #fff;
    background: radial-gradient(900px 420px at 8% -20%, #1b3b8f 0%, transparent 60%),
                radial-gradient(700px 380px at 92% 0%, #0d7d8f 0%, transparent 58%),
                linear-gradient(140deg, #070c1e, #0d1533);
}

.page-hero .hero-grid { opacity: .9; }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: 34px; margin-bottom: 12px; }
.page-hero p { color: #b9cbec; margin: 0; }

/* 面包屑 */
.crumb {
    font-size: 13.5px;
    color: #94a9cd;
    margin-bottom: 16px;
}

.crumb a { color: #cfe0ff; }
.crumb a:hover { color: var(--c-yellow); }
.crumb i { font-style: normal; margin: 0 8px; opacity: .6; }

/* -------------------- 12. 文章正文 -------------------- */
.article-wrap { padding: 46px 0 70px; }

.article {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--bd);
    border-radius: var(--r-lg);
    box-shadow: var(--sd-sm);
    padding: 44px 46px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13.5px;
    color: var(--t-mute);
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--bd-soft);
}

.article h2 {
    position: relative;
    font-size: 21px;
    margin: 34px 0 16px;
    padding-left: 14px;
}

.article h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 5px;
    border-radius: 3px;
    background: var(--g-brand);
}

.article h3 { font-size: 17px; margin: 24px 0 12px; }

.article p {
    font-size: 15.5px;
    line-height: 2.1;
    color: #435071;
}

.article p b { color: var(--t-title); }

.article-figure {
    margin: 26px 0;
    text-align: center;
}

.article-figure img {
    display: inline-block;
    max-width: 100%;
    border-radius: var(--r-md);
    box-shadow: var(--sd-md);
}

.article-figure figcaption {
    margin-top: 12px;
    font-size: 13.5px;
    color: var(--t-mute);
}

/* 讲师名片（内页） */
.profile-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    margin-bottom: 30px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, #f4f8ff 0%, #eefbf8 100%);
    border: 1px solid #e2ecff;
}

.profile-card .pic {
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sd-md);
}

.profile-card h2 { margin: 0 0 6px; padding: 0; font-size: 26px; }
.profile-card h2::before { display: none; }
.profile-card .role { color: var(--c-brand); font-weight: 600; margin-bottom: 14px; }

/* 信息表格：自适应宽度 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14.5px;
    table-layout: fixed;
}

.info-table th,
.info-table td {
    padding: 12px 14px;
    border: 1px solid var(--bd);
    text-align: left;
    word-break: break-all;
}

.info-table th {
    width: 32%;
    background: #f6f9ff;
    color: var(--t-title);
    font-weight: 600;
}

/* 演示占位内容 */
.demo-box {
    margin: 10px 0 0;
    padding: 34px;
    border-radius: var(--r-md);
    border: 1px dashed #c8d8f5;
    background: #f7faff;
    text-align: center;
}

.demo-box .big {
    font-size: 54px;
    font-weight: 800;
    letter-spacing: 6px;
    line-height: 1.2;
    background: var(--g-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.demo-box p { margin: 8px 0 0; color: var(--t-mute); font-size: 14px; }

/* 二维码组 */
.qr-group {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin: 22px 0 6px;
}

.qr-group .qr {
    width: 178px;
    text-align: center;
    padding: 14px;
    border-radius: var(--r-md);
    background: #fff;
    border: 1px solid var(--bd);
    box-shadow: var(--sd-sm);
}

.qr-group .qr img { width: 100%; border-radius: 8px; }
.qr-group .qr span {
    display: block;
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--t-body);
}

/* -------------------- 13. 页脚 -------------------- */
.footer {
    background: var(--c-ink);
    color: var(--t-inv-mute);
    padding: 52px 0 0;
    font-size: 14px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 50px;
    padding-bottom: 34px;
}

.footer-intro {
    line-height: 2;
    color: #9db1d4;
    max-width: 790px;
    margin-bottom: 20px;
}

.footer-bottom-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin-bottom: 14px;
}

.footer a { color: #c3d4f0; }
.footer a:hover { color: var(--c-yellow); }

.footer .link .title { color: #fff; font-weight: 600; }
.footer .link .split { margin: 0 10px; opacity: .35; }

.footer-qr {
    display: flex;
    gap: 22px;
}

.footer-qr .item { text-align: center; }

.footer-qr .item img {
    width: 118px;
    height: 118px;
    object-fit: cover;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
}

.footer-qr .item span {
    display: block;
    margin-top: 10px;
    font-size: 12.5px;
    color: #95a9cc;
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 18px 0 22px;
    text-align: center;
    font-size: 13px;
    color: #8296b9;
}

/* -------------------- 14. 返回顶部 -------------------- */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 28px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    background: var(--g-brand);
    box-shadow: var(--sd-brand);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: all .3s ease;
    z-index: 90;
}

.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }

/* -------------------- 15. 入场动画 -------------------- */
/* 仅在脚本可用时（html.js）才隐藏元素，避免脚本异常导致内容不可见 */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.js .reveal.in { opacity: 1; transform: translateY(0); }

/* -------------------- 16. 响应式适配 -------------------- */
@media (max-width: 1280px) {
    .nav a { padding: 8px 8px; font-size: 13.5px; }
    .logo img { height: 42px; }
}

@media (max-width: 1080px) {
    .hero h1 { font-size: 40px; }
    .hero-inner { grid-template-columns: 1fr; gap: 42px; }
    .teacher { grid-template-columns: 280px 1fr; gap: 34px; }
    .nav a { padding: 8px 6px; font-size: 13px; }
    .logo img { height: 38px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }

    .nav {
        flex-wrap: wrap;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        display: block;
        background: #fff;
        border-top: 1px solid var(--bd);
        box-shadow: var(--sd-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }

    .nav.open { max-height: 520px; overflow-y: auto; }

    .nav > li { border-bottom: 1px solid var(--bd-soft); }
    .nav > li:last-child { border-bottom: none; }

    .nav a {
        padding: 14px 20px;
        border-radius: 0;
        font-size: 15px;
    }

    .nav a::after { display: none; }

    .footer-main { grid-template-columns: 1fr; gap: 30px; }
    .profile-card { grid-template-columns: 1fr; gap: 24px; }
    .profile-card .pic { max-width: 260px; margin: 0 auto; }
}

@media (max-width: 768px) {
    body { font-size: 14.5px; }

    .topbar { font-size: 12px; line-height: 34px; }
    .topbar .slogan { display: none; }

    .hero { padding: 54px 0 62px; }
    .hero h1 { font-size: 29px; }
    .hero-desc { font-size: 15px; line-height: 1.95; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 36px; }
    .hero-stats b { font-size: 26px; }

    .section { padding: 52px 0; }
    .sec-head { margin-bottom: 32px; }
    .sec-head h2 { font-size: 24px; }
    .feature-grid { grid-template-columns: 1fr; }

    .teacher { grid-template-columns: 1fr; gap: 26px; }
    .teacher-photo { max-width: 330px; margin: 0 auto; }
    .teacher-photo .ribbon { right: 50%; transform: translateX(50%); bottom: -14px; }
    .teacher-info { text-align: left; }
    .teacher-info h2 { font-size: 24px; }

    .cta { padding: 34px 24px; text-align: center; justify-content: center; }
    .cta .cta-btns { justify-content: center; width: 100%; }
    .cta h2 { font-size: 22px; }

    .page-hero { padding: 40px 0 36px; }
    .page-hero h1 { font-size: 25px; }

    .article { padding: 26px 20px; }
    .article p { font-size: 15px; line-height: 1.95; }
    .article h2 { font-size: 19px; }

    .info-table { display: block; overflow-x: auto; }

    .footer-qr { justify-content: flex-start; }
    .footer-qr .item img { width: 100px; height: 100px; }

    .to-top { right: 14px; bottom: 16px; width: 42px; height: 42px; }
}

@media (max-width: 420px) {
    .logo img { height: 38px; }
    .hero h1 { font-size: 25px; }
    .btn { height: 42px; padding: 0 20px; font-size: 14px; }
    .hero-btns .btn { flex: 1 1 100%; }
    .qr-group .qr { width: 100%; }
}

/* 尊重系统的减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html { scroll-behavior: auto; }
}
