/* LiSSi — site styles
   Brand teal from the logo, charcoal from the previous site. */
:root {
  --ink: #15191b;
  --ink-2: #485055;
  --muted: #737c81;
  --line: #e2e8e7;
  --line-2: #cfd8d6;
  --bg: #fafcfb;
  --surface: #ffffff;
  --surface-2: #f1f6f5;
  --dark: #1c2023;
  --dark-2: #262b2f;

  --teal: #45c7b9;
  --teal-300: #8edcd4;
  --teal-100: #d7f3ef;
  --teal-50: #ecf9f7;
  --teal-600: #2a9d8f;
  --teal-700: #1d7a6f;
  --teal-800: #155c54;
  --warm: #e0663a;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 22, .05), 0 8px 24px -12px rgba(16, 24, 22, .18);
  --shadow-lg: 0 2px 4px rgba(16, 24, 22, .04), 0 24px 48px -20px rgba(16, 24, 22, .28);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;

  --font: "Manrope", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.75; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-800); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: .01em; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: 1480px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; border-left: 1px solid var(--line-2); padding-left: 12px; }
.brand-text b { font-size: 13px; font-weight: 700; }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); font-size: 15px; font-weight: 500; transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--teal-50); color: var(--teal-800); font-weight: 700; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
  .brand-text { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: 8px var(--gutter) 16px; display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 14px; border-radius: 10px; font-size: 16px; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--dark); color: #c9d0d2; margin-top: 96px; }
.site-footer .wrap { padding-top: 56px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid img { height: 40px; width: auto; margin-bottom: 16px; }
.footer-grid h3 { color: #fff; font-size: 14px; letter-spacing: .08em; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: #c9d0d2; text-decoration: none; }
.site-footer a:hover { color: var(--teal); }
.footer-meta { border-top: 1px solid #353b3f; margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #8d979b; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------------------------------------------------------------- page hero */
.page-hero { position: relative; overflow: hidden; background: var(--dark); color: #fff; }
.page-hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 64px; }
.page-hero .eyebrow { color: var(--teal); }
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); margin: 6px 0 12px; font-weight: 800; }
.page-hero p.lead { color: #c4cccf; max-width: 720px; font-size: 18px; margin: 0; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(69, 199, 185, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 199, 185, .09) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal-700);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; background: currentColor; transform: rotate(45deg); border-radius: 2px; }

/* ---------------------------------------------------------------- sections */
.section { padding: 88px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 8px 0 0; font-weight: 800; }
.section-head p { color: var(--ink-2); margin: 8px 0 0; max-width: 620px; }
.link-arrow { font-weight: 700; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--teal); color: #0d2522; }
.btn-primary:hover { background: #5fd3c6; color: #0d2522; }
.btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .06); }
.btn-outline { border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }

.meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }

