:root {
  --bg: #05080c;
  --panel: #101722;
  --panel-soft: #151d2a;
  --text: #f4f7fb;
  --muted: #7f8a9a;
  --cyan: #00f5ff;
  --line: rgba(255, 255, 255, 0.14);
  --cyan-soft: rgba(0, 245, 255, 0.1);
  --cyan-line: rgba(0, 245, 255, 0.42);
  --max-width: 1720px;
  --page-pad: clamp(20px, 4.2vw, 80px);
  --section-space: clamp(100px, 10vw, 180px);
  --font-sans: Inter, "Helvetica Neue", Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--cyan) var(--bg);
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 245, 255, 0.035), transparent 26rem),
    var(--bg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p,
h1,
h2,
h3,
figure {
  margin: 0;
}

button {
  color: inherit;
}

::selection {
  color: var(--bg);
  background: var(--cyan);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 50%;
  display: flex;
  width: min(100%, var(--max-width));
  height: 82px;
  padding-inline: var(--page-pad);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transform: translateX(-50%);
  transition:
    height 240ms var(--ease),
    border-color 240ms ease,
    background-color 240ms ease;
}

.site-header::before {
  position: absolute;
  z-index: -1;
  inset: 0 50%;
  width: 100vw;
  content: "";
  background: rgba(5, 8, 12, 0.24);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header.is-scrolled {
  height: 62px;
  border-color: var(--line);
}

.site-header.is-scrolled::before {
  background: rgba(5, 8, 12, 0.86);
}

.wordmark {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.wordmark-mark {
  display: grid;
  width: 28px;
  height: 28px;
  color: var(--bg);
  background: var(--cyan);
  border-radius: 7px;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.25);
}

.wordmark-name,
.site-nav {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wordmark-name {
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: clamp(24px, 3vw, 52px);
  align-items: center;
}

.site-nav a {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  transition: color 180ms ease;
}

.site-nav a span {
  color: var(--cyan);
  font-size: 8px;
}

.site-nav a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  display: flex;
  min-height: 760px;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  padding: 118px var(--page-pad) 44px;
  align-items: center;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(5, 8, 12, 0.46) 0%, rgba(5, 8, 12, 0.15) 45%, var(--bg) 100%),
    radial-gradient(circle at 50% 50%, transparent 0, rgba(5, 8, 12, 0.1) 34%, rgba(5, 8, 12, 0.92) 83%);
}

.hero-grid {
  position: absolute;
  z-index: -3;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: clamp(58px, 6vw, 104px) clamp(58px, 6vw, 104px);
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.hero-media {
  position: absolute;
  z-index: -2;
  inset: 16% -6% -4%;
  opacity: 0.16;
  filter: grayscale(1) contrast(1.35) brightness(0.85) hue-rotate(120deg);
  mask-image: linear-gradient(to bottom, transparent 0, black 22%, black 70%, transparent 100%);
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
}

.hero-topline,
.hero-footer {
  position: absolute;
  right: var(--page-pad);
  left: var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.55;
}

.hero-topline {
  top: 104px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hero-content {
  width: min(100%, 1560px);
  margin-inline: auto;
  text-align: center;
}

.eyebrow,
.section-number,
.section-kicker,
.cyan-label,
.visual-index,
.visual-caption,
.visual-status,
.joyboy-signal,
.joyboy-code,
.project-number,
.project-meta {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: clamp(24px, 3vw, 46px);
  color: var(--muted);
  font-size: clamp(9px, 0.72vw, 12px);
}

.eyebrow::before,
.eyebrow::after {
  display: inline-block;
  width: clamp(24px, 4vw, 70px);
  height: 1px;
  margin: 0 16px 3px;
  content: "";
  background: var(--cyan-line);
}

.hero-title {
  display: grid;
  grid-template-columns: auto 0.2em auto 0.2em auto;
  gap: 0.12em;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: clamp(60px, 9.5vw, 178px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.82;
  white-space: nowrap;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.55);
}

.hero-title i {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.34em;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-title-accent {
  color: var(--cyan);
  text-shadow: 0 0 46px rgba(0, 245, 255, 0.2);
}

.hero-intro {
  max-width: 640px;
  margin: clamp(30px, 4vw, 58px) auto 0;
  color: #b8c1ce;
  font-size: clamp(14px, 1.25vw, 20px);
  line-height: 1.8;
}

.hero-footer {
  bottom: 34px;
}

.hero-footer > p {
  text-align: right;
}

.scroll-cue {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: var(--text);
}

.scroll-cue-index {
  color: var(--cyan);
}

.scroll-cue-line {
  width: 54px;
  height: 1px;
  background: var(--line);
  transition:
    width 240ms var(--ease),
    background-color 240ms ease;
}

.scroll-cue:hover .scroll-cue-line {
  width: 74px;
  background: var(--cyan);
}

.layout-section {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: var(--section-space) var(--page-pad);
}

.work-section {
  border-top: 1px solid var(--line);
}

.section-header {
  display: grid;
  grid-template-columns: 2.5fr 6.5fr 3fr;
  gap: clamp(24px, 3vw, 56px);
  align-items: start;
}

.section-number {
  color: var(--cyan);
  font-size: 10px;
}

.section-kicker {
  margin-top: 14px;
  color: var(--muted);
  font-size: 8px;
}

.section-header h2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: clamp(54px, 6.5vw, 112px);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.section-title-cn {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.18em;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1;
}

.section-lead {
  padding-top: 2px;
  color: var(--muted);
  font-size: clamp(13px, 0.95vw, 16px);
  line-height: 1.8;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 32px);
  margin-top: clamp(72px, 8vw, 136px);
}

.project-card {
  min-width: 0;
}

.project-card > a {
  display: flex;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(21, 29, 42, 0.96), rgba(16, 23, 34, 0.96));
  border: 1px solid var(--line);
  border-radius: clamp(20px, 2vw, 30px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  transition:
    border-color 280ms ease,
    box-shadow 360ms ease,
    transform 360ms var(--ease);
}

.project-card:hover > a {
  border-color: var(--cyan-line);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(0, 245, 255, 0.08);
  transform: translateY(-6px);
}

.project-visual {
  position: relative;
  min-height: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #090e15;
  border-bottom: 1px solid var(--line);
}

.joyboy-cover-visual {
  background: #000;
  overflow: hidden;
}

.joyboy-cover-visual > video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.25);
  transform-origin: center;
  pointer-events: none;
}

/* Tongyu cover inside the existing 02 card; shared card geometry stays unchanged. */
.tongyu-product-visual {
  background: #2780ff;
}

.tongyu-product-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.xianglehui-visual { background: #584bff; }
.xianglehui-visual > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }

.visual-index,
.visual-caption,
.visual-status,
.joyboy-signal {
  position: absolute;
  z-index: 4;
  color: var(--muted);
  font-size: 8px;
}

.visual-index {
  top: clamp(18px, 2vw, 32px);
  left: clamp(18px, 2vw, 32px);
}

.visual-caption {
  right: 22px;
  bottom: 20px;
}

.joyboy-visual {
  background:
    radial-gradient(circle at 50% 52%, rgba(0, 245, 255, 0.14), transparent 31%),
    linear-gradient(135deg, #101925, #080c12 62%);
}

.joyboy-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(0, 245, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 255, 0.1) 1px, transparent 1px);
  background-size: clamp(42px, 5vw, 84px) clamp(42px, 5vw, 84px);
  mask-image: radial-gradient(circle, black 12%, transparent 72%);
}

