/* ===========================================================
   个人站点样式
   视觉参考 alphafuture.cn 的编辑式风格：
   米白纸底、宋体标题、细线分隔、字号克制的小标签，少圆角、无阴影。
   纯 HTML + CSS，无框架、无构建、无依赖。
   =========================================================== */

:root {
    --paper: #f5f3ee;        /* 纸底 */
    --ink: #23211e;          /* 标题墨色 */
    --body: #4a4741;         /* 正文 */
    --muted: #8c8579;        /* 次要信息 */
    --line: #e3ded5;         /* 细线 / 描边 */
    --line-strong: #cdc6ba;  /* 强调描边 */
    --navy: #1b3d6e;         /* 主题色：深蓝 */
    --measure: 920px;        /* 正文栏宽 */

    --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun",
             Georgia, "Times New Roman", serif;
    --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC",
            -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--paper);
    color: var(--body);
    font-family: var(--sans);
    font-size: 16.5px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }

a {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(27, 61, 110, 0.35);
}
a:hover { text-decoration-color: var(--navy); }
a:focus-visible { outline: 1px solid var(--navy); outline-offset: 3px; }
::selection { background: rgba(27, 61, 110, 0.14); }

/* ---------- 布局 ---------- */
.container {
    max-width: var(--measure);
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}

/* ---------- 页头 ---------- */
#dhead { margin-top: 52px; }
#dhead .row { align-items: center; }
#dpic { grid-column: span 2; }
#dpic img {
    display: block;
    width: 104px;
    height: 104px;
    border-radius: 50%;
}
#ddesc {
    grid-column: span 10;
    padding-left: 24px;
}
h1 {
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: var(--ink);
    padding: 0;
    margin: 0;
}
h2 {
    font-size: 15px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.02em;
    padding: 0;
    margin: 8px 0 0 0;
}
#dico { margin-top: 14px; }
.iico {
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.iico:hover { opacity: 0.9; }
#demail {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.5s;
}

/* ---------- 顶部导航 ---------- */
#dnav {
    margin-top: 26px;
    font-size: 13px;
    letter-spacing: 0.14em;
}
#dnav a {
    color: var(--muted);
    text-decoration: none;
    margin-right: 22px;
}
#dnav a:hover { color: var(--ink); }
#dnav a.cur {
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
}

/* ---------- 细线分隔 ---------- */
hr {
    height: 0;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 0;
    margin: 24px 0;
}

/* ---------- 首页导语 ---------- */
#intro { margin-top: 6px; }
#intro > div:first-child {
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.75;
    color: var(--ink);
}

/* ---------- 时间线条目 ---------- */
#history { margin-top: 36px; }
.timespan {
    grid-column: span 2;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-align: right;
    color: var(--muted);
    padding-right: 16px;
    padding-top: 4px;
}
.ico {
    grid-column: span 1;
    position: relative;
    border-left: 1px solid var(--line);
}
.ico img {
    border-radius: 2px;
    width: 100%;
    max-width: 80px;
    margin-left: 10px;
}
.desc {
    grid-column: span 9;
    font-size: 16px;
    padding-left: 24px;
    padding-bottom: 28px;
}
.entry-dot {
    position: absolute;
    top: 11px;
    left: -5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--paper);
    border: 1px solid var(--line-strong);
}
.entry-dot::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background-color: var(--muted);
}

/* ---------- 分区标题 ---------- */
.ctitle {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin-top: 52px;
    margin-bottom: 14px;
}

