:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Noto Sans SC", sans-serif;
  background: #f2eadc;
  color: #2a211b;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow: hidden;
}

.not-found-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 32px;
  overflow: auto;
}

.not-found {
  width: min(900px, 100%);
  text-align: center;
}

.not-found-code,
.not-found-kicker {
  color: #9b5132;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.not-found-code {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 32px;
  place-items: center;
  border: 1px solid #b8a895;
  border-radius: 50%;
}

.not-found-kicker {
  margin: 0 0 20px;
}

.not-found h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.not-found > p:last-of-type {
  max-width: 460px;
  margin: 24px auto 0;
  color: #6d5f52;
  font-size: 16px;
  line-height: 1.75;
}

.not-found a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-top: 28px;
  border-bottom: 1px solid #9c8d7d;
  color: #2a211b;
  font-size: 13px;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    color 180ms ease;
}

.not-found a:hover {
  border-color: #9b5132;
  color: #9b5132;
}

.not-found a:focus-visible {
  outline: 2px solid #9b5132;
  outline-offset: 3px;
}

button,
a {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.site {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
}

.site::-webkit-scrollbar {
  display: none;
}

.screen {
  position: relative;
  display: grid;
  min-height: 100dvh;
  align-content: center;
  padding: 64px 0;
  border-top: 1px solid #bcae9b;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.screen:first-child {
  border-top: 0;
}

.screen-inner {
  width: min(1100px, calc(100% - 64px));
  margin: 0 auto;
}

.hero-inner,
.section-heading,
.projects-inner,
.contact-inner {
  text-align: center;
}

.kicker,
.section-index,
.section-heading > span {
  color: #9b5132;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker {
  display: inline-block;
  margin-bottom: 32px;
  padding: 9px 16px;
  border: 1px solid #9b5132;
  border-radius: 999px;
  background: #ead8c8;
  color: #7d3f28;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  box-shadow: 0 6px 18px rgba(83, 55, 38, 0.1);
}

.hero h1,
.hero h2,
.section-heading h2,
.job h3 {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
}

.hero h1 {
  position: relative;
  display: flex;
  width: max-content;
  align-items: baseline;
  margin: 0 auto;
  font-size: clamp(64px, 8.8vw, 124px);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.92;
  isolation: isolate;
}

.hero-name-char {
  position: relative;
  display: inline-block;
}

.hero-name-char-wind {
  text-shadow: -0.055em 0.035em 0 rgba(155, 81, 50, 0.24);
  transform: skewX(-4deg) translateY(-0.015em);
}

.hero-name-char-wind::before,
.hero-name-char-wind::after {
  position: absolute;
  left: -0.18em;
  z-index: -1;
  height: 0.12em;
  border-top: 2px solid rgba(155, 81, 50, 0.5);
  border-radius: 50%;
  content: "";
}

.hero-name-char-wind::before {
  top: 0.3em;
  width: 0.42em;
  transform: rotate(-8deg);
}

.hero-name-char-wind::after {
  top: 0.62em;
  left: -0.24em;
  width: 0.54em;
  transform: rotate(6deg);
}

.hero-name-char-forest {
  color: #30372b;
  text-shadow: 0.045em 0.025em 0 rgba(71, 81, 57, 0.22);
}

.hero-name-char-forest::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  color: rgba(82, 94, 67, 0.42);
  content: "林";
  transform: translate(0.075em, 0.055em);
}

.hero-name-char-fire {
  color: #9b5132;
  text-shadow: 0 0.08em 0.18em rgba(155, 81, 50, 0.24);
}

.hero-name-char-fire::after {
  position: absolute;
  top: -0.05em;
  right: 0.06em;
  width: 0.07em;
  height: 0.07em;
  border-radius: 50%;
  background: #b9663f;
  box-shadow: -0.12em 0.1em 0 -0.015em rgba(185, 102, 63, 0.55);
  content: "";
}

.hero-name-char-match {
  color: #4b382c;
  text-shadow: 0.025em 0.025em 0 rgba(138, 103, 79, 0.22);
}

.hero-name-flame {
  position: absolute;
  top: 0.35em;
  right: -0.13em;
  z-index: 2;
  width: 0.18em;
  height: 0.27em;
  overflow: visible;
  filter: drop-shadow(0 0 0.06em rgba(185, 93, 56, 0.3));
  transform: rotate(-10deg);
  transform-origin: 50% 100%;
}

.hero-name-flame-outer {
  fill: #b95d38;
}

.hero-name-flame-inner {
  fill: #f0b267;
}

.hero-name-flame-head {
  fill: #8f4029;
}