.joyboy-visual::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -20%;
  width: 16%;
  content: "";
  opacity: 0.5;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.13), transparent);
  transform: skewX(-16deg);
  animation: scan 8s ease-in-out infinite;
}

@keyframes scan {
  0%,
  16% {
    left: -22%;
  }

  70%,
  100% {
    left: 112%;
  }
}

.joyboy-signal {
  top: clamp(18px, 2vw, 32px);
  right: clamp(18px, 2vw, 32px);
  color: var(--cyan);
}

.joyboy-stage {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: min(73%, 1040px);
  aspect-ratio: 3.2 / 1;
  place-items: center;
  transform: translate(-50%, -50%);
}

.joyboy-stage strong {
  position: relative;
  z-index: 2;
  color: var(--text);
  font-size: clamp(56px, 11vw, 180px);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 0.8;
  text-shadow:
    0 0 1px var(--text),
    0 0 36px rgba(0, 245, 255, 0.2);
}

.joyboy-orbit {
  position: absolute;
  width: 48%;
  aspect-ratio: 2 / 1;
  border: 1px solid var(--cyan-line);
  border-radius: 50%;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 36px rgba(0, 245, 255, 0.05);
}

.joyboy-orbit::before,
.joyboy-orbit::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.joyboy-orbit::before {
  inset: 12%;
}

