/* ==========================================================
   海启晨光 · 成长笔记 —— 前台样式（科技风）
   设计基调：深空黑底 + 霓虹青/电光蓝点缀 + 等宽字体标签，
   网格纹理 + 辉光效果，控制台 / Terminal 风格
   ========================================================== */

:root {
    --paper: #070b14;
    --paper-2: #0c1322;
    --paper-3: #131c30;
    --ink: #e8eef8;
    --ink-2: #b7c3d8;
    --ink-3: #8292ac;
    --muted: #5d6d88;
    --line: #1d2a44;
    --line-soft: #16223a;
    --accent: #22d3ee;
    --accent-2: #38bdf8;
    --accent-soft: rgba(34, 211, 238, .09);
    --rust: #a78bfa;
    --gold: #fbbf24;
    --radius: 10px;
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, .65), 0 0 0 1px rgba(34, 211, 238, .06);
    --font-serif: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: .01em;
    -webkit-font-smoothing: antialiased;
}

/* 网格纹理 + 顶部光晕 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: .8;
}

body::after {
    content: "";
    position: fixed;
    left: 0; right: 0; top: 0;
    height: 420px;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(640px 320px at 50% -80px, rgba(34, 211, 238, .13), transparent 70%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 1;
}

/* ---------------- 顶栏 ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 11, 20, .82);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 74px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* 新版 LOGO（透明底、适配深色顶栏） */
.brand-logo { display: block; height: 44px; width: auto; max-width: 190px; object-fit: contain; }

.brand-mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, .14), rgba(59, 130, 246, .14));
    box-shadow: 0 0 18px rgba(34, 211, 238, .28);
    overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-serif); font-size: 16px; font-weight: 700; letter-spacing: .08em; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .06em; }

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav > a, .nav-drop > a {
    position: relative;
    padding: 8px 14px;
    font-size: 14.5px;
    color: var(--ink-2);
    letter-spacing: .08em;
    transition: color .18s ease;
}

.site-nav > a::after, .nav-drop > a::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 3px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s ease;
}

.site-nav > a:hover, .nav-drop > a:hover { color: var(--ink); }
.site-nav > a:hover::after, .nav-drop > a:hover::after,
.site-nav > a.active::after, .nav-drop > a.active::after { transform: scaleX(1); }
.site-nav > a.active, .nav-drop > a.active { color: var(--accent); }

.nav-admin {
    margin-left: 10px;
    border: 1px solid var(--line) !important;
    border-radius: 999px;
    padding: 6px 16px !important;
    font-size: 13px !important;
    color: var(--ink-3) !important;
}
.nav-admin::after { display: none; }
.nav-admin:hover { background: var(--accent); color: #06121f !important; border-color: var(--accent) !important; box-shadow: 0 0 16px rgba(34, 211, 238, .4); }

.nav-drop { position: relative; }
.caret { font-size: 9px; opacity: .55; }

.drop-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 6px;
    min-width: 232px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .2s ease;
}

.nav-drop:hover .drop-panel, .nav-drop:focus-within .drop-panel { opacity: 1; visibility: visible; transform: translateY(0); }

.drop-panel a {
    display: flex; flex-direction: column;
    padding: 9px 12px;
    border-radius: 2px;
    transition: background .15s ease;
}
.drop-panel a span { font-size: 14.5px; }
.drop-panel a em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.drop-panel a:hover { background: var(--accent-soft); }

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px; height: 38px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
}

/* ---------------- 通用块 ---------------- */
main { position: relative; z-index: 1; }

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-tight { padding: 48px 0; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}

.section-head .label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .22em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.35;
}

.section-head p { margin: 8px 0 0; color: var(--ink-3); font-size: 14.5px; }

.more-link {
    flex-shrink: 0;
    font-size: 13.5px;
    color: var(--accent);
    letter-spacing: .06em;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color .2s ease;
}
.more-link:hover { border-color: var(--accent); }

.muted { color: var(--muted); }

