:root {
  --bg: #26252d;
  --panel: #292831;
  --panel-soft: #302f39;
  --panel-line: rgba(255, 255, 255, 0.18);
  --text: #f4f1f7;
  --muted: #beb8c9;
  --dim: #878191;
  --accent: #69f5ff;
  --pink: #d47abf;
  --purple: #b072e6;
  --hot: #ff1f62;
  --black: #030303;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(105deg, transparent 0 24%, rgba(255, 255, 255, 0.14) 24.1% 24.25%, transparent 24.35% 50%, rgba(255, 255, 255, 0.12) 50.1% 50.25%, transparent 50.35% 76%, rgba(255, 255, 255, 0.12) 76.1% 76.25%, transparent 76.35%),
    var(--bg);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.26) 0 1.6px, transparent 2.2px) 0 0 / 72px 72px;
  animation: dot-wave 13s ease-in-out infinite alternate;
}

body::after {
  z-index: 0;
  background:
    radial-gradient(circle at center, rgba(105, 245, 255, 0.16) 0 1.2px, transparent 2px) 18px 28px / 96px 96px;
  filter: blur(0.2px);
  opacity: 0.72;
  animation: dot-wave-soft 18s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: 20px;
  top: -60px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: #071113;
  font-weight: 800;
}

.skip-link:focus {
  top: 20px;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(16px, 4vw, 54px);
}

@keyframes dot-wave {
  0% {
    background-position: 0 0;
    transform: translate3d(-10px, -6px, 0) skewY(-1deg) scale(1);
    opacity: 0.62;
  }

  45% {
    background-position: 26px 42px;
    transform: translate3d(8px, 12px, 0) skewY(1.2deg) scale(1.018);
    opacity: 0.9;
  }

  100% {
    background-position: 58px 18px;
    transform: translate3d(14px, -10px, 0) skewY(-0.6deg) scale(1.006);
    opacity: 0.68;
  }
}

@keyframes dot-wave-soft {
  0% {
    background-position: 18px 28px;
    transform: translate3d(12px, 8px, 0) skewX(1deg) scale(1.01);
  }

  100% {
    background-position: -38px 76px;
    transform: translate3d(-16px, -14px, 0) skewX(-1.4deg) scale(1.028);
  }
}

.stage {
  position: relative;
  width: min(1102px, 100%);
  min-height: calc(100vh - clamp(32px, 8vw, 108px));
  padding: clamp(28px, 5vw, 60px);
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: clamp(36px, 6vw, 62px);
  background: rgba(38, 37, 45, 0.92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(12deg, transparent 0 43%, rgba(255, 255, 255, 0.13) 43.1% 43.25%, transparent 43.35%),
    linear-gradient(171deg, transparent 0 62%, rgba(255, 255, 255, 0.12) 62.1% 62.25%, transparent 62.35%);
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.brand,
.nav-links,
.social-row {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 12px;
  font-weight: 900;
}

.brand-avatar,
.mini-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--accent));
  color: #101018;
  font-weight: 1000;
}

.brand-avatar {
  width: 38px;
  height: 38px;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  gap: 8px;
}