/* ---------------------------------------------------------------- home hero */
.hero { background: var(--dark); color: #fff; overflow: hidden; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; min-height: min(720px, calc(100vh - var(--header-h))); padding-top: 48px; padding-bottom: 48px; }
.hero h1 { margin: 0 0 24px; font-weight: 800; }
.hero h1 .eyebrow { display: flex; }
.hero-tagline { display: block; margin-top: 18px; font-size: clamp(40px, 6vw, 76px); line-height: 1; letter-spacing: .01em; }
.hero-tagline em { font-style: normal; color: var(--teal); }
.hero p { color: #c4cccf; font-size: 18px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
/*.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 75% 50%, rgba(69, 199, 185, .16), transparent 70%);
}*/
.iso { position: relative; height: 560px; perspective: 1400px; }
.iso-stack { position: absolute; left: 50%; top: 50%; width: 360px; height: 470px; transform-style: preserve-3d;
  transform: translate(-50%, -46%) rotateX(56deg) rotateZ(-38deg); }
.iso-layer { position: absolute; inset: 0; }
.iso-layer svg { width: 100%; height: 100%; overflow: visible; }
.iso-layer.l3 { transform: translateZ(-34px); }
.iso-layer.l2 { transform: translateZ(-17px); }
.iso-layer.l3 path { fill: #2e7f74; stroke: #2e7f74; stroke-width: 2; }
.iso-layer.l2 path { fill: #7fd6cc; stroke: #7fd6cc; stroke-width: 2; }
.iso-layer.l1 path { fill: var(--teal); stroke: #e8fbf8; stroke-width: 1.4; }
.iso-grid { position: absolute; inset: -40% -40%; transform: translateZ(-60px);
  background-image: linear-gradient(rgba(69, 199, 185, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(69, 199, 185, .16) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(closest-side, #000 40%, transparent);
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent); }
/* NCCU placemark: a dot on the map plane plus a pin counter-rotated to stand upright */
.iso-mark { position: absolute; width: 0; height: 0; transform-style: preserve-3d; transform: translateZ(1px); }
.iso-dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--warm);
  box-shadow: 0 0 0 5px rgba(224, 102, 58, .28), 0 0 0 11px rgba(224, 102, 58, .12); }
.iso-pin { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: rotateZ(38deg) rotateX(-56deg); transform-style: preserve-3d; }
.pin-body { position: absolute; left: 0; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pin-icon { width: 30px; height: 41px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.pin-label { background: #fff; color: var(--ink); border-radius: 10px; padding: 6px 12px; font-size: 13px; line-height: 1.35; white-space: nowrap; text-align: center; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }
.pin-label b { display: block; font-size: 15px; font-weight: 800; color: var(--teal-800); letter-spacing: .02em; }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 56px; }
  .iso { height: 400px; }
  .iso-stack { width: 260px; height: 340px; }
  .pin-label { font-size: 11.5px; padding: 4px 9px; }
  .pin-label b { font-size: 13px; }
}

/* ---------------------------------------------------------------- pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; position: relative; }
.pillar .num { font-size: 13px; font-weight: 800; color: var(--teal-700); letter-spacing: .1em; }
.pillar h3 { font-size: 20px; margin: 18px 0 8px; }
.pillar p { color: var(--ink-2); font-size: 15px; margin: 0; }
.pillar .glyph { width: 40px; height: 40px; position: absolute; right: 22px; top: 22px; }
@media (max-width: 960px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- cards (one card for every section) */
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; color: inherit; }
.card-cover { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; position: relative; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a.card:hover .card-cover img { transform: scale(1.03); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 19px; margin: 0; }
.card-body p { color: var(--ink-2); font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .meta { margin-top: auto; padding-top: 6px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.feature-card .card-cover { aspect-ratio: 16 / 10; }
.feature-card .card-body { padding: 26px 28px 28px; }
.feature-card h3 { font-size: 26px; }
.feature-card .meta { justify-content: space-between; }

/* generated cover for posts without an image */
.gen-cover { width: 100%; height: 100%; background: var(--dark-2); position: relative; overflow: hidden; }
.gen-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gen-cover .gen-date { position: absolute; left: 20px; bottom: 16px; color: #fff; font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: .02em; }
.gen-cover .gen-date small { display: block; font-size: 12px; font-weight: 600; color: var(--teal); letter-spacing: .14em; margin-bottom: 6px; }

/* ---------------------------------------------------------------- prose */
.prose { font-size: 17px; line-height: 1.9; color: #262c2f; max-width: 760px; }
.prose h2 { font-size: 26px; margin: 2em 0 .7em; font-weight: 800; }
.prose h3 { font-size: 20px; margin: 1.8em 0 .6em; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--teal-600); }
.prose blockquote { border-left: 3px solid var(--teal); padding: 4px 0 4px 20px; color: var(--ink-2); }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.prose strong { color: var(--ink); }
.prose > :first-child { margin-top: 0; }

.article-head { padding: 56px 0 8px; }
.article-head h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; margin: 14px 0 12px; max-width: 900px; }
.article-head .subtitle { font-size: 20px; color: var(--ink-2); margin: 0 0 18px; max-width: 760px; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal-700); }

.notice { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); background: var(--surface); }
.loading { color: var(--muted); padding: 40px 0; }
.draft-banner { background: #fff4d6; color: #6b4b00; text-align: center; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.source-link { margin-top: 32px; font-weight: 600; }

/* uploaded HTML embedded in an article ({{viz}}) */
.viz-section { margin: 40px 0 24px; }
/* content-box: the height set from the embed's report is exactly its inner viewport */
.embed-frame { display: block; box-sizing: content-box; width: calc(100% - 2px); border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.embed-actions { margin: 10px 4px 0; font-size: 14px; text-align: right; }
.embed-actions a { color: var(--muted); text-decoration: none; }
.embed-actions a:hover { color: var(--teal-700); }

/* ---------------------------------------------------------------- about */
.split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.ref-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.ref-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--surface); font-size: 14px; color: var(--ink-2); }
.ref-card b { display: block; font-size: 22px; color: var(--ink); font-weight: 800; }
@media (max-width: 760px) { .ref-cards { grid-template-columns: 1fr; } }
.charter { margin: 28px 0 0; padding: 24px 28px; background: var(--teal-50); border-radius: var(--radius); color: var(--teal-800); font-size: 16px; border: 0; }
.charter cite { display: block; font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; color: var(--teal-700); }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; background: var(--teal); transform: rotate(45deg); border-radius: 2px; }
.timeline b { display: block; font-size: 14px; color: var(--teal-700); }

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.person-body { padding: 20px 22px 24px; }
.person h3 { font-size: 21px; margin: 0; }
.person .en { font-size: 13px; color: var(--muted); }
.person .role { display: inline-block; margin: 10px 0 12px; font-size: 13px; font-weight: 700; color: var(--teal-800); background: var(--teal-50); padding: 3px 10px; border-radius: 999px; }
.person p { font-size: 15px; color: var(--ink-2); margin: 0; }
.person:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; color: inherit;
}
@media (max-width: 960px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- 404 / empty section */
.placeholder-hero { text-align: center; padding: 72px 0 24px; }
.placeholder-hero h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 800; margin: 12px 0 8px; }
.placeholder-hero p { color: var(--ink-2); font-size: 18px; max-width: 640px; margin: 0 auto; }
.soon { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--teal-50); color: var(--teal-800); font-weight: 700; font-size: 14px; }
.soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-600); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .soon::before { animation: none; } }