.hero h2 {
  max-width: 760px;
  margin: 36px auto 0;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.hero-copy {
  max-width: 530px;
  margin: 26px auto 0;
  color: #6d5f52;
  font-size: 16px;
  line-height: 1.75;
}

.next-link {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #776759;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  transform: translateX(-50%);
  transition: color 180ms ease;
}

.next-link span {
  display: block;
  animation: guide-down 1800ms ease-in-out infinite;
}

.next-link:hover,
.next-link:focus-visible {
  color: #9b5132;
}

.next-link:hover span,
.next-link:focus-visible span {
  animation-play-state: paused;
  transform: translateY(3px);
}

@keyframes guide-down {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

.next-link:focus-visible,
.contact-trigger:focus-visible,
.copy-button:focus-visible,
.qr-caption:focus-visible,
.page-progress button:focus-visible {
  outline: 2px solid #9b5132;
  outline-offset: 3px;
}

.about-inner {
  width: min(860px, calc(100% - 64px));
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 56px;
}

.section-heading > span {
  display: block;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.jobs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: left;
}

.job time {
  color: #9b5132;
  font-size: 12px;
  font-weight: 650;
}

.job h3 {
  margin: 22px 0 8px;
  font-size: 27px;
  font-weight: 500;
}

.job p {
  margin: 7px 0;
  color: #706052;
  line-height: 1.75;
}

.job .stack {
  margin-top: 22px;
  color: #2a211b;
  font-size: 12px;
}

.section-index {
  display: block;
  margin-bottom: 32px;
}

/* v0.9 — Projects 屏开源项目区（可扩展：1 个项目占整行，多个自动分列） */
.projects-screen {
  padding-top: 24px;
  padding-bottom: 104px;
}

.projects-screen .section-heading {
  margin-bottom: 18px;
}

.projects-note {
  margin: 0 0 64px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.projects-inner {
  width: min(860px, calc(100% - 64px));
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 14px;
  margin-top: 0;
}

.project-card {
  display: block;
  padding: 22px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-4px);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.project-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-status {
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  white-space: nowrap;
}

.project-name {
  color: var(--text);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-open {
  margin-left: auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
}

.project-desc {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.project-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.project-points span {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(156, 141, 125, .14);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.motion-ready .project-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.motion-ready .is-visible .project-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 620ms ease, transform 620ms ease;
  transition-delay: 240ms;
}

.motion-ready .is-visible .project-card:hover,
.motion-ready .is-visible .project-card:focus-visible {
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
  transition-delay: 0ms;
}

@media (max-width: 760px) {
  .projects-note {
    margin-bottom: 40px;
  }
  .projects-grid {
    margin-top: 0;
  }
  .project-card {
    padding: 18px 18px 16px;
  }
  .project-card-top {
    flex-wrap: wrap;
    gap: 10px;
  }
  .project-name {
    font-size: 22px;
  }
  .project-points {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (prefers-color-scheme: dark) {
  .project-points span {
    background: rgba(238, 224, 207, .07);
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .project-card,
  .motion-ready .is-visible .project-card,
  .motion-ready .is-visible .project-card:hover,
  .motion-ready .is-visible .project-card:focus-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.contact-inner {
  width: min(760px, calc(100% - 64px));
}

.contact-screen {
  position: relative;
}

.contact-methods {
  display: flex;
  align-items: start;
  justify-content: center;
  gap: 28px;
}

.contact-method {
  position: relative;
}

.contact-trigger {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  padding: 0;
  border: 1px solid #b8a895;
  border-radius: 50%;
  background: transparent;
  color: #6d5f52;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.contact-trigger:hover,
.contact-trigger[aria-expanded="true"] {
  border-color: #9b5132;
  background: rgb(155 81 50 / 7%);
  color: #9b5132;
  transform: translateY(-2px);
}

.contact-icon {
  display: grid;
  place-items: center;
}

.contact-icon-email {
  font-family: Georgia, serif;
  font-size: 29px;
  line-height: 1;
}

.contact-icon-xhs {
  width: 34px;
  height: 24px;
  border-radius: 6px;
  background: #d6463d;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.contact-panel {
  position: absolute;
  z-index: 14;
  top: calc(100% + 14px);
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 80px);
  padding: 12px;
  border: 1px solid #b8a895;
  border-radius: 14px;
  background: #f8f1e6;
  box-shadow: 0 14px 32px rgb(74 54 39 / 14%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.contact-panel::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 18px;
  content: "";
}

.contact-panel::after {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-top: 1px solid #b8a895;
  border-left: 1px solid #b8a895;
  background: #f8f1e6;
  content: "";
  transform: rotate(45deg);
}

.contact-method.is-open .contact-panel {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.email-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 16px;
}

.email-address {
  font-size: 14px;
  white-space: nowrap;
}

.copy-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: #9b5132;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.copy-button:hover {
  background: #7f4027;
}

.copy-button:active {
  transform: scale(0.97);
}

.qr-panel {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.qr-image {
  display: block;
  width: 172px;
  height: 172px;
  aspect-ratio: 1;
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
}

.qr-caption {
  color: #9b5132;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}

.qr-caption:hover {
  text-decoration: underline;
}

.site-footer {
  position: absolute;
  right: 32px;
  bottom: 24px;
  left: 32px;
  color: #8b7d6f;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  transition: opacity 180ms ease;
}

.page-progress {
  position: fixed;
  z-index: 12;
  top: 50%;
  right: 22px;
  display: grid;
  gap: 5px;
  transform: translateY(-50%);
}

.page-progress button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.page-progress button::before {
  width: 6px;
  height: 6px;
  border: 1px solid #9a8876;
  border-radius: 50%;
  background: transparent;
  content: "";
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.page-progress button:hover::before,
.page-progress button[aria-current="true"]::before {
  border-color: #9b5132;
  background: #9b5132;
  transform: scale(1.45);
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .screen {
    padding: 40px 0;
  }

  .screen-inner,
  .about-inner,
  .projects-inner,
  .contact-inner {
    width: min(100% - 56px, 680px);
  }

  .kicker {
    margin-bottom: 24px;
  }

  .hero h1 {
    font-size: clamp(56px, 17vw, 76px);
  }

  .hero h2 {
    margin-top: 28px;
    font-size: clamp(27px, 8.5vw, 36px);
  }

  .hero-copy {
    margin-top: 20px;
    font-size: 14px;
  }

  .next-link {
    bottom: 12px;
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .section-heading > span {
    margin-bottom: 20px;
  }

  .section-heading h2 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .jobs {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .job h3 {
    margin-top: 14px;
    font-size: 23px;
  }

  .job p {
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.55;
  }

  .job .stack {
    margin-top: 12px;
  }

  .section-index {
    margin-bottom: 24px;
  }

  .contact-methods {
    gap: 20px;
  }

  .contact-trigger {
    width: 60px;
    height: 60px;
  }

  .contact-panel {
    max-width: calc(100vw - 64px);
  }

  .page-progress {
    right: 4px;
  }

  .site-footer {
    right: 28px;
    bottom: 16px;
    left: 28px;
    font-size: 10px;
  }
}

@media (max-width: 360px) and (max-height: 650px) {
  .next-link {
    bottom: 8px;
  }

  #about .section-heading {
    margin-bottom: 20px;
  }

  #about .section-heading > span {
    margin-bottom: 12px;
  }

  .jobs {
    gap: 14px;
  }

  .qr-panel {
    gap: 7px;
    padding: 10px;
  }

  .qr-image {
    width: 132px;
    height: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .motion-ready .reveal {
    opacity: 1;
    transform: none;
  }

  .next-link span {
    animation: none;
    transform: none;
  }
}



/* v0.2 visual enhancement */
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 40%, rgba(155,81,50,.12), transparent 35%);
  animation: paperBreath 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes paperBreath {
  from { transform: scale(1); opacity: .65; }
  to { transform: scale(1.08); opacity: 1; }
}

.hero-name-char {
  display: inline-block;
  will-change: transform;
}

.hero-name-char-wind {
  animation: windFloat 3.8s ease-in-out infinite;
}

.hero-name-char-forest {
  animation: forestFloat 5.5s ease-in-out infinite;
}

.hero-name-char-fire {
  animation: firePulse 1.5s ease-in-out infinite;
}

.hero-name-flame {
  animation: flameMove 1.6s ease-in-out infinite;
  transform-origin: 50% 100%;
}

@keyframes windFloat {
  0%,100% { transform: translateX(0) skewX(-4deg); }
  25% { transform: translateX(-8px) translateY(-2px) skewX(-8deg); }
  50% { transform: translateX(12px) translateY(2px) skewX(3deg); }
  75% { transform: translateX(-5px) skewX(-6deg); }
}

@keyframes forestFloat {
  0%,100% { transform: translateY(0); }
  25% { transform: translateY(-5px) rotate(-1deg); }
  50% { transform: translateY(4px) rotate(1deg); }
  75% { transform: translateY(-2px); }
}

@keyframes firePulse {
  0%,100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 .08em rgba(185,93,56,.35)); }
  50% { transform: translateY(-6px) scale(1.12); filter: drop-shadow(0 0 .22em rgba(185,93,56,.65)); }
}

@keyframes flameMove {
  0%,100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.08) rotate(2deg); }
}

.screen.reveal {
  animation: sectionIn .7s ease both;
}

@keyframes sectionIn {
  from { opacity: .75; }
  to { opacity: 1; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    background: #171310;
    color: #eee0cf;
  }

  body {
    background: #171310;
  }

  .screen {
    border-color: rgba(238,224,207,.18);
  }

  .hero::before {
    background: radial-gradient(circle, rgba(200,100,50,.18), transparent 38%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero-name-char,
  .hero-name-flame,
  .screen.reveal {
    animation: none !important;
  }
}

/* v0.3 dynamic ink & flame enhancement */
.hero-name-char-wind::before,
.hero-name-char-wind::after {
  animation: windTrail 2.2s ease-in-out infinite;
}

.hero-name-char-fire::before {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: -1;
  background: radial-gradient(circle, rgba(185,93,56,.22), transparent 65%);
  animation: fireAura 1.4s ease-in-out infinite;
}

@keyframes windTrail {
  0%,100% { opacity:.35; transform: translateX(0) scaleX(1); }
  50% { opacity:.85; transform: translateX(-12px) scaleX(1.35); }
}

@keyframes fireAura {
  0%,100% { transform:scale(.9); opacity:.4; }
  50% { transform:scale(1.25); opacity:1; }
}

/* v0.4 Feng Lin Huo Chai enhanced motion */
.hero-name-char {
  position: relative;
  will-change: transform, filter;
}

.hero-name-char-wind {
  animation: v04-wind-storm 4s ease-in-out infinite;
}
.hero-name-char-wind::before,
.hero-name-char-wind::after {
  opacity: .55;
  animation: v04-wind-trail 2.8s ease-in-out infinite;
}

.hero-name-char-forest {
  animation: v04-forest-sway 5s ease-in-out infinite;
}
.hero-name-char-forest::before {
  animation: v04-ink-shadow 4s ease-in-out infinite;
}

.hero-name-char-fire {
  animation: v04-fire-jump 1.1s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(220,90,35,.45));
}
.hero-name-char-fire::after {
  animation: v04-fire-glow 1.4s ease-in-out infinite;
}

.hero-name-char-match {
  animation: v04-ember 2.4s ease-in-out infinite;
}

.hero-name-flame {
  transform-origin: center bottom;
  animation: v04-flame-burst .8s ease-in-out infinite alternate;
}

@keyframes v04-wind-storm {
  0%,100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-9px) rotate(-4deg); }
  50% { transform: translateX(8px) rotate(3deg); }
  75% { transform: translateX(-5px) rotate(-2deg); }
}

@keyframes v04-wind-trail {
  0%,100% { transform: translateX(0); opacity:.35; }
  50% { transform: translateX(-18px); opacity:.75; }
}

@keyframes v04-forest-sway {
  0%,100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-7px) rotate(2deg); }
  70% { transform: translateY(4px) rotate(-2deg); }
}

@keyframes v04-ink-shadow {
  0%,100% { transform: translate(0,0); opacity:.25; }
  50% { transform: translate(12px,6px); opacity:.5; }
}

@keyframes v04-fire-jump {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.06); }
}

@keyframes v04-fire-glow {
  0%,100% { opacity:.4; transform:scale(1); }
  50% { opacity:1; transform:scale(1.18); }
}

@keyframes v04-ember {
  0%,100% { transform: translateY(0); filter:brightness(1); }
  50% { transform: translateY(-5px); filter:brightness(1.2); }
}

@keyframes v04-flame-burst {
  from { transform:scale(.92) skewX(-3deg); }
  to { transform:scale(1.08) skewX(3deg); }
}


/* v0.5 brand motion upgrade */
.hero-name-char {
  position: relative;
  will-change: transform, opacity, filter;
  animation-fill-mode: both;
  animation-duration: 1.4s;
}

.hero-name-char-wind {
  animation: v05WindEnter 1.2s ease-out, v05WindFlow 4s ease-in-out infinite 1.4s;
}
.hero-name-char-forest {
  animation: v05ForestEnter 1.35s ease-out .15s both, v05ForestSway 5s ease-in-out infinite 1.6s;
}
.hero-name-char-fire {
  animation: v05FireEnter 1.25s ease-out .3s both, v05FirePulse 1.8s ease-in-out infinite 1.6s;
  filter: drop-shadow(0 0 16px rgba(210,100,35,.35));
}
.hero-name-char-match {
  animation: v05MatchEnter 1.25s ease-out .45s both, v05Warm 3s ease-in-out infinite 1.8s;
}

.hero-name-char-fire::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,160,60,.28), transparent 65%);
  opacity: .8;
  animation: v05Glow 1.8s ease-in-out infinite;
  pointer-events:none;
}

