:root {
  --bg: #07100f;
  --panel: #111c1a;
  --panel-2: #172522;
  --line: #2a3b37;
  --text: #f3f0e8;
  --muted: #9fb9ad;
  --accent: #34d399;
  --gold: #f6c85f;
  --danger: #ff8f70;
  --shadow: rgba(0, 0, 0, 0.32);
}

html {
  background-color: #07100f;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(52, 211, 153, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -10%, rgba(246, 200, 95, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 32%);
}

.ambient-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-field span {
  position: absolute;
  display: block;
  width: 52vw;
  height: 1px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0), rgba(52, 211, 153, 0.24), rgba(246, 200, 95, 0));
  transform-origin: center;
  opacity: 0.58;
}

.ambient-field span:nth-child(1) {
  top: 18%;
  left: -8%;
  transform: rotate(-18deg);
}

.ambient-field span:nth-child(2) {
  top: 52%;
  right: -16%;
  transform: rotate(14deg);
}

.ambient-field span:nth-child(3) {
  bottom: 16%;
  left: 22%;
  transform: rotate(-6deg);
}

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

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 50;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(18px, 3vw, 44px);
  border-bottom: 1px solid rgba(159, 185, 173, 0.2);
  background: rgba(7, 16, 15, 0.86);
  backdrop-filter: blur(16px);
  will-change: transform, opacity;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
}

.nav {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 6px;
}

.nav a,
.mode-btn,
.hero-actions a,
.filters button {
  border: 1px solid rgba(159, 185, 173, 0.22);
  background: rgba(23, 37, 34, 0.72);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.nav a:hover,
.mode-btn:hover,
.hero-actions a:hover,
.filters button:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.56);
  background: rgba(52, 211, 153, 0.12);
}

.nav a {
  padding: 8px 12px;
  font-size: 14px;
}

.nav a.active,
.filters button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(52, 211, 153, 0.1);
}

.mode-btn {
  padding: 9px 14px;
  font: inherit;
  font-size: 15px;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  min-height: calc(100vh - 68px);
  padding-top: 34px;
  perspective: 1200px;
}

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

.hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background:
    radial-gradient(circle at 16% 20%, rgba(52, 211, 153, 0.22), transparent 24%),
    linear-gradient(135deg, #0d1816, #14211f);
  box-shadow:
    0 38px 90px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(52, 211, 153, 0.08) inset;
  transform-origin: center;
  will-change: transform, opacity;
}

.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(7, 16, 15, 0), rgba(7, 16, 15, 0.2));
  mix-blend-mode: screen;
  opacity: 0.45;
}

.hero-video video,
.video-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video video {
  object-fit: cover;
}

.video-fallback {
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  background-color: #07100f;
}

.video-fallback span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-fallback strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: clamp(22px, 3vw, 42px);
}

.video-ready .video-fallback {
  display: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  text-wrap: balance;
  will-change: transform, opacity;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  text-wrap: balance;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.lead,
.section-head p,
.closing p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.hero-actions,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions a,
.filters button {
  padding: 11px 15px;
  font: inherit;
}

.section-head {
  margin-bottom: 30px;
}

.section-head.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: end;
}

#achievements {
  position: relative;
  padding-bottom: clamp(150px, 18vh, 230px);
}

#achievements.webgl-ready {
  width: 100%;
  height: calc(100vh - 68px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 58% 44%, rgba(52, 211, 153, 0.16), transparent 28%),
    radial-gradient(circle at 22% 78%, rgba(246, 200, 95, 0.12), transparent 24%),
    linear-gradient(rgba(52, 211, 153, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.045) 1px, transparent 1px),
    #07100f;
  background-size: 100% 100%, 100% 100%, 80px 80px, 80px 80px, auto;
  color: var(--text);
}

#achievements.webgl-ready::after {
  content: "CORE RESULTS";
  position: absolute;
  left: clamp(28px, 5vw, 88px);
  bottom: clamp(74px, 11vh, 132px);
  z-index: 1;
  max-width: 92vw;
  color: rgba(52, 211, 153, 0.09);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(86px, 13vw, 206px);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: 0;
  pointer-events: none;
}

#achievements.webgl-ready .section-head {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: min(1840px, calc(100% - 56px));
  height: 100%;
  margin: 0 auto;
  padding-top: clamp(44px, 6vh, 74px);
  pointer-events: none;
}

#achievements.webgl-ready .section-head.split {
  display: block;
}

#achievements.webgl-ready .section-head .eyebrow {
  color: rgba(246, 200, 95, 0.72);
}

#achievements.webgl-ready .section-head h2 {
  position: absolute;
  left: clamp(24px, 4vw, 76px);
  bottom: clamp(92px, 13vh, 150px);
  z-index: 1;
  max-width: min(1280px, 82vw);
  margin: 0;
  color: rgba(243, 240, 232, 0.14);
  font-size: clamp(70px, 9.8vw, 150px);
  line-height: 0.86;
  letter-spacing: 0;
}

#achievements.webgl-ready .section-head > p {
  position: absolute;
  right: clamp(24px, 4vw, 76px);
  bottom: clamp(34px, 5vh, 64px);
  max-width: 360px;
  color: rgba(159, 185, 173, 0.78);
  font-size: 16px;
  line-height: 1.55;
}