/* ---------- 卡片 ---------- */
.cards {
    grid-column-gap: 18px;
    grid-row-gap: 18px;
    padding-bottom: 8px;
}
.card {
    grid-column: span 4;
    background-color: transparent;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 14px;
    transition: border-color 0.2s;
}
.card:hover { border-color: var(--line-strong); }
.card img {
    display: block;
    width: 100%;
    border-radius: 1px;
    border: 1px solid var(--line);
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center top;
}
.cdesc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted);
    margin-top: 12px;
    margin-bottom: 2px;
}
.cdesc b {
    display: block;
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

/* ---------- 项目条目（当前页面未使用，保留） ---------- */
.project {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.pico { float: left; margin-right: 14px; }
.pico img { height: 80px; border-radius: 1px; border: 1px solid var(--line); }
.pend { clear: both; }

/* ---------- 列表 ---------- */
ul.nodot { list-style-type: none; padding-left: 0; }
ul.nodot li { margin-bottom: 6px; }
ul.tul { padding-left: 20px; margin: 8px 0 0 0; }
ul.tul li { margin-bottom: 6px; }
ul.tul li::marker { color: var(--line-strong); }
ol.plain { padding-left: 22px; margin: 10px 0 0 0; }
ol.plain li { margin-bottom: 6px; }
ol.plain li::marker { color: var(--muted); }

/* ---------- 条目下方的入口链接 ---------- */
.more {
    margin-top: 12px;
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* ---------- 标签 ---------- */
.tags { margin-top: 12px; }
.tag {
    display: inline-block;
    font-size: 12px;
    line-height: 1.9;
    letter-spacing: 0.04em;
    color: var(--body);
    background-color: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 11px;
    margin: 0 6px 6px 0;
    white-space: nowrap;
}

/* ---------- 页尾 ---------- */
.footband {
    background-color: transparent;
    border-top: 1px solid var(--line);
    margin-top: 72px;
    padding-top: 26px;
    padding-bottom: 40px;
}
.foot { font-size: 13px; letter-spacing: 0.04em; }
.fleft {
    grid-column: span 6;
    color: var(--muted);
}
.fright {
    grid-column: span 6;
    text-align: right;
}
.fright a, .fleft a { color: var(--muted); text-decoration: none; }
.fright a:hover, .fleft a:hover { color: var(--ink); text-decoration: underline; }
.fnote { margin-top: 14px; color: var(--muted); }
.fnote a { color: var(--muted); text-decoration: none; }
.fnote a:hover { color: var(--ink); text-decoration: underline; }
.bottomspacer { height: 96px; }

/* ---------- 学习与思考：三个色块 ---------- */
#thinking .blk {
    border-left: 3px solid var(--line-strong);
    border-radius: 2px;
    padding: 20px 22px 22px 22px;
}
#thinking .blk + .blk { margin-top: 18px; }
#thinking .blk-kicker {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}
#thinking .blk-lead { font-size: 16px; }
#thinking .blk-note {
    margin-top: 10px;
    font-size: 14.5px;
    color: var(--muted);
}
#thinking .blk-sub {
    margin-top: 16px;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--muted);
}
#thinking .blk .tul { margin-top: 8px; }
#thinking .blk .blk-sub + .tul { margin-top: 4px; }

/* 关于学习：暖沙色 */
#thinking .blk-study { background-color: #f0e9db; border-left-color: #b18a4c; }
#thinking .blk-study .blk-kicker { color: #8a6524; }

/* 块内小节（如「FMBA 课程」）：同色系浅底，带左侧细条 */
#thinking .blk-in {
    margin-top: 14px;
    padding: 14px 16px 16px 16px;
    background-color: rgba(255, 255, 255, 0.58);
    border-left: 2px solid #b18a4c;
    border-radius: 2px;
}
#thinking .blk-in .blk-in-title {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #8a6524;
}
#thinking .blk-in .blk-in-lead { margin-top: 4px; font-size: 15px; }
#thinking .blk-in .tul { margin-top: 6px; }

/* 讲课老师小卡：沿用同色系，边框极轻 */
#thinking .blk-who {
    margin-top: 12px;
    padding: 11px 13px 12px 13px;
    background-color: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(177, 138, 76, 0.3);
    border-radius: 2px;
}
#thinking .blk-who .blk-who-name {
    font-family: var(--serif);
    font-size: 15.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #8a6524;
}
#thinking .blk-who .blk-who-line { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
#thinking .blk-who .tags { margin-top: 8px; }

