:root {
  color-scheme: dark;
  --ink: #0b1110;
  --ink-soft: #121a18;
  --fog: #f0eee6;
  --fog-muted: #c9cdc6;
  --moss: #53685b;
  --dawn: #d1a35a;
  --lake: #9caaa8;
  --hairline: rgba(240, 238, 230, 0.28);
  --panel: rgba(8, 14, 13, 0.76);
  --display: "Songti SC", "STSong", "SimSun", "Iowan Old Style", "Baskerville", Georgia, serif;
  --body: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  --utility: "Arial Narrow", "Aptos Narrow", "Roboto Condensed", var(--body);
  --page-pad: clamp(1.25rem, 4vw, 4.5rem);
  --stage-x: 50%;
  --stage-y: 50%;
  --stage-scale: 1.035;
  --stage-brightness: 0.72;
  --stage-saturation: 0.82;
  --wash-opacity: 0.48;
  --scroll-progress: 0%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; background: var(--ink); }
body {
  margin: 0;
  min-width: 20rem;
  background: var(--ink);
  color: var(--fog);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body[data-active-section="about"] { --stage-x: 44%; --stage-y: 49%; --stage-scale: 1.07; --stage-brightness: 0.55; --stage-saturation: 0.66; --wash-opacity: 0.58; }
body[data-active-section="now"] { --stage-x: 57%; --stage-y: 48%; --stage-scale: 1.09; --stage-brightness: 0.62; --stage-saturation: 0.78; --wash-opacity: 0.52; }
body[data-active-section="skills"] { --stage-x: 38%; --stage-y: 52%; --stage-scale: 1.12; --stage-brightness: 0.48; --stage-saturation: 0.58; --wash-opacity: 0.65; }
body[data-active-section="experience"] { --stage-x: 63%; --stage-y: 50%; --stage-scale: 1.08; --stage-brightness: 0.52; --stage-saturation: 0.62; --wash-opacity: 0.62; }
body[data-active-section="projects"] { --stage-x: 43%; --stage-y: 55%; --stage-scale: 1.13; --stage-brightness: 0.44; --stage-saturation: 0.72; --wash-opacity: 0.66; }
body[data-active-section="education"] { --stage-x: 58%; --stage-y: 45%; --stage-scale: 1.06; --stage-brightness: 0.58; --stage-saturation: 0.58; --wash-opacity: 0.58; }
body[data-active-section="contact"] { --stage-x: 50%; --stage-y: 50%; --stage-scale: 1.03; --stage-brightness: 0.38; --stage-saturation: 0.48; --wash-opacity: 0.74; }

button, a { font: inherit; }
a { color: inherit; text-underline-offset: 0.25em; }
button { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--dawn); outline-offset: 5px; }
h1, h2, h3, p, blockquote { margin-top: 0; }
button { cursor: pointer; }
::selection { background: var(--dawn); color: var(--ink); }

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem 1rem;
  background: var(--fog);
  color: var(--ink);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visual-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); pointer-events: none; }
.stage-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--stage-x) var(--stage-y);
  transform: scale(var(--stage-scale));
  filter: brightness(var(--stage-brightness)) saturate(var(--stage-saturation)) contrast(1.04);
  transition: object-position 1.6s cubic-bezier(.2,.7,.2,1), transform 1.6s cubic-bezier(.2,.7,.2,1), filter 1.6s ease;
}
.stage-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 10, 9, 0.74) 0%, rgba(5, 10, 9, 0.16) 46%, rgba(5, 10, 9, 0.48) 100%),
    linear-gradient(180deg, rgba(5, 10, 9, 0.32) 0%, rgba(5, 10, 9, 0.04) 45%, rgba(5, 10, 9, 0.72) 100%);
  opacity: var(--wash-opacity);
  transition: opacity 1.4s ease;
}
.stage-grain {
  position: absolute;
  inset: -50%;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  transform: rotate(8deg);
}