.hero-name-char-wind::after {
  content:"";
  position:absolute;
  left:-35%;
  top:45%;
  width:80%;
  height:2px;
  background:linear-gradient(90deg,transparent,rgba(155,81,50,.3),transparent);
  animation:v05WindTrail 2.8s ease-in-out infinite;
}

@keyframes v05WindEnter {
  from { opacity:0; transform:translateX(-35px) rotate(-12deg); }
  to { opacity:1; transform:translateX(0) rotate(0); }
}
@keyframes v05WindFlow {
  50% { transform:translateX(10px) rotate(4deg); }
}
@keyframes v05ForestEnter {
  from { opacity:0; transform:translateY(35px) scale(.9); }
  to { opacity:1; transform:none; }
}
@keyframes v05ForestSway {
  50% { transform:translateY(-8px) rotate(2deg); }
}
@keyframes v05FireEnter {
  from { opacity:0; transform:scale(.65); }
  to { opacity:1; transform:scale(1); }
}
@keyframes v05FirePulse {
  50% { transform:scale(1.08) translateY(-5px); }
}
@keyframes v05MatchEnter {
  from { opacity:0; transform:translateY(25px); }
  to { opacity:1; transform:none; }
}
@keyframes v05Warm {
  50% { filter:brightness(1.12); }
}
@keyframes v05Glow {
  50% { transform:scale(1.35); opacity:.45; }
}
@keyframes v05WindTrail {
  50% { transform:translateX(25px); opacity:0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-name-char,
  .hero-name-char::before,
  .hero-name-char::after {
    animation:none !important;
  }
}

/* v0.6 immersive storytelling */
.hero {
  --pointer-x: 0;
  --pointer-y: 0;
  --hero-progress: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(calc(var(--pointer-x) * -10px), calc(var(--pointer-y) * -7px), 0);
  transition: transform 180ms ease-out;
}

.ink-cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .42;
  will-change: transform, opacity;
}

.ink-cloud-one {
  top: 9%;
  left: 12%;
  width: clamp(220px, 32vw, 520px);
  aspect-ratio: 1.35;
  background: radial-gradient(ellipse, rgba(75,56,44,.12), rgba(75,56,44,.035) 48%, transparent 72%);
  animation: v06InkDriftOne 15s ease-in-out infinite alternate;
}

.ink-cloud-two {
  right: 8%;
  bottom: 7%;
  width: clamp(240px, 36vw, 580px);
  aspect-ratio: 1.45;
  background: radial-gradient(ellipse, rgba(155,81,50,.13), rgba(155,81,50,.025) 52%, transparent 74%);
  animation: v06InkDriftTwo 18s ease-in-out infinite alternate;
}

.wind-stream {
  position: absolute;
  left: -18vw;
  height: 1px;
  border-radius: 100%;
  background: linear-gradient(90deg, transparent, rgba(155,81,50,.24), rgba(155,81,50,.08), transparent);
  opacity: .65;
  transform: rotate(-5deg);
  will-change: transform, opacity;
}

.wind-stream::after {
  position: absolute;
  top: 8px;
  left: 18%;
  width: 62%;
  height: 1px;
  background: inherit;
  content: "";
}

.wind-stream-one {
  top: 31%;
  width: 62vw;
  animation: v06WindSweep 7s cubic-bezier(.45,.05,.25,1) infinite;
}

.wind-stream-two {
  top: 61%;
  width: 48vw;
  animation: v06WindSweep 8.5s cubic-bezier(.45,.05,.25,1) infinite 1.7s;
}

.ember {
  position: absolute;
  left: calc(61% + var(--pointer-x) * 12px);
  top: 43%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c86c3d;
  box-shadow: 0 0 12px rgba(211,104,55,.65);
  opacity: 0;
  will-change: transform, opacity;
}