/* ---------------- 首页 Hero ---------------- */
.hero { padding: 78px 0 64px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.55fr .85fr;
    gap: 64px;
    align-items: start;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .2em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 22px;
}
.kicker::before { content: ""; width: 30px; height: 1px; background: var(--accent); }

.hero h1 {
    margin: 0 0 6px;
    font-family: var(--font-serif);
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: .02em;
}

.hero .slogan {
    margin: 18px 0 0;
    font-family: var(--font-serif);
    font-size: clamp(17px, 2vw, 21px);
    color: var(--rust);
    letter-spacing: .06em;
}

.hero .lead {
    margin: 22px 0 0;
    max-width: 46em;
    color: var(--ink-2);
    font-size: 15.5px;
    line-height: 1.95;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    color: #06121f;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 0 16px rgba(34, 211, 238, .28);
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 0 26px rgba(34, 211, 238, .45); }

.btn-ghost { background: transparent; color: var(--accent); border-color: rgba(34, 211, 238, .35); box-shadow: none; }
.btn-ghost:hover { background: var(--accent-soft); filter: none; border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 0 18px rgba(34, 211, 238, .22); }

.hero-card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}

.avatar-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--line);
}

.avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid; place-items: center;
    font-family: var(--font-serif);
    font-size: 26px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--line);
}

.avatar-lg { width: 108px; height: 108px; font-size: 42px; }

.hero-card .who strong { display: block; font-family: var(--font-serif); font-size: 19px; letter-spacing: .06em; }
.hero-card .who span { font-size: 12.5px; color: var(--muted); letter-spacing: .08em; }

.meta-list { margin: 18px 0 0; display: grid; gap: 12px; }
.meta-row { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.meta-row dt { color: var(--muted); letter-spacing: .06em; flex-shrink: 0; }
.meta-row dd { margin: 0; text-align: right; color: var(--ink-2); }

.hero-stat {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
    text-align: center;
}
.hero-stat div strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--accent);
    line-height: 1.3;
}
.hero-stat div span { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; }

/* ---------------- 学习栏目卡片 ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 26px 24px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cat-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--cat-accent, var(--accent));
    opacity: .8;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 30px -8px rgba(34, 211, 238, .3);
    border-color: rgba(34, 211, 238, .45);
}

.cat-icon {
    font-family: var(--font-serif);
    font-size: 30px;
    line-height: 1;
    color: var(--cat-accent, var(--accent));
    margin-bottom: 18px;
    letter-spacing: 0;
}
.cat-card h3 { margin: 0; font-family: var(--font-serif); font-size: 21px; letter-spacing: .08em; }
.cat-card .en { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.cat-card .tagline { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.8; min-height: 3.6em; }

.cat-latest {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    font-size: 13.5px;
    color: var(--ink-2);
}
.cat-latest span { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--muted); margin-bottom: 6px; }
.cat-latest a:hover { color: var(--accent); }

.cat-foot { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.cat-foot .arrow { color: var(--cat-accent, var(--accent)); }

/* ---------------- 文章列表 ---------------- */
.post-list { border-top: 1px solid var(--line); }

.post-row {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 24px;
    align-items: baseline;
    padding: 24px 4px;
    border-bottom: 1px solid var(--line-soft);
    transition: background .2s ease, padding-left .2s ease;
}
.post-row:hover { background: rgba(34, 211, 238, .045); padding-left: 12px; }

