:root {
  --bg: #08111f;
  --surface: #0d1828;
  --ink: #f4f7fb;
  --muted: #a7b5c6;
  --dim: #7f91a8;
  --line: rgba(162, 185, 211, 0.22);
  --line-soft: rgba(162, 185, 211, 0.12);
  --ink-line: rgba(244, 247, 251, 0.55);
  --header-solid: rgba(8, 17, 31, 0.97);
  --header-soft: rgba(8, 17, 31, 0.72);
  --header-clear: rgba(8, 17, 31, 0);
  --stage-glow: rgba(80, 131, 214, 0.11);
  --control-surface: rgba(8, 17, 31, 0.62);
  --control-surface-strong: rgba(8, 17, 31, 0.88);
  --overlay-surface: rgba(8, 17, 31, 0.99);
  --hover-surface: rgba(255, 255, 255, 0.04);
  --accent: #78a6ff;
  --accent-ink: #07101d;
  --canvas-glow-primary: rgba(120, 166, 255, 0.19);
  --canvas-glow-secondary: rgba(84, 132, 207, 0.16);
  --canvas-glow-fade: rgba(92, 137, 205, 0.04);
  --canvas-ring-rgb: 157, 187, 225;
  --canvas-point: rgba(224, 235, 249, 0.92);
  --canvas-crosshair: rgba(171, 198, 230, 0.2);
  --canvas-transparent: rgba(0, 0, 0, 0);
  --pad: clamp(24px, 4vw, 64px);
  --target: 44px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --text-caption: 0.8125rem;
  --text-meta: 0.875rem;
  --text-body: 1rem;
  --text-lead: 1.125rem;
  --z-canvas: -2;
  --z-panel: 1;
  --z-ui: 10;
  --z-header: 40;
  --z-overlay: 60;
  --z-skip: 80;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: var(--text-body);
  font-kerning: normal;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  z-index: var(--z-skip);
  top: 12px;
  left: 12px;
  min-height: var(--target);
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 0.875rem;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

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

.site-header {
  position: fixed;
  z-index: var(--z-header);
  top: 0;
  left: 0;
  width: 100%;
  height: calc(80px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--pad) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: linear-gradient(180deg, var(--header-solid), var(--header-soft) 72%, var(--header-clear));
  backdrop-filter: blur(10px);
}

.brand {
  min-height: var(--target);
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.3vw, 36px);
}

.desktop-nav a,
.header-contact {
  min-height: var(--target);
  display: inline-flex;
  align-items: center;
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s, opacity 0.2s;
}

.desktop-nav a span,
.header-contact span {
  margin-left: 7px;
  color: var(--muted);
}

.header-contact {
  min-width: 126px;
  padding-inline: 2px;
  border-bottom: 1px solid var(--ink-line);
  justify-self: end;
  justify-content: space-between;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

.story {
  position: relative;
  height: 600svh;
}

.story-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 68% 38%, var(--stage-glow), transparent 31%),
    var(--bg);
}

#field-canvas {
  position: absolute;
  z-index: var(--z-canvas);
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.coordinate {
  position: absolute;
  z-index: var(--z-panel);
  color: var(--dim);
  font: var(--text-caption)/1.4 var(--mono);
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
}

.coordinate-a {
  top: 25%;
  right: var(--pad);
}

.coordinate-b {
  right: calc(var(--pad) + 18px);
  bottom: 20%;
}

.story-panel {
  position: absolute;
  z-index: var(--z-panel);
  inset: 0;
  padding: 112px var(--pad) 108px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.65s var(--ease),
    visibility 0s linear 0.65s;
  pointer-events: none;
}

.story-panel.is-active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
  pointer-events: auto;
}

.hero-copy {
  position: absolute;
  top: 25%;
  left: var(--pad);
  width: min(84vw, 960px);
}

.hero-hello {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: var(--text-body);
}

.hero-copy h1,
.section-copy h2,
.contact-copy h2 {
  margin: 0;
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(4rem, 7vw, 6rem);
  white-space: nowrap;
}

