/* Home keeps the shared Danfeng palette; layout and animation are scoped. */
body { margin:0; background:var(--df-bg); color:var(--df-text); font-family:var(--q-font); }
.q-header { border-top:3px solid var(--df-primary); }
.q-header-inner,.workbench,.home-footer { width:min(calc(100% - 80px),1280px); margin-inline:auto; }
.q-header-inner { padding:0; gap:24px; }
.q-header nav { gap:4px; }
.q-header nav a { padding-inline:14px; font-size:16px; }
.workbench :is(h1,h2,h3,p) { margin:0; }
.workbench a { text-decoration:none; }
.workbench-hero { position:relative; isolation:isolate; display:grid; grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr); align-items:center; gap:clamp(32px,5vw,80px); padding-block:clamp(24px,4svh,44px) 16px; }
.intro-copy h1 { font-size:clamp(42px,4.55vw,70px); line-height:1.28; font-weight:600; letter-spacing:-.05em; text-wrap:nowrap; }
.intro-copy h1>span { color:var(--df-secondary); }
.title-period { color:var(--df-primary); }
.intro-description { margin-top:28px!important; font-size:clamp(17px,1.5vw,20px); line-height:1.9; color:var(--df-muted); }
.intro-actions { display:flex; align-items:center; gap:28px; margin-top:36px; }
.intro-actions a { display:inline-flex; align-items:center; gap:22px; min-height:48px; font-size:16px; }
.intro-actions .q-button { padding:13px 24px; border:1px solid var(--df-primary); border-radius:6px; background:var(--df-primary); color:var(--df-on-primary); font-weight:600; transition:background .18s,transform .18s; }
.intro-actions svg,.project-arrow { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.6; flex-shrink:0; transition:transform .2s; }
.workbench-link { color:var(--df-text); }
.workbench-link:hover { color:var(--df-action-hover-ink); }
.intro-actions a:hover svg { transform:translateX(3px); }
.intro-actions a[href^="#"]:hover svg { transform:translateY(3px); }
.live-indicator { width:6px; height:6px; background:#e9b26b; border-radius:50%; }
.projects { padding-block:8px 48px; scroll-margin-top:24px; }
.projects-heading { display:flex; align-items:baseline; justify-content:space-between; gap:20px; margin-bottom:24px; }
.projects-heading h2 { font-size:32px; font-weight:500; }
.projects-heading>span { font-size:14px; color:var(--df-muted); }
.project-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.project-card { display:flex; flex-direction:column; padding:24px 28px 18px; border:1px solid var(--df-border); border-radius:10px; color:var(--df-text); background:var(--df-surface); min-width:0; transition:transform .2s,border-color .2s,box-shadow .2s; }
.project-heading { display:flex; align-items:center; justify-content:space-between; }
.project-route { font:13px/1.5 Consolas,monospace; color:var(--df-muted); }
.project-arrow { color:var(--df-secondary); width:20px; height:20px; }
.project-main { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-block:20px 24px; flex:1; }
.project-card h3 { font-size:30px; line-height:1.4; font-weight:500; color:var(--df-text); }
.project-card p { margin-top:12px; color:var(--df-muted); font-size:15px; line-height:1.85; }
.project-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--df-border); padding-top:14px; font-size:12px; color:var(--df-muted); }
.project-foot strong { font-size:13px; color:var(--df-secondary); font-weight:500; white-space:nowrap; }
.note-preview { width:116px; flex-shrink:0; padding:12px; border:1px solid var(--df-border); border-radius:4px; color:var(--df-secondary); font:11px/1.5 Consolas,var(--q-font); background:var(--df-bg); }
.note-preview i { display:block; width:100%; height:2px; background:var(--df-border); margin-top:9px; }
.note-preview i:nth-child(3) { width:70%; }
.note-preview b { display:block; font-size:21px; line-height:1; color:var(--df-primary); font-weight:400; margin-top:12px; }
.wave-preview { width:150px; flex-shrink:0; fill:none; stroke:var(--df-primary); stroke-width:1.8; }
.wave-grid { stroke:var(--df-border); stroke-width:1; }
.wave-cosine { stroke:var(--df-secondary); }
.taiji-preview { margin-inline:20px; flex-shrink:0; }
.chess-preview { display:flex; align-items:center; width:152px; flex-shrink:0; gap:0; }
.chess-preview img { width:76px; height:76px; object-fit:contain; }
.project-tool { grid-column:1 / -1; }
.tool-preview { margin-inline:20px; flex-shrink:0; }
.home-footer.q-footer { max-width:1280px; padding:0; min-height:40px; font-size:12px; line-height:1.6; gap:12px; border-color:var(--df-border); flex-direction:row; align-items:center; justify-content:space-between; }
.home-footer a { display:inline-flex; align-items:center; min-height:40px; gap:4px; }
html[data-q-app="home"][data-theme="light"] .q-header nav a[aria-current="page"] { color:var(--df-hover); }
.home-footer a { text-decoration:none; }
.home-footer a:hover { text-decoration:underline; }
html[data-q-app="home"] .q-back-top.home-to-top { position:static; flex:0 0 36px; width:36px; height:36px; min-height:36px; padding:8px; border:0; border-radius:5px; box-shadow:none; background:transparent; }
.home-footer > a { margin-inline-start:auto; }
html[data-theme="dark"] .taiji-preview { filter:invert(.85); }
@media (hover:hover) and (pointer:fine) {
 .project-card:hover { transform:translateY(-2px); border-color:var(--df-action-hover-border); box-shadow:0 8px 20px #38260b08; }
 .project-card:hover .project-arrow { transform:translate(3px,-3px); color:var(--df-action-hover-ink); }
 .intro-actions .q-button:hover { background:var(--df-action-hover-bg); transform:translateY(-1px); }
}
.intro-actions .q-button:active { transform:translateY(1px); }
@media (prefers-reduced-motion:no-preference) {
 .intro-copy { animation:home-arrive .7s ease-out both; }
 @keyframes home-arrive { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
}
@media (max-width:1100px) {
 .q-header-inner,.workbench,.home-footer.q-footer { width:calc(100% - 48px); }
 .q-header-inner { gap:12px; }
 .workbench-hero { gap:28px; }
 .intro-copy h1 { font-size:48px; }
 .project-main { gap:8px; }
 .project-card { padding-inline:24px; }
 .project-card p { font-size:14px; }
 .wave-preview { width:105px; }
 .note-preview { width:90px; }
 .taiji-preview { width:72px; height:72px; margin-inline:10px; }
 .chess-preview { width:105px; gap:5px; }
 .project-foot { flex-wrap:wrap; }
}
@media (max-width:800px) {
 .q-header-inner { display:grid; grid-template-columns:1fr auto; grid-template-rows:44px 48px; gap:0; align-content:center; }
 .q-header nav { grid-row:2; grid-column:1/-1; justify-content:space-between; }
 .q-header [data-danfeng-toggle] { grid-row:1; grid-column:2; }
 .q-header nav a { font-size:15px; padding-inline:14px; }
 .home-footer.q-footer { flex-direction:row; padding-block:0; min-height:44px; }
 .home-footer a { min-height:44px; }
 html[data-q-app="home"] .q-back-top.home-to-top { flex-basis:44px; width:44px; height:44px; }
 .workbench-hero { grid-template-columns:1fr; gap:24px; padding-block:32px 10px; }
 .intro-copy h1 { font-size:clamp(40px,7.3vw,60px); }
 .intro-description { margin-top:20px!important; }
 .intro-actions { margin-top:24px; }
 .project-grid { grid-template-columns:1fr; }
 .project-main { gap:20px; }
 .project-card p { font-size:15px; }
 .wave-preview { width:150px; }
 .chess-preview { width:136px; gap:8px; }
}
@media (max-width:480px) {
 .q-header-inner,.workbench,.home-footer.q-footer { width:calc(100% - 32px); }
 .q-header nav a { padding-inline:10px; font-size:14px; }
 .intro-description { font-size:16px; }
 .intro-actions { gap:24px; }
 .intro-actions a { font-size:15px; gap:12px; }
 .intro-actions .q-button { padding-inline:18px; }
 .projects { padding-block:8px 28px; }
 .projects-heading { margin-bottom:16px; gap:12px; }
 .projects-heading h2 { font-size:28px; }
 .projects-heading>span { font-size:12px; }
 .project-card { padding:20px 20px 16px; }
 .project-card h3 { font-size:27px; }
 .project-card p { font-size:14px; }
 .project-main { gap:12px; padding-block:18px 20px; }
 .project-foot { font-size:11px; row-gap:8px; }
 .wave-preview { width:76px; }
 .note-preview { width:76px; padding:9px; font-size:9px; }
 .taiji-preview { width:64px; height:64px; margin:6px; }
 .chess-preview { width:76px; gap:4px; }
 .tool-preview,.tool-preview>img { width:64px; height:64px; }
 .tool-preview { margin:6px; }
 .home-footer.q-footer { gap:8px; font-size:11px; }
}
@media (max-width:359px) {
 .intro-copy h1 { font-size:38px; }
 .project-main>:last-child { width:52px; }
 .chess-preview { flex-direction:column; }
 .project-card p br { display:none; }
 .project-foot { font-size:10px; }
}
/* Native particle field and linked site marks share the page ground. */
#ambient-particles { position:absolute; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; }
.intro-copy { position:relative; }
.portal-map { position:relative; height:clamp(470px,63svh,540px); min-width:0; }
.portal-connections { position:absolute; inset:0; width:100%; height:100%; overflow:visible; fill:none; stroke:var(--df-secondary); pointer-events:none; }
.map-orbit { stroke-width:.65; opacity:.16; }
.orbit-outer { stroke-dasharray:2 9; }
.orbit-inner { opacity:.1; }
.portal-connections path { stroke-width:1; opacity:.18; transition:stroke .25s,opacity .25s; }
.portal-connections path.is-linked { stroke:var(--df-primary); opacity:.8; stroke-width:1.4; }
.portal-core { position:absolute; left:50%; top:54%; transform:translate(-50%,-50%); display:grid; justify-items:center; padding:0; border:0; background:transparent; color:var(--df-secondary); cursor:pointer; border-radius:20px; }
.portal-core>img { display:block; width:104px; height:104px; transition:transform .35s,filter .35s; position:relative; }
.core-ring { position:absolute; left:50%; top:52px; width:160px; height:160px; border:1px solid var(--df-border); border-radius:50%; transform:translate(-50%,-50%); transition:border-color .25s,box-shadow .25s; }
.portal-core:is(:hover,:focus-visible,[aria-pressed="true"])>img { transform:scale(1.07); }
.portal-core:is(:hover,:focus-visible,[aria-pressed="true"]) .core-ring { border-color:var(--df-primary); box-shadow:0 0 0 12px color-mix(in srgb,var(--df-primary) 5%,transparent); }
.portal-node { position:absolute; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; min-width:100px; padding:8px; border-radius:10px; color:var(--df-text); text-align:center; transition:color .2s; }
.portal-node-icon { width:68px; height:68px; display:grid; place-items:center; position:relative; background:var(--df-bg); border:1px solid transparent; border-radius:16px; transition:transform .25s,background .25s,border-color .25s,box-shadow .25s; }
.portal-node-icon>img { object-fit:contain; }
.portal-node-icon>.blog-mark { width:84%; height:84%; fill:none; stroke:var(--df-secondary); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.blog-mark-letters { stroke-width:1.6; }
.blog-mark-pen { stroke:var(--df-primary); fill:var(--df-bg); transition:fill .25s; }
.portal-node:is(.is-linked,:hover,:focus-visible) .blog-mark-pen { fill:var(--df-surface); }
.portal-node strong { font-size:20px; font-weight:500; margin-top:8px; line-height:1.5; }
.node-caption { font-size:12px; color:var(--df-muted); margin-top:3px; }
/* 五节点人形星图：头=游戏，左臂=博客，右臂=五术，左下右脚=工具，右下左脚=可视化 */
.portal-node.node-game { left:50%; top:13.5%; }
.portal-node.node-blog { left:15%; top:38%; }
.portal-node.node-wushu { left:85%; top:38%; }
.portal-node.node-tool { left:24%; top:85%; }
.portal-node.node-view { left:76%; top:85%; }
.portal-node.is-linked .portal-node-icon,.portal-node:is(:hover,:focus-visible) .portal-node-icon { transform:translateY(-4px); border-color:var(--df-primary); background:var(--df-surface); box-shadow:0 8px 24px color-mix(in srgb,var(--df-primary) 10%,transparent); }
.portal-node.is-linked strong { color:var(--df-action-hover-ink); }
.project-card.is-linked { border-color:var(--df-primary); }
.q-header nav a.is-linked { background:var(--df-tint); color:var(--df-action-hover-ink); }
.portal-map.has-active .core-ring { border-color:color-mix(in srgb,var(--df-primary) 55%,var(--df-border)); }
@media (max-width:1100px) {
 .portal-map { height:470px; }
 .portal-core>img { width:86px; height:86px; }
 .core-ring { top:43px; width:132px; height:132px; }
 .portal-node { min-width:86px; }
 .portal-node-icon { width:60px; height:60px; }
 .portal-node strong { font-size:18px; }
 .chess-preview img { width:52px; height:52px; }
}
@media (max-width:800px) {
 .portal-map { height:440px; }
 .portal-node.node-game { left:50%; top:14%; }
 .portal-node.node-blog { left:16%; top:38%; }
 .portal-node.node-wushu { left:84%; top:38%; }
 .portal-node.node-tool { left:23%; top:84%; }
 .portal-node.node-view { left:77%; top:84%; }
 .chess-preview img { width:68px; height:68px; }
}
@media (max-width:480px) {
 .portal-map { height:400px; }
 .portal-core>img { width:72px; height:72px; }
 .core-ring { top:36px; width:112px; height:112px; }
 .portal-node { min-width:78px; padding:4px; }
 .portal-node-icon { width:54px; height:54px; border-radius:12px; }
 .portal-node-icon img { width:48px; height:48px; }
 .portal-node-icon.chess-node>img { width:60px; height:60px; }
 .portal-node strong { font-size:17px; margin-top:5px; }
 .node-caption { font-size:11px; }
 .chess-preview img { width:42px; height:42px; }
 .chess-preview { width:84px; }
}
@media (max-width:359px) {
 .portal-map { height:370px; }
 .portal-node.node-blog { left:15%; }
 .portal-node.node-wushu { left:85%; }
 .portal-node.node-tool { left:20%; }
 .portal-node.node-view { left:80%; }
 .chess-preview { flex-direction:column; }
}
@media (prefers-reduced-motion:reduce) { .portal-core>img,.portal-node-icon { transform:none!important; } }

