:root {
  color-scheme: dark;
  --bg: #0a1019;
  --panel: #101a28;
  --text: #f1f3f4;
  --muted: #a7b4c6;
  --line: #2b3747;
  --accent: #e8c58d;
  --blue: #a4c8e8;
  --max: 1160px;
  font-family: "PingFang HK", "Noto Sans CJK TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: radial-gradient(ellipse at 85% 8%, #142337 0, transparent 38%), var(--bg); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
.site-header, main, .site-footer { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 12px 16px; background: var(--accent); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-block: 25px; border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; min-height: 44px; }
.brand strong { display: block; font-size: 1.2rem; letter-spacing: .12em; }
.brand-dot { color: var(--accent); }
.brand small { display: block; margin-top: 5px; font: 500 .62rem/1.6 ui-monospace, monospace; letter-spacing: .17em; }
.header-nav { display: flex; gap: 6px; }
.header-nav a { display: flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.header-nav a:hover { color: var(--accent); }
.hero { display: grid; gap: 40px; align-items: center; padding-block: 64px 70px; }
.eyebrow { margin-bottom: 20px; color: var(--accent); font: 600 .72rem/1.8 system-ui, sans-serif; letter-spacing: .12em; }
h1 { margin-bottom: 24px; font-size: clamp(1.7rem, 5.2vw, 3.15rem); line-height: 1.32; letter-spacing: -.04em; font-weight: 750; }
h1 span { color: var(--blue); }
.hero-lede { max-width: 36rem; color: var(--muted); font-size: 1rem; line-height: 1.95; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.primary-action, .secondary-action, .project-action { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 12px 17px; border-radius: 6px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.primary-action, .project-action { background: var(--accent); color: var(--bg); }
.primary-action:hover, .project-action:hover { background: #f6d8a8; }
.secondary-action { border: 1px solid var(--line); color: var(--text); }
.secondary-action:hover { border-color: var(--blue); }
.phase-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, #142337, #0b1421); }
.panel-caption, .panel-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font: .62rem/1.6 ui-monospace, monospace; letter-spacing: .1em; }
.phase-wave { display: block; width: 100%; height: auto; margin-block: 12px; overflow: hidden; color: var(--muted); }
.phase-wave path { fill: none; }
.wave-axis { stroke: var(--muted); stroke-width: 1; opacity: .4; }
.wave-back { stroke: var(--blue); stroke-width: 2; opacity: .55; }
.wave-front { stroke: var(--accent); stroke-width: 3; }
.wave-guide { stroke: var(--accent); stroke-dasharray: 4 6; opacity: .5; }
.wave-point { fill: var(--accent); }
.panel-footer { padding-top: 16px; border-top: 1px solid var(--line); font-family: inherit; font-size: .76rem; }
.section { padding-block: 60px; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.section-heading { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; margin-bottom: 30px; }
.section-heading .eyebrow, .about .eyebrow { margin-bottom: 12px; }
h2 { margin-bottom: 0; font-size: clamp(1.4rem, 3.2vw, 2.1rem); line-height: 1.5; letter-spacing: -.025em; }
.section-note { color: var(--muted); font-size: .84rem; line-height: 1.8; margin-bottom: 0; }
.series-grid { display: grid; gap: 0 28px; }
.series-item { padding-block: 26px; border-top: 1px solid var(--line); }
.series-number { color: var(--accent); font: .76rem ui-monospace, monospace; }
.series-item h3 { margin-block: 18px 10px; font-size: 1.18rem; }
.series-item h3 small { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; margin-top: 5px; }
.series-item p { color: var(--muted); line-height: 1.85; font-size: .9rem; margin-bottom: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-button { min-height: 44px; min-width: 56px; padding: 8px 14px; background: transparent; border: 1px solid var(--line); border-radius: 24px; color: var(--muted); cursor: pointer; }
.filter-button.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter-button:hover:not(:disabled) { border-color: var(--blue); }
.filter-button:disabled { cursor: default; opacity: .5; }
#load-status { margin: -10px 0 22px; }
.project-grid { display: grid; gap: 22px; }
.project-card { display: grid; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.project-cover { display: flex; align-items: center; background: #151b26; }
.project-cover img { width: 100%; height: auto; }
.project-body { display: flex; align-items: flex-start; flex-direction: column; padding: 26px; }
.project-body h3 { font-size: 1.7rem; margin-bottom: 12px; }
.project-body h3 a { text-decoration: none; }
.project-body h3 a:hover { color: var(--accent); }
.project-body > p { line-height: 1.8; color: var(--muted); font-size: .95rem; }
.project-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--muted); font-size: .76rem; }
.status { padding: 5px 9px; border-radius: 4px; background: #233b32; color: #b2e5c9; }
.status-experiment { background: #20354d; color: var(--blue); }
.status-paused { background: #303946; color: var(--text); }
.status-graduated { background: #3c3427; color: var(--accent); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 26px; list-style: none; }
.tag-list li { color: var(--muted); border: 1px solid var(--line); padding: 5px 8px; font-size: .74rem; border-radius: 4px; }
.project-action { margin-top: auto; }
.project-footnote { margin: 18px 0 0; font-size: .78rem; line-height: 1.8; color: var(--muted); }
.empty-state { padding: 30px; margin: 0; border: 1px dashed var(--line); border-radius: 8px; line-height: 1.8; color: var(--muted); }
.about { display: grid; gap: 30px; }
.about-copy > p { color: var(--muted); font-size: .96rem; line-height: 1.9; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; }
.social-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .84rem; }
.social-links a:hover { color: var(--accent); }
.site-footer { display: flex; flex-direction: column; gap: 16px; padding-block: 30px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; line-height: 1.8; }
.site-footer strong { color: var(--text); font-weight: 500; }
.site-footer p { margin: 6px 0 0; }
@media (min-width: 560px) { .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 820px) {
  .site-header, main, .site-footer { width: min(calc(100% - 80px), var(--max)); }
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 45px; min-height: 590px; padding-block: 80px; }
  .section { padding-block: 70px; }
  .section-heading { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .section-heading .section-note { max-width: 16rem; text-align: right; }
  .series-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .project-card.featured { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .project-body { padding: 34px; }
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 70px; }
  .site-footer { flex-direction: row; justify-content: space-between; align-items: end; }
}
@media (max-width: 359px) { .site-header { gap: 8px; } .header-nav { width: 100%; } .header-nav a { padding-left: 0; padding-right: 24px; } .hero { padding-top: 42px; } .phase-panel { padding: 14px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
