:root {
  color-scheme: only light;
  --paper: #fff;
  --wash: #f7f7fa;
  --ink: #191b21;
  --quiet: #4d535c;
  --line: #e4e5eb;
  --accent: #4139a9;
  --gutter: clamp(16px, 4vw, 50px);
  --sans: system-ui, -apple-system, "PingFang TC", "Noto Sans CJK TC", sans-serif;
  --headline-size: clamp(1.95rem, 4.5vw, 3.45rem);
  --section-size: clamp(1.48rem, 3vw, 2.2rem);
  font-family: var(--sans);
  font-synthesis: none;
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
body { min-block-size: 100vh; min-inline-size: 0; display: flex; flex-direction: column; line-height: 1.65; }
main { flex: 1; }
main:focus { outline: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1160px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip { position: fixed; z-index: 10; inset: .6rem auto auto var(--gutter); padding: .6rem .9rem; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
.site-header { border-block-end: 1px solid var(--line); }
.site-footer { border-block-start: 1px solid var(--line); }
.site-bar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; column-gap: .75rem; }
.wordmark { display: inline-flex; min-height: 44px; align-items: center; gap: .45rem; color: var(--ink); font-weight: 760; font-size: clamp(1rem, 2vw, 1.25rem); letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.wordmark img { width: 30px; height: 30px; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 0 clamp(.65rem, 3vw, 1.5rem); }
.site-nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--quiet); font-size: .875rem; font-weight: 640; white-space: nowrap; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-footer .wordmark { font-size: 1rem; }
.site-footer .wordmark img { width: 26px; height: 26px; }
.page-intro h1 { font-size: var(--headline-size); font-weight: 780; letter-spacing: -.046em; line-height: 1.2; text-wrap: balance; }
.page-intro p { color: var(--quiet); font-size: clamp(1rem, 1.65vw, 1.125rem); line-height: 1.65; }
@media (max-width: 560px) {
  .site-bar { min-height: 56px; }
  .wordmark img { width: 25px; height: 25px; }
}
@media (max-width: 295px) {
  .site-bar { flex-wrap: wrap; padding-block: .2rem; }
  .site-nav { justify-content: start; }
}

/* Motion is additive: content is visible and clickable without it. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes koala-enter {
    from { opacity: .62; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .page-intro > h1 { animation: koala-enter 260ms cubic-bezier(.2,.65,.3,1) both; }
  .page-intro > p { animation: koala-enter 280ms cubic-bezier(.2,.65,.3,1) 35ms both; }
  .site-nav a { transition: color 150ms ease; }
  .site-nav a:hover { color: var(--accent); }
}
