/*
Theme Name: wenshu-neuro
Author: Wenshu Neuro
Description: 面向脑电数据分析的原创中文 WordPress 主题。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: wenshu-neuro
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --background: #f4f7f7;
  --foreground: #0b1f25;
  --navy: #071f26;
  --ink: #0b2026;
  --slate: #4f676c;
  --paper: #f8fbfa;
  --teal: #16b9a8;
  --teal-light: #70e1d2;
  --gold: #f0b95f;
  --border: #cedcda;
  --font-sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); font-size: 16px; -webkit-font-smoothing: antialiased; }
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
svg { flex: 0 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.screen-reader-text:focus { z-index: 100000; top: 6px; left: 6px; width: auto; height: auto; padding: 14px 18px; clip: auto; color: var(--navy); background: #fff; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 80px);
  background: rgb(248 251 250 / 88%);
  border-bottom: 1px solid rgb(154 183 179 / 35%);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; background: var(--navy); border-radius: 50%; }
.brand-copy { display: grid; line-height: 1; }
.brand strong { font-size: 1rem; letter-spacing: .08em; }
.brand small { margin-top: 6px; color: #698084; font: 600 .58rem/1 var(--font-mono); letter-spacing: .13em; }
.site-nav { display: flex; gap: clamp(24px, 3.3vw, 48px); }
.site-nav a { color: #415a5f; font-size: .9rem; transition: color .2s ease; }
.site-nav a:hover, .site-nav a:focus { color: var(--teal); }
.header-link { justify-self: end; display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 700; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(500px, 1.13fr);
  align-items: center;
  gap: clamp(48px, 7vw, 110px);
  overflow: hidden;
  padding: 86px clamp(24px, 7vw, 110px) 96px;
  background: var(--paper);
}
.hero::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -130px; top: -170px; border-radius: 50%; background: radial-gradient(circle, rgb(68 207 190 / 18%), transparent 68%); }
.hero-grid { position: absolute; inset: 0; z-index: -2; opacity: .32; background-image: linear-gradient(rgb(66 104 108 / 12%) 1px, transparent 1px), linear-gradient(90deg, rgb(66 104 108 / 12%) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to right, #000, transparent 67%); }
.eyebrow { color: #148b80; font: 700 .7rem/1.2 var(--font-mono); letter-spacing: .16em; }
.eyebrow--light { color: var(--teal-light); }
.hero h1 { margin: 24px 0 26px; color: var(--ink); font-family: Georgia, "Songti SC", "SimSun", serif; font-size: clamp(3rem, 5.1vw, 5.4rem); font-weight: 600; line-height: 1.08; letter-spacing: -.055em; }
.hero h1 em { color: #0c746e; font-style: normal; }
.hero-lead { max-width: 610px; margin: 0; color: var(--slate); font-size: 1.08rem; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; border: 1px solid transparent; font-size: .9rem; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--primary { color: #fff; background: var(--navy); }
.button--primary:hover { background: #0d4a50; }
.button--ghost { border-color: #b8ccca; background: rgb(255 255 255 / 60%); }
.hero-note { display: flex; align-items: center; gap: 9px; margin-top: 32px; color: #60767a; font-size: .8rem; }

.signal-panel { position: relative; overflow: hidden; color: #e8f7f4; background: linear-gradient(145deg, #0b3036, #071d24 72%); border: 1px solid #1b5156; box-shadow: 0 34px 80px rgb(8 41 45 / 22%); }
.signal-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px rgb(7 17 21 / 42%); }
.signal-panel__top { display: flex; align-items: flex-start; justify-content: space-between; padding: 26px 28px 18px; }
.signal-panel__top p { margin: 8px 0 0; font-size: .94rem; font-weight: 650; }
.signal-status { display: inline-flex; align-items: center; gap: 7px; color: #b2cdca; font: 600 .68rem/1 var(--font-mono); }
.signal-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-light); box-shadow: 0 0 12px var(--teal-light); }
.eeg-chart { display: block; width: 100%; height: auto; min-height: 300px; }
.eeg-chart text { fill: #6f9294; font: 11px var(--font-mono); }
.chart-grid { stroke: #3b5b5e; stroke-width: 1; opacity: .5; }
.chart-grid--vertical { opacity: .24; }
.eeg-trace { fill: none; stroke: url(#traceGlow); stroke-width: 2.3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgb(88 231 212 / 42%)); }
.eeg-trace--soft { stroke: #43c8bb; stroke-width: 1.8; opacity: .85; }
.eeg-trace--thin { stroke: #43aeb0; stroke-width: 1.3; opacity: .8; }
.eeg-trace--gold { stroke: #efb860; stroke-width: 1.8; opacity: .9; }
.signal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #21464b; }
.signal-metrics div { display: grid; gap: 8px; padding: 18px 22px; border-right: 1px solid #21464b; }
.signal-metrics div:last-child { border: 0; }
.signal-metrics span { color: #6f9294; font-size: .7rem; }
.signal-metrics strong { color: #e8f7f4; font: 600 .82rem/1 var(--font-mono); }

.principles { display: grid; grid-template-columns: 1fr 2fr; align-items: center; gap: 32px; padding: 30px clamp(24px, 7vw, 110px); color: #d6e7e4; background: #0a292f; border-top: 1px solid #17464b; }
.principles > p { margin: 0; color: #8eaaa8; font-size: .82rem; }
.principle-list { display: grid; grid-template-columns: repeat(3, 1fr); }
.principle-list span { color: #4f7778; font: 600 .68rem/1 var(--font-mono); }
.principle-list b { margin-left: 12px; color: #e5f2ef; font-family: var(--font-sans); font-size: .88rem; letter-spacing: .08em; }

.section { padding: 120px clamp(24px, 7vw, 110px); }
.section-heading { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 80px; margin-bottom: 60px; }
.section-heading h2, .training h2, .insight h2 { margin: 18px 0 0; color: var(--ink); font-family: Georgia, "Songti SC", "SimSun", serif; font-size: clamp(2.2rem, 4vw, 4.2rem); font-weight: 600; line-height: 1.18; letter-spacing: -.045em; }
.section-heading > p { max-width: 490px; margin: 0; color: var(--slate); font-size: 1rem; line-height: 1.9; }
.analysis { background: #f2f6f5; }
.workflow-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #cbd9d7; }
.workflow-card { position: relative; min-height: 300px; padding: 28px 28px 34px; border-right: 1px solid #cbd9d7; background: rgb(255 255 255 / 42%); transition: background .25s ease, transform .25s ease; }
.workflow-card:last-child { border: 0; }
.workflow-card:hover { z-index: 1; background: #fff; transform: translateY(-6px); box-shadow: 0 22px 50px rgb(24 63 64 / 10%); }
.workflow-card > span { color: #71918f; font: 600 .72rem/1 var(--font-mono); }
.workflow-card h3 { margin: 78px 0 18px; font-size: 1.22rem; }
.workflow-card p { margin: 0; color: #5f7478; font-size: .9rem; line-height: 1.8; }
.methods-band { display: grid; grid-template-columns: 1fr 1.8fr; margin-top: 24px; color: #eef8f6; background: var(--navy); }
.method-intro { padding: 34px; border-right: 1px solid #23464a; }
.method-intro svg { color: var(--teal-light); }
.method-intro h3 { margin: 20px 0 10px; font-size: 1.1rem; }
.method-intro p { max-width: 440px; margin: 0; color: #91aaa9; font-size: .82rem; line-height: 1.7; }
.method-list { display: grid; grid-template-columns: repeat(2, 1fr); }
.method-list span { display: flex; align-items: center; justify-content: space-between; padding: 28px 32px; color: #c7d9d6; border-right: 1px solid #23464a; border-bottom: 1px solid #23464a; font-size: .84rem; }
.method-list span:nth-child(even) { border-right: 0; }
.method-list span:nth-last-child(-n+2) { border-bottom: 0; }
.method-list b { color: #5ba8a3; font: 600 .76rem/1 var(--font-mono); }

.training { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(60px, 9vw, 150px); color: #edf8f5; background: linear-gradient(135deg, #0c393f 0%, #071e25 74%); }
.training h2 { color: #fff; }
.training-copy > p { max-width: 570px; margin: 28px 0 0; color: #a8c0bd; line-height: 1.9; }
.training-audience { display: grid; grid-template-columns: 96px 1fr; gap: 18px; margin-top: 42px; padding-top: 26px; border-top: 1px solid #2a5155; }
.training-audience span { color: var(--teal-light); font-size: .75rem; font-weight: 700; }
.training-audience p { margin: 0; color: #afc6c3; font-size: .86rem; line-height: 1.7; }
.curriculum { align-self: center; padding: 34px; color: var(--ink); background: #f4f8f7; box-shadow: 0 28px 70px rgb(0 0 0 / 18%); }
.curriculum-title { display: flex; align-items: center; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid #d3dfdd; }
.curriculum-title > svg { color: #0f8a80; }
.curriculum-title div { display: grid; gap: 4px; }
.curriculum-title span { color: #758a8d; font-size: .7rem; }
.curriculum-title strong { font-size: 1rem; letter-spacing: .06em; }
.curriculum ol { margin: 0; padding: 0; list-style: none; }
.curriculum li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 16px; min-height: 66px; border-bottom: 1px solid #dbe5e3; }
.curriculum li span { color: #71a39e; font: 600 .7rem/1 var(--font-mono); }
.curriculum li p { margin: 0; font-size: .88rem; }
.curriculum li svg { color: #29a798; }
.curriculum-note { margin: 22px 0 0; color: #7c8e91; font-size: .75rem; }

.insight { display: grid; grid-template-columns: minmax(380px, .9fr) 1.1fr; align-items: center; gap: clamp(70px, 10vw, 160px); background: var(--paper); }
.insight-visual { position: relative; aspect-ratio: 1; width: min(100%, 520px); display: grid; place-items: center; }
.insight-visual::before { content: ""; position: absolute; inset: 5%; border-radius: 50%; background: radial-gradient(circle, rgb(76 204 187 / 16%), transparent 64%); }
.orbit { position: absolute; border: 1px solid #aac9c5; border-radius: 50%; }
.orbit--one { inset: 35%; border-color: #45b9ad; }
.orbit--two { inset: 20%; border-style: dashed; animation: spin 30s linear infinite; }
.orbit--three { inset: 5%; border-color: #d4e1df; }
.orbit--two::before, .orbit--three::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.orbit--two::before { top: 13%; left: 14%; box-shadow: 0 0 0 7px rgb(240 185 95 / 15%); }
.orbit--three::after { right: 12%; bottom: 18%; background: var(--teal); box-shadow: 0 0 0 7px rgb(22 185 168 / 13%); }
.insight-core { z-index: 2; width: 78px; height: 78px; display: grid; place-items: center; color: #fff; background: var(--navy); border-radius: 50%; box-shadow: 0 14px 34px rgb(8 46 50 / 22%); }
.orbit-label { position: absolute; z-index: 2; padding: 7px 11px; color: #3d6868; background: #f8fbfa; border: 1px solid #c8dbd8; font-size: .72rem; font-weight: 700; box-shadow: 0 8px 20px rgb(20 70 70 / 8%); }
.orbit-label--signal { left: 2%; top: 45%; }
.orbit-label--context { right: 9%; top: 16%; }
.orbit-label--inference { right: 2%; bottom: 27%; }
.insight-copy > p { max-width: 650px; margin: 28px 0 0; color: var(--slate); line-height: 1.95; }
.insight-copy ul { display: grid; gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; }
.insight-copy li { display: flex; align-items: center; gap: 12px; color: #365258; font-size: .88rem; }
.insight-copy li svg { color: #0f9d8e; }

.articles { background: #e8f0ef; }
.section-heading--articles { margin-bottom: 46px; }
.section-heading--articles h2 { font-size: clamp(2.2rem, 3.8vw, 3.8rem); }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { min-width: 0; overflow: hidden; background: var(--paper); border: 1px solid #cfddda; transition: transform .22s ease, box-shadow .22s ease; }
.article-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgb(22 63 63 / 10%); }
.article-figure { position: relative; height: 210px; overflow: hidden; color: #8cb0ac; background: #0a2c33; }
.article-figure img { width: 100%; height: 100%; display: block; object-fit: cover; }
.article-body { padding: 26px 26px 24px; }
.article-tag { color: #0c8a7e; font: 700 .65rem/1 var(--font-mono); letter-spacing: .08em; }
.article-body h3 { min-height: 58px; margin: 15px 0 13px; font-family: Georgia, "Songti SC", serif; font-size: 1.16rem; line-height: 1.55; }
.article-body > p { min-height: 88px; margin: 0; color: #607579; font-size: .84rem; line-height: 1.75; }
.article-body > div { display: flex; align-items: center; justify-content: space-between; margin-top: 23px; padding-top: 18px; border-top: 1px solid #dce5e3; color: #7b8e91; font-size: .7rem; }
.article-body a { display: inline-flex; align-items: center; gap: 6px; color: #234d50; font-weight: 700; }

.copyright { display: grid; grid-template-columns: auto 1fr; gap: 22px; margin: 0 clamp(24px, 7vw, 110px); padding: 38px 0 44px; border-top: 1px solid #cadad7; }
.copyright > svg { color: #168e83; }
.copyright h2 { margin: 1px 0 9px; font-size: 1rem; }
.copyright p { max-width: 1000px; margin: 0; color: #667b7e; font-size: .8rem; line-height: 1.8; }
.site-footer { min-height: 140px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; padding: 30px clamp(24px, 7vw, 110px); color: #8dadaa; background: var(--navy); }
.brand--footer .brand-mark { background: #123b40; }
.brand--footer strong { color: #edf8f5; }
.site-footer p { margin: 0; font-size: .72rem; line-height: 1.6; }
.site-footer p:last-child { justify-self: end; max-width: 360px; text-align: right; }

.article-page { min-height: 100vh; background: var(--paper); }
.article-hero { padding: 100px max(24px, calc((100vw - 1080px) / 2)) 82px; color: #eff8f6; background: linear-gradient(135deg, #0d3b41, #071f26 72%); }
.article-hero h1 { max-width: 880px; margin: 22px 0 24px; font-family: Georgia, "Songti SC", serif; font-size: clamp(2.7rem, 5.4vw, 5.2rem); font-weight: 600; line-height: 1.16; letter-spacing: -.045em; }
.article-hero > p { max-width: 800px; margin: 0; color: #afc5c2; font-size: 1.05rem; line-height: 1.9; }
.article-meta { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px; color: #7fa19f; font: 600 .7rem/1 var(--font-mono); }
.article-content { display: grid; grid-template-columns: 200px minmax(0, 720px); justify-content: center; gap: clamp(50px, 8vw, 110px); padding: 90px 24px 110px; }
.article-content aside { align-self: start; position: sticky; top: 110px; padding-top: 15px; border-top: 2px solid #21a99b; }
.article-content aside span { color: #147e76; font-size: .72rem; font-weight: 750; }
.article-content aside p { margin: 12px 0 0; color: #718589; font-size: .76rem; line-height: 1.75; }
.article-prose > .wenshu-article-image { margin: 0 0 62px; }
.wenshu-article-image img { display: block; width: 100%; border: 1px solid #cadbd8; }
.wenshu-article-image figcaption { margin-top: 10px; color: #718589; font-size: .72rem; text-align: center; }
.article-prose section + section { margin-top: 64px; padding-top: 56px; border-top: 1px solid #d7e2e0; }
.article-prose h2 { margin: 0 0 24px; color: var(--ink); font-family: Georgia, "Songti SC", serif; font-size: 1.75rem; font-weight: 600; }
.article-prose p { margin: 0 0 20px; color: #405b60; font-size: 1rem; line-height: 2; }
.article-prose ul { display: grid; gap: 12px; margin: 30px 0 0; padding: 25px 28px; list-style: none; background: #eaf3f1; }
.article-prose li { position: relative; padding-left: 22px; color: #2d4e52; font-size: .88rem; line-height: 1.6; }
.article-prose li::before { content: "✓"; position: absolute; left: 0; color: #13998d; font-weight: 800; }
.article-takeaway { margin-top: 68px; padding: 30px 34px; color: #eaf7f4; background: var(--navy); }
.article-takeaway strong { color: var(--teal-light); font-size: .76rem; }
.article-takeaway p { margin: 12px 0 0; color: #d3e6e2; }
.article-disclaimer { display: flex; gap: 12px; margin-top: 36px; padding: 20px 0; color: #75898c; border-top: 1px solid #d7e2e0; border-bottom: 1px solid #d7e2e0; }
.article-disclaimer svg { margin-top: 5px; color: #168e83; }
.article-disclaimer p { margin: 0; color: inherit; font-size: .78rem; line-height: 1.75; }

.archive-page { min-height: 70vh; padding: 90px clamp(24px, 7vw, 110px) 110px; }
.archive-header { max-width: 760px; margin-bottom: 48px; }
.archive-header h1 { margin: 18px 0 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.15; }
.archive-grid { max-width: 1080px; display: grid; gap: 18px; }
.archive-item { display: grid; grid-template-columns: 170px 1fr; gap: 30px; padding: 28px; background: var(--paper); border: 1px solid #cedcda; }
.archive-item img { width: 170px; height: 100px; object-fit: cover; background: var(--navy); }
.archive-item h2 { margin: 8px 0 10px; font-family: Georgia, "Songti SC", serif; font-size: 1.35rem; }
.archive-item p { margin: 0; color: var(--slate); line-height: 1.75; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination a, .pagination span { padding: 10px 14px; border: 1px solid #bed1ce; background: #fff; }
.not-found { max-width: 760px; padding: 80px 0; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 72px; }
  .hero-copy { max-width: 760px; }
  .signal-panel { width: min(100%, 800px); }
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-card:nth-child(2) { border-right: 0; }
  .workflow-card:nth-child(-n+2) { border-bottom: 1px solid #cbd9d7; }
  .training { gap: 60px; }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .article-card:last-child { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

@media (max-width: 760px) {
  .site-header { min-height: 68px; padding-inline: 20px; }
  .header-link { display: none; }
  .hero { min-height: 0; padding: 62px 20px 68px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .hero-lead { font-size: 1rem; }
  .signal-panel__top { padding: 21px 20px 12px; }
  .signal-status { display: none; }
  .eeg-chart { min-height: 220px; }
  .signal-metrics div { padding: 15px 12px; }
  .signal-metrics strong { font-size: .7rem; }
  .principles { grid-template-columns: 1fr; padding: 26px 20px; }
  .principle-list { gap: 12px; }
  .principle-list span { display: grid; gap: 8px; }
  .principle-list b { margin: 0; }
  .section { padding: 82px 20px; }
  .section-heading { grid-template-columns: 1fr; gap: 26px; margin-bottom: 42px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-card { min-height: 240px; border-right: 0; border-bottom: 1px solid #cbd9d7; }
  .workflow-card:nth-child(3) { border-bottom: 1px solid #cbd9d7; }
  .workflow-card h3 { margin-top: 48px; }
  .methods-band { grid-template-columns: 1fr; }
  .method-intro { border-right: 0; border-bottom: 1px solid #23464a; }
  .method-list { grid-template-columns: 1fr; }
  .method-list span, .method-list span:nth-child(even) { border-right: 0; border-bottom: 1px solid #23464a; }
  .method-list span:last-child { border-bottom: 0; }
  .training { grid-template-columns: 1fr; gap: 46px; }
  .curriculum { padding: 25px 20px; }
  .insight { grid-template-columns: 1fr; gap: 50px; }
  .insight-visual { width: min(100%, 430px); justify-self: center; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card:last-child { grid-column: auto; display: block; }
  .article-body h3, .article-body > p { min-height: 0; }
  .site-footer { grid-template-columns: 1fr; padding: 38px 20px; }
  .site-footer p:last-child { justify-self: start; text-align: left; }
  .article-hero { padding: 74px 20px 64px; }
  .article-content { grid-template-columns: 1fr; gap: 36px; padding: 60px 20px 80px; }
  .article-content aside { position: static; }
  .article-prose section + section { margin-top: 48px; padding-top: 42px; }
  .article-takeaway { margin-top: 52px; padding: 26px 22px; }
  .archive-item { grid-template-columns: 1fr; }
  .archive-item img { width: 100%; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
