:root {
  color-scheme: dark;
  --canvas: #030b08;
  --ink: #f0f2e9;
  --muted: #aab8ac;
  --accent: #dfedb4;
  --line: rgb(224 237 204 / 18%);
  --gutter: clamp(24px, 4.5vw, 76px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; isolation: isolate; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; }
.skip { position: fixed; top: 12px; left: 12px; transform: translateY(-160%); z-index: 10; padding: 12px 20px; background: var(--ink); color: var(--canvas); }
.skip:focus { transform: none; }
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--canvas); }
.nebula { position: absolute; inset: -2%; background: url("assets/nebula-v2.png") center / cover; animation: nebula-flow 56s ease-in-out infinite alternate; }
.nebula-detail { position: absolute; width: min(65vw, 960px); aspect-ratio: 1; right: -10%; bottom: -20%; background: url("assets/nebula-detail-v2.png") center / cover; mask-image: radial-gradient(ellipse at center, #000 10%, #000 36%, transparent 70%); opacity: .78; animation: detail-flow 34s ease-in-out infinite alternate; }
.scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(1 8 5 / 30%), transparent 56%), linear-gradient(180deg, rgb(1 8 5 / 20%), transparent 25%, transparent 82%, rgb(1 8 5 / 40%)); }
.stars { position: absolute; inset: 0; opacity: .50; background-image: radial-gradient(1px 1px at 9% 23%, #c0cead 70%, transparent), radial-gradient(1px 1px at 31% 12%, #c0cead 70%, transparent), radial-gradient(1px 1px at 47% 72%, #c0cead 70%, transparent), radial-gradient(1.3px 1.3px at 85% 19%, #c0cead 70%, transparent), radial-gradient(1px 1px at 93% 76%, #c0cead 70%, transparent); }
.header { padding: 0 var(--gutter); min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 36px; position: relative; z-index: 5; }
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgb(2 9 6 / 86%), rgb(2 9 6 / 38%)); }
.wordmark { font-size: 23px; font-weight: 500; letter-spacing: .27em; padding: 12px 0; }
.navigation { display: flex; gap: clamp(28px, 3.8vw, 62px); }
.navigation a { display: flex; flex-direction: column; gap: 7px; padding: 12px 0; color: var(--muted); font-size: 14px; letter-spacing: .1em; position: relative; }
.navigation small { font-size: 10px; letter-spacing: .09em; color: #8c9d8e; }
.navigation a:hover, .navigation .current { color: var(--ink); }
.navigation .current::before { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); left: -15px; top: 19px; }
.menu-button { display: none; }
main { flex: 1; }
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: calc(100svh - 160px); max-width: 1700px; padding: 32px var(--gutter) 24px; margin: 0 auto; }
.intro { position: relative; z-index: 4; align-self: center; padding-bottom: 10px; }
h1 { font-size: clamp(62px, 6.15vw, 100px); font-weight: 450; line-height: 1.07; letter-spacing: -.047em; margin: 0; }
h1 span, h1 em { display: block; white-space: nowrap; }
h1 em { color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.04em; letter-spacing: -.055em; line-height: 1.12; margin-top: 3px; }
.intro p { margin: 33px 0 29px; color: #cbd5c8; font-size: clamp(16px, 1.35vw, 20px); letter-spacing: .03em; line-height: 1.8; }
.primary { min-height: 52px; min-width: 164px; display: inline-flex; align-items: center; justify-content: space-between; gap: 37px; padding: 0 22px; background: var(--accent); color: #121b0e; border: 1px solid transparent; border-radius: 5px; font-size: 15px; font-weight: 500; transition: background .2s, transform .2s; }
.primary span { font-size: 23px; font-weight: 400; }
.primary:hover { background: #edf6d4; transform: translateY(-2px); }
.portrait-position { position: relative; z-index: 2; justify-self: center; width: min(100%, calc(clamp(530px, calc(100svh - 220px), 690px) * .6440281)); aspect-ratio: 550 / 854; }
.portrait-motion { width: 100%; height: 100%; position: relative; }
.portrait { position: absolute; inset: 0; pointer-events: none; overflow: clip; overflow-clip-margin: 5px; }
.portrait img { position: absolute; width: 304%; height: auto; max-width: none; left: -152.181818%; top: -5.386417%; user-select: none; }
.portrait-rgb { mask-image: url("assets/portrait-mask-v2.svg"); mask-size: 100% 100%; mask-repeat: no-repeat; }
.portrait-rim { pointer-events: none; z-index: -1; }
.ambient { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ambient-back { z-index: 1; }
.ambient-front { z-index: 3; }
.orbits { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: -1; }
.orbits path { fill: none; stroke: #c5c58e; stroke-width: .7; opacity: .38; }
.orbits path + path { opacity: .24; }
.planet { position: absolute; overflow: visible; pointer-events: none; z-index: -1; filter: drop-shadow(0 0 9px #9cbb6827); }
.planet-purple { width: 51px; left: -22%; top: 15%; }
.planet-green { width: 83px; right: -17%; top: 22%; }
.planet-blue { width: 58px; left: -28%; bottom: 24%; }
.planet-gold { width: 65px; right: -17%; bottom: 18%; }
.gesture { position: absolute; width: 48px; height: 48px; left: calc(32.73% - 24px); top: calc(13% - 24px); border-radius: 50%; display: grid; place-items: center; }
.gesture-light { width: 4px; height: 4px; display: block; border-radius: 50%; background: #eaf8bd; box-shadow: 0 0 8px 2px rgb(220 242 165 / 22%); opacity: .5; animation: breathe 4.8s ease-in-out infinite; pointer-events: none; }
.gesture-label { position: absolute; top: 9px; right: 58px; padding: 7px 9px; background: rgb(3 11 8 / 94%); border-radius: 3px; white-space: nowrap; font-size: 12px; color: var(--accent); opacity: 0; transform: translateX(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.gesture:hover .gesture-label, .gesture:focus-visible .gesture-label { opacity: 1; transform: none; }
.gesture:hover .gesture-light { opacity: 1; }
.footer { margin: 0 var(--gutter); min-height: 64px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 28px; position: relative; z-index: 3; text-shadow: 0 1px 4px #000; }
.footer-name { font-size: 11px; letter-spacing: .43em; }
.footer-line { margin-left: auto; color: #9ba994; font-size: 10px; letter-spacing: .12em; }
.motion-toggle { display: flex; align-items: center; justify-content: center; gap: 7px; background: none; border: 0; padding: 12px 0 12px 12px; font-size: 10px; color: var(--muted); min-height: 44px; }
.motion-toggle > span:first-child { font-size: 12px; }
.motion-toggle:disabled { cursor: default; }
body[data-paused="true"] .nebula, body[data-paused="true"] .nebula-detail, body[data-paused="true"] .gesture-light { animation-play-state: paused; }
body.is-leaving main { transform-origin: var(--entry-x, 73%) var(--entry-y, 25%); animation: enter-works .6s cubic-bezier(.22,.7,.3,1) forwards; pointer-events: none; }
@keyframes nebula-flow { from { transform: translate(-.3%, 0) scale(1); } to { transform: translate(.5%, -.4%) scale(1.008); } }
@keyframes detail-flow { from { transform: translate(-1.2%, .8%); } to { transform: translate(1.4%, -1%); } }
@keyframes breathe { 0%, 100% { opacity: .25; } 50% { opacity: .64; } }
@keyframes enter-works { 0% { opacity: 1; transform: scale(1); } 70% { opacity: .4; } 100% { opacity: 0; transform: scale(1.035); } }
@media (min-width: 900px) and (max-height: 650px) {
  .header { min-height: 80px; }
  .hero { min-height: 600px; }
  h1 { font-size: clamp(58px, 5.1vw, 78px); }
  .intro { align-self: start; padding-top: 52px; }
}
@media (max-width: 1100px) and (min-width: 900px) {
  .hero { gap: 24px; }
  h1 { font-size: clamp(52px, 6vw, 66px); }
  .intro p { font-size: 15px; }
  .navigation { gap: 26px; }
  .planet-green { right: -9%; width: 66px; }
  .planet-gold { right: -9%; width: 52px; }
}
@media (max-width: 899px) {
  .header { min-height: 76px; gap: 20px; }
  .wordmark { font-size: 20px; letter-spacing: .23em; }
  .menu-button { display: flex; align-items: center; gap: 9px; font-size: 12px; padding: 12px 0 12px 12px; border: 0; background: none; min-height: 44px; }
  .menu-button span { font-size: 20px; font-weight: 300; }
  .navigation { display: none; position: absolute; top: 69px; left: var(--gutter); right: var(--gutter); background: #07120d; border: 1px solid var(--line); border-radius: 5px; padding: 14px 22px; gap: 0; flex-direction: column; box-shadow: 0 12px 40px #0006; }
  .navigation.is-open { display: flex; }
  .navigation a { flex-direction: row; justify-content: space-between; align-items: center; padding: 14px 0; }
  .navigation .current::before { left: -12px; top: 20px; width: 4px; height: 4px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 40px; padding-top: 32px; padding-bottom: 22px; min-height: 0; }
  .intro { width: 100%; align-self: auto; padding-bottom: 0; }
  h1 { font-size: clamp(43px, 9.2vw, 74px); line-height: 1.06; }
  h1 em { margin-top: 2px; }
  .intro p { font-size: 15px; margin: 24px 0 22px; letter-spacing: .015em; line-height: 1.7; }
  .primary { min-height: 46px; min-width: 148px; font-size: 13px; padding: 0 18px; gap: 30px; }
  .primary span { font-size: 21px; }
  .portrait-position { width: min(74%, 350px); margin: 0 auto; }
  .gesture-label { display: none; }
  .planet-purple { width: 40px; left: -17%; }
  .planet-green { width: 61px; right: -15%; }
  .planet-blue { width: 42px; left: -18%; }
  .planet-gold { width: 47px; right: -15%; }
  .nebula { background-position: 67% center; }
  .nebula-detail { width: 760px; right: -420px; bottom: -100px; opacity: .65; }
  .scene::after { background: linear-gradient(180deg, rgb(1 8 5 / 27%), transparent 55%, rgb(1 8 5 / 18%)); }
  .footer { min-height: 60px; gap: 16px; }
  .footer-name { font-size: 9px; letter-spacing: .29em; }
  .footer-line { font-size: 8px; letter-spacing: .025em; }
  .motion-label { display: none; }
  .motion-toggle { margin-left: -4px; }
}
@media (max-width: 480px) {
  h1 { font-size: clamp(40px, 11.7vw, 56px); }
  .hero { gap: 24px; padding-bottom: 16px; }
  .intro p { font-size: 14px; margin-top: 22px; margin-bottom: 20px; }
  .portrait-position { width: 80%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