/* 课程条目里的授课老师小卡：卡片跟着课程走，老师和课程绑在一起 */
#thinking .blk-in .tul li { margin-bottom: 14px; }
#thinking .blk-in .tul li:last-child { margin-bottom: 0; }
#thinking .tul .blk-who { margin-top: 9px; }
#thinking .blk-who .blk-who-role {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #8a6524;
    margin-bottom: 3px;
}
/* 关于 AI：青蓝色 */
#thinking .blk-ai { background-color: #e6edf0; border-left-color: #3f7285; }
#thinking .blk-ai .blk-kicker { color: #2c6577; }

/* 关于量化：黛紫色 */
#thinking .blk-quant { background-color: #ebe7f0; border-left-color: #6a5285; }
#thinking .blk-quant .blk-kicker { color: #584374; }

/* ---------- 产业链网络图（工作页） ---------- */
.chainsec { margin-top: 46px; }
.chain-title { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); }
.chain-note { margin-top: 8px; font-size: 14.5px; line-height: 1.75; color: var(--muted); }
.chainwrap { margin-top: 18px; overflow-x: auto; padding-bottom: 4px; }
#chainsvg { display: block; width: 100%; min-width: 640px; height: auto; }

.chain-edge {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1;
    stroke-dasharray: 5 7;
    animation: chainflow 1.8s linear infinite;
}
.chain-edge.long { stroke: #ded7cb; }
@keyframes chainflow { to { stroke-dashoffset: -12; } }

.chain-node { cursor: pointer; }
.chain-node rect {
    fill: #fff;
    stroke: var(--c);
    stroke-width: 1;
    transition: fill 0.18s, stroke-width 0.18s;
}
.chain-node .n1 { font-family: var(--sans); font-size: 12.5px; font-weight: 500; fill: var(--ink); }
.chain-node .n2 { font-family: var(--sans); font-size: 9px; fill: var(--muted); letter-spacing: 0.06em; }

#chainsvg.dim .chain-node { opacity: 0.26; transition: opacity 0.18s; }
#chainsvg.dim .chain-node.on { opacity: 1; }
#chainsvg.dim .chain-edge { opacity: 0.16; }
#chainsvg.dim .chain-edge.on { opacity: 1; stroke: var(--navy); stroke-width: 1.6; animation-duration: 0.7s; }
.chain-node:hover rect { fill: var(--tint); }
.chain-node.on rect { fill: var(--tint); stroke-width: 1.6; }

.chain-readout { margin-top: 14px; font-size: 14px; line-height: 1.8; color: var(--body); min-height: 26px; }
.chain-readout b { color: var(--ink); font-weight: 500; }
.chain-readout em { font-style: normal; color: var(--muted); }

.chain-legend { margin-top: 6px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.chain-legend .lg { display: inline-block; margin-right: 18px; }
.chain-legend .lg::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    background-color: currentColor;
    opacity: 0.8;
}
.lg-up { color: #1b3d6e; }
.lg-ref { color: #2f6b7f; }
.lg-base { color: #3d7a5a; }
.lg-mono { color: #a07a35; }
.lg-resin { color: #6a5285; }
.lg-app { color: #a2543f; }

@media (prefers-reduced-motion: reduce) {
    .chain-edge { animation: none; }
}
/* ---------- 小屏 ---------- */
@media (max-width: 767px) {
    body { font-size: 16px; }
    .container { padding-left: 20px; padding-right: 20px; }
    #dhead { margin-top: 32px; }
    #dpic { grid-column: span 12; }
    #dpic img { width: 76px; height: 76px; }
    #ddesc { grid-column: span 12; padding-left: 0; margin-top: 14px; }
    h1 { font-size: 26px; }
    #intro > div:first-child { font-size: 18px; }
    #dnav { margin-top: 20px; letter-spacing: 0.08em; }
    #dnav a { margin-right: 14px; }
    .ctitle { font-size: 24px; margin-top: 34px; }
    .timespan {
        grid-column: span 12;
        text-align: left;
        padding-right: 0;
        margin-bottom: 6px;
    }
    .ico { grid-column: span 1; }
    .desc { grid-column: span 11; padding-left: 16px; }
    .card { grid-column: span 12; }
    #thinking .blk { padding: 16px 16px 18px 18px; }
    #thinking .blk-in { padding: 12px 13px 14px 13px; }
    .chain-title { font-size: 20px; }
    #chainsvg { min-width: 600px; }
    .pico { float: none; margin-right: 0; margin-bottom: 8px; }
    .fleft, .fright { grid-column: span 12; text-align: left; }
    .fright { margin-top: 8px; }
}

/* ===========================================================
   首页主题：奔向宇宙 · 奔向星辰大海（2026-09-18）
   深空底 + 星场 + 傅里叶级数描星，底部海面波形过渡回纸本
   =========================================================== */
.cosmos {
    position: relative;
    margin-top: 26px;
    overflow: hidden;
    background:
        radial-gradient(1100px 500px at 76% 24%, rgba(64, 92, 160, 0.32), rgba(5, 8, 15, 0) 62%),
        radial-gradient(820px 400px at 10% 82%, rgba(46, 74, 130, 0.22), rgba(5, 8, 15, 0) 60%),
        linear-gradient(180deg, #05080f 0%, #0a1223 48%, #101a30 80%, #16203a 100%);
}
#sky { position: absolute; top: 0; left: 0; display: block; }
.cosmos-inner {
    position: relative;
    z-index: 2;
    min-height: 420px;
    padding-top: 84px;
    padding-bottom: 142px;
}
.cosmos-kicker {
    font-size: 12px;
    letter-spacing: 0.4em;
    color: #c8a55b;
}
.cosmos-title {
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: #f1ede3;
    margin: 20px 0 0 0;
    max-width: 14em;
}
.cosmos-sub {
    margin: 18px 0 0 0;
    max-width: 28em;
    font-size: 15px;
    line-height: 2.05;
    color: #a9b3c6;
}
.cosmos-note {
    margin-top: 40px;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(200, 165, 91, 0.82);
}
.cosmos-note span {
    display: block;
    margin-top: 6px;
    color: rgba(169, 179, 198, 0.7);
    letter-spacing: 0.06em;
}
.cosmos-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 84px;
    z-index: 3;
    pointer-events: none;
}
.wv { position: absolute; left: 0; bottom: 0; width: 200%; }
.wv svg { display: block; width: 100%; height: 100%; }
.wv-back { height: 84px; animation: wavemove 26s linear infinite; }
.wv-back path { fill: rgba(206, 170, 96, 0.22); }
.wv-front { height: 62px; animation: wavemove 17s linear infinite; }
.wv-front path { fill: #f5f3ee; }
@keyframes wavemove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 首屏文字入场：纯 CSS，动画结束即正常状态，不依赖脚本，也不会留下隐形的正文 */
@media (prefers-reduced-motion: no-preference) {
    .cosmos-kicker, .cosmos-title, .cosmos-sub, .cosmos-note {
        animation: heroIn 0.9s ease both;
    }
    .cosmos-title { animation-delay: 0.08s; }
    .cosmos-sub { animation-delay: 0.16s; }
    .cosmos-note { animation-delay: 0.26s; }
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
    .cosmos { margin-top: 20px; }
    .cosmos-inner { min-height: 0; padding-top: 44px; padding-bottom: 186px; }
    .cosmos-kicker { letter-spacing: 0.26em; }
    .cosmos-title { font-size: 25px; line-height: 1.62; }
    .cosmos-sub { font-size: 13.5px; line-height: 2; }
    .cosmos-note { margin-top: 22px; }
    .cosmos-wave { height: 68px; }
    .wv-back { height: 68px; }
    .wv-front { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
    .wv-back, .wv-front { animation: none; }
    .cosmos-kicker, .cosmos-title, .cosmos-sub, .cosmos-note { animation: none; }
}

/* ===========================================================
   内页呼应：导航下的「星轨带」（业余创作 / 学习与思考）
   深空窄带 + 缓慢画出的金色星座线，与首页主题一脉相承
   =========================================================== */
.starband {
    position: relative;
    margin-top: 22px;
    overflow: hidden;
    background:
        radial-gradient(760px 200px at 84% 26%, rgba(64, 92, 160, 0.30), rgba(5, 8, 15, 0) 72%),
        radial-gradient(520px 180px at 8% 92%, rgba(46, 74, 130, 0.22), rgba(5, 8, 15, 0) 72%),
        linear-gradient(180deg, #060a13 0%, #0b1322 62%, #101a30 100%);
}
.starband::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.4px 1.4px at 6% 30%, rgba(233, 228, 214, 0.7), transparent),
        radial-gradient(1px 1px at 17% 66%, rgba(233, 228, 214, 0.5), transparent),
        radial-gradient(1.1px 1.1px at 31% 18%, rgba(233, 228, 214, 0.6), transparent),
        radial-gradient(1px 1px at 42% 78%, rgba(233, 228, 214, 0.45), transparent),
        radial-gradient(1.3px 1.3px at 55% 34%, rgba(233, 228, 214, 0.6), transparent),
        radial-gradient(1px 1px at 64% 62%, rgba(233, 228, 214, 0.45), transparent),
        radial-gradient(1.2px 1.2px at 73% 20%, rgba(233, 228, 214, 0.6), transparent),
        radial-gradient(1px 1px at 82% 58%, rgba(233, 228, 214, 0.5), transparent),
        radial-gradient(1.4px 1.4px at 91% 28%, rgba(233, 228, 214, 0.65), transparent),
        radial-gradient(1px 1px at 96% 72%, rgba(233, 228, 214, 0.45), transparent);
}
.stb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 88px;
}
.stb-kicker {
    font-size: 12px;
    letter-spacing: 0.3em;
    color: #c8a55b;
}
.stb-track { width: 300px; height: 56px; flex: 0 0 auto; }
.stb-path {
    fill: none;
    stroke: rgba(216, 180, 106, 0.9);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: stbDraw 8s ease-in-out infinite;
}
.stb-node {
    fill: #eee6d2;
    opacity: 0;
    animation: stbNode 8s ease-out infinite;
}
.stb-node-dim { fill: rgba(216, 180, 106, 0.7); }
.stb-tw {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background-color: #e9e4d6;
    animation: stbTw 5.2s ease-in-out infinite;
}
@keyframes stbDraw {
    0% { stroke-dashoffset: 300; opacity: 0.95; }
    42% { stroke-dashoffset: 0; opacity: 0.95; }
    80% { stroke-dashoffset: 0; opacity: 0.95; }
    92% { stroke-dashoffset: 0; opacity: 0; }
    100% { stroke-dashoffset: 300; opacity: 0; }
}
@keyframes stbNode {
    0%, 4% { opacity: 0; }
    16% { opacity: 0.95; }
    80% { opacity: 0.95; }
    90%, 100% { opacity: 0; }
}
@keyframes stbTw {
    0%, 100% { opacity: 0.22; transform: scale(0.85); }
    50% { opacity: 0.85; transform: scale(1.3); }
}

@media (max-width: 767px) {
    .starband { margin-top: 18px; }
    .stb-inner {
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .stb-kicker { font-size: 11.5px; letter-spacing: 0.2em; }
    .stb-track { width: 200px; height: 40px; align-self: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
    .stb-path { animation: none; stroke-dashoffset: 0; }
    .stb-node { animation: none; opacity: 0.95; }
    .stb-tw { animation: none; opacity: 0.55; }
}