.ember-one { animation: v06Ember 4.3s ease-out infinite 1.2s; }
.ember-two { animation: v06Ember 5.1s ease-out infinite 2.5s; transform: translateX(24px) scale(.7); }
.ember-three { animation: v06Ember 4.7s ease-out infinite 3.6s; transform: translateX(-18px) scale(.55); }

.hero-inner {
  position: relative;
  z-index: 2;
  transform: translate3d(calc(var(--pointer-x) * 4px), calc(var(--pointer-y) * 3px + var(--hero-progress) * -28px), 0);
  opacity: calc(1 - var(--hero-progress) * .45);
  transition: transform 180ms ease-out;
  will-change: transform, opacity;
}

.hero-name {
  transform-style: preserve-3d;
  perspective: 700px;
}

.hero-name-char-wind {
  --wind-direction: calc(var(--pointer-x) * 7deg);
  animation: v06WindCharacter 4.6s ease-in-out infinite 1.4s;
}

.hero-name-char-forest::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  color: rgba(48,55,43,.13);
  content: "林";
  transform: translate(.13em,.1em) scale(.98);
  filter: blur(1px);
  animation: v06ForestDepth 6s ease-in-out infinite;
}

.hero-name-char-fire {
  transform-origin: 50% 85%;
  animation: v06FireCharacter 1.65s cubic-bezier(.45,.05,.3,1) infinite 1.6s;
}

.hero-name-char-match::after {
  position: absolute;
  right: .04em;
  bottom: .08em;
  width: .32em;
  height: .035em;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(185,93,56,.55), transparent);
  content: "";
  filter: blur(1px);
  animation: v06MatchHeat 2.8s ease-in-out infinite;
}

.timeline {
  --timeline-gap: 96px;
  --timeline-dot-size: 13px;
  display: block;
  position: relative;
  column-gap: var(--timeline-gap);
}

.timeline::before {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 50%;
  width: 1px;
  background: linear-gradient(transparent, #bcae9b 10%, #bcae9b 90%, transparent);
  content: "";
  transform: translateX(-50%);
}

.timeline .job {
  position: relative;
  width: calc(50% - var(--timeline-gap) / 2);
  padding: 26px 28px 26px 0;
}

.timeline .job:nth-child(odd) {
  margin-right: auto;
}

.timeline .job:nth-child(even) {
  margin-left: auto;
  padding-right: 0;
  padding-left: 28px;
}

.timeline .job::before {
  position: absolute;
  z-index: 1;
  top: 30px;
  right: calc((var(--timeline-gap) / -2) - (var(--timeline-dot-size) / 2));
  box-sizing: border-box;
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  border: 2px solid #f2eadc;
  border-radius: 50%;
  background: #9b5132;
  box-shadow: 0 0 0 1px #9b5132;
  content: "";
}

.timeline .job:nth-child(even)::before {
  right: auto;
  left: calc((var(--timeline-gap) / -2) - (var(--timeline-dot-size) / 2));
}

.motion-ready .timeline .job {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.motion-ready .is-visible .timeline .job {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready .is-visible .timeline .job:nth-child(even) { transition-delay: 120ms; }

@keyframes v06InkDriftOne {
  from { transform: translate3d(-3%,0,0) rotate(-4deg) scale(.95); opacity: .28; }
  to { transform: translate3d(8%,6%,0) rotate(3deg) scale(1.08); opacity: .52; }
}

@keyframes v06InkDriftTwo {
  from { transform: translate3d(5%,4%,0) rotate(4deg) scale(1.04); opacity: .28; }
  to { transform: translate3d(-7%,-4%,0) rotate(-3deg) scale(.92); opacity: .5; }
}

@keyframes v06WindSweep {
  0% { transform: translate3d(-10vw,0,0) rotate(-5deg) scaleX(.65); opacity: 0; }
  18% { opacity: .68; }
  72% { opacity: .45; }
  100% { transform: translate3d(130vw,-18px,0) rotate(2deg) scaleX(1.2); opacity: 0; }
}

@keyframes v06Ember {
  0%, 16% { opacity: 0; transform: translate3d(0,10px,0) scale(.45); }
  28% { opacity: .8; }
  100% { opacity: 0; transform: translate3d(calc(var(--pointer-x) * 18px + 34px),-116px,0) scale(.15); }
}

@keyframes v06WindCharacter {
  0%,100% { transform: translate3d(0,0,22px) rotate(0deg) skewX(-4deg); }
  28% { transform: translate3d(-15px,-3px,30px) rotate(calc(-5deg + var(--wind-direction))) skewX(-12deg); }
  58% { transform: translate3d(17px,4px,18px) rotate(calc(5deg + var(--wind-direction))) skewX(6deg); }
  78% { transform: translate3d(-7px,-1px,24px) rotate(-3deg) skewX(-7deg); }
}

@keyframes v06ForestDepth {
  0%,100% { transform: translate(.13em,.1em) scale(.98); opacity: .12; }
  50% { transform: translate(.2em,.13em) scale(1.03); opacity: .27; }
}

@keyframes v06FireCharacter {
  0%,100% { transform: translateY(0) rotate(-1deg) scale(1); filter: drop-shadow(0 0 12px rgba(210,100,35,.32)); }
  35% { transform: translateY(-11px) rotate(3deg) scale(1.11,.95); filter: drop-shadow(0 0 26px rgba(225,100,35,.58)); }
  68% { transform: translateY(2px) rotate(-3deg) scale(.97,1.06); }
}

@keyframes v06MatchHeat {
  0%,100% { opacity: .18; transform: scaleX(.7); }
  50% { opacity: .75; transform: scaleX(1.35); }
}

@media (max-width:760px) {
  .hero-atmosphere { opacity: .72; }
  .timeline {
    --timeline-gap: 28px;
    display: block;
  }
  .timeline::before {
    top: 14px;
    bottom: 14px;
    left: 7.5px;
  }
  .timeline .job,
  .timeline .job:nth-child(even) {
    width: auto;
    margin-right: 0;
    margin-left: 0;
    padding: 8px 0 8px 32px;
  }
  .timeline .job::before,
  .timeline .job:nth-child(even)::before {
    top: 14px;
    right: auto;
    left: 1px;
  }
}

@media (prefers-color-scheme:dark) {
  .timeline .job::before { border-color: #171310; }
}

@media (prefers-reduced-motion:reduce) {
  .hero-atmosphere,
  .hero-inner { transform: none !important; transition: none !important; }
  .ink-cloud,
  .wind-stream,
  .ember,
  .hero-name-char,
  .hero-name-char::before,
  .hero-name-char::after { animation: none !important; }
  .wind-stream { display: none; }
  .ember { display: none; }
  .motion-ready .timeline .job { opacity: 1; transform: none; }
}

/* v0.7 — calmer motion, richer sections, true dark mode and mobile resilience */
:root {
  --page-bg: #f2eadc;
  --surface: #f8f1e6;
  --surface-soft: rgb(255 250 242 / 58%);
  --text: #2a211b;
  --muted: #6d5f52;
  --faint: #8b7d6f;
  --line: #b8a895;
  --accent: #9b5132;
  --accent-strong: #7f4027;
  --shadow: rgb(74 54 39 / 14%);
  color-scheme: light dark;
  background: var(--page-bg);
  color: var(--text);
}

body,
.site { background: var(--page-bg); color: var(--text); }

.hero-name-char {
  animation-iteration-count: 3 !important;
  animation-fill-mode: both !important;
}

.hero-name-flame { animation-iteration-count: 5 !important; }
.hero:hover .hero-name-char,
.hero:focus-within .hero-name-char,
.hero:hover .hero-name-flame { animation-iteration-count: infinite !important; }

.timeline::before {
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  transition: transform 900ms cubic-bezier(.22,1,.36,1) 120ms;
}

.timeline .job {
  opacity: .54;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

#about.is-visible .timeline::before { transform: translateX(-50%) scaleY(1); }
#about.is-visible .timeline .job { opacity: 1; transform: translateY(0); }
#about.is-visible .timeline .job:nth-child(even) { transition-delay: 180ms; }
.timeline .job:first-child { opacity: .72; }
#about.is-visible .timeline .job:first-child { opacity: .78; }
#about.is-visible .timeline .job:last-child { opacity: 1; }

.job-period {
  display: inline-flex;
  gap: .35em;
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
}

.contact-panel { background: var(--surface); border-color: var(--line); box-shadow: 0 14px 32px var(--shadow); }
.contact-panel::after { background: var(--surface); border-color: var(--line); }
.contact-trigger { color: var(--text); border-color: var(--line); }
.email-address { color: var(--text); }
.site-footer { color: var(--faint); }

@media (max-width: 720px), (max-height: 680px) {
  body { overflow: auto; }
  .site { scroll-snap-type: y proximity; }
  .screen { scroll-snap-stop: normal; min-height: 100svh; }
  .hero-atmosphere { opacity: .72; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #17130f;
    --surface: #211a15;
    --surface-soft: rgb(39 31 25 / 72%);
    --text: #f2e8d8;
    --muted: #c2b29f;
    --faint: #9b8b7b;
    --line: #544437;
    --accent: #e07b4f;
    --accent-strong: #f09268;
    --shadow: rgb(0 0 0 / 36%);
  }

  body,
  .site { background: radial-gradient(circle at 50% 0%, #241b15 0, var(--page-bg) 48%); }
  .hero-copy,
  .job p { color: var(--muted); }
  .screen { border-color: rgb(255 255 255 / 6%); }
  .ink-cloud { opacity: .35; filter: sepia(.35) brightness(.7); }
  .wind-stream { opacity: .38; }
  .contact-panel { backdrop-filter: blur(8px); }
  .qr-image { box-shadow: 0 8px 26px rgb(0 0 0 / 34%); }
}

@media (prefers-reduced-motion: reduce) {
  .timeline::before,
  .timeline .job { transition: none !important; transform: none !important; opacity: 1 !important; }
}

/* v0.7.1-lite performance pass
   Keep one composited motion layer and disable stacked legacy effects. */
.hero::before,
.hero-name-char-wind::before,
.hero-name-char-wind::after,
.hero-name-char-forest::before,
.hero-name-char-fire::before,
.hero-name-char-fire::after,
.hero-name-char-match::before,
.hero-name-char-match::after,
.hero-name-flame::before,
.hero-name-flame::after {
  animation: none !important;
}

/* Decorative layers were attractive but forced frequent repaints. */
.ink-cloud,
.wind-current,
.ember,
.hero-depth-layer {
  display: none !important;
}

.hero-name-char,
.hero-name-flame {
  will-change: auto !important;
  filter: none !important;
}

/* One low-frequency transform-only animation per character. */
.hero-name-char-wind {
  animation: liteWind 5.8s ease-in-out 1.1s infinite !important;
}

.hero-name-char-forest {
  animation: liteForest 7s ease-in-out 1.2s infinite !important;
}

.hero-name-char-fire {
  animation: liteFire 3.4s ease-in-out 1.25s infinite !important;
}

.hero-name-char-match {
  animation: liteMatch 6.5s ease-in-out 1.3s infinite !important;
}

.hero-name-flame {
  animation: liteFlame 2.8s ease-in-out 1.3s infinite !important;
  transform-origin: 50% 100%;
}

@keyframes liteWind {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(7px, -2px, 0) rotate(1.5deg); }
}

@keyframes liteForest {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -3px, 0) rotate(-1deg); }
}

@keyframes liteFire {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -5px, 0) scale(1.045); }
}

@keyframes liteMatch {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -2px, 0); }
}