/* Each cloud texture moves by exactly one background tile, so frame 0 and the final frame match. */
.cloud-field { position: absolute; left: -10%; width: 120%; pointer-events: none; background-repeat: repeat-x; mix-blend-mode: screen; transform: translateZ(0); }
.cloud-field--far {
  top: 4%;
  height: 43%;
  opacity: 0.18;
  filter: blur(12px);
  background-image:
    radial-gradient(ellipse at 10% 52%, rgba(230, 235, 232, 0.58) 0 8%, rgba(210, 220, 218, 0.2) 22%, transparent 42%),
    radial-gradient(ellipse at 40% 38%, rgba(238, 241, 237, 0.52) 0 7%, rgba(214, 222, 220, 0.16) 24%, transparent 44%),
    radial-gradient(ellipse at 74% 61%, rgba(224, 230, 228, 0.52) 0 9%, rgba(204, 214, 212, 0.14) 26%, transparent 46%);
  background-size: 80rem 100%;
  animation: cloud-drift-far 138s linear infinite;
}
.cloud-field--near {
  top: 42%;
  height: 38%;
  opacity: 0.23;
  filter: blur(15px);
  background-image:
    radial-gradient(ellipse at 18% 58%, rgba(242, 244, 240, 0.55) 0 8%, rgba(219, 225, 223, 0.19) 25%, transparent 45%),
    radial-gradient(ellipse at 55% 45%, rgba(235, 239, 236, 0.62) 0 9%, rgba(211, 219, 216, 0.16) 27%, transparent 48%),
    radial-gradient(ellipse at 88% 62%, rgba(232, 237, 234, 0.52) 0 7%, rgba(208, 217, 214, 0.14) 24%, transparent 44%);
  background-size: 62rem 100%;
  animation: cloud-drift-near 96s linear infinite;
}
@keyframes cloud-drift-far { from { background-position: 0 50%; } to { background-position: 80rem 50%; } }
@keyframes cloud-drift-near { from { background-position: 0 50%; } to { background-position: -62rem 50%; } }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.6rem var(--page-pad);
  pointer-events: none;
}
.wordmark, .menu-toggle { pointer-events: auto; }
.wordmark { display: grid; color: var(--fog); text-decoration: none; text-shadow: 0 1px 18px rgba(0,0,0,.4); }
.wordmark-cn { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.22em; line-height: 1.2; }
.wordmark-en { font-family: var(--utility); font-size: 0.55rem; letter-spacing: 0.28em; opacity: 0.66; }
.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 0;
  padding: 0.35rem 0;
  background: transparent;
  font-family: var(--utility);
  font-size: 0.66rem;
  letter-spacing: 0.25em;
}
.menu-toggle-icon { display: grid; width: 1.55rem; gap: 0.4rem; }
.menu-toggle-icon i { display: block; width: 100%; height: 1px; background: currentColor; transition: transform .35s ease, width .35s ease; }
.menu-toggle:hover .menu-toggle-icon i:last-child { width: 65%; justify-self: end; }

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  opacity: 0;
  background: rgba(7, 12, 11, 0.97);
  transition: visibility 0s linear .55s, opacity .55s ease;
}
.menu-panel::before { content: ""; position: absolute; inset: 0 50% 0 0; background: linear-gradient(135deg, rgba(83,104,91,.2), transparent 66%); }
.menu-panel.is-open { visibility: visible; opacity: 1; transition-delay: 0s; }
.menu-panel-inner { position: relative; width: min(100% - 2.5rem, 75rem); min-height: 100%; margin-inline: auto; padding: 2rem 0; display: grid; grid-template-rows: auto 1fr auto; }
.menu-meta { display: flex; justify-content: space-between; padding-right: 6rem; color: var(--fog-muted); font-family: var(--utility); font-size: .62rem; letter-spacing: .26em; }
.menu-close { position: absolute; top: 1.55rem; right: 0; border: 0; background: transparent; font-family: var(--utility); font-size: .66rem; letter-spacing: .24em; }
.overlay-nav { align-self: center; display: grid; width: min(100%, 48rem); margin-inline: auto; }
.overlay-nav a {
  display: grid;
  grid-template-columns: 3rem 1fr;
  align-items: baseline;
  padding: .15rem 0;
  color: rgba(240,238,230,.34);
  font-family: var(--display);
  font-size: clamp(1.75rem, 4.4vh, 3.2rem);
  line-height: 1.08;
  text-decoration: none;
  transition: color .3s ease, transform .3s ease;
}
.overlay-nav a span { font-family: var(--utility); font-size: .63rem; letter-spacing: .18em; color: var(--dawn); }
.overlay-nav a:hover, .overlay-nav a:focus-visible { color: var(--fog); transform: translateX(.7rem); }
.menu-note { margin: 0; color: rgba(240,238,230,.42); font-size: .72rem; letter-spacing: .12em; }
body.menu-open { overflow: hidden; }