.joyboy-orbit::after {
  inset: 28%;
}

.joyboy-code {
  position: absolute;
  right: -2%;
  bottom: 9%;
  color: var(--muted);
  font-size: clamp(7px, 0.65vw, 10px);
  line-height: 1.6;
}

.visual-status {
  right: clamp(18px, 2vw, 32px);
  bottom: clamp(18px, 2vw, 30px);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.visual-status i {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan);
}

.product-visual {
  background:
    linear-gradient(135deg, transparent 22%, rgba(0, 245, 255, 0.06) 22%, transparent 23%),
    #090e15;
}

.interface-stack {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 60%;
  height: 54%;
  transform: translate(-50%, -50%);
}

.interface-stack span {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid var(--line);
  background: rgba(21, 29, 42, 0.86);
  border-radius: 10px;
  box-shadow: 0 22px 38px rgba(0, 0, 0, 0.25);
}

.interface-stack span:nth-child(1) {
  transform: translate(-20%, 10%) scale(0.9);
}

.interface-stack span:nth-child(2) {
  border-color: rgba(0, 245, 255, 0.28);
  transform: translate(0, -2%);
}

.interface-stack span:nth-child(3) {
  background:
    linear-gradient(90deg, var(--cyan) 0 22%, transparent 22%) 14px 14px / 34% 3px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.13) 0 0) 14px 34px / 70% 1px no-repeat,
    rgba(16, 23, 34, 0.95);
  transform: translate(20%, -14%) scale(0.88);
}

.project-info {
  position: relative;
  display: flex;
  min-height: 260px;
  padding: clamp(22px, 2.4vw, 38px);
  flex: 1;
  flex-direction: column;
}

.project-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.project-number {
  padding-top: 5px;
  color: var(--cyan);
  font-size: 9px;
}