@keyframes liteFlame {
  0%, 100% { transform: scale3d(1, 1, 1) rotate(-1deg); }
  50% { transform: scale3d(.96, 1.06, 1) rotate(1deg); }
}

/* Avoid blur and backdrop-filter repaints. */
.contact-panel,
.timeline-item,
.timeline-content {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Cards reveal once; no continuous decorative animation. */
.timeline::before,
.timeline-item::before,
.timeline-item::after {
  animation-iteration-count: 1 !important;
}

/* Pause hero motion while it is off screen. */
.hero:not(.is-visible) .hero-name-char,
.hero:not(.is-visible) .hero-name-flame {
  animation-play-state: paused !important;
}

@media (max-width: 760px), (pointer: coarse) {
  .hero-name-char-wind,
  .hero-name-char-forest,
  .hero-name-char-fire,
  .hero-name-char-match,
  .hero-name-flame {
    animation: none !important;
  }
}


/* v0.7.2 production cleanup */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.page-hidden *,
.page-hidden *::before,
.page-hidden *::after {
  animation-play-state: paused !important;
}

/* v0.7.3 ambient backgrounds: one lightweight, composited layer per page. */
.screen {
  isolation: isolate;
  overflow: hidden;
}

.screen > .screen-inner,
.screen > .next-link {
  position: relative;
  z-index: 2;
}

.screen > .site-footer {
  z-index: 2;
}

.ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .72;
}

.ambient i {
  position: absolute;
  display: block;
  will-change: transform, opacity;
}

/* Home · wind */
.ambient-wind {
  background:
    radial-gradient(circle at 22% 28%, rgb(255 255 255 / 18%), transparent 34%),
    linear-gradient(110deg, transparent 28%, rgb(163 118 83 / 6%) 50%, transparent 72%);
}

.ambient-wind i {
  left: -24vw;
  width: 36vw;
  min-width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(126 98 76 / 28%), transparent);
  transform: translate3d(0, 0, 0) rotate(-5deg);
  animation: ambientWind 11s linear infinite;
}

.ambient-wind i:nth-child(1) { top: 28%; }
.ambient-wind i:nth-child(2) { top: 51%; animation-delay: -3.5s; animation-duration: 14s; opacity: .72; }
.ambient-wind i:nth-child(3) { top: 72%; animation-delay: -7s; animation-duration: 17s; opacity: .48; }

@keyframes ambientWind {
  0% { transform: translate3d(0, 0, 0) rotate(-5deg); opacity: 0; }
  14% { opacity: .85; }
  86% { opacity: .55; }
  100% { transform: translate3d(155vw, -4vh, 0) rotate(-5deg); opacity: 0; }
}

/* About · forest shadows */
.ambient-forest {
  background:
    radial-gradient(ellipse at 15% 100%, rgb(73 104 73 / 13%), transparent 44%),
    radial-gradient(ellipse at 88% 100%, rgb(73 104 73 / 10%), transparent 42%);
}

.ambient-forest i {
  bottom: -12%;
  width: 11vw;
  min-width: 62px;
  height: 58%;
  border-radius: 55% 55% 16% 16%;
  background: linear-gradient(to top, rgb(60 84 61 / 12%), rgb(60 84 61 / 2%));
  transform-origin: 50% 100%;
  animation: ambientForest 9s ease-in-out infinite;
}