.chapter-rail {
  position: fixed;
  top: 50%;
  right: max(1.2rem, 2.6vw);
  z-index: 60;
  display: grid;
  gap: .7rem;
  transform: translateY(-50%);
}
.chapter-rail a { display: grid; grid-template-columns: 1.5rem 1.6rem; align-items: center; color: var(--fog); text-decoration: none; }
.chapter-rail span { font-family: var(--utility); font-size: .52rem; letter-spacing: .08em; opacity: 0; transition: opacity .3s ease; }
.chapter-rail i { display: block; width: .55rem; height: 1px; justify-self: end; background: currentColor; opacity: .42; transition: width .35s ease, opacity .35s ease; }
.chapter-rail b { position: absolute; right: 3.5rem; width: max-content; font-family: var(--utility); font-size: .58rem; font-weight: 400; letter-spacing: .22em; opacity: 0; transform: translateX(.5rem); transition: opacity .3s ease, transform .3s ease; }
.chapter-rail a:hover span, .chapter-rail a:focus-visible span, .chapter-rail a[aria-current="true"] span { opacity: .7; }
.chapter-rail a:hover i, .chapter-rail a:focus-visible i, .chapter-rail a[aria-current="true"] i { width: 1.6rem; opacity: 1; }
.chapter-rail a:hover b, .chapter-rail a:focus-visible b { opacity: .8; transform: none; }

.scroll-progress { position: fixed; left: 0; top: 0; bottom: 0; z-index: 70; width: 2px; background: rgba(240,238,230,.08); }
.scroll-progress span { display: block; width: 100%; height: var(--scroll-progress); background: var(--dawn); transition: height .12s linear; }

