:root {
  --blue: #0d39ae;
  --ink: #14192b;
  --line: #dbe1f0;
  --soft: #f4f6fc;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: system-ui, "Segoe UI", "Microsoft JhengHei", "PingFang TC", sans-serif;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; }

.wrap { width: min(100% - 2.5rem, 60rem); margin-inline: auto; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 2; background: #fff; padding: .5rem 1rem; }

.site-header { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.brand img { display: block; width: 8.5rem; }

.actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.lang { color: var(--blue); }

.button {
  flex-shrink: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: .55rem 1.2rem;
  border-radius: 999px;
}
.button:hover { background: #092a83; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.hero { display: grid; grid-template-columns: 1fr 16rem; gap: 2rem; align-items: center; padding-block: 3rem; }
.hero h1 { margin: 0; color: var(--blue); font-size: clamp(2rem, 6vw, 3rem); line-height: 1.2; }

section + section { border-top: 1px solid var(--line); padding-block: 2.5rem; }
h2 { margin-top: 0; color: var(--blue); }

.grid { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; }
.two { grid-template-columns: repeat(2, 1fr); }
.three { grid-template-columns: repeat(3, 1fr); }
.card { display: block; height: 100%; border: 1px solid var(--line); border-radius: .75rem; padding: 1.25rem; color: inherit; text-decoration: none; }
.card h3 { margin: 0; color: var(--blue); }
.card p { margin: .5rem 0 0; }
a.card:hover { border-color: var(--blue); background: var(--soft); }
.card.soon { background: var(--soft); border-style: dashed; }
.card.soon p { color: #5a6275; }

.work { border: 1px solid var(--line); border-radius: .75rem; padding: 1.25rem; margin-bottom: 1rem; }
.work > h3 { margin: 0; color: var(--blue); }
.work h4 { margin: 1rem 0 .25rem; }
.work p { margin: 0; }
.themes { margin: 1rem 0 0; padding-left: 1.5rem; }
.themes li + li { margin-top: 1rem; }
.work-page .back { margin: 1.5rem 0 1rem; }
.work-page .work { margin-bottom: 2.5rem; }
.work h1 { margin: 0; color: var(--blue); font-size: clamp(1.6rem, 4vw, 2rem); line-height: 1.3; }
.work h2 { margin: 1.25rem 0 .25rem; color: var(--ink); font-size: 1.1rem; }
.themes h2 { margin: 0 0 .25rem; }
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.chart { margin: 1rem 0 0; padding: 1rem; background: var(--soft); border-radius: .5rem; max-width: 100%; }
.chart figcaption { font-weight: 700; margin-bottom: .5rem; }
.chart .mermaid { margin: 0; overflow-x: auto; text-align: center; font: inherit; }
.chart svg { max-width: none; height: auto; }
.diagram { display: grid; place-items: center; min-height: 14rem; background: var(--soft); border-radius: .5rem; }

.row { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1rem; }
.row h3, .row p { margin: 0; font-size: 1rem; }

.social { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-left: auto; font-size: .95rem; }
.social a { color: var(--blue); }

.todo { background: #fff1b8; color: inherit; padding: 0 .25em; }

footer { border-top: 1px solid var(--line); padding-block: 1.5rem; }

@media (max-width: 56rem) {
  .bar { flex-wrap: wrap; }
  .social { order: 3; width: 100%; margin-left: 0; }
}

@media (max-width: 40rem) {
  html { scroll-padding-top: 8.5rem; }
  .brand img { width: 7rem; }
  .actions { gap: .75rem; }
  .button { padding: .5rem .9rem; }
  .two, .three, .columns, .row { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-block: 2rem; }
  .hero img { width: 12rem; margin-inline: auto; }
  .work { padding: 1rem; }
  .themes { padding-left: 1.25rem; }
}

.not-found { padding-block: 2.5rem; }
.not-found h1 { margin: 0 0 .5rem; color: var(--blue); font-size: clamp(1.6rem, 4vw, 2rem); }
.not-found p { margin: .25rem 0; }

/* Full-bleed hero must not add sideways scroll */
body { overflow-x: clip; }

/* Motion: progress bar (scroll-linked) */
.progress { position: fixed; top: 0; left: 0; z-index: 3; width: 100%; height: 4px; background: #6f8cff; transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* Motion: parallax hero */
.hero-scene { position: relative; overflow: hidden; margin-inline: calc(50% - 50vw); min-height: calc(100svh - 5rem); display: flex; align-items: center; background: linear-gradient(160deg, #0d39ae 0%, #14192b 85%); color: #fff; }
.stars { position: absolute; inset: -20% 0 0; background-image: radial-gradient(2px 2px at 20% 30%, #ffffff99, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #ffffffb3, transparent), radial-gradient(2px 2px at 40% 70%, #ffffff80, transparent), radial-gradient(1.5px 1.5px at 85% 60%, #ffffffa6, transparent), radial-gradient(1px 1px at 10% 85%, #ffffff99, transparent), radial-gradient(2px 2px at 55% 45%, #ffffff8c, transparent); background-size: 420px 420px; will-change: transform; }
.hero-inner { position: relative; width: min(100% - 2.5rem, 60rem); margin-inline: auto; display: grid; grid-template-columns: 1fr 16rem; gap: 2rem; align-items: center; padding-block: 3rem; }
.hero-copy, .hero-astro { will-change: transform; }
.hero-copy h1 { margin: 0 0 1rem; color: #fff; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.2; }
.hero-copy p { color: #e6ebff; }
.hero-astro { position: relative; width: 100%; transform-origin: 50% 0; }
.hero-astro img { display: block; width: 100%; filter: brightness(0) invert(1); }
.orbit { position: absolute; inset: -12% -14%; width: 128%; height: 124%; overflow: visible; pointer-events: none; }
.orbit path { fill: none; stroke: #9fb4ff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s .4s ease forwards; }
.orbit .s2 { animation-delay: 1.4s; stroke: #fff; }
.orbit .s3 { animation-delay: 1.8s; stroke: #fff; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .orbit path { stroke-dashoffset: 0; animation: none; } }
.hero-scene + section { border-top: 0; }

/* Motion: work pages, scroll snap + scroll-triggered */
html.snap-page { scroll-snap-type: y mandatory; }
.snap-page .work { border: 0; padding: 0; margin: 0; }
.snap-page .themes { padding-left: 0; list-style: none; counter-reset: theme; }
.snap-page .themes li + li { margin-top: 0; }
.panel { scroll-snap-align: start; min-height: calc(100svh - 5.5rem); display: flex; flex-direction: column; justify-content: center; padding-block: 2rem; border-bottom: 1px solid var(--line); }
.themes .panel { counter-increment: theme; }
.themes .panel h2::before { content: counter(theme) ". "; color: var(--blue); }
.themes .panel h2 { margin: 0 0 .5rem; color: var(--blue); font-size: clamp(1.3rem, 3vw, 1.6rem); }
.panel > .back { margin: 0 0 1rem; }
.panel .lede { max-width: 40rem; margin: 1rem 0 0; font-size: 1.1rem; }
.scroll-hint { margin: 2rem 0 0; color: var(--blue); font-size: 1.5rem; }
@media (prefers-reduced-motion: no-preference) { .scroll-hint { animation: hint 1.6s ease-in-out infinite; } }
@keyframes hint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.reveal-on .panel > * { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal-on .panel > :nth-child(2) { transition-delay: .1s; }
.reveal-on .panel > :nth-child(3) { transition-delay: .2s; }
.reveal-on .panel.in > * { opacity: 1; transform: none; }
.snap-page footer { scroll-snap-align: end; }

@media (max-width: 40rem) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 2rem; }
  .hero-astro { width: 10rem; margin-inline: auto; grid-row: 1; }
  .panel { min-height: calc(100svh - 8.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html.snap-page { scroll-snap-type: y proximity; }
  .stars, .hero-copy, .hero-astro { transform: none !important; }
}

/* Page transitions (View Transitions API; browsers without support just switch pages) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* Cursor speech bubble (mouse only): the system arrow stays, a comic bubble appears next to links, buttons and cards */
.cur-bub { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 70; }
.cur-bub b { position: absolute; left: 22px; top: 30px; white-space: nowrap; padding: .35rem .75rem; background: #fff; border: 3px solid var(--ink); border-radius: 1rem; box-shadow: 3px 3px 0 var(--ink); font-weight: 800; font-size: .95rem; color: var(--ink); transform: scale(0); transform-origin: 0 0; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
.cur-bub b::before { content: ""; position: absolute; left: 6px; top: -11px; width: 12px; height: 12px; background: #fff; border-left: 3px solid var(--ink); border-top: 3px solid var(--ink); transform: skewX(25deg) rotate(20deg); }
.cur-bub.on b { transform: scale(1); }
.cur-bub.up b { top: auto; bottom: 18px; transform-origin: 0 100%; }
.cur-bub.up b::before { top: auto; bottom: -11px; border-top: 0; border-bottom: 3px solid var(--ink); transform: skewX(-25deg) rotate(-20deg); }
.cur-bub.left b { left: auto; right: 10px; }
.cur-bub.left b::before { left: auto; right: 6px; }
.cur-bub.left:not(.up) b { transform-origin: 100% 0; }
.cur-bub.left.up b { transform-origin: 100% 100%; }

/* Number counter */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.25rem; }
.stat { text-align: center; border: 1px solid var(--line); border-radius: .75rem; padding: 1rem .5rem; }
.stat b { display: block; font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--blue); font-variant-numeric: tabular-nums; line-height: 1.2; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Marquee */
.marquee { margin-top: 1.5rem; overflow: hidden; }
.marquee-label { margin: 0 0 .5rem; font-weight: 700; }
.marquee .track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee ul { display: flex; gap: .75rem; list-style: none; margin: 0; padding: 0 .75rem 0 0; }
.marquee li { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .9rem; color: var(--blue); font-weight: 700; background: var(--soft); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee .track { animation: none; width: auto; }
  .marquee ul[aria-hidden] { display: none; }
  .marquee ul { flex-wrap: wrap; row-gap: .5rem; }
}

/* Intro loader (first visit only) */
.intro-loader { display: none; }
html.intro { overflow: hidden; }
html.intro .intro-loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 1.5rem; background: linear-gradient(160deg, #0d39ae, #14192b); transition: transform .8s cubic-bezier(.7,0,.3,1); }
.intro-loader img { width: 9rem; filter: brightness(0) invert(1); animation: intro-pop .8s ease both; }
.intro-loader .bar { width: 12rem; height: 3px; background: #ffffff33; overflow: hidden; }
.intro-loader .bar span { display: block; height: 100%; width: 0; background: #fff; animation: intro-fill 1.6s .3s ease forwards; }
.intro-loader.gone { transform: translateY(-100%); }
@keyframes intro-fill { to { width: 100%; } }
@keyframes intro-pop { from { opacity: 0; transform: scale(.8); } }

/* FLIP preview panel */
button.card { width: 100%; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.flip-shade { position: fixed; inset: 0; z-index: 40; background: #14192b80; }
.flip-panel { position: fixed; inset: 10vh max(1.25rem, calc((100vw - 48rem) / 2)) auto; z-index: 41; max-height: 80vh; overflow: auto; padding: 2rem; border-radius: 1rem; background: linear-gradient(160deg, #0d39ae, #14192b); color: #fff; }
.flip-panel h3 { margin: 0 0 .75rem; color: #fff; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.flip-panel .marquee-label { color: #fff; }
.flip-panel .button { display: inline-block; margin-top: 1.25rem; background: #fff; color: var(--blue); }
.flip-close { position: absolute; top: .75rem; right: .75rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: #ffffff26; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.flip-shade[hidden], .flip-panel[hidden] { display: none; }

/* ===== Theme: 活潑插畫風 × 美式漫畫 (Austin 2026-11-29「現在套用」) ===== */
:root { --blue: #0d39ae; --ink: #14192b; --line: #14192b; --soft: #fff2c6; --paper: #fbf6ec; --sun: #ffcf4a; --pink: #ffe3e8; --mint: #dcf5ed; --red: #e63946; }
body { background-color: var(--paper); background-image: radial-gradient(#14192b14 1.2px, transparent 1.2px); background-size: 22px 22px; color: var(--ink); }
.comic, h2, .hero-copy h1, .stat b, .not-found h1 { font-family: "Bangers", "Noto Sans TC", "Microsoft JhengHei", sans-serif; font-weight: 400; letter-spacing: .03em; }
.site-header { background: var(--paper); border-bottom: 3px double var(--ink); }
.social a, .lang { color: var(--ink); font-weight: 700; }
.button { background: var(--sun); color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-family: "Baloo 2", "Noto Sans TC", sans-serif; font-weight: 800; transition: transform .15s, box-shadow .15s; }
.button:hover { background: var(--sun); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
a:focus-visible { outline-color: var(--red); }
h2 { color: var(--blue); font-size: clamp(2.2rem, 5vw, 2.8rem); }
section + section { border-top: 0; }

/* hero: paper + halftone instead of the dark sky; parallax and orbit stay */
.hero-scene { background: transparent; color: var(--ink); min-height: calc(100svh - 6rem); }
.stars { background-image: radial-gradient(#0d39ae2e 2px, transparent 2.2px), radial-gradient(#e6394626 3px, transparent 3.2px); background-size: 14px 14px, 90px 90px; background-position: 0 0, 30px 40px; -webkit-mask-image: radial-gradient(60% 70% at 78% 45%, #000, transparent 75%); mask-image: radial-gradient(60% 70% at 78% 45%, #000, transparent 75%); }
.hero-copy h1 { color: var(--sun); -webkit-text-stroke: 2px var(--ink); text-shadow: 5px 5px 0 var(--blue); font-size: clamp(3rem, 8vw, 5rem); line-height: .95; margin-bottom: 1.25rem; }
.hero-copy p { color: var(--ink); }
.hero-copy p:first-of-type { position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 1.5rem; padding: .75rem 1rem; box-shadow: 4px 4px 0 var(--ink); }
.hero-copy p:first-of-type::after { content: ""; position: absolute; left: 2rem; bottom: -1.1rem; border: .6rem solid transparent; border-top: 1rem solid var(--ink); }
.hero-copy p:last-of-type { margin-top: 1.75rem; }
.hero-astro img { filter: none; }
.orbit path { stroke: var(--ink); stroke-width: 3; }
.orbit .s2 { stroke: var(--red); }
.orbit .s3 { stroke: var(--blue); }
.progress { height: 6px; background: var(--red); border-bottom: 2px solid var(--ink); }

/* cards as comic panels */
.card { background: #fff; border: 3px solid var(--ink); border-radius: 1.25rem; box-shadow: 5px 5px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.grid li:nth-child(2) .card { background: var(--pink); }
.grid li:nth-child(3) .card { background: var(--mint); }
.grid li:nth-child(4) .card { background: var(--soft); }
.card h3 { font-family: "Baloo 2", "Noto Sans TC", sans-serif; font-weight: 800; color: var(--blue); font-size: 1.4rem; }
a.card:hover, button.card:hover { background: #fff; border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.card.soon { border-style: solid; }
.card.soon p { color: var(--ink); font-family: "Bangers", "Noto Sans TC", sans-serif; letter-spacing: .05em; font-size: 1.1rem; }

/* contact as a big speech bubble */
#contact { position: relative; background: var(--blue); color: #fff; border: 3px solid var(--ink); border-radius: 2rem; box-shadow: 6px 6px 0 var(--ink); padding: 2rem; margin-block: 2.5rem 3.5rem; }
#contact::after { content: ""; position: absolute; left: 3rem; bottom: -1.5rem; border: .8rem solid transparent; border-top: 1.5rem solid var(--ink); }
#contact h2 { color: var(--sun); margin-top: 0; }
#contact a { color: #fff; }
footer { border-top: 3px double var(--ink); font-weight: 700; }

/* work pages */
.panel { border-bottom: 3px dashed #14192b33; }
.themes .panel h2 { font-family: "Baloo 2", "Noto Sans TC", sans-serif; font-weight: 800; letter-spacing: 0; color: var(--blue); }
.themes .panel h2::before { color: var(--red); }
.work h1 { font-family: "Bangers", "Noto Sans TC", sans-serif; font-weight: 400; letter-spacing: .03em; color: var(--sun); -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--blue); font-size: clamp(2.6rem, 7vw, 4rem); }
.panel .lede { background: #fff; border: 3px solid var(--ink); border-radius: 1.25rem; padding: .75rem 1rem; box-shadow: 4px 4px 0 var(--ink); }
.scroll-hint { color: var(--red); }
.work h2 { font-family: "Baloo 2", "Noto Sans TC", sans-serif; font-weight: 800; letter-spacing: 0; color: var(--blue); font-size: 1.5rem; }
.chart { background: #fff; border: 3px solid var(--ink); border-radius: 1.25rem; box-shadow: 6px 6px 0 var(--ink); }
.stat { background: #fff; border: 3px solid var(--ink); border-radius: 1rem; box-shadow: 4px 4px 0 var(--ink); }
.stat:nth-child(2) { background: var(--pink); } .stat:nth-child(3) { background: var(--mint); }
.stat b { color: var(--blue); font-size: clamp(2.2rem, 6vw, 3rem); }
.marquee li { border: 2px solid var(--ink); background: #fff; color: var(--ink); }
.diagram { background: #fff; border: 3px dashed var(--ink); }

/* intro loader, FLIP panel, cursor */
html.intro .intro-loader { background-color: var(--paper); background-image: radial-gradient(#0d39ae2e 2px, transparent 2.2px); background-size: 14px 14px; }
.intro-loader img { filter: none; }
.intro-loader .bar { height: 10px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; width: 14rem; }
.intro-loader .bar span { background: var(--sun); }
.flip-shade { background: #14192b66; }
.flip-panel { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 1.5rem; box-shadow: 8px 8px 0 var(--ink); }
.flip-panel h3 { font-family: "Bangers", "Noto Sans TC", sans-serif; font-weight: 400; letter-spacing: .03em; color: var(--sun); -webkit-text-stroke: 1.5px var(--ink); text-shadow: 3px 3px 0 var(--blue); font-size: clamp(2.2rem, 5vw, 3rem); }
.flip-panel .marquee-label { color: var(--ink); }
.flip-panel .button { background: var(--sun); color: var(--ink); }
.flip-close { background: var(--sun); color: var(--ink); border: 3px solid var(--ink); }
.not-found h1 { color: var(--blue); font-size: clamp(2.4rem, 6vw, 3.4rem); }

/* Hero stars: drawn in, then spin and twinkle (Austin 2026-11-29) */
.orbit .s2, .orbit .s3 { transform-box: fill-box; transform-origin: center; }
.orbit .s2 { animation: draw 1.2s .4s ease forwards, star-spin 6s 1.6s linear infinite, star-twinkle 1.8s 1.6s ease-in-out infinite; }
.orbit .s3 { animation: draw 1.2s .8s ease forwards, star-spin 8s 2s linear infinite reverse, star-twinkle 2.4s 2s ease-in-out infinite; }
@keyframes star-spin { to { rotate: 360deg; } }
@keyframes star-twinkle {
  0%, 100% { scale: 1; filter: drop-shadow(0 0 0 transparent); fill: transparent; }
  50% { scale: 1.25; filter: drop-shadow(0 0 6px #ffcf4a) drop-shadow(0 0 2px #ffcf4a); fill: #ffcf4a; }
}
@media (prefers-reduced-motion: reduce) { .orbit .s2, .orbit .s3 { animation: none; stroke-dashoffset: 0; } }

/* Running astronaut + more stars (Austin 2026-11-29) */
.hero-astro img { display: block; width: 100%; }
.astro-run { position: relative; display: block; }
.astro-run::before { display: none; content: ""; position: absolute; left: -12%; top: 32%; width: 26%; height: 36%; pointer-events: none;
  background: linear-gradient(#14192b, #14192b) 0 15% / 70% 5px no-repeat, linear-gradient(#0d39ae, #0d39ae) 30% 50% / 55% 5px no-repeat, linear-gradient(#14192b, #14192b) 10% 85% / 60% 5px no-repeat;
  opacity: 0; }
.orbit .star { transform-box: fill-box; transform-origin: center; }
.orbit .s4 { stroke: var(--sun); stroke-width: 2.5; }
.orbit .s5 { stroke: var(--red); }
.orbit .s6 { stroke: var(--blue); }
.orbit .s7 { stroke: var(--ink); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .orbit .s4 { animation: draw 1s 1s ease forwards, star-spin 3s 2s linear infinite, star-twinkle 1.4s 2s ease-in-out infinite; }
  .orbit .s5 { animation: draw 1s 1.2s ease forwards, star-spin 5s 2.2s linear infinite reverse, star-twinkle 2s 2.2s ease-in-out infinite; }
  .orbit .s6 { animation: draw 1s 1.4s ease forwards, star-spin 4s 2.4s linear infinite, star-twinkle 1.7s 2.4s ease-in-out infinite; }
  .orbit .s7 { animation: draw 1s 1.6s ease forwards, star-spin 3.5s 2.6s linear infinite reverse, star-twinkle 1.2s 2.6s ease-in-out infinite; }
}
@keyframes astro-run {
  0% { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-4%) rotate(3deg); }
}
@keyframes speed-lines {
  0% { transform: translateX(30%); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateX(-60%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .orbit .star { animation: none; stroke-dashoffset: 0; } }

/* Running astronaut now comes from a generated GIF (Higgsfield, 2026-11-29); static PNG for reduced motion */
.astro-run picture, .astro-run img { display: block; width: 100%; }

/* ===== Fonts: Outfit for Latin and headings, 昭源圓體 (Chiron GoRound TC) for Chinese (Austin 2026-11-30) ===== */
body, body *:not(.c-dot):not(.c-ring) { font-family: "Outfit", "Chiron GoRound TC", "Microsoft JhengHei", sans-serif !important; letter-spacing: normal; }
h1, h2, h3, .hero-copy h1, .work h1, .button, .card h3, .stat b, .flip-panel h3 { font-weight: 700 !important; letter-spacing: -.01em !important; }
.hero-copy h1, .work h1 { font-size: clamp(2.6rem, 7vw, 4.4rem) !important; line-height: 1.02 !important; }

/* Text size switcher (top right): small 90%, medium 100%, large 120% of the root size; the buttons keep a fixed size */
.actions { flex-wrap: wrap; flex-shrink: 1; justify-content: flex-end; row-gap: .5rem; }
.fs { display: flex; align-items: center; gap: 6px; }
.fs button { width: 32px; height: 32px; padding: 0; font-family: "Outfit", sans-serif !important; font-weight: 800; line-height: 1; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.fs button:nth-child(1) { font-size: 13px; }
.fs button:nth-child(2) { font-size: 17px; }
.fs button:nth-child(3) { font-size: 21px; }
.fs button:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.fs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.fs button[aria-pressed="true"] { background: var(--sun); }

/* Big comic titles (home hero and work-page title): Cinzel, yellow fill, black outline painted under the fill, blue shadow */
body .hero-copy.hero-copy h1:not(.x), body .work.work h1:not(.x) {
  font-family: "Cinzel", "Chiron GoRound TC", sans-serif !important; font-weight: 900 !important; letter-spacing: .02em !important;
  font-size: clamp(1.92rem, 5.18vw, 3.26rem) !important; line-height: 1.08 !important;
  color: var(--sun); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--blue);
}

/* Work-page theme panels: bigger text with double line spacing, and two faint space doodles per panel */
.themes .panel { position: relative; isolation: isolate; }
.themes .panel > p { font-size: 1.333rem; line-height: 2; }
.themes .panel::before, .themes .panel::after { content: ""; position: absolute; z-index: -1; width: clamp(64px, 9vw, 120px); aspect-ratio: 1; background: no-repeat center / contain; opacity: .55; pointer-events: none; }
.themes .panel::before { top: 12%; right: 2%; transform: rotate(8deg); }
.themes .panel::after { bottom: 10%; left: -1%; transform: rotate(-10deg); }
@media (max-width: 40rem) { .themes .panel::before { top: 4%; right: 0; } .themes .panel::after { bottom: 3%; left: auto; right: 0; } }
.themes .panel:nth-child(4n+1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Cpath d=%22M40 14 Q40 40 66 40 Q40 40 40 66 Q40 40 14 40 Q40 40 40 14Z%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M88 54 Q88 70 104 70 Q88 70 88 86 Q88 70 72 70 Q88 70 88 54Z%22 fill=%22%23fff%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M50 83 Q50 94 61 94 Q50 94 50 105 Q50 94 39 94 Q50 94 50 83Z%22 fill=%22%230d39ae%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E"); }
.themes .panel:nth-child(4n+1)::after { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Ccircle cx=%2260%22 cy=%2260%22 r=%2230%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Cellipse cx=%2260%22 cy=%2260%22 rx=%2254%22 ry=%2215%22 fill=%22none%22 stroke=%22%2314192b%22 stroke-width=%223%22 transform=%22rotate(-20 60 60)%22/%3E%3Ccircle cx=%2250%22 cy=%2252%22 r=%225%22 fill=%22%2314192b%22 opacity=%22.35%22/%3E%3Ccircle cx=%2270%22 cy=%2270%22 r=%223.5%22 fill=%22%2314192b%22 opacity=%22.35%22/%3E%3C/svg%3E"); }
.themes .panel:nth-child(4n+2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Cg transform=%22rotate(35 60 60)%22%3E%3Cpath d=%22M60 10 C78 28 80 54 74 80 L46 80 C40 54 42 28 60 10Z%22 fill=%22%23fff%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Ccircle cx=%2260%22 cy=%2244%22 r=%229%22 fill=%22%230d39ae%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Cpath d=%22M46 62 L32 88 L46 82Z M74 62 L88 88 L74 82Z%22 fill=%22%23e63946%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M50 82 L60 106 L70 82Z%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3C/g%3E%3C/svg%3E"); }
.themes .panel:nth-child(4n+2)::after { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Cpath d=%22M40 14 Q40 40 66 40 Q40 40 40 66 Q40 40 14 40 Q40 40 40 14Z%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M88 54 Q88 70 104 70 Q88 70 88 86 Q88 70 72 70 Q88 70 88 54Z%22 fill=%22%23fff%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M50 83 Q50 94 61 94 Q50 94 50 105 Q50 94 39 94 Q50 94 50 83Z%22 fill=%22%230d39ae%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E"); }
.themes .panel:nth-child(4n+3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Ccircle cx=%2260%22 cy=%2260%22 r=%2230%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Cellipse cx=%2260%22 cy=%2260%22 rx=%2254%22 ry=%2215%22 fill=%22none%22 stroke=%22%2314192b%22 stroke-width=%223%22 transform=%22rotate(-20 60 60)%22/%3E%3Ccircle cx=%2250%22 cy=%2252%22 r=%225%22 fill=%22%2314192b%22 opacity=%22.35%22/%3E%3Ccircle cx=%2270%22 cy=%2270%22 r=%223.5%22 fill=%22%2314192b%22 opacity=%22.35%22/%3E%3C/svg%3E"); }
.themes .panel:nth-child(4n+3)::after { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Ccircle cx=%2260%22 cy=%2260%22 r=%2244%22 fill=%22none%22 stroke=%22%230d39ae%22 stroke-width=%223%22 stroke-dasharray=%228 9%22/%3E%3Ccircle cx=%2260%22 cy=%2260%22 r=%2212%22 fill=%22%23fff%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Ccircle cx=%22101%22 cy=%2244%22 r=%228%22 fill=%22%23e63946%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Cpath d=%22M24 89 Q24 98 33 98 Q24 98 24 107 Q24 98 15 98 Q24 98 24 89Z%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E"); }
.themes .panel:nth-child(4n)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Ccircle cx=%2260%22 cy=%2260%22 r=%2244%22 fill=%22none%22 stroke=%22%230d39ae%22 stroke-width=%223%22 stroke-dasharray=%228 9%22/%3E%3Ccircle cx=%2260%22 cy=%2260%22 r=%2212%22 fill=%22%23fff%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Ccircle cx=%22101%22 cy=%2244%22 r=%228%22 fill=%22%23e63946%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Cpath d=%22M24 89 Q24 98 33 98 Q24 98 24 107 Q24 98 15 98 Q24 98 24 89Z%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E"); }
.themes .panel:nth-child(4n)::after { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 120%22%3E%3Cg transform=%22rotate(35 60 60)%22%3E%3Cpath d=%22M60 10 C78 28 80 54 74 80 L46 80 C40 54 42 28 60 10Z%22 fill=%22%23fff%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Ccircle cx=%2260%22 cy=%2244%22 r=%229%22 fill=%22%230d39ae%22 stroke=%22%2314192b%22 stroke-width=%223%22/%3E%3Cpath d=%22M46 62 L32 88 L46 82Z M74 62 L88 88 L74 82Z%22 fill=%22%23e63946%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M50 82 L60 106 L70 82Z%22 fill=%22%23ffcf4a%22 stroke=%22%2314192b%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3C/g%3E%3C/svg%3E"); }

/* Project links under the work-page title (GitHub showcase, live site) */
.work-links { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .5rem; }
.work-links a { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .9rem; border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.work-links a::after { content: "↗"; font-size: .9em; }
.work-links a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.work-links a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Work-page section navigator (left side) */
.toc { position: fixed; top: 50%; z-index: 4; transform: translateY(-50%); padding-left: 22px; opacity: 0; transition: opacity .4s; }
.toc.toc-in { opacity: 1; }
.toc-track { position: absolute; left: 6px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: #14192b26; }
.toc-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; border-radius: 4px; background: var(--blue); transition: height .15s linear; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.toc li { position: relative; }
.toc li::before { content: ""; position: absolute; left: -21px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fbf6ec; border: 2px solid #14192b66; box-sizing: border-box; transition: background .2s, border-color .2s, transform .2s; }
.toc li.on::before { background: var(--sun); border: 3px solid var(--ink); transform: scale(1.35); }
.toc a { display: block; width: 0; overflow: hidden; white-space: nowrap; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.35; opacity: .4; transition: opacity .2s, color .2s; }
.toc.toc-full a { width: auto; white-space: normal; }
.toc a:hover, .toc a:focus-visible { opacity: .85; }
.toc li.on a { opacity: 1; color: var(--blue); font-weight: 800; }
.toc:not(.toc-full) li { height: 14px; }
.toc:not(.toc-full) a, .toc:not(.toc-full) li.on a { position: absolute; inset: -3px -6px -3px -26px; width: auto; color: transparent; }
.toc.toc-tight ol { gap: 6px; }
.toc.toc-tight a { font-size: 12px; }
.toc:not(.toc-full) li::after { content: attr(data-label); position: absolute; left: 6px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: .3rem .7rem; background: #fff; border: 2px solid var(--ink); border-radius: .75rem; box-shadow: 2px 2px 0 var(--ink); font-size: 13px; font-weight: 700; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .15s; }
.toc:not(.toc-full) li:hover::after, .toc:not(.toc-full) li:focus-within::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toc, .toc-fill, .toc li::before, .toc a { transition: none; } }
@media print { .toc { display: none; } }

/* Footer: back-to-top button on every page */
footer.wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.to-top { display: inline-flex; align-items: center; padding: .3rem .85rem; border: 3px solid var(--ink); border-radius: 999px; background: var(--sun); color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.to-top:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.to-top:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Site structure: header menu to the four main pages, home entry cards, main-page layout, footer social links */
.main-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-left: auto; font-size: .95rem; }
.main-nav a { color: var(--ink); font-weight: 700; text-decoration: none; padding: .2rem 0; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--sun); }
.main-nav a[aria-current="page"] { color: var(--blue); }
@media (max-width: 56rem) { .main-nav { order: 3; width: 100%; margin-left: 0; } }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 2rem 0 3rem; }
.entry-grid a { display: block; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 1.25rem; box-shadow: 5px 5px 0 var(--ink); padding: 1.25rem 1.4rem; transition: transform .15s, box-shadow .15s; }
.entry-grid a:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.entry-grid li:nth-child(2) a { background: var(--pink); }
.entry-grid li:nth-child(3) a { background: var(--mint); }
.entry-grid li:nth-child(4) a { background: #fff2c6; }
.entry-grid b { display: block; font-size: 1.4rem; color: var(--blue); margin-bottom: .35rem; }
.entry-grid b::after { content: " →"; }
.page-head { padding: 3rem 0 1rem; }
.page-head h1 { margin: 0; font-family: "Cinzel", "Chiron GoRound TC", sans-serif; font-weight: 900; letter-spacing: .02em; color: var(--sun); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--blue); font-size: clamp(2.2rem, 6vw, 3.4rem); }
.page-body { padding-bottom: 3rem; }
.page-body > p { font-size: 1.15rem; line-height: 1.9; max-width: 44rem; }
.page-body .soon-box { display: inline-block; margin-top: .5rem; padding: .75rem 1.25rem; border: 3px dashed var(--ink); border-radius: 1rem; background: #fff; font-weight: 700; }
.link-list { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; }
.link-list a { display: inline-block; padding: .35rem .9rem; border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
footer .foot-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-weight: 400; }
footer .foot-links a { color: var(--ink); }

/* Work pages: "back to portfolio" as a comic pill button */
.work .back a { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .9rem .3rem .75rem; border: 3px solid var(--ink); border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.work .back a::before { content: "←"; }
.work .back a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.work .back a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.work .back { position: relative; top: -4pt; }
.work .back a { font-size: calc(1em - 4pt); }

/* Preview panel title: same look as the home headline (Cinzel, yellow, outline under the fill, blue shadow) */
body .flip-panel.flip-panel h3:not(.x) {
  font-family: "Cinzel", "Chiron GoRound TC", sans-serif !important; font-weight: 900 !important; letter-spacing: .02em !important;
  color: var(--sun); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--blue);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.1;
}

/* Cursor bubble tail: an ink triangle with a white triangle inside, so the outline is one closed shape */
.cur-bub b::before, .cur-bub b::after { content: ""; position: absolute; border: 0; transform: none; top: auto; bottom: auto; left: auto; right: auto; }
.cur-bub b::before { left: 18px; top: -14px; width: 16px; height: 14px; background: var(--ink); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.cur-bub b::after { left: 21px; top: -7.5px; width: 8.6px; height: 7.5px; background: #fff; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.cur-bub.up b::before { top: auto; bottom: -14px; border: 0; transform: none; clip-path: polygon(0 0, 100% 0, 0 100%); }
.cur-bub.up b::after { top: auto; bottom: -7.5px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.cur-bub.left b::before { left: auto; right: 18px; border: 0; transform: none; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.cur-bub.left b::after { left: auto; right: 21px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.cur-bub.left.up b::before, .cur-bub.left.up b::after { clip-path: polygon(0 0, 100% 0, 100% 100%); }

/* Bottom doodle sits in the flow under the paragraph, so it never covers the text whatever the text size */
.themes .panel::after { position: relative; top: auto; bottom: auto; left: auto; right: auto; z-index: auto; flex: none; align-self: flex-start; margin: 1.25rem 0 0 -.5rem; }
@media (max-width: 40rem) { .themes .panel::after { align-self: flex-end; margin: 1rem 0 0; } }
/* Top doodle also sits in the flow (above the heading, on the right), so it never covers the text either */
.themes .panel::before { position: relative; top: auto; bottom: auto; left: auto; right: auto; z-index: auto; flex: none; align-self: flex-end; margin: 0 0 .25rem; }
@media (max-width: 40rem) { .themes .panel::before { margin: 0; } }

/* Footer social links: icon + text pills (template 03) */
footer .foot-links { gap: .6rem; align-items: center; }
footer .foot-links a { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .85rem .2rem .25rem; border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-weight: 700; font-size: .9rem; line-height: 1.2; text-decoration: none; transition: transform .12s, box-shadow .12s; }
footer .foot-links a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
footer .foot-links a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
footer .foot-links i { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); }
footer .foot-links svg { width: 13px; height: 13px; }

/* Language dropdown in the header (Austin 2026-12-01: globe icon plus current language) */
.lang-menu { position: relative; }
.lang-menu summary { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem .3rem .55rem; list-style: none; cursor: pointer; white-space: nowrap; border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: "▾"; font-size: .85em; }
.lang-menu summary svg { width: 18px; height: 18px; flex: none; }
.lang-menu summary:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.lang-menu summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.lang-menu[open] summary::after { content: "▴"; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + .55rem); z-index: 60; min-width: 13rem; margin: 0; padding: .4rem; list-style: none; background: #fff; border: 3px solid var(--ink); border-radius: 1rem; box-shadow: 4px 4px 0 var(--ink); }
.lang-menu li a { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .75rem; border-radius: .6rem; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.lang-menu li a:hover, .lang-menu li a:focus-visible { background: var(--soft); outline: none; }
.lang-menu li a[aria-current]::after { content: "✓"; color: var(--blue); }
@media (max-width: 40rem) { .lang-menu ul { right: auto; left: 0; } }

/* Vietnamese: Outfit and Cinzel have no Vietnamese letters, so use 昭源圓體 (it has them) for whole words.
   The home tagline stays English on every language, so it keeps Cinzel. */
html:lang(vi) body, html:lang(vi) body *:not(.c-dot):not(.c-ring):not(.x), body .lang-menu a:lang(vi):not(.x) { font-family: "Chiron GoRound TC", "Microsoft JhengHei", sans-serif !important; }
html:lang(vi) body .work.work h1:not(.x):not(.y), html:lang(vi) body .flip-panel.flip-panel h3:not(.x):not(.y), html:lang(vi) .page-head h1:not(.x) { font-family: "Chiron GoRound TC", sans-serif !important; }
html:lang(vi) body .hero-copy.hero-copy h1:not(.x):not(.y):not(.z) { font-family: "Cinzel", "Chiron GoRound TC", sans-serif !important; }

/* Note on AI-translated pages (end of the main content) */
.ai-note { margin: 2.5rem 0 0; padding-top: 1rem; border-top: 2px dashed #14192b40; font-size: .9rem; color: #14192bb3; }
.ai-note a { color: var(--blue); }

/* Stat tiles: long single words in some languages (e.g. Spanish "confirmaciones") must wrap inside the tile on phones */
.stat { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
