@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --background: #0d1117;
  --surface: #111923;
  --line: #2c3948;
  --ink: #edf4fa;
  --muted: #a7b6c7;
  --accent: #72f1c4;
  --display: "Space Grotesk", var(--chinese);
  --chinese: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-snap-type: y mandatory; }
body {
  margin: 0;
  isolation: isolate;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, var(--chinese);
}
.galaxy {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 72% 25%, #46357238, transparent 46%),
    radial-gradient(ellipse at 37% 57%, #263f7636, transparent 52%),
    radial-gradient(ellipse at 12% 77%, #23586424, transparent 40%);
}
.galaxy canvas { display: block; width: 100%; height: 100%; }
.meteor {
  position: absolute;
  top: 16%;
  left: 78%;
  width: clamp(5rem, 12vw, 11rem);
  height: 2px;
  border-radius: 50%;
  background: linear-gradient(90deg, #e6f8ff, #a7c9ff8c 20%, transparent);
  opacity: 0;
  animation: meteor-pass 21s 2s linear infinite;
}
.meteor:nth-of-type(2) { top: 7%; left: 56%; animation-delay: 5.5s; }
.meteor:nth-of-type(3) { top: 27%; left: 95%; animation-delay: 9s; }
.meteor:nth-of-type(4) { top: 33%; left: 66%; animation-delay: 12.5s; }
.meteor:nth-of-type(5) { top: 44%; left: 90%; animation-delay: 16s; }
.meteor:nth-of-type(6) { top: 12%; left: 40%; animation-delay: 19.5s; }

@keyframes meteor-pass {
  0% { opacity: 0; transform: translate(0, 0) rotate(-28deg); }
  1% { opacity: .95; }
  5% { opacity: 0; transform: translate(-48vw, 25.5vw) rotate(-28deg); }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .meteor { animation: none; }
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(70rem, calc(100% - 4rem)); margin-inline: auto; }
.screen-nav {
  --dot-step: 1.75rem;
  position: fixed;
  top: 50%;
  left: max(.25rem, env(safe-area-inset-left));
  z-index: 3;
  display: grid;
  gap: 0;
  transform: translateY(-50%);
}
.screen-nav a {
  display: grid;
  width: 1.5rem;
  height: var(--dot-step);
  place-items: center;
  border-radius: .4rem;
}
.screen-nav a::before {
  content: "";
  width: .5rem;
  height: .5rem;
  background: #8190a1;
  border-radius: 50%;
}
.screen-nav a:hover::before { background: var(--ink); }
.screen-nav::after {
  content: "";
  position: absolute;
  top: calc(var(--dot-step) / 2);
  left: 50%;
  width: .625rem;
  height: .625rem;
  pointer-events: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 .6rem #72f1c44d;
  transform: translate(-50%, calc(-50% + var(--active-dot, 0) * var(--dot-step)));
}
@media (prefers-reduced-motion: no-preference) {
  .screen-nav::after { transition: transform .34s cubic-bezier(.22, 1.25, .36, 1); }
}
.intro-screen, #work, .contact {
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.intro-screen { display: flex; flex-direction: column; }
.hero {
  flex: 1;
  display: grid;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 77% 48%, #132724 0%, transparent 48%);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  padding-block: clamp(2rem, 7vh, 4rem);
}
.hero-copy { position: relative; z-index: 1; }
.hero-art {
  --planet-size: clamp(25rem, 46vw, 49rem);
  position: absolute;
  top: calc(var(--planet-size) * -.19);
  right: calc(var(--planet-size) * -.19);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: .38;
}
.sphere-art {
  position: relative;
  width: var(--planet-size);
  aspect-ratio: 1;
}
.sphere {
  position: absolute;
  inset: 0;
  border: 1px solid #72f1c454;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 44%, #16312f, #0c171c 68%, #0b1218 78%);
  box-shadow: 0 0 4rem #72f1c425, inset 0 0 2.5rem #72f1c426;
  overflow: hidden;
}
.sphere canvas { display: block; width: 100%; height: 100%; }
.sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 28% 22%, #b4f4e623, transparent 52%);
  box-shadow: inset 0 0 1.6rem #70c8f323;
}
h1, h2, h3, p, figure { margin: 0; }
.identity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.identity-tags li {
  padding: .3rem .625rem;
  border: 1px solid #72f1c450;
  border-radius: 999px;
  background: #72f1c40d;
  color: var(--accent);
  font-size: .9375rem;
}
h1 { font: 700 clamp(2.5rem, 8vw, 5rem)/1.1 var(--display); letter-spacing: -1px; margin-bottom: 1.5rem; }
h1 span { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  #hero-title span {
    display: inline-block;
    background: linear-gradient(90deg, #36b99e, #b6eeff 25%, #36b99e 50%, #b6eeff 75%, #36b99e) 100% 0 / 200% 100% no-repeat;
    background-clip: text;
    color: transparent;
    animation:
      hero-title-wave 2s linear 1s infinite,
      hero-title-breathe 2s ease-in-out 1s infinite;
  }
  .hero-copy > * { animation: hero-copy-enter 600ms cubic-bezier(.22, .65, .36, 1) both; }
  .hero-copy > .identity { animation-delay: 200ms; }
  .hero-copy > .identity-tags { animation-delay: 400ms; }
}
@keyframes hero-title-wave {
  from { background-position-x: 100%; }
  to { background-position-x: 0%; }
}
@keyframes hero-title-breathe {
  0%, 100% { filter: brightness(.88); }
  50% { filter: brightness(1.14); }
}
@keyframes hero-copy-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.identity {
  margin-bottom: 1.5rem;
  font: 700 clamp(1.125rem, 3.2vw, 2rem)/1.4 var(--chinese);
  letter-spacing: 2px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
}
.button:hover { border-color: var(--accent); }
.not-found {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  min-height: 100svh;
  padding-block: 2rem;
}
.not-found .not-found-code { color: var(--accent); font: 700 1.25rem var(--display); }
.not-found h1 { margin-bottom: 0; font-size: clamp(2rem, 7vw, 4rem); }
.not-found p { color: var(--muted); }
.not-found .button { margin-top: .5rem; color: var(--background); background: var(--accent); }
.not-found .button:hover { background: #a4f8db; }
.section { padding-block: 3.75rem; }
#work {
  display: grid;
  align-content: center;
  padding-bottom: clamp(4rem, 13svh, 8rem);
}
#work h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.section h2 {
  font: 500 clamp(1.75rem, 3.5vw, 2.25rem) var(--chinese);
  letter-spacing: 2px;
  margin-bottom: 1.75rem;
}
.section p { color: var(--muted); }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); }
.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
  align-items: center;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
  scroll-margin-top: 1rem;
}
.card .work-type { font-size: .875rem; }
.card h3 { margin-top: .3rem; font: 700 clamp(1.4rem, 2.3vw, 2rem)/1.2 var(--display); overflow-wrap: anywhere; }
.work-description { margin-block: .6rem 1rem; }
.cover-art, .date-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: .5rem;
}
.cover-art { object-fit: cover; }
.date-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  padding: clamp(.55rem, 1.2vw, .85rem);
  background: linear-gradient(145deg, #394e63, #263748);
  font-size: .875rem;
  line-height: 1.4;
}
.date-preview figcaption { color: #d3dfeb; }
.date-preview-panel { padding: .55rem .65rem; border-radius: .4rem; background: #172230; }
.date-preview-panel strong { display: block; margin-bottom: .2rem; font-size: 1rem; }
.date-preview-panel span { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem; padding-block: .2rem; border-top: 1px solid #34475b; }
.date-preview-panel b { color: #c5d5e5; font-weight: 600; white-space: nowrap; }
.card:target { border-color: var(--accent); }
.contact {
  display: grid;
  grid-template-rows: .8fr auto auto 1.2fr;
  padding-block: clamp(2rem, 7vh, 4.5rem);
  text-align: center;
}
.contact h2 {
  grid-row: 2;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
  letter-spacing: .06em;
}
.follow-links { grid-row: 3; position: relative; display: flex; justify-content: center; gap: 2rem; }
.follow-link {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .65rem;
  width: clamp(6rem, 12vw, 9rem);
  border-radius: .5rem;
  color: var(--muted);
  cursor: pointer;
}
.follow-link::-webkit-details-marker { display: none; }
.follow-link svg {
  display: block;
  width: clamp(4rem, 7vw, 6rem);
  aspect-ratio: 1;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid #72f1c436;
  border-radius: 50%;
  background: #72f1c409;
}
.follow-link:hover, .follow-link:focus-visible, .wechat-follow[open] > summary { color: var(--accent); }
.follow-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.follow-link:hover svg, .follow-link:focus-visible svg, .wechat-follow[open] > summary svg {
  border-color: #72f1c49c;
  background: #72f1c41a;
  box-shadow: 0 0 1.1rem #72f1c424;
}
.wechat-follow::details-content { content-visibility: visible; }
.wechat-preview {
  position: absolute;
  z-index: 2;
  bottom: 100%;
  left: 50%;
  width: max-content;
  padding-bottom: .6rem;
  transform: translateX(-50%);
  visibility: hidden;
}
.wechat-follow[open] .wechat-preview { visibility: visible; }
@media (hover: hover) {
  .wechat-follow:hover .wechat-preview { visibility: visible; }
}
@media (min-width: 48rem) {
  .wechat-preview {
    bottom: 0;
    left: calc(50% - clamp(7rem, 13vw, 10rem));
    padding: 0 .6rem 0 0;
    transform: translateX(-100%);
  }
}
.wechat-preview-card {
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
  box-shadow: 0 .5rem 1.5rem #0008;
}
.wechat-preview-card p { margin-top: .4rem; font-size: .875rem; }
.wechat-qr {
  display: block;
  max-width: 100%;
  height: auto;
}
.site-footer {
  grid-row: 4;
  align-self: end;
  padding-bottom: clamp(1rem, 5svh, 3rem);
  color: #8793a3;
  font-size: .875rem;
}

@media (min-width: 951px) and (max-height: 760px) {
  #work { padding-block: 1.5rem; }
  #work h2 { margin-bottom: 1.25rem; }
  .cover-art, .date-preview { max-width: 12rem; justify-self: end; }
  .contact { padding-block: 1.5rem; }
}

@media (min-width: 951px) {
  .cover-art { width: 85%; justify-self: end; }
  .date-preview { aspect-ratio: 1.17; padding: .55rem; }
}

@media (max-width: 950px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .cover-art, .date-preview { aspect-ratio: auto; min-height: 8.5rem; }
  .cover-art { height: 8.5rem; }
  .cover-art { object-fit: contain; background: #1a2430; }
}
@media (max-width: 767px) {
  .shell { width: calc(100% - 3rem); margin-left: 2rem; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  #work { padding-bottom: 2.5rem; }
  .card { gap: .75rem; padding: .85rem; }
  .work-description { margin-block: .4rem .65rem; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-art { --planet-size: clamp(9rem, 48vw, 17rem); opacity: .21; }
  .section { padding-block: 1.75rem; }
  .section h2 { font-size: clamp(1.375rem, 5vw, 1.75rem); margin-bottom: 1.75rem; }
  .contact { margin-inline: auto; }
  .contact h2 { font-size: 1.75rem; margin-bottom: 1.25rem; }
  .wechat-qr { width: clamp(5rem, calc(50svh - 6.75rem), 192px); }
}
@media (max-height: 420px) {
  .contact { padding-block: 1rem; }
}