main { position: relative; z-index: 2; }
.chapter {
  position: relative;
  min-height: 100svh;
  padding: 7.5rem calc(var(--page-pad) + 4rem) 5.5rem var(--page-pad);
  display: grid;
  align-items: center;
  scroll-snap-align: start;
}
.chapter-shell { width: min(100%, 43rem); padding: clamp(1.5rem, 3vw, 3rem); background: var(--panel); border-top: 1px solid var(--hairline); backdrop-filter: blur(12px); box-shadow: 0 2rem 6rem rgba(0,0,0,.18); }
.chapter-shell--wide { width: min(100%, 61rem); }
.chapter--right { justify-items: end; }
.chapter--right .chapter-shell { border-top-color: rgba(209,163,90,.62); }
.chapter-heading { display: grid; grid-template-columns: minmax(10rem,.75fr) minmax(0,1.25fr); gap: 2rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.chapter-heading h2 { margin: 0; font-family: var(--display); font-size: clamp(2.15rem, 5vw, 4.9rem); font-weight: 400; line-height: 1.15; letter-spacing: .02em; }
.chapter-number { margin: .4rem 0 0; font-family: var(--utility); font-size: .7rem; letter-spacing: .16em; color: var(--dawn); }
.chapter-number span { display: block; margin-top: .35rem; color: var(--fog-muted); font-size: .58rem; letter-spacing: .28em; }
.chapter-body { margin-left: calc(33.333% + .8rem); max-width: 32rem; color: var(--fog-muted); }
.chapter-body p:last-child { margin-bottom: 0; }
.lead-copy { color: var(--fog); font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1.55; }

.hero { justify-items: center; text-align: center; padding-inline: var(--page-pad); }
.hero-inner { width: min(100%, 58rem); text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.archive-label { margin-bottom: clamp(2rem, 5vh, 4.8rem); font-family: var(--utility); font-size: .58rem; letter-spacing: .34em; color: rgba(240,238,230,.66); }
.hero-role { margin-bottom: 1.1rem; font-family: var(--utility); font-size: clamp(.68rem, 1.1vw, .84rem); letter-spacing: .3em; }
.hero h1 { margin: 0; font-weight: 400; }
.hero-name { display: block; font-family: var(--display); font-size: clamp(5rem, 14vw, 11.5rem); line-height: .86; letter-spacing: .08em; }
.hero-name-latin { display: block; margin-top: 1rem; font-family: var(--utility); font-size: clamp(.78rem, 1.4vw, 1.08rem); letter-spacing: .72em; padding-left: .72em; }
.short-rule { display: block; width: 2rem; height: 1px; margin: clamp(1.5rem, 4vh, 2.8rem) auto; background: var(--fog); }
.hero-statement { margin-bottom: .8rem; font-family: var(--display); font-size: clamp(1.35rem, 3vw, 2.15rem); letter-spacing: .08em; }
.hero-intro { max-width: 39rem; margin: 0 auto; color: rgba(240,238,230,.76); font-size: .9rem; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 1.8rem; margin-top: 2.4rem; }
.primary-link, .quiet-link { font-family: var(--utility); font-size: .66rem; letter-spacing: .2em; text-decoration: none; }
.primary-link { padding-bottom: .55rem; border-bottom: 1px solid var(--fog); }
.primary-link span { display: inline-block; margin-left: .5rem; transition: transform .3s ease; }
.primary-link:hover span { transform: translate(.25rem,.25rem); }
.quiet-link { color: rgba(240,238,230,.58); }
.scroll-cue { position: absolute; bottom: 2.3rem; left: 50%; display: grid; justify-items: center; gap: .75rem; color: rgba(240,238,230,.68); text-decoration: none; transform: translateX(-50%); }
.scroll-cue span { font-family: var(--utility); font-size: .52rem; letter-spacing: .32em; white-space: nowrap; }
.scroll-cue i { display: block; width: 1px; height: 2.5rem; background: linear-gradient(var(--fog) 50%, transparent 50%); background-size: 100% 200%; animation: scroll-line 2.2s ease-in-out infinite; }
@keyframes scroll-line { 0% { background-position: 0 100%; } 55%,100% { background-position: 0 0; } }

.fact-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 2.5rem 0 0; }
.fact-strip div { padding-top: .85rem; border-top: 1px solid var(--hairline); }
.fact-strip dt { font-family: var(--utility); font-size: .56rem; letter-spacing: .18em; color: var(--dawn); }
.fact-strip dd { margin: .25rem 0 0; color: var(--fog); font-size: .78rem; }

.now-list { display: grid; gap: .7rem; }
.now-list article { padding: 1rem 0; border-top: 1px solid var(--hairline); }
.now-list article > span { font-family: var(--utility); font-size: .56rem; letter-spacing: .2em; color: var(--dawn); }
.now-list h3 { margin: .45rem 0 .3rem; color: var(--fog); font-family: var(--display); font-size: 1.25rem; font-weight: 400; }
.now-list p { margin: 0; font-size: .84rem; }

.capability-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--hairline); }
.capability-grid article { position: relative; min-height: 18rem; padding: 1.4rem; border-right: 1px solid var(--hairline); }
.capability-grid article:last-child { border-right: 0; }
.capability-index { color: var(--dawn); font-family: var(--utility); font-size: .65rem; }
.capability-grid h3 { margin: 3.2rem 0 1rem; font-family: var(--display); font-size: 1.55rem; font-weight: 400; line-height: 1.3; }
.capability-grid p { color: var(--fog-muted); font-size: .82rem; }
.capability-grid small { position: absolute; bottom: 1.4rem; left: 1.4rem; font-family: var(--utility); font-size: .5rem; letter-spacing: .12em; color: rgba(240,238,230,.42); }

.experience-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hairline); }
.experience-list li { display: grid; grid-template-columns: 10rem 1fr; gap: 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--hairline); }
.experience-list time { padding-top: .2rem; font-family: var(--utility); font-size: .62rem; letter-spacing: .16em; color: var(--dawn); }
.experience-list h3 { margin-bottom: .35rem; font-family: var(--display); font-size: 1.25rem; font-weight: 400; }
.experience-list p { margin: 0; color: var(--fog-muted); font-size: .82rem; }
.experience-note { margin: 1rem 0 0; color: rgba(240,238,230,.58); font-size: .68rem; letter-spacing: .04em; }

