:root {
  --bg-primary: #0b0d12;
  --bg-secondary: #11141a;
  --bg-card: #161a23;
  --bg-hover: #1e222e;
  --accent: #22c55e;
  --accent-glow: rgba(34, 197, 94, 0.2);
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --border: #2a2f3c;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-head: system-ui, -apple-system, "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
p { margin-bottom: 1rem; color: var(--text-sub); }
strong { color: var(--text-main); font-weight: 600; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-stretch: condensed;
}
h1 { font-size: clamp(2.2rem, 5vw + 1rem, 3.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw + 0.5rem, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.15rem, 2vw + 0.4rem, 1.5rem); margin-bottom: 1rem; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; position: relative; }
.section-alt { background: var(--bg-secondary); }
.section-border { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.card h3 { color: var(--text-main); }
.card p { font-size: 0.95rem; line-height: 1.6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.8rem; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer;
  transition: all 0.2s ease; border: none; font-size: 1rem; text-align: center;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #1ea44e; box-shadow: 0 4px 12px var(--accent-glow); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
th, td { padding: 1rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--bg-secondary); color: var(--text-main); font-weight: 600; }
td { color: var(--text-sub); }
tr:hover td { background: var(--bg-hover); }

details { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
summary {
  padding: 1rem; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); color: var(--text-main);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 1rem; background: var(--bg-primary); color: var(--text-sub); font-size: 0.95rem; line-height: 1.7; }

article.card .date { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 0.5rem; display: block; }
.article-actions { margin-top: 1rem; }
.link-text { color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.link-text:hover { text-decoration: underline; }

.header-grid { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.25rem; color: var(--text-main); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; gap: 1.5rem; }
nav a { padding: 0.5rem 0; border-bottom: 2px solid transparent; transition: color 0.2s ease; font-size: 0.95rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 3.5rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { margin-bottom: 1rem; color: var(--text-main); font-size: 1.1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--text-sub); transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.copyright { text-align: center; margin-top: 2.5rem; color: var(--text-sub); font-size: 0.85rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }

/* SVG Animation System */
.svg-container { width: 100%; max-width: 420px; margin: 0 auto; }
svg { width: 100%; height: auto; overflow: visible; }
.draw-path {
  pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: drawLine 6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  stroke-linecap: round; stroke-linejoin: round;
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; opacity: 0.4; }
  15% { stroke-dashoffset: 0; opacity: 1; }
  85% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 1; opacity: 0.4; }
}
.float-node {
  animation: floatNode 7s ease-in-out infinite alternate;
  transform-box: fill-box; transform-origin: center;
}
@keyframes floatNode {
  0% { transform: translate(0, 0); }
  100% { transform: translate(2px, -3px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .draw-path, .float-node { animation: none; opacity: 1; stroke-dashoffset: 0; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 768px) {
  .header-grid { flex-direction: column; height: auto; padding: 1rem 0; gap: 1rem; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  section { padding: 3.5rem 0; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