.metrics,
.achievement-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric,
.achievement,
.review-item,
.project,
.perf-board article,
.plan-item {
  border: 1px solid rgba(159, 185, 173, 0.18);
  background: linear-gradient(180deg, rgba(23, 37, 34, 0.94), rgba(10, 20, 18, 0.94));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.metric:hover,
.achievement:hover,
.review-item:hover,
.project:hover,
.perf-board article:hover,
.plan-item:hover {
  border-color: rgba(52, 211, 153, 0.34);
}

.metric,
.achievement,
.review-item,
.perf-board article,
.plan-item {
  padding: 22px;
}

.metric span,
.project-meta,
.perf-board span,
.plan-item span,
.review-item span {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin: 14px 0 8px;
  color: var(--accent);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.achievement-grid {
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(36px, 5vw, 72px);
  perspective: 1400px;
  transform-style: preserve-3d;
}

.achievement-webgl {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

#achievements.webgl-ready .achievement-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: min(1320px, calc(100% - 56px));
  height: 100%;
  margin: 0 auto;
  padding: clamp(96px, 12vh, 132px) 0 clamp(48px, 8vh, 76px);
  box-sizing: border-box;
  align-content: center;
  pointer-events: none;
}

#achievements.webgl-ready .motion-card-surface {
  opacity: var(--achievement-dom-opacity, 0);
}

.motion-card {
  position: relative;
  min-height: 238px;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform-origin: 18% 50%;
  backface-visibility: hidden;
}

.motion-card-surface {
  position: relative;
  z-index: 1;
  min-height: 238px;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(159, 185, 173, 0.22);
  border-radius: 8px 20px 10px 18px / 10px 18px 12px 20px;
  background:
    linear-gradient(115deg, rgba(255, 143, 112, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(23, 37, 34, 0.97), rgba(10, 20, 18, 0.95));
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.22);
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  animation: cloth-edge-breathe 5.2s ease-in-out infinite;
  will-change: transform, border-radius;
}

.motion-card-cloth {
  position: relative;
  isolation: isolate;
  min-height: 238px;
  height: 100%;
  padding: 22px;
  overflow: hidden;
  transform-origin: 0 50%;
}

.motion-card:nth-child(2n) .motion-card-surface {
  animation-delay: -1.35s;
}

.motion-card:nth-child(3n) .motion-card-surface {
  animation-duration: 5.8s;
  animation-delay: -2.1s;
}

.motion-card-cloth > * {
  position: relative;
  z-index: 2;
}

.motion-card-surface::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 4px;
  background: linear-gradient(180deg, var(--danger), var(--gold), rgba(52, 211, 153, 0.2));
  opacity: 0.95;
}

@keyframes cloth-edge-breathe {
  0%,
  100% {
    border-radius: 8px 20px 10px 18px / 10px 18px 12px 20px;
    transform: translate3d(0, 0, 0) rotateX(0.8deg) rotateY(-0.7deg) rotateZ(-0.35deg) scaleX(1.002);
  }

  35% {
    border-radius: 14px 10px 18px 9px / 18px 11px 20px 10px;
    transform: translate3d(0, -3px, 0) rotateX(-1.1deg) rotateY(1.2deg) rotateZ(0.45deg) scaleX(0.997) scaleY(1.004);
  }

  68% {
    border-radius: 10px 18px 8px 22px / 12px 21px 9px 18px;
    transform: translate3d(0, 2px, 0) rotateX(0.4deg) rotateY(-1.35deg) rotateZ(-0.2deg) scaleX(1.004) scaleY(0.998);
  }
}

.achievement p,
.review-item p,
.project p,
.plan-item p,
.perf-board p {
  color: var(--muted);
  line-height: 1.7;
}

.project-list {
  display: grid;
  gap: 12px;
}

.project {
  overflow: hidden;
}

.project button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  width: 100%;
  padding: 22px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.project button::after {
  content: "+";
  color: var(--accent);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 28px;
}

.project.open button::after {
  content: "-";
}

.project-detail {
  display: none;
  padding: 0 22px 22px;
  color: var(--muted);
  transform-origin: top;
}

.project.open .project-detail {
  display: block;
}

.perf-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.perf-board strong {
  display: block;
  margin: 18px 0;
  color: var(--gold);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(38px, 7vw, 76px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.review-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.plan-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  position: relative;
  overflow: hidden;
}

.plan-item::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.86), rgba(246, 200, 95, 0));
}

.closing {
  display: grid;
  min-height: 58vh;
  place-content: center;
  text-align: center;
}

.closing::before {
  content: "";
  display: block;
  width: min(620px, 72vw);
  height: 1px;
  margin: 0 auto 34px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0), rgba(246, 200, 95, 0.68), rgba(52, 211, 153, 0));
}

.closing h2 {
  max-width: 920px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

body.presenting .topbar {
  transform: translateY(-100%);
}

body.presenting .section {
  min-height: 100vh;
  padding-top: 9vh;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .section-head.split,
  .perf-board,
  .plan-item {
    grid-template-columns: 1fr;
  }

  .metrics,
  .achievement-grid,
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .motion-card {
    min-height: 210px;
  }

  .motion-card-surface {
    min-height: 210px;
  }

  .motion-card-cloth {
    min-height: 210px;
  }

  .achievement-webgl {
    display: none;
  }
}

@media (max-width: 620px) {
  .section {
    width: min(100% - 28px, 1180px);
    padding: 64px 0;
  }

  h1 {
    font-size: clamp(36px, 13vw, 52px);
    line-height: 1.06;
  }

  .metrics,
  .achievement-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }
}