.hero-role {
  margin: var(--space-3) 0 0;
  font-size: clamp(2rem, 3.1vw, 2.625rem);
  font-weight: 450;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.hero-intro {
  max-width: 43ch;
  margin: var(--space-3) 0 0;
  color: var(--ink);
  font-size: var(--text-body);
  line-height: 1.75;
}

.profile-facts {
  width: min(820px, 72vw);
  margin-top: var(--space-4);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.profile-fact {
  min-width: 0;
  padding: 14px 20px 0 0;
}

.profile-fact + .profile-fact {
  padding-left: 20px;
  border-left: 1px solid var(--line-soft);
}

.profile-fact span {
  margin-bottom: 5px;
  display: block;
  color: var(--dim);
  font: 600 var(--text-caption)/1.4 var(--mono);
  letter-spacing: 0.08em;
}

.profile-fact strong {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-link {
  min-height: var(--target);
  padding: 8px 0;
  border-bottom: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.panel-link {
  width: max-content;
  margin-top: var(--space-3);
}

.panel-link span {
  margin-left: var(--space-4);
  transition: transform 0.25s var(--ease);
}

.section-copy,
.contact-copy {
  position: absolute;
  top: 15%;
  left: var(--pad);
}

.section-copy > p,
.contact-copy > p {
  max-width: 48ch;
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-body);
  line-height: 1.65;
}

.section-copy h2,
.contact-copy h2 {
  font-size: clamp(3.5rem, 7vw, 6rem);
}

.section-copy h2 + p {
  margin-top: var(--space-3);
  color: var(--ink);
  font-size: var(--text-lead);
}

.project-grid,
.capability-grid {
  position: absolute;
  right: calc(var(--pad) + 64px);
  bottom: 10%;
  left: var(--pad);
}

.project-grid {
  border-top: 1px solid var(--line);
}

.project-row {
  min-height: 82px;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 46px minmax(210px, 0.85fr) minmax(280px, 1.15fr) auto;
  align-items: center;
  gap: clamp(16px, 2.3vw, 34px);
  transition: background-color 0.25s, transform 0.25s var(--ease);
}

.project-row.is-link {
  cursor: pointer;
}

.project-index,
.project-category,
.cap-index {
  color: var(--dim);
  font: 600 var(--text-caption)/1.4 var(--mono);
  letter-spacing: 0.08em;
}

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

.project-row h3 {
  margin: 5px 0 0;
  font-size: clamp(1.0625rem, 1.45vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-row p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.project-action {
  min-width: 70px;
  color: var(--dim);
  font: 600 var(--text-caption)/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-align: right;
  transition: color 0.2s, transform 0.25s var(--ease);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}

.capability-item {
  min-height: 94px;
  padding: 17px 0 13px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: start;
  gap: 12px;
}

.capability-item h3 {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 600;
}

.capability-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.cap-arrow {
  color: var(--dim);
  font-size: 1rem;
  transition: transform 0.25s var(--ease), color 0.25s;
}

.contact-copy {
  top: 18%;
}

.contact-copy h2 {
  margin-bottom: var(--space-4);
  font-size: clamp(3.75rem, 7vw, 5.75rem);
}

.contact-copy > p:last-child {
  color: var(--ink);
  font-size: var(--text-body);
}

.contact-actions {
  position: absolute;
  right: calc(var(--pad) + 64px);
  bottom: 13%;
  width: min(44vw, 620px);
}

.primary-contact {
  min-height: 64px;
  padding: 10px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 18px;
  align-items: center;
  transition: color 0.25s, background-color 0.25s;
}

.primary-contact span {
  font-size: 0.875rem;
  font-weight: 600;
}

.primary-contact b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  font-weight: 600;
}

.primary-contact i {
  font-size: 1.375rem;
  font-style: normal;
  transition: transform 0.25s var(--ease);
}

.social-links {
  margin-top: var(--space-2);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.social-links[hidden] {
  display: none;
}

.social-links a {
  min-height: var(--target);
  padding-inline: 4px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font: 600 var(--text-caption)/1.4 var(--mono);
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.site-filing {
  position: absolute;
  z-index: var(--z-ui);
  bottom: 54px;
  left: 50%;
  color: var(--muted);
  font-size: var(--text-caption);
  letter-spacing: 0.03em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.site-filing a {
  min-height: var(--target);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s, border-color 0.2s;
}

.story-progress {
  position: absolute;
  z-index: var(--z-ui);
  right: var(--pad);
  bottom: max(22px, env(safe-area-inset-bottom));
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font: 600 var(--text-caption)/1.4 var(--mono);
  letter-spacing: 0.06em;
}

.story-progress > div {
  position: relative;
  height: 1px;
  flex: 1;
  background: var(--line);
}

.story-progress i {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

#story-label {
  min-width: 68px;
}

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

.chapter-nav {
  position: absolute;
  z-index: var(--z-ui);
  top: 50%;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.chapter-nav button {
  position: relative;
  width: var(--target);
  height: var(--target);
  padding: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--control-surface);
  font: 600 var(--text-caption)/1 var(--mono);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.chapter-nav button:hover,
.chapter-nav button[aria-current="step"] {
  color: var(--accent-ink);
  border-color: var(--ink);
  background: var(--ink);
}

.chapter-nav small {
  position: absolute;
  top: 50%;
  right: 54px;
  color: var(--ink);
  font: 600 var(--text-meta)/1 var(--sans);
  white-space: nowrap;
  opacity: 0;
  transform: translate(6px, -50%);
  transition: opacity 0.2s, transform 0.2s var(--ease);
  pointer-events: none;
}

.chapter-nav button:hover small,
.chapter-nav button:focus-visible small {
  opacity: 1;
  transform: translate(0, -50%);
}

.noscript {
  position: fixed;
  z-index: var(--z-overlay);
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 16px;
  color: var(--accent-ink);
  background: var(--accent);
  text-align: center;
}

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

@media (hover: hover) {
  .desktop-nav a:hover,
  .header-contact:hover {
    color: var(--accent);
  }

  .panel-link:hover span,
  .project-row.is-link:hover .project-action,
  .primary-contact:hover i {
    transform: translate(3px, -3px);
  }

  .project-row.is-link:hover {
    background: var(--hover-surface);
    transform: translateX(4px);
  }

  .project-row.is-link:hover .project-action,
  .capability-item:hover .cap-arrow,
  .social-links a:hover,
  .site-filing a:hover {
    color: var(--ink);
  }

  .capability-item:hover .cap-arrow {
    transform: translate(3px, -3px);
  }

  .primary-contact:hover {
    color: var(--accent-ink);
    background: var(--accent);
  }

  .site-filing a:hover {
    border-color: currentColor;
  }
}

@media (pointer: coarse) {
  .desktop-nav a,
  .header-contact,
  .text-link,
  .social-links a,
  .site-filing a {
    min-height: var(--target);
  }
}

@media (max-width: 820px) {
  :root {
    --pad: clamp(20px, 6vw, 28px);
    --text-caption: 0.875rem;
  }

  .site-header {
    height: calc(68px + env(safe-area-inset-top));
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .header-contact {
    display: none;
  }

  .brand {
    font-size: 1.125rem;
  }

  .brand-mark {
    width: 25px;
    height: 25px;
  }

  .menu-toggle {
    width: auto;
    min-width: 76px;
    height: var(--target);
    padding: 0 14px;
    border: 1px solid var(--line);
    justify-self: end;
    display: block;
    color: var(--ink);
    background: var(--control-surface-strong);
    font: 600 var(--text-caption)/1 var(--mono);
    letter-spacing: 0.08em;
  }

  .mobile-nav {
    position: absolute;
    z-index: var(--z-overlay);
    top: calc(67px + env(safe-area-inset-top));
    right: 0;
    left: 0;
    padding: 0 var(--pad) 18px;
    border-bottom: 1px solid var(--line);
    background: var(--overlay-surface);
  }

  .mobile-nav:not([hidden]) {
    display: grid;
  }

  .mobile-nav a {
    min-height: 60px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
  }

  .mobile-nav a span {
    color: var(--muted);
    font: 600 var(--text-caption)/1 var(--mono);
  }

  .story {
    height: 520svh;
  }

  .story-stage {
    min-height: 640px;
  }

  .story-panel {
    padding: 88px var(--pad) 92px;
  }

  .hero-copy {
    top: 23%;
    right: var(--pad);
    width: auto;
  }

  .hero-hello {
    margin-bottom: 12px;
    font-size: 0.9375rem;
  }

  .hero-copy h1 {
    max-width: 92vw;
    font-size: clamp(3.5rem, 16vw, 4.5rem);
    white-space: normal;
  }

  .hero-role {
    margin-top: 14px;
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .hero-intro {
    max-width: 33ch;
    margin-top: 14px;
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  .profile-facts {
    width: 100%;
    margin-top: 18px;
    grid-template-columns: 1fr;
  }

  .profile-fact {
    min-height: 40px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    grid-template-columns: 98px 1fr;
    align-items: center;
  }

  .profile-fact + .profile-fact {
    padding-left: 0;
    border-left: 0;
  }

  .profile-fact span {
    margin: 0;
    font-size: var(--text-caption);
  }

  .profile-fact strong {
    font-size: 0.875rem;
    white-space: normal;
  }

  .panel-link {
    margin-top: 14px;
  }

  .section-copy,
  .contact-copy {
    top: 14%;
    right: var(--pad);
  }

  .section-copy > p,
  .contact-copy > p {
    font-size: 0.9375rem;
  }

  .section-copy h2,
  .contact-copy h2 {
    font-size: clamp(3rem, 13vw, 4rem);
  }

  .section-copy h2 + p {
    margin-top: 10px;
    font-size: 0.9375rem;
  }

  .project-grid,
  .capability-grid {
    right: var(--pad);
    bottom: 11%;
    left: var(--pad);
  }

  .project-row {
    min-height: 78px;
    padding: 10px 0;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas:
      "index heading action"
      ". description description";
    align-items: start;
    gap: 4px 12px;
  }

  .project-index {
    grid-area: index;
    padding-top: 3px;
  }

  .project-heading {
    grid-area: heading;
  }

  .project-row h3 {
    margin-top: 2px;
    font-size: 1rem;
  }

  .project-category {
    font-size: var(--text-caption);
  }

  .project-row p {
    grid-area: description;
    margin-top: 4px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.875rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .project-action {
    grid-area: action;
    padding-top: 3px;
    font-size: var(--text-caption);
  }

  .capability-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }

  .capability-item {
    min-height: 84px;
    padding: 14px 0 10px;
    grid-template-columns: 1fr auto;
    gap: 5px;
  }

  .capability-item .cap-index {
    display: none;
  }

  .capability-item h3 {
    font-size: 0.9375rem;
  }

  .capability-item p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .contact-copy {
    top: 17%;
  }

  .contact-copy h2 {
    margin-bottom: 18px;
  }

  .contact-actions {
    right: var(--pad);
    bottom: 18%;
    left: var(--pad);
    width: auto;
  }

  .primary-contact {
    min-height: 68px;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .primary-contact span,
  .primary-contact b {
    font-size: 0.875rem;
  }

  .social-links {
    justify-content: flex-start;
  }

  .site-filing {
    bottom: 67px;
    font-size: var(--text-caption);
  }

  .chapter-nav {
    top: auto;
    right: var(--pad);
    bottom: max(12px, env(safe-area-inset-bottom));
    flex-direction: row;
    gap: 4px;
    transform: none;
  }

  .chapter-nav small {
    display: none;
  }

  .story-progress {
    right: 224px;
    bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px));
    left: var(--pad);
    gap: 10px;
  }

  #story-label,
  .scroll-cue {
    display: none;
  }

  .coordinate {
    display: none;
  }
}

@media (max-width: 390px) {
  .hero-copy {
    top: 21%;
  }

  .hero-copy h1 {
    font-size: clamp(3.25rem, 15.2vw, 4rem);
  }

  .hero-role {
    font-size: clamp(1.625rem, 6.8vw, 2rem);
  }

  .profile-fact {
    grid-template-columns: 92px 1fr;
  }

  .project-row {
    gap-inline: 8px;
  }

  .project-action {
    min-width: 60px;
  }
}

@media (max-height: 690px) and (min-width: 821px) {
  .hero-copy {
    top: 22%;
  }

  .hero-hello {
    margin-bottom: 8px;
  }

  .hero-copy h1 {
    font-size: clamp(3.5rem, 6vw, 4.75rem);
  }

  .hero-role {
    margin-top: 8px;
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  }

  .hero-intro {
    margin-top: 8px;
    font-size: 0.875rem;
    line-height: 1.55;
  }

  .profile-facts {
    margin-top: 10px;
  }

  .profile-fact {
    padding-top: 8px;
  }

  .panel-link {
    margin-top: 8px;
  }

  .section-copy,
  .contact-copy {
    top: 15%;
  }

  .section-copy h2,
  .contact-copy h2 {
    font-size: clamp(3rem, 5.5vw, 4.5rem);
  }

  .section-copy h2 + p {
    margin-top: 8px;
    font-size: 0.9375rem;
  }

  .project-grid,
  .capability-grid {
    bottom: 10%;
  }

  .project-row {
    min-height: 66px;
    padding-block: 6px;
  }

  .project-row p,
  .capability-item p {
    font-size: 0.875rem;
  }

  .capability-item {
    min-height: 72px;
    padding-block: 10px 8px;
  }

  .contact-actions {
    bottom: 12%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