.post-date { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.post-main h3 { margin: 0; font-family: var(--font-serif); font-size: 18.5px; font-weight: 700; line-height: 1.5; letter-spacing: .02em; }
.post-row:hover h3 { color: var(--accent); }
.post-main p { margin: 7px 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.75; }
.post-cat {
    font-size: 11.5px;
    letter-spacing: .1em;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 12px;
    white-space: nowrap;
}

/* ---------------- 作品卡片 ---------------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.work-card {
    display: flex;
    flex-direction: column;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.work-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow), 0 0 30px -8px rgba(34, 211, 238, .3);
    border-color: rgba(34, 211, 238, .45);
}

.work-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--paper-3), var(--accent-soft));
    display: grid;
    place-items: center;
    color: var(--accent);
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: .3em;
    position: relative;
    overflow: hidden;
}
.work-cover img { width: 100%; height: 100%; object-fit: cover; }

.work-body { padding: 22px 24px 24px; }
.work-body .kicker-sm { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; color: var(--rust); text-transform: uppercase; }
.work-body h3 { margin: 8px 0 0; font-family: var(--font-serif); font-size: 19px; line-height: 1.45; }
.work-body p { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.8; }
.work-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    font-size: 11.5px;
    letter-spacing: .06em;
    color: var(--ink-3);
    background: var(--paper-3);
    border-radius: 999px;
    padding: 3px 11px;
}

/* ---------------- 时间轴 ---------------- */
.timeline { position: relative; margin: 0; padding: 0 0 0 26px; list-style: none; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 30px 22px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -31px; top: 8px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--accent);
}
.timeline .period { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em; color: var(--accent); }
.timeline h4 { margin: 4px 0 0; font-family: var(--font-serif); font-size: 16.5px; letter-spacing: .03em; }
.timeline p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.8; }

/* ---------------- 内页 ---------------- */
.page-head { padding: 60px 0 40px; border-bottom: 1px solid var(--line); }
.page-head .label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .22em; color: var(--accent); text-transform: uppercase; }
.page-head h1 { margin: 14px 0 0; font-family: var(--font-serif); font-size: clamp(28px, 4vw, 42px); letter-spacing: .04em; line-height: 1.3; }
.page-head p { margin: 14px 0 0; color: var(--ink-3); max-width: 52em; font-size: 15px; line-height: 1.9; }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.sticky-side { position: sticky; top: 100px; }

.prose { font-size: 16px; line-height: 2; color: var(--ink-2); }
.prose h3 { margin: 40px 0 14px; font-family: var(--font-serif); font-size: 21px; color: var(--ink); letter-spacing: .04em; }
.prose h4 { margin: 30px 0 12px; font-family: var(--font-serif); font-size: 17.5px; color: var(--ink); }
.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
    margin: 26px 0;
    padding: 16px 22px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    color: var(--accent-2);
    font-family: var(--font-serif);
    font-size: 16.5px;
    line-height: 1.9;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--paper-3); padding: 2px 6px; border-radius: 2px; }
.prose strong { color: var(--ink); }

.side-card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}
.side-card h3 { margin: 0 0 14px; font-family: var(--font-serif); font-size: 15px; letter-spacing: .1em; color: var(--ink-3); }
.side-card .link-list a { display: block; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13.5px; color: var(--ink-2); }
.side-card .link-list a:last-child { border-bottom: 0; }
.side-card .link-list a:hover { color: var(--accent); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a { font-size: 12.5px; color: var(--ink-3); background: var(--paper-3); border-radius: 999px; padding: 4px 12px; transition: all .18s ease; }
.tag-list a:hover, .tag-list a.active { background: var(--accent); color: #06121f; font-weight: 600; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 26px; }

.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input {
    font-family: inherit;
    font-size: 13.5px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--ink);
    outline: none;
    min-width: 200px;
}
.search-form input:focus { border-color: var(--accent); }
.search-form button {
    border: 1px solid var(--line);
    background: var(--paper-2);
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 13px;
    cursor: pointer;
    color: var(--ink-2);
}
.search-form button:hover { border-color: var(--accent); color: var(--accent); }

.empty {
    padding: 64px 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(34, 211, 238, .25);
    border-radius: var(--radius);
    background: rgba(12, 19, 34, .7);
}
.empty strong { display: block; font-family: var(--font-serif); font-size: 17px; color: var(--ink-3); margin-bottom: 6px; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pager a, .pager span {
    min-width: 38px; height: 38px;
    display: grid; place-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--paper-2);
}
.pager span.current { background: linear-gradient(135deg, #22d3ee, #3b82f6); color: #06121f; border-color: transparent; font-weight: 600; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }

/* 文章详情 */
.article-head { padding: 56px 0 32px; }
.article-head .cat-tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 12px; }
.article-head h1 { margin: 20px 0 0; font-family: var(--font-serif); font-size: clamp(26px, 4vw, 40px); line-height: 1.4; letter-spacing: .02em; }
.article-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 18px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .06em; }
.article-body { padding: 12px 0 40px; max-width: 46em; }
.article-summary { margin: 26px 0 0; padding: 18px 22px; background: var(--paper-2); border-left: 2px solid var(--gold); font-size: 14.5px; color: var(--ink-2); line-height: 1.9; }

.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-nav a { font-size: 13.5px; color: var(--ink-2); }
.article-nav a span { display: block; font-size: 11px; letter-spacing: .14em; color: var(--muted); margin-bottom: 6px; }
.article-nav a:hover { color: var(--accent); }
.article-nav .next { text-align: right; }

/* 留言 */
.msg-form { display: grid; gap: 14px; }
.msg-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.msg-form label { font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em; }
.msg-form input, .msg-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-2);
    color: var(--ink);
    outline: none;
    resize: vertical;
}
.msg-form input:focus, .msg-form textarea:focus { border-color: var(--accent); }