.ambient-forest i:nth-child(1) { left: 5%; }
.ambient-forest i:nth-child(2) { right: 14%; height: 47%; animation-delay: -3s; animation-duration: 11s; opacity: .74; }
.ambient-forest i:nth-child(3) { right: -1%; height: 66%; animation-delay: -6s; animation-duration: 13s; opacity: .48; }

@keyframes ambientForest {
  0%, 100% { transform: rotate(-1deg) translate3d(0, 0, 0); }
  50% { transform: rotate(1.3deg) translate3d(3px, 0, 0); }
}

/* Now · restrained fire particles */
.ambient-fire {
  background:
    radial-gradient(circle at 78% 76%, rgb(222 104 56 / 12%), transparent 26%),
    radial-gradient(circle at 20% 22%, rgb(230 157 91 / 6%), transparent 24%);
}

.ambient-fire i,
.ambient-embers i {
  bottom: -18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  color: rgb(218 98 49 / 55%);
  box-shadow: 0 0 10px currentColor;
  animation: ambientSpark 8s ease-out infinite;
}

.ambient-fire i:nth-child(1) { left: 12%; animation-delay: -1s; }
.ambient-fire i:nth-child(2) { left: 38%; animation-delay: -4.4s; animation-duration: 10s; transform: scale(.72); }
.ambient-fire i:nth-child(3) { left: 69%; animation-delay: -2.2s; animation-duration: 12s; transform: scale(.85); }
.ambient-fire i:nth-child(4) { left: 88%; animation-delay: -6.8s; animation-duration: 11s; transform: scale(.58); }

@keyframes ambientSpark {
  0% { transform: translate3d(0, 0, 0) scale(.55); opacity: 0; }
  16% { opacity: .55; }
  72% { opacity: .22; }
  100% { transform: translate3d(22px, -92vh, 0) scale(1); opacity: 0; }
}

/* Contact · slow ember afterglow */
.ambient-embers {
  background:
    radial-gradient(circle at 50% 100%, rgb(154 76 42 / 11%), transparent 38%),
    linear-gradient(to top, rgb(108 70 49 / 5%), transparent 44%);
}

.ambient-embers i { animation-name: ambientEmber; animation-duration: 13s; }
.ambient-embers i:nth-child(1) { left: 24%; animation-delay: -2s; }
.ambient-embers i:nth-child(2) { left: 56%; animation-delay: -8s; animation-duration: 16s; transform: scale(.6); }
.ambient-embers i:nth-child(3) { left: 80%; animation-delay: -5s; animation-duration: 18s; transform: scale(.8); }

@keyframes ambientEmber {
  0% { transform: translate3d(0, 0, 0) scale(.45); opacity: 0; }
  18% { opacity: .42; }
  100% { transform: translate3d(-16px, -72vh, 0) scale(.85); opacity: 0; }
}

/* Only animate the currently visible page. */
.screen:not(.is-visible) .ambient i {
  animation-play-state: paused;
}

@media (prefers-color-scheme: dark) {
  .ambient { opacity: .56; }
  .ambient-wind i { background: linear-gradient(90deg, transparent, rgb(235 220 198 / 20%), transparent); }
  .ambient-forest i { background: linear-gradient(to top, rgb(96 127 92 / 14%), rgb(96 127 92 / 2%)); }
}

