/* ===== Base Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans", sans-serif; line-height: 1.6; }
img, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
#vision,
#aboutVision { white-space: pre-line; }
.zh { font-size: 1.6em; }
.en, .lab { font-size: 1em; }
:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --gray: #ededed;
  --primary: #059669;
  --primary-strong: #047857;
  --primary-weak: #ecfdf5;
  --accent: #2563eb;
  --accent-weak: #eff6ff;
  --card: #f8fafc;
  --border: #e2e8f0;
  --shadow: 0 6px 20px rgba(2,6,23,.08);
}
body { background: var(--bg); color: var(--fg); }
.container { width: min(1100px, 92vw); margin-inline: auto; }
.section { padding: 80px 0; }
.section h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem); margin: 0 0 14px; }
.section p.lead { color: var(--muted); margin-top: 0; }
header { position: sticky; top: 0; backdrop-filter: saturate(1.2) blur(8px); background: color-mix(in oklab, var(--bg) 80%, transparent); border-bottom: 1px solid var(--border); z-index: 50; overflow: visible; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; min-height: 92px; overflow: visible; gap: 18px; }
.logo {
  height: 69px !important;
  width: auto !important;
  max-width: none;
  max-height: none;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}
.logo:hover { opacity: 0.8; }
.brand { display: flex; align-items: center; min-width: 0; flex-shrink: 1; overflow: visible; }
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  line-height: 1.05;
  overflow: visible;
  color: #166534;
  text-decoration: none;
}
.brand-full-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 420px;
  color: #166534;
  font-size: clamp(0.9rem, 1.2vw, 1.2rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand-full-name span { display: block; }
.brand a { color: #166534; text-decoration: none; }
.brand a:hover { opacity: 0.8; }
nav { flex-shrink: 0; }
nav ul { display: flex; gap: clamp(4px, 1vw, 18px); list-style: none; padding: 0; margin: 0; }
nav a { padding: 8px clamp(6px, 0.8vw, 12px); border-radius: 10px; font-size: clamp(1.2rem, 1vw, 1.6rem); color: var(--muted); }
nav a:hover, nav a.active { color: var(--fg); background: color-mix(in oklab, var(--gray) 50%, transparent); }
.hamburger { display: none; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; background: transparent; color: var(--fg); }
@media (max-width: 880px) {
  .nav { min-height: 78px; padding: 7px 0; }
  nav ul { display: none; }
  nav ul.open { display: grid; gap: 10px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; position: absolute; right: 4vw; top: 78px; box-shadow: var(--shadow); }
  .hamburger { display: block; }
  .logo { height: 57px !important; }
  .brand-logo-link { gap: 10px; }
  .brand-full-name { max-width: 280px; font-size: 0.8rem; }
}
.grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 18px; }
.col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; } .col-12 { grid-column: span 12; }
@media (max-width: 880px) { .col-4, .col-6 { grid-column: span 12; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: clip; }
.card .content { padding: 18px; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.muted { color: var(--muted); }
.tag { padding: 6px 10px; border-radius: 6px; background: color-mix(in oklab, var(--primary-weak) 55%, transparent); border: 1px solid var(--border); font-size: .88rem; }
.badge { padding: 6px 10px; border: 1px dashed var(--border); border-radius: 999px; font-size: .85rem; color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.line { height: 1px; background: var(--border); margin: 8px 0; }
.spacer { height: 16px; }
.person { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: center; }
.avatar { display: none; }
.person, .person.hero { grid-template-columns: 1fr; }
.role { font-size: .9rem; color: var(--muted); }
.input { padding: 10px 12px; border: 1px solid var(--border); background: var(--bg); border-radius: 12px; color: var(--fg); }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
footer { padding: 20px 0 24px; border-top: 1px solid var(--border); color: var(--muted); }
footer > .container[style*="border-top"] { border-top: none !important; padding-top: 10px !important; padding-bottom: 10px !important; }
.footgrid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; padding-top: 10px; }
@media (max-width: 880px) { .footgrid { grid-template-columns: 1fr; } }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; font-size: .9rem; color: var(--muted); display: grid; place-items: center; gap: 6px; }
.scroll-cue svg { width: 22px; height: 22px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .65; } 50% { transform: translateY(4px); opacity: 1; } }
.dots { position: fixed; right: 18px; top: 50%; translate: 0 -50%; display: grid; gap: 10px; z-index: 40; }
.dotbtn { width: 12px; height: 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); cursor: pointer; opacity: .7; }
.dotbtn[aria-current="true"] { background: var(--primary); border-color: var(--primary); opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; opacity: 1; transform: none; } .scroll-cue svg { animation: none; } }
body[data-page="publication"] .section { padding-top: 56px; padding-bottom: 56px; }
body[data-page="publication"] .publication-section { margin-bottom: 28px; }
body[data-page="publication"] .section-header { margin-bottom: 8px; padding-bottom: 6px; }
body[data-page="publication"] .pub-list { font-size: 0.92rem; line-height: 1.38; }
body[data-page="publication"] .pub-list li { padding-top: 6px; padding-bottom: 6px; }
body[data-page="publication"] .pub-list li::before { top: 6px; }