.msg-list { display: grid; gap: 16px; }
.msg-item { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.msg-item .who { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.msg-item .who strong { font-family: var(--font-serif); font-size: 15px; }
.msg-item .who time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.msg-item p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.85; }
.msg-reply { margin-top: 14px; padding: 12px 16px; background: var(--accent-soft); border-radius: var(--radius); font-size: 13.5px; color: var(--accent-2); line-height: 1.8; }
.msg-reply b { font-weight: 600; }

.notice {
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 20px;
    background: var(--accent-soft);
    color: var(--accent-2);
    border: 1px solid rgba(34, 211, 238, .28);
}

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 48px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.footer-inner a { color: var(--ink-3); }
.footer-inner a:hover { color: var(--accent); }
.footer-brand { font-family: var(--font-serif); font-size: 14px; letter-spacing: .1em; color: var(--ink-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .cat-grid { grid-template-columns: 1fr; }
    .work-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; gap: 36px; }
    .sticky-side { position: static; }
    .section { padding: 56px 0; }
}

@media (max-width: 760px) {
    .container { padding: 0 18px; }
    .header-inner { height: 64px; }
    .brand-logo { height: 36px; max-width: 150px; }
    .nav-toggle { display: block; }
    .site-nav {
        position: absolute;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 18px 18px;
        background: var(--paper-2);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
    }
    .site-nav.open { display: flex; }
    .site-nav > a, .nav-drop > a { padding: 12px 6px; border-bottom: 1px solid var(--line-soft); }
    .site-nav > a::after, .nav-drop > a::after { display: none; }
    .nav-admin { margin: 12px 0 0; text-align: center; }
    .drop-panel {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; border-radius: 0;
        padding: 0 0 8px 12px;
    }
    .drop-panel a { padding: 10px 6px; }
    .hero { padding: 44px 0 32px; }
    .post-row { grid-template-columns: 1fr; gap: 8px; padding: 20px 2px; }
    .post-cat { justify-self: start; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .article-nav { grid-template-columns: 1fr; }
    .article-nav .next { text-align: left; }
    .msg-form .row { grid-template-columns: 1fr; }
    .hero-stat { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------- 文章表格 ---------------- */
.prose .table-wrap { overflow-x: auto; margin: 24px 0; }
.prose table.md-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose .md-table th, .prose .md-table td { border: 1px solid var(--line); padding: 9px 14px; text-align: left; }
.prose .md-table th { background: var(--paper-3); font-family: var(--font-serif); letter-spacing: .04em; white-space: nowrap; }
.prose .md-table tbody tr:nth-child(even) td { background: rgba(56, 189, 248, .04); }
.prose .md-table td { font-variant-numeric: tabular-nums; }

/* ---------------- 科技风细节 ---------------- */
::selection { background: rgba(34, 211, 238, .3); color: #e8eef8; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #070b14; }
::-webkit-scrollbar-thumb { background: #1d2a44; border-radius: 6px; border: 2px solid #070b14; }
::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, .45); }

input:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }

.section + .section { border-top: 1px solid var(--line-soft); }

@supports (backdrop-filter: blur(1px)) {
    .drop-panel, .side-card { backdrop-filter: blur(8px); }
}

/* ---------------- 学习工具卡片 ---------------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.tool-card .cat-icon { font-family: inherit; }

@media (max-width: 980px) {
    .tool-grid { grid-template-columns: 1fr; }
}

/* ---------------- 首页开场动画：海上黎明 ---------------- */
#site-intro {
    position: fixed; inset: 0; z-index: 9998;
    overflow: hidden;
    background: #050b1c;
    cursor: pointer;
    transition: opacity .8s ease;
}
#site-intro.intro-done { opacity: 0; pointer-events: none; }
body.intro-playing { overflow: hidden; }
body.intro-playing .site-header { visibility: hidden; }

.intro-sky { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 夜幕褪去，天空由深蓝渐变为黎明的暖金 */
.night-veil { animation: veil-lift 4.6s cubic-bezier(.4,0,.2,1) .2s both; }
@keyframes veil-lift { from { opacity: .92; } to { opacity: 0; } }

/* 星空闪烁后隐去 */
.intro-stars { animation: star-fade 3s ease 1.9s both; }
.intro-stars circle { animation: star-twinkle 2.8s ease-in-out var(--sd, 0s) infinite; }
@keyframes star-twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes star-fade { from { opacity: 1; } to { opacity: 0; } }

/* 云带缓慢漂移 */
.cloud { animation: cloud-drift 14s ease-in-out infinite alternate, cloud-fade 2s ease 1.5s both; }
.cloud.c2 { animation-duration: 18s, 2s; animation-delay: -5s, 1.9s; }
.cloud.c3 { animation-duration: 16s, 2s; animation-delay: -9s, 2.3s; }
@keyframes cloud-drift { from { transform: translateX(-12px); } to { transform: translateX(24px); } }
@keyframes cloud-fade { from { opacity: 0; } }

.intro-birds { opacity: 0; animation: fade-in 1.2s ease 3.4s forwards; }

/* 旭日缓慢升出海面，光线与光晕呼吸 */
.intro-sunrise { animation: sun-rise 4.3s cubic-bezier(.16,.82,.3,1) 1.3s both; }
@keyframes sun-rise { from { transform: translateY(190px); } to { transform: translateY(0); } }
.sun-halo { animation: halo-breathe 4.8s ease-in-out 2.2s infinite; }
@keyframes halo-breathe { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
.rays-spin { transform-origin: 0 0; animation: rays-breathe 5.5s ease-in-out 2.6s infinite; }
@keyframes rays-breathe { 0%, 100% { opacity: .3; transform: scale(.96); } 50% { opacity: .78; transform: scale(1.04); } }
.sun-body { animation: sun-flash 1.3s ease-out 4.5s both; }
@keyframes sun-flash {
    0% { filter: brightness(1); }
    26% { filter: brightness(1.45) drop-shadow(0 0 26px rgba(255,220,150,.9)); }
    100% { filter: brightness(1); }
}

/* 日轮跃出海面瞬间的暖光冲击 */
.intro-flare {
    position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
    mix-blend-mode: screen;
    background: radial-gradient(circle at 63.3% 51.4%, rgba(255,246,205,.85), rgba(255,180,95,.3) 32%, transparent 62%);
    animation: flare-burst 1.2s ease-out 4.35s both;
}
@keyframes flare-burst { 0% { opacity: 0; } 16% { opacity: .9; } 42% { opacity: .28; } 100% { opacity: 0; } }

/* 海面与粼粼倒影 */
.sea-base { opacity: 0; animation: fade-in 1.5s ease 1.7s forwards; }
.sun-reflection { opacity: 0; animation: fade-in 1.8s ease 3.2s forwards; }
.reflection-line { animation: shimmer 2.6s ease-in-out var(--rd, 0s) infinite alternate; }
@keyframes shimmer { from { opacity: .45; } to { opacity: 1; } }
@keyframes fade-in { to { opacity: 1; } }

/* 层叠海浪错位漂移 */
.wave, .wave-line {
    animation-name: wave-drift; animation-timing-function: ease-in-out;
    animation-iteration-count: infinite; animation-direction: alternate;
}
.wave.w1, .wave-line.l1 { --wx: -48px; animation-duration: 9s; }
.wave.w2 { --wx: 38px; animation-duration: 12s; animation-direction: alternate-reverse; }
.wave.w3, .wave-line.l3 { --wx: -30px; animation-duration: 14s; }
@keyframes wave-drift { from { transform: translateX(0); } to { transform: translateX(var(--wx, -40px)); } }

/* 少年自左向右迎着阳光冲浪 */
.surfer-ride { animation: surfer-ride 3.2s cubic-bezier(.2,.76,.3,1) 2.9s both; }
@keyframes surfer-ride {
    0% { opacity: 0; transform: translate(-490px, 46px); }
    10% { opacity: 1; }
    100% { opacity: 1; transform: translate(0, 0); }
}
.surfer-bob {
    transform-box: fill-box; transform-origin: center;
    animation: surfer-bob 1.5s ease-in-out 6.1s infinite alternate;
}
@keyframes surfer-bob { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-6px) rotate(1.5deg); } }
.surfer-spray { animation: spray-out 1.4s ease-out 5.4s both; }
@keyframes spray-out {
    0% { opacity: 0; transform: translate(20px, 10px) scale(.6); }
    40% { opacity: .9; }
    100% { opacity: .62; transform: none; }
}

/* 文字层（位于天空上方，不遮挡海面与少年） */
.intro-stage {
    position: absolute; z-index: 2; top: 12%; left: 0; right: 0;
    display: flex; flex-direction: column; align-items: center;
}
.intro-wordmark {
    width: 460px; max-width: 78vw;
    opacity: 0; transform: translateY(-18px) scale(.96);
    animation: wordmark-in 1s cubic-bezier(.2,.8,.25,1) 4.9s both;
    filter: drop-shadow(0 8px 26px rgba(255,180,90,.3));
}
@keyframes wordmark-in { to { opacity: 1; transform: none; } }
.intro-sub {
    margin-top: 16px; font-size: 14px; letter-spacing: .42em; text-indent: .42em;
    color: #ffe4b8; text-shadow: 0 2px 12px rgba(0,0,0,.4);
    opacity: 0; animation: sub-in .8s ease 5.2s both;
}
@keyframes sub-in { from { opacity: 0; transform: translateY(10px); } to { opacity: .92; transform: none; } }
.intro-line { width: 220px; height: 2px; margin-top: 26px; background: rgba(255,215,150,.18); border-radius: 2px; overflow: hidden; }
.intro-line i {
    display: block; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, #ffd08a, #fff3cf);
    transform-origin: left; animation: line-fill 1.3s cubic-bezier(.4,0,.2,1) 4.9s both;
}
@keyframes line-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.intro-skip {
    position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; z-index: 4;
    font-size: 12px; letter-spacing: .3em; text-indent: .3em; color: #d8c8b2;
    animation: sub-in .8s ease 5s both;
}
.intro-skip::after { content: ""; display: block; width: 34px; height: 1px; margin: 10px auto 0; background: rgba(226, 198, 150, .5); animation: skip-blink 1.6s ease-in-out infinite; }
@keyframes skip-blink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    #site-intro { display: none; }
}

/* 正文内嵌媒体：视频播放器与链接 */
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.prose a:hover { color: var(--accent); }
.prose img { max-width: 100%; height: auto; }
.prose .media-embed { margin: 22px 0; }
.prose .media-embed video { display: block; width: 100%; max-width: 720px; background: #000; border-radius: 8px; }