.nav-links a {
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav-links a {
  padding: 9px 13px;
}

.nav-links a:hover {
  color: var(--text);
  border-color: rgba(105, 245, 255, 0.5);
}

.video-card,
.panel,
.masonry-card {
  border: 1px solid var(--panel-line);
  border-radius: 36px;
}

.video-card {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--black);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.video-card iframe,
.video-card video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

.video-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.video-status,
.quality-switch {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  backdrop-filter: blur(12px);
}

.video-status {
  min-width: 0;
  overflow: hidden;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  pointer-events: auto;
}

.quality-switch button {
  min-width: 48px;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.quality-switch button:hover,
.quality-switch button:focus-visible,
.quality-switch button.is-active {
  background: rgba(105, 245, 255, 0.18);
  color: #fff;
  outline: none;
}

.quality-switch button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.panel {
  background: rgba(43, 42, 51, 0.92);
}

.profile-card {
  margin: 26px auto 0;
  overflow: hidden;
}

.profile-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  padding:
    clamp(46px, 8vw, 96px)
    clamp(28px, 7vw, 80px)
    clamp(42px, 6vw, 72px);
}

.portrait {
  width: 132px;
  height: 132px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  overflow: hidden;
  background: #1b1a22;
  box-shadow: inset 0 0 0 8px rgba(0, 0, 0, 0.18);
}

.profile-copy {
  min-width: 0;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kicker {
  margin: 0 0 16px;
  color: var(--pink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(14px, 2.2vw, 22px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.profile-card h2,
.section-title h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 300;
  line-height: 1.06;
}

.profile-card h2 span {
  display: block;
}

.terminal-copy {
  margin: 0;
  color: #fff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(17px, 2.3vw, 24px);
  font-weight: 900;
  line-height: 1.28;
}

.terminal-copy strong {
  color: var(--accent);
}

.social-row {
  position: relative;
  gap: 28px;
  padding: 28px clamp(28px, 7vw, 80px);
  border-top: 1px solid var(--panel-line);
}

.social-item {
  position: relative;
}

.social-button {
  display: inline-grid;
  min-width: 78px;
  min-height: 42px;
  place-items: center;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 1000;
}

.social-button:hover,
.social-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  outline: none;
}

.contact-popover {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  z-index: 6;
  display: grid;
  min-width: 230px;
  gap: 12px;
  justify-items: center;
  padding: 16px;
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  background: rgba(31, 30, 38, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.contact-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.contact-popover::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
  background: rgba(31, 30, 38, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.contact-popover img:not(.wechat-qr) {
  display: block;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
}

.contact-popover span {
  color: var(--accent);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 900;
}

.qr-popover {
  min-width: min(330px, calc(100vw - 56px));
  padding: 20px;
  border-radius: 24px;
}

.wechat-qr {
  display: block;
  width: min(268px, calc(100vw - 96px));
  height: auto;
  max-height: 72vh;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  object-fit: contain;
  background: #fff;
}

.copy-toast {
  position: absolute;
  right: clamp(28px, 7vw, 80px);
  top: 50%;
  z-index: 7;
  padding: 10px 12px;
  border: 1px solid rgba(105, 245, 255, 0.42);
  border-radius: 999px;
  background: rgba(31, 30, 38, 0.96);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(8px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.content-block {
  margin-top: 54px;
}

.section-title {
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-title h2 {
  font-size: clamp(34px, 5vw, 52px);
}

.project-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 34px;
  background: rgba(43, 42, 51, 0.94);
}

.project-visual {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: end start;
  margin: 24px 24px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: #111;
}

.project-visual::before,
.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.project-visual::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px) 0 0 / 46px 46px;
  opacity: 0.45;
}

.project-visual::after {
  z-index: 1;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.55));
}

.project-visual span {
  position: relative;
  z-index: 2;
  max-width: calc(100% - 66px);
  padding: 14px;
  color: #fff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.project-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

video.project-media {
  background: #000;
}

.open-project {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.project-visual.trinity {
  background:
    radial-gradient(circle at 62% 42%, rgba(225, 87, 69, 0.95) 0 4px, transparent 5px),
    radial-gradient(circle at 32% 58%, rgba(99, 196, 115, 0.95) 0 5px, transparent 6px),
    linear-gradient(135deg, #7f5136 0 18%, #b77243 18% 34%, #8d5f3e 34% 52%, #c18b53 52% 70%, #77523a 70%);
}

.project-visual.life {
  background:
    radial-gradient(circle at 74% 54%, #2dff56 0 8px, transparent 9px),
    linear-gradient(90deg, transparent 0 26%, #111 26% 42%, transparent 42%),
    linear-gradient(0deg, transparent 0 28%, #111 28% 32%, transparent 32%),
    #f1f1ee;
}

.project-visual.engine {
  background:
    radial-gradient(circle at 76% 22%, rgba(255, 255, 255, 0.88) 0 20%, transparent 21%),
    radial-gradient(circle at 32% 58%, rgba(78, 250, 196, 0.35) 0 9%, transparent 10%),
    linear-gradient(135deg, #08070d, #243041 55%, #101018);
}

.project-visual.soduku {
  background:
    linear-gradient(90deg, rgba(105, 245, 255, 0.28) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(135deg, #202337, #11131f);
}

.project-visual.contra {
  background:
    radial-gradient(circle at 78% 52%, #35ff53 0 7px, transparent 8px),
    linear-gradient(0deg, transparent 0 55%, #000 55% 59%, transparent 59%),
    linear-gradient(90deg, #f4f4f1 0 40%, #d8d8d4 40% 42%, #f4f4f1 42%);
}

.project-copy {
  padding: 26px 28px 30px;
}

.project-copy h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 500;
  line-height: 0.98;
}

.project-meta,
.project-role,
.project-period,
.project-text,
.project-links {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.project-meta {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 900;
  line-height: 1.25;
}

.project-role {
  margin: 0 0 4px;
  color: #ffd45f;
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 900;
  line-height: 1.18;
}

.project-period {
  margin: 0 0 18px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
}

.project-text {
  color: #f3eef7;
}

.project-text p,
.project-text li {
  color: var(--muted);
  line-height: 1.58;
}

.project-text p {
  margin: 0 0 12px;
}

.project-text h4 {
  margin: 18px 0 10px;
  color: #fff;
  font-size: 15px;
}

.project-text ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
}

.project-text li::marker {
  color: rgba(255, 255, 255, 0.28);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.project-links a {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
}

.project-links a:hover {
  border-color: rgba(105, 245, 255, 0.5);
  background: rgba(105, 245, 255, 0.08);
}

.reveal,
.fade-copy {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.72s ease,
    transform 0.72s ease;
}

.reveal {
  transition-delay: var(--delay, 0ms);
}

.fade-copy {
  transition-delay: 90ms;
}

.reveal.is-visible,
.fade-copy.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .stage {
    border-radius: 44px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 10px;
    place-items: start center;
  }

  .stage {
    min-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 32px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links a {
    text-align: center;
  }

  .video-card {
    border-radius: 28px;
  }

  .video-toolbar {
    top: 10px;
    left: 10px;
    right: 10px;
    align-items: flex-start;
    flex-direction: row;
    gap: 6px;
  }

  .video-status {
    max-width: 38%;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 11px;
  }

  .quality-switch {
    flex: 0 1 auto;
    gap: 2px;
    max-width: 60%;
    padding: 3px;
    border-radius: 12px;
  }

  .quality-switch button {
    min-width: clamp(38px, 12vw, 46px);
    min-height: 30px;
    padding: 0 7px;
    border-radius: 9px;
    font-size: clamp(10px, 3vw, 12px);
  }
}

@media (max-width: 420px) {
  .video-toolbar {
    gap: 4px;
  }

  .video-status {
    max-width: 34%;
    padding: 6px 8px;
    font-size: 10px;
  }

  .quality-switch {
    max-width: 64%;
  }

  .quality-switch button {
    min-width: clamp(32px, 11vw, 40px);
    min-height: 28px;
    padding: 0 5px;
  }
}

@media (max-width: 640px) {
  .profile-main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 24px 38px;
  }

  .portrait {
    width: 112px;
    height: 112px;
  }

  .kicker {
    letter-spacing: 0.22em;
  }

  .social-row {
    gap: 10px;
    padding: 22px 24px;
  }

  .social-button {
    min-width: 70px;
    padding: 0 10px;
  }

  .copy-toast {
    right: 18px;
    top: auto;
    bottom: calc(100% + 12px);
    transform: translateY(8px);
  }

  .copy-toast.is-visible {
    transform: translateY(0);
  }

  .project-visual {
    margin: 16px 16px 0;
    border-radius: 18px;
  }

  .project-copy {
    padding: 22px 18px 26px;
  }

  .project-copy h3 {
    font-size: clamp(34px, 12vw, 52px);
  }

}