@media (max-width: 760px), (pointer: coarse) {
  .ambient { opacity: .42; }
  .ambient i:nth-child(n + 3) { display: none; }
  .ambient-wind i { animation-duration: 17s; }
  .ambient-forest i { animation-duration: 14s; }
  .ambient-fire i,
  .ambient-embers i { animation-duration: 14s; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient i { animation: none !important; opacity: .18; }
}


/* v0.7.4 footer position fix */
.site-footer {
  bottom: max(24px, env(safe-area-inset-bottom));
}

/* v1.0 contact popup: hide the copyright footer while a popup is open so it
   never overlaps the popup on short viewports. */
.contact-screen:has(.contact-method.is-open) .site-footer {
  opacity: 0;
}

/* v1.0 short-viewport: shrink the qr panel so it fits inside the viewport
   without moving the contact screen out of center. */
@media (max-height: 780px) {
  .contact-screen .qr-panel {
    gap: 7px;
    padding: 10px;
  }

  .contact-screen .qr-image {
    width: 132px;
    height: 132px;
  }
}

@media (max-width: 760px) {
  .site-footer {
    right: 24px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 24px;
  }
}

/* v0.7.5: lower the first three page navigation arrows without shrinking the tap target. */
.next-link {
  bottom: max(2px, env(safe-area-inset-bottom));
}

@keyframes guide-down {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

@media (max-width: 760px) {
  .next-link {
    bottom: max(0px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) and (max-height: 650px) {
  .next-link {
    bottom: max(-2px, env(safe-area-inset-bottom));
  }
}

/* v0.8 viewport navigation: one arrow owned by the viewport, not by a section. */
.viewport-next {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 24;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: .72;
  transform: translate3d(-50%, 0, 0);
  transition: opacity 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.viewport-next span {
  display: block;
  font-size: 24px;
  line-height: 1;
  animation: viewportGuide 2.2s ease-in-out infinite;
}

.viewport-next:hover,
.viewport-next:focus-visible {
  opacity: 1;
  transform: translate3d(-50%, -2px, 0) scale(1.06);
}

.viewport-next:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.viewport-next.is-scrolling,
.viewport-next.is-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, 8px, 0);
}

@keyframes viewportGuide {
  0%, 100% { transform: translate3d(0, -1px, 0); }
  50% { transform: translate3d(0, 4px, 0); }
}

/* The old section arrows are no longer rendered; keep this defensive rule for cached markup. */
.next-link { display: none !important; }

@media (max-width: 760px) {
  .viewport-next {
    bottom: max(6px, env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
  }
}

@media (max-height: 650px) {
  .viewport-next { bottom: max(2px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .viewport-next,
  .viewport-next span { transition: none; animation: none; }
}

/* v0.9.1 first-paint guard: these states exist before the external script runs. */
html.hero-pending .hero .kicker,
html.hero-pending .hero .hero-inner > h2,
html.hero-pending .hero .hero-copy {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

html.hero-pending .hero-name-char {
  opacity: 0;
  animation: none !important;
}

html.hero-pending .hero-name-flame {
  opacity: 0;
  animation: none !important;
}

html.hero-pending .viewport-next {
  opacity: 0;
  pointer-events: none;
}

/* v0.9 semantic hero intro: the four-character mark performs first, supporting copy follows. */
.motion-ready .hero.is-visible:not(.hero-intro-complete) .kicker,
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-inner > h2,
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-copy {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

.motion-ready .hero .kicker,
.motion-ready .hero .hero-inner > h2,
.motion-ready .hero .hero-copy {
  transition: opacity 680ms ease, transform 680ms cubic-bezier(.22, 1, .36, 1);
}

.motion-ready .hero.hero-intro-complete .kicker {
  transition-delay: 80ms;
}

.motion-ready .hero.hero-intro-complete .hero-inner > h2 {
  transition-delay: 260ms;
}

.motion-ready .hero.hero-intro-complete .hero-copy {
  transition-delay: 440ms;
}

.motion-ready .hero.hero-intro-complete .kicker,
.motion-ready .hero.hero-intro-complete .hero-inner > h2,
.motion-ready .hero.hero-intro-complete .hero-copy {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Pause the normal idle motion until the semantic intro has finished. */
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char {
  animation: none !important;
}

.motion-ready .hero.is-visible .hero-name-char {
  will-change: transform, opacity;
  transform-origin: 50% 76%;
}

/* Wind: a fast side sweep with two trailing strokes. */
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-wind {
  opacity: 0;
  transform: translate3d(-96px, -8px, 0) skewX(-16deg) rotate(-10deg) scale(.82);
  animation: heroWindArrival 900ms cubic-bezier(.16, 1, .3, 1) 80ms forwards !important;
}

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-wind::before,
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-wind::after {
  opacity: 0;
  animation: heroWindTrail 760ms ease-out 160ms forwards !important;
}

@keyframes heroWindArrival {
  0% { opacity: 0; transform: translate3d(-96px, -8px, 0) skewX(-16deg) rotate(-10deg) scale(.82); }
  62% { opacity: 1; transform: translate3d(11px, 1px, 0) skewX(4deg) rotate(3deg) scale(1.06); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) skewX(0) rotate(0) scale(1); }
}

@keyframes heroWindTrail {
  0% { opacity: 0; transform: translate3d(-34px, 0, 0) scaleX(.35); }
  38% { opacity: .7; }
  100% { opacity: 0; transform: translate3d(32px, 0, 0) scaleX(1.2); }
}

/* Forest: rises from the ground, briefly showing a deeper shadow layer. */
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-forest {
  opacity: 0;
  clip-path: inset(100% -12% 0 -12%);
  transform: translate3d(0, 52px, 0) scale(.72, 1.22);
  animation: heroForestGrow 980ms cubic-bezier(.2, .9, .25, 1) 520ms forwards !important;
}

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-forest::before {
  opacity: 0;
  animation: heroForestShadow 1100ms ease-out 610ms forwards !important;
}

@keyframes heroForestGrow {
  0% { opacity: 0; clip-path: inset(100% -12% 0 -12%); transform: translate3d(0, 52px, 0) scale(.72, 1.22); }
  55% { opacity: 1; clip-path: inset(0 -12% 0 -12%); transform: translate3d(0, -7px, 0) scale(1.05, .98); }
  100% { opacity: 1; clip-path: inset(0 -12% 0 -12%); transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes heroForestShadow {
  0% { opacity: 0; transform: translate3d(0, 16px, 0) scale(.82); }
  48% { opacity: .34; }
  100% { opacity: .08; transform: translate3d(10px, 4px, 0) scale(1.06); }
}

/* Fire: ignites from a small ember and expands once before settling. */
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-fire {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(.28) rotate(-6deg);
  animation: heroFireIgnite 920ms cubic-bezier(.18, 1.25, .35, 1) 1040ms forwards !important;
}

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-fire::after {
  opacity: 0;
  animation: heroFireFlash 820ms ease-out 1120ms forwards !important;
}

@keyframes heroFireIgnite {
  0% { opacity: 0; transform: translate3d(0, 24px, 0) scale(.28) rotate(-6deg); filter: brightness(.8); }
  46% { opacity: 1; transform: translate3d(0, -13px, 0) scale(1.24, 1.34) rotate(4deg); filter: brightness(1.35); }
  72% { transform: translate3d(0, 4px, 0) scale(.94, .91) rotate(-2deg); filter: brightness(1.08); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0); filter: none; }
}

@keyframes heroFireFlash {
  0% { opacity: 0; transform: scale(.3); }
  42% { opacity: .58; transform: scale(1.45); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* Firewood: drops in with weight, then gives a restrained warm afterglow. */
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-match {
  opacity: 0;
  transform: translate3d(18px, -70px, 0) rotate(13deg) scale(.84);
  animation: heroMatchLand 880ms cubic-bezier(.2, 1.05, .35, 1) 1540ms forwards !important;
}

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-flame {
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(.3);
  animation: heroMatchFlame 720ms cubic-bezier(.2, 1.3, .4, 1) 2050ms forwards !important;
}

@keyframes heroMatchLand {
  0% { opacity: 0; transform: translate3d(18px, -70px, 0) rotate(13deg) scale(.84); }
  66% { opacity: 1; transform: translate3d(-3px, 8px, 0) rotate(-3deg) scale(1.07, .94); }
  82% { transform: translate3d(1px, -3px, 0) rotate(1deg) scale(.98, 1.03); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}

@keyframes heroMatchFlame {
  0% { opacity: 0; transform: translate3d(0, 8px, 0) scale(.3); }
  58% { opacity: 1; transform: translate3d(0, -3px, 0) scale(1.18, 1.32); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* Hide the global down indicator during the title performance. */
.motion-ready .hero:not(.hero-intro-complete) ~ .viewport-next,
html.hero-sequencing .viewport-next {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-wind {
    animation-duration: 760ms !important;
  }

  .motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-forest,
  .motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-fire,
  .motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-name-char-match {
    animation-duration: 800ms !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .kicker,
  .hero .hero-inner > h2,
  .hero .hero-copy,
  .hero-name-char,
  .hero-name-char::before,
  .hero-name-char::after,
  .hero-name-flame {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* v1.0 elemental title formation: the meaning appears before the glyph. */
.hero-name {
  overflow: visible;
}

.hero-glyph {
  position: relative;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
}

.hero-glyph > .hero-name-char {
  grid-area: 1 / 1;
  z-index: 2;
}

.hero-effect {
  position: absolute;
  inset: -28% -45%;
  z-index: 1;
  pointer-events: none;
}

.hero-effect i {
  position: absolute;
  display: block;
  opacity: 0;
}

/* WIND — currents cross the empty space, then compress into 风. */
.hero-effect-wind i {
  left: -80%;
  width: 150%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, currentColor 34%, currentColor 72%, transparent 100%);
  transform-origin: right center;
}
.hero-effect-wind i:nth-child(1) { top: 28%; }
.hero-effect-wind i:nth-child(2) { top: 43%; width: 126%; }
.hero-effect-wind i:nth-child(3) { top: 59%; width: 142%; }
.hero-effect-wind i:nth-child(4) { top: 72%; width: 108%; }

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-glyph-wind .hero-name-char {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: none;
  animation: v10WindGlyph 760ms cubic-bezier(.16,1,.3,1) 520ms forwards !important;
}
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-wind i {
  animation: v10WindCurrent 760ms cubic-bezier(.2,.8,.2,1) forwards;
}
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-wind i:nth-child(1) { animation-delay: 70ms; }
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-wind i:nth-child(2) { animation-delay: 150ms; }
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-wind i:nth-child(3) { animation-delay: 230ms; }
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-wind i:nth-child(4) { animation-delay: 310ms; }

@keyframes v10WindCurrent {
  0% { opacity: 0; transform: translate3d(-34px,0,0) scaleX(.35); }
  28% { opacity: .78; }
  72% { opacity: .5; }
  100% { opacity: 0; transform: translate3d(90px,0,0) scaleX(.12); }
}
@keyframes v10WindGlyph {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); filter: blur(5px); }
  55% { opacity: .86; clip-path: inset(0 18% 0 0); filter: blur(1px); }
  100% { opacity: 1; clip-path: inset(0); filter: none; }
}

/* FOREST — scattered trunks converge and stand upright before 林 resolves. */
.hero-effect-forest i {
  left: 48%;
  top: 54%;
  width: 5px;
  height: 38%;
  border-radius: 3px;
  background: currentColor;
  transform-origin: 50% 100%;
}
.hero-effect-forest i:nth-child(1) { --x:-58px; --y:-36px; --r:-62deg; }
.hero-effect-forest i:nth-child(2) { --x:52px; --y:-42px; --r:52deg; height:46%; }
.hero-effect-forest i:nth-child(3) { --x:-48px; --y:36px; --r:74deg; height:30%; }
.hero-effect-forest i:nth-child(4) { --x:58px; --y:31px; --r:-73deg; }
.hero-effect-forest i:nth-child(5) { --x:-20px; --y:-55px; --r:-30deg; height:42%; }
.hero-effect-forest i:nth-child(6) { --x:25px; --y:54px; --r:34deg; height:34%; }
.hero-effect-forest i:nth-child(7) { --x:-66px; --y:4px; --r:88deg; height:28%; }
.hero-effect-forest i:nth-child(8) { --x:66px; --y:-2px; --r:-86deg; height:32%; }

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-glyph-forest .hero-name-char {
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  transform: none;
  animation: v10ForestGlyph 720ms cubic-bezier(.2,.9,.25,1) 1180ms forwards !important;
}
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-forest i {
  animation: v10ForestGather 860ms cubic-bezier(.18,.85,.28,1) 720ms forwards;
}

@keyframes v10ForestGather {
  0% { opacity: 0; transform: translate3d(var(--x),var(--y),0) rotate(var(--r)) scaleY(.7); }
  42% { opacity: .72; }
  76% { opacity: .68; transform: translate3d(calc((var(--x)) * .06),0,0) rotate(0deg) scaleY(1); }
  100% { opacity: 0; transform: translate3d(0,4px,0) rotate(0deg) scaleY(.86); }
}
@keyframes v10ForestGlyph {
  0% { opacity: 0; clip-path: inset(100% 0 0 0); transform: translateY(12px); }
  70% { opacity: 1; clip-path: inset(0); transform: translateY(-2px); }
  100% { opacity: 1; clip-path: inset(0); transform: none; }
}

/* FIRE — sparks spiral inward, ignition blooms, and 火 is left behind. */
.hero-effect-fire i {
  left: 50%;
  top: 58%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.hero-effect-fire i:nth-child(1) { --x:-56px; --y:30px; }
.hero-effect-fire i:nth-child(2) { --x:52px; --y:22px; }
.hero-effect-fire i:nth-child(3) { --x:-38px; --y:-38px; }
.hero-effect-fire i:nth-child(4) { --x:43px; --y:-42px; }
.hero-effect-fire i:nth-child(5) { --x:-8px; --y:54px; }
.hero-effect-fire i:nth-child(6) { --x:12px; --y:-58px; }
.hero-effect-fire i:nth-child(7) { --x:61px; --y:-4px; }

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-glyph-fire .hero-name-char {
  opacity: 0;
  transform: translate3d(0,18px,0) scale(.18);
  animation: v10FireGlyph 820ms cubic-bezier(.18,1.25,.35,1) 1800ms forwards !important;
}
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-fire::after {
  content: '';
  position: absolute;
  left: 50%; top: 58%;
  width: 18px; height: 24px;
  border-radius: 58% 42% 52% 48% / 72% 70% 30% 28%;
  background: currentColor;
  opacity: 0;
  transform: translate(-50%,-50%) scale(.1) rotate(8deg);
  filter: blur(.3px);
  animation: v10FireBloom 650ms ease-out 1580ms forwards;
}
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-fire i {
  animation: v10SparkGather 640ms cubic-bezier(.2,.8,.2,1) 1360ms forwards;
}

@keyframes v10SparkGather {
  0% { opacity: 0; transform: translate3d(var(--x),var(--y),0) scale(.45); }
  32% { opacity: .9; }
  100% { opacity: 0; transform: translate3d(0,0,0) scale(1.3); }
}
@keyframes v10FireBloom {
  0% { opacity: 0; transform: translate(-50%,-30%) scale(.12) rotate(-8deg); }
  45% { opacity: .82; transform: translate(-50%,-62%) scale(1.6,2.1) rotate(5deg); }
  100% { opacity: 0; transform: translate(-50%,-92%) scale(.7,1.15) rotate(-3deg); }
}
@keyframes v10FireGlyph {
  0% { opacity: 0; transform: translate3d(0,18px,0) scale(.18); filter: brightness(.75); }
  52% { opacity: 1; transform: translate3d(0,-8px,0) scale(1.2,1.3); filter: brightness(1.3); }
  78% { transform: translate3d(0,3px,0) scale(.95,.92); }
  100% { opacity: 1; transform: none; filter: none; }
}

/* FIREWOOD — six log strokes stack, lock together, then the match flame catches. */
.hero-effect-match i {
  left: 50%; top: 50%;
  width: 52%; height: 6px;
  border-radius: 4px;
  background: currentColor;
  transform-origin: center;
}
.hero-effect-match i:nth-child(1) { --x:-52px; --y:-48px; --r:18deg; --fr:-5deg; }
.hero-effect-match i:nth-child(2) { --x:55px; --y:-40px; --r:-24deg; --fr:6deg; }
.hero-effect-match i:nth-child(3) { --x:-62px; --y:8px; --r:80deg; --fr:88deg; }
.hero-effect-match i:nth-child(4) { --x:60px; --y:18px; --r:-76deg; --fr:92deg; }
.hero-effect-match i:nth-child(5) { --x:-28px; --y:58px; --r:36deg; --fr:7deg; }
.hero-effect-match i:nth-child(6) { --x:34px; --y:58px; --r:-38deg; --fr:-8deg; }

.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-glyph-match .hero-name-char {
  opacity: 0;
  transform: scale(.84);
  animation: v10MatchGlyph 620ms cubic-bezier(.2,1,.35,1) 2480ms forwards !important;
}
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-effect-match i {
  animation: v10LogsStack 760ms cubic-bezier(.18,.9,.28,1) 2080ms forwards;
}
.motion-ready .hero.is-visible:not(.hero-intro-complete) .hero-glyph-match .hero-name-flame {
  opacity: 0;
  transform: translate3d(0,8px,0) scale(.2);
  animation: v10MatchFlame 620ms cubic-bezier(.2,1.3,.4,1) 2840ms forwards !important;
}

@keyframes v10LogsStack {
  0% { opacity: 0; transform: translate3d(var(--x),var(--y),0) rotate(var(--r)) scaleX(.65); }
  48% { opacity: .72; }
  78% { opacity: .65; transform: translate3d(0,0,0) rotate(var(--fr)) scaleX(1); }
  100% { opacity: 0; transform: translate3d(0,0,0) rotate(var(--fr)) scaleX(.82); }
}
@keyframes v10MatchGlyph {
  0% { opacity: 0; transform: scale(.84); filter: blur(3px); }
  70% { opacity: 1; transform: scale(1.05); filter: none; }
  100% { opacity: 1; transform: scale(1); filter: none; }
}
@keyframes v10MatchFlame {
  0% { opacity: 0; transform: translate3d(0,8px,0) scale(.2); }
  55% { opacity: 1; transform: translate3d(0,-4px,0) scale(1.25,1.45); }
  100% { opacity: 1; transform: none; }
}

/* The semantic performance is longer; copy remains hidden until all four formations finish. */
@media (max-width: 760px) {
  .hero-effect { inset: -22% -32%; }
  .hero-effect-forest i:nth-child(n + 7),
  .hero-effect-fire i:nth-child(n + 6) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-effect { display: none !important; }
  .hero-glyph .hero-name-char { opacity: 1 !important; clip-path: none !important; transform: none !important; filter: none !important; animation: none !important; }
}