.project-heading { align-items: end; grid-template-columns: 1fr auto; }
.project-heading h2 { margin-top: .65rem; }
.project-controls { display: flex; align-items: center; gap: .8rem; padding-bottom: .55rem; }
.project-controls button { width: 2.45rem; height: 2.45rem; border: 1px solid var(--hairline); border-radius: 50%; background: transparent; transition: background .25s ease, color .25s ease; }
.project-controls button:hover { background: var(--fog); color: var(--ink); }
.project-controls span { font-family: var(--utility); font-size: .58rem; letter-spacing: .12em; }
.project-stage { position: relative; min-height: 32rem; border-top: 1px solid var(--hairline); overflow: hidden; }
.project-slide { position: absolute; inset: 0; padding: 1.6rem 0 0; opacity: 0; transform: translateX(2rem); pointer-events: none; transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.project-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.project-meta { display: flex; justify-content: space-between; font-family: var(--utility); font-size: .54rem; letter-spacing: .16em; color: var(--dawn); }
.project-slide h3 { margin: 1.15rem 0 .35rem; font-family: var(--display); font-size: clamp(2.5rem,6vw,5.2rem); font-weight: 400; line-height: 1; }
.project-link { display: inline-block; padding-bottom: .2rem; border-bottom: 1px solid rgba(211,165,98,.55); color: var(--dawn); font-family: var(--utility); font-size: .56rem; letter-spacing: .13em; text-decoration: none; }
.project-link:hover, .project-link:focus-visible { color: var(--fog); border-bottom-color: currentColor; }
.project-tagline { margin: 1rem 0 1.2rem; color: var(--fog); font-family: var(--display); font-size: 1.18rem; }
.project-slide > p:not(.project-tagline) { max-width: 44rem; color: var(--fog-muted); font-size: .84rem; }
.project-slide ul { display: flex; flex-wrap: wrap; gap: .55rem 1.4rem; margin: 1.4rem 0 0; padding: 0; list-style: none; font-family: var(--utility); font-size: .56rem; letter-spacing: .14em; }
.project-slide li::before { content: "/"; margin-right: .5rem; color: var(--dawn); }

.education-body { display: grid; gap: 2rem; }
.education-body time { font-family: var(--utility); font-size: .62rem; letter-spacing: .16em; color: var(--dawn); }
.education-body h3 { margin: .4rem 0; color: var(--fog); font-family: var(--display); font-size: 1.35rem; font-weight: 400; }
.education-body blockquote { margin: 0; padding: 1.3rem 0 1.3rem 1.4rem; border-left: 1px solid var(--dawn); color: var(--fog); font-family: var(--display); font-size: 1.4rem; line-height: 1.55; }

.contact { text-align: center; justify-items: center; padding-inline: var(--page-pad); }
.contact-inner { width: min(100%, 56rem); }
.contact .chapter-number span { display: inline; margin-left: .8rem; }
.contact-kicker { margin: clamp(2rem,5vh,4rem) 0 1rem; font-family: var(--utility); font-size: .7rem; letter-spacing: .25em; color: var(--fog-muted); }
.contact h2 { margin-bottom: 1.4rem; font-family: var(--display); font-size: clamp(2.8rem,8vw,7rem); font-weight: 400; line-height: 1.08; }
.contact-inner > p:not(.chapter-number):not(.contact-kicker) { max-width: 40rem; margin-inline: auto; color: var(--fog-muted); }
.contact-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .8rem 1.8rem; margin-top: 2.2rem; }
.contact-link { display: inline-block; margin: 0; padding: 0 0 .25rem; border: 0; border-bottom: 1px solid rgba(255,255,255,.35); border-radius: 0; background: transparent; color: #fff; font-family: var(--utility); font-size: .62rem; line-height: 1.75; letter-spacing: .14em; text-decoration: none; appearance: none; }
.contact-link:hover, .contact-link:focus-visible { border-bottom-color: rgba(255,255,255,.72); color: #fff; }
.copy-toast { position: fixed; top: 72%; left: 50%; z-index: 180; display: flex; align-items: center; gap: .65rem; width: max-content; max-width: calc(100vw - 2rem); padding: .72rem 1rem; border: 1px solid rgba(255,255,255,.38); border-radius: 999px; background: rgba(232,235,229,.9); box-shadow: 0 1rem 3rem rgba(3,8,7,.24); color: #24302b; font-family: var(--utility); font-size: .62rem; line-height: 1.4; letter-spacing: .1em; opacity: 0; transform: translate(-50%, .7rem); backdrop-filter: blur(14px); pointer-events: none; transition: opacity .22s ease, transform .28s cubic-bezier(.2,.7,.2,1); }
.copy-toast[hidden] { display: none; }
.copy-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.copy-toast.is-error { background: rgba(241,226,215,.92); color: #4c3026; }
.copy-toast-icon { display: grid; width: 1.25rem; height: 1.25rem; place-items: center; border-radius: 50%; background: rgba(36,48,43,.1); font-size: .72rem; line-height: 1; }
.contact-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem 2rem; margin-top: 2rem; font-family: var(--utility); font-size: .55rem; letter-spacing: .15em; color: rgba(240,238,230,.52); }
.site-footer { position: absolute; left: var(--page-pad); right: calc(var(--page-pad) + 3rem); bottom: 1.5rem; display: flex; justify-content: space-between; font-family: var(--utility); font-size: .5rem; letter-spacing: .17em; color: rgba(240,238,230,.45); }
.site-footer p { margin: 0; }

.chapter-status { position: fixed; left: var(--page-pad); bottom: 1.5rem; z-index: 55; display: flex; align-items: center; gap: .7rem; font-family: var(--utility); font-size: .52rem; letter-spacing: .2em; color: rgba(240,238,230,.64); }
.chapter-status i { display: block; width: 1.5rem; height: 1px; background: currentColor; }
body[data-active-section="contact"] .chapter-status { opacity: 0; }

.motion-ready .reveal { opacity: 0; transform: translateY(2.2rem); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 64rem) {
  .chapter { padding-right: calc(var(--page-pad) + 2.2rem); }
  .chapter-rail { right: .8rem; }
  .chapter-rail b { display: none; }
  .chapter-shell--wide { width: min(100%, 52rem); }
}

@media (max-width: 48rem) {
  :root { --page-pad: 1.15rem; }
  html { scroll-snap-type: none; }
  .site-header { padding-top: 1.1rem; }
  .menu-toggle-label, .chapter-rail, .chapter-status { display: none; }
  .menu-panel-inner { padding-block: 1.25rem; }
  .menu-meta { padding-right: 4rem; font-size: .5rem; }
  .overlay-nav a {
    grid-template-columns: 2.1rem 1fr;
    padding-block: .08rem;
    font-size: clamp(1.6rem, 5.1vh, 2.4rem);
    line-height: 1.08;
  }
  .chapter { min-height: auto; padding: 7rem var(--page-pad) 5rem; }
  .hero { min-height: 100svh; padding-bottom: 7rem; }
  .hero-name { font-size: clamp(4.6rem, 28vw, 7.5rem); }
  .hero-name-latin { letter-spacing: .5em; padding-left: .5em; }
  .hero-actions { align-items: flex-start; flex-direction: column; width: fit-content; margin-inline: auto; }
  .scroll-cue { bottom: 1.2rem; }
  .scroll-cue i { height: 1.8rem; }
  .chapter-shell, .chapter-shell--wide { width: 100%; padding: 1.35rem; backdrop-filter: blur(9px); }
  .chapter-heading { grid-template-columns: 1fr; gap: .7rem; margin-bottom: 2rem; }
  .chapter-heading h2 { font-size: clamp(2.15rem, 12vw, 3.5rem); }
  .chapter-body { margin-left: 0; }
  .fact-strip, .capability-grid { grid-template-columns: 1fr; }
  .fact-strip { gap: .5rem; }
  .capability-grid article { min-height: 13.5rem; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .capability-grid article:last-child { border-bottom: 0; }
  .experience-list li { grid-template-columns: 1fr; gap: .5rem; }
  .project-heading { grid-template-columns: 1fr; }
  .project-controls { justify-self: start; }
  .project-stage { min-height: 39rem; }
  .project-meta { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .project-slide h3 { font-size: clamp(2.35rem, 11vw, 3.2rem); }
  .contact { min-height: 100svh; }
  .contact h2 { font-size: clamp(2.7rem, 14vw, 4.6rem); }
  .site-footer { left: var(--page-pad); right: var(--page-pad); flex-direction: column; gap: .3rem; }
  .visual-stage { position: fixed; }
  .stage-image { object-position: 58% var(--stage-y); }
  .cloud-field--far { opacity: .14; }
  .cloud-field--near { opacity: .18; }
}

@media (max-height: 46rem) and (min-width: 49rem) {
  .chapter { min-height: 46rem; }
  .hero { min-height: 100svh; }
  .archive-label { margin-bottom: 1.5rem; }
  .hero-name { font-size: 7rem; }
  .hero-actions { margin-top: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .cloud-field { animation: none !important; }
  .motion-ready .reveal { opacity: 1; transform: none; }
}