.project-heading h3 {
  font-size: clamp(26px, 2.2vw, 42px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.project-description {
  margin: 28px 0;
  color: var(--muted);
  font-size: clamp(13px, 0.9vw, 15px);
  line-height: 1.8;
}

.project-meta {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
  font-size: 8px;
}

.project-meta span {
  padding: 8px 10px;
  color: #a7b2c0;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.project-arrow {
  position: absolute;
  right: clamp(22px, 2.4vw, 38px);
  bottom: clamp(22px, 2.4vw, 38px);
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    transform 280ms var(--ease);
}

.project-card:hover .project-arrow {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  transform: rotate(45deg);
}

.about-section {
  padding-top: clamp(80px, 8vw, 140px);
  border-top: 1px solid var(--line);
}

.about-header {
  grid-template-columns: 2.5fr 9.5fr;
}

.cyan-label {
  color: var(--cyan);
  font-size: 9px;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(38px, 7vw, 130px);
  margin-top: clamp(90px, 10vw, 170px);
  padding: clamp(34px, 5vw, 80px);
  background:
    linear-gradient(130deg, rgba(0, 245, 255, 0.055), transparent 38%),
    var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: clamp(22px, 2.2vw, 34px);
}

.contact-panel h2 {
  margin-top: clamp(46px, 7vw, 112px);
  font-size: clamp(54px, 7.2vw, 124px);
  font-weight: 750;
  letter-spacing: -0.075em;
  line-height: 0.86;
}

.contact-panel h2 em {
  color: var(--cyan);
  font-style: normal;
  text-shadow: 0 0 40px rgba(0, 245, 255, 0.16);
}

.contact-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.contact-content > p {
  max-width: 33ch;
  margin-bottom: clamp(38px, 5vw, 78px);
  color: var(--muted);
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.8;
}

.contact-links {
  border-top: 1px solid var(--line);
}

.contact-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  min-height: 66px;
  padding: 16px 0;
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-family: inherit;
  text-align: left;
  appearance: none;
}

.contact-row > span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.contact-row strong {
  min-width: 0;
  color: #aeb8c6;
  font-size: 13px;
  font-weight: 450;
  overflow-wrap: anywhere;
}

.contact-copy.is-ready {
  cursor: pointer;
}

.resume-download {
  display: inline-flex;
  min-height: 52px;
  margin-top: 32px;
  padding: 0 24px;
  align-items: center;
  gap: 14px;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  transition:
    color 200ms ease,
    background-color 200ms ease,
    transform 200ms ease;
}

.resume-download-caption {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0;
}

.resume-download-arrow {
  transition: transform 200ms ease;
}

.resume-download:hover,
.resume-download:focus-visible {
  color: var(--bg);
  background: var(--cyan);
}

.resume-download:hover .resume-download-arrow,
.resume-download:focus-visible .resume-download-arrow {
  transform: translateX(4px);
}

.site-footer {
  display: flex;
  min-height: 100px;
  margin-top: clamp(50px, 6vw, 100px);
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.site-footer a {
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: var(--cyan);
}

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-header {
    grid-template-columns: 2.5fr 6fr 3.5fr;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 700px) {
  :root {
    --page-pad: 18px;
    --section-space: 92px;
  }

  .site-header,
  .site-header.is-scrolled {
    height: 60px;
  }

  .wordmark-name {
    display: none;
  }

  .site-nav {
    gap: 16px;
    font-size: 9px;
  }

  .site-nav a {
    gap: 5px;
  }

  .hero {
    min-height: 680px;
    padding-top: 94px;
  }

  .hero-topline {
    top: 75px;
  }

  .hero-title {
    gap: 0.08em;
    font-size: 11.5vw;
  }

  .eyebrow {
    max-width: 280px;
    margin-inline: auto;
    line-height: 1.7;
  }

  .eyebrow::before,
  .eyebrow::after {
    display: none;
  }

  .hero-intro {
    max-width: 29em;
    font-size: 14px;
  }

  .hero-footer > p {
    display: none;
  }

  .section-header,
  .about-header {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .section-header h2 {
    font-size: clamp(52px, 17vw, 80px);
  }

  .section-lead {
    max-width: 32em;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-top: 64px;
  }

  .joyboy-stage {
    width: 88%;
  }

  .joyboy-stage strong {
    font-size: clamp(52px, 18vw, 100px);
  }

  .joyboy-code,
  .joyboy-signal {
    display: none;
  }

  .project-info {
    min-height: 280px;
  }

  .project-heading {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .project-heading h3 {
    font-size: clamp(28px, 9vw, 42px);
  }

  .project-description {
    padding-right: 36px;
  }

  .contact-panel {
    margin-top: 80px;
    padding: 32px 22px;
  }

  .contact-panel h2 {
    margin-top: 54px;
    font-size: clamp(48px, 15vw, 74px);
  }

  .contact-content {
    display: flex;
    margin-top: 64px;
  }

  .contact-row {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .resume-download {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    min-height: 84px;
    margin-top: 56px;
  }
}

@media (max-width: 380px) {
  .site-nav a span {
    display: none;
  }

  .site-nav {
    gap: 14px;
  }

  .hero-title {
    font-size: 11vw;
  }

  .visual-status {
    display: none;
  }
}

@media (hover: none) {
  .project-card:hover > a {
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
