:root {
  color-scheme: dark;
  --ink: #0b100f;
  --ink-deep: #070b0a;
  --panel: #111816;
  --line: rgba(232, 238, 231, 0.16);
  --line-strong: rgba(232, 238, 231, 0.32);
  --paper: #edf1ea;
  --muted: #9ca8a0;
  --accent: #74f0bd;
  --accent-dark: #0e2b22;
  --amber: #d8a864;
  --header-height: 84px;
  --page-gutter: clamp(24px, 5vw, 84px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  color: var(--ink);
  background: var(--accent);
}

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

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  transition: transform 180ms ease;
}

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

.site-header {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-gutter);
  border-bottom: 1px solid rgba(237, 241, 234, 0.1);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand img,
.footer-brand img {
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  font-size: 13px;
  color: rgba(237, 241, 234, 0.72);
}

.site-nav a,
.text-link {
  position: relative;
}

.site-nav a::after,
.text-link::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  background: currentColor;
  transition: transform 360ms var(--ease-out);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-height) + 48px) var(--page-gutter) 84px;
  background: var(--ink-deep);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(237, 241, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 241, 234, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(90deg, black 0%, transparent 78%);
  mask-image: linear-gradient(90deg, black 0%, transparent 78%);
}

.hero::after {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  height: 140px;
  pointer-events: none;
  content: "";
  background: linear-gradient(transparent, var(--ink));
}

.hero-art {
  position: absolute;
  z-index: -2;
  top: 4%;
  right: -4%;
  width: min(68vw, 1050px);
  height: 92%;
  pointer-events: none;
  transform: translate3d(var(--art-x, 0), var(--art-y, 0), 0);
  transition: transform 800ms var(--ease-out);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.38));
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: 23%;
  right: 17%;
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(116, 240, 189, 0.12);
  filter: blur(80px);
  animation: breathe 6s ease-in-out infinite alternate;
}

.hero-wordmark {
  position: absolute;
  z-index: -3;
  top: 50%;
  right: -0.06em;
  transform: translateY(-50%);
  color: transparent;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(130px, 22vw, 410px);
  line-height: 0.8;
  letter-spacing: -0.055em;
  -webkit-text-stroke: 1px rgba(237, 241, 234, 0.08);
  white-space: nowrap;
}

.hero-content {
  width: min(760px, 60vw);
  padding-top: 3vh;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--accent);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero-copy {
  max-width: 480px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 42px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 260ms var(--ease-out),
    background 260ms ease,
    color 260ms ease;
}

.button-primary {
  background: var(--accent);
  color: var(--ink-deep);
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translateY(-3px);
  background: var(--paper);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 650;
}

.hero-meta {
  position: absolute;
  z-index: 6;
  right: var(--page-gutter);
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(237, 241, 234, 0.54);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(116, 240, 189, 0.1);
}

.hero-meta-line {
  width: 54px;
  height: 1px;
  margin: 0 4px;
  background: var(--line-strong);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: enter 900ms var(--ease-out) forwards;
}

.reveal-delay-1 {
  animation-delay: 120ms;
}

.reveal-delay-2 {
  animation-delay: 240ms;
}

.reveal-delay-3 {
  animation-delay: 360ms;
}

.projects {
  padding: clamp(100px, 13vw, 190px) var(--page-gutter);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.65fr) 1.2fr 1fr;
  align-items: end;
  gap: 32px;
  padding-bottom: 42px;
}

.section-heading .eyebrow {
  margin: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 86px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.section-heading > p:last-child {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.project {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: 0.22fr 1.1fr 0.9fr 0.5fr;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  padding: 42px 0;
  border-bottom: 1px solid var(--line-strong);
}

.project::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  transform: scaleY(0);
  transform-origin: bottom;
  background: var(--panel);
  transition: transform 520ms var(--ease-out);
}

.project-active:hover::before,
.project-active:focus-visible::before {
  transform: scaleY(1);
}

.project-active:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.project-index {
  align-self: start;
  padding-top: 6px;
  color: var(--muted);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.project-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-kicker {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.project-main strong {
  font-size: clamp(30px, 3.5vw, 54px);
  font-weight: 580;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.project-description {
  max-width: 430px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.project-visual {
  position: relative;
  width: 100%;
  max-width: 410px;
  aspect-ratio: 1.65;
  justify-self: center;
  overflow: hidden;
  background: #17211e;
  transition: transform 700ms var(--ease-out);
}

.project-active:hover .project-visual,
.project-active:focus-visible .project-visual {
  transform: scale(1.035);
}

.survey-visual {
  background:
    radial-gradient(circle at 72% 26%, rgba(116, 240, 189, 0.22), transparent 28%),
    linear-gradient(135deg, #1a2924, #0e1513);
}

.survey-ring {
  position: absolute;
  border: 1px solid rgba(116, 240, 189, 0.5);
  border-radius: 50%;
}

.ring-one {
  width: 62%;
  aspect-ratio: 1;
  top: -15%;
  right: -2%;
}

.ring-two {
  width: 34%;
  aspect-ratio: 1;
  right: 21%;
  bottom: -8%;
}

.survey-axis {
  position: absolute;
  right: 12%;
  bottom: 17%;
  width: 75%;
  height: 1px;
  transform: rotate(-18deg);
  background: var(--accent);
  box-shadow: 0 -32px 0 rgba(116, 240, 189, 0.24), 0 32px 0 rgba(116, 240, 189, 0.13);
}

.gotham-visual {
  background:
    radial-gradient(circle at 74% 24%, rgba(216, 168, 100, 0.18), transparent 24%),
    linear-gradient(160deg, #22251f, #101311 72%);
}

.gotham-moon {
  position: absolute;
  top: 13%;
  right: 16%;
  width: 18%;
  aspect-ratio: 1;
  border: 1px solid rgba(216, 168, 100, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(216, 168, 100, 0.14);
}

.gotham-tower {
  position: absolute;
  bottom: 18%;
  background: #090c0b;
  border-top: 1px solid rgba(237, 241, 234, 0.2);
}

.tower-one {
  left: 14%;
  width: 19%;
  height: 50%;
  clip-path: polygon(0 18%, 40% 18%, 50% 0, 60% 18%, 100% 18%, 100% 100%, 0 100%);
}

.tower-two {
  left: 38%;
  width: 13%;
  height: 35%;
}

.tower-three {
  left: 55%;
  width: 25%;
  height: 43%;
  clip-path: polygon(0 12%, 65% 12%, 72% 0, 80% 12%, 100% 12%, 100% 100%, 0 100%);
}

.gotham-road {
  position: absolute;
  right: -4%;
  bottom: -23%;
  width: 110%;
  height: 43%;
  transform: rotate(-7deg);
  background: #080a09;
  border-top: 1px solid rgba(216, 168, 100, 0.45);
}

.project-meta {
  min-height: 120px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  text-align: right;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-live {
  color: var(--accent);
}

.status-building {
  color: var(--amber);
}

.status-checking {
  color: var(--muted);
}

.status-offline {
  color: #e28b82;
}

.project-action {
  font-size: 13px;
  font-weight: 650;
}

.project-action b {
  display: inline-block;
  margin-left: 8px;
  font-size: 18px;
  transition: transform 300ms var(--ease-out);
}

.project-active:hover .project-action b,
.project-active:focus-visible .project-action b {
  transform: translate(4px, -4px);
}

.project-action-muted {
  color: var(--muted);
  font-weight: 400;
}

.about {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: clamp(48px, 10vw, 150px);
  padding: clamp(100px, 13vw, 190px) var(--page-gutter);
  background: var(--paper);
  color: var(--ink);
}

.about .eyebrow {
  color: #2f7059;
}

.about h2 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(40px, 5.3vw, 78px);
  font-weight: 580;
  line-height: 1.15;
  letter-spacing: -0.055em;
}

.about-detail {
  align-self: end;
}

.about-detail p {
  margin: 0 0 38px;
  color: #4d5751;
  font-size: 15px;
  line-height: 2;
}

.site-footer {
  min-height: 150px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 38px var(--page-gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  padding: 8px 0;
  transition: color 180ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--paper);
}

.site-footer p:last-child {
  justify-self: end;
}

.observe {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 800ms var(--ease-out),
    transform 800ms var(--ease-out);
}

.observe.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathe {
  to {
    transform: scale(1.16);
    opacity: 0.65;
  }
}

@media (max-width: 980px) {
  .hero-content {
    width: min(650px, 68vw);
  }

  .hero-art {
    right: -19%;
    width: 78vw;
    opacity: 0.78;
  }

  .section-heading {
    grid-template-columns: 1fr 1.5fr;
  }

  .section-heading > p:last-child {
    display: none;
  }

  .project {
    grid-template-columns: 0.16fr 1fr 0.75fr;
  }

  .project-meta {
    grid-column: 2 / 4;
    min-height: 0;
    flex-direction: row;
    align-items: center;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-detail {
    max-width: 570px;
    margin-left: 32%;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 70px;
    --page-gutter: 22px;
  }

  .site-nav {
    gap: 20px;
  }

  .hero {
    min-height: 100svh;
    align-items: flex-end;
    padding-top: calc(var(--header-height) + 42px);
    padding-bottom: 116px;
  }

  .hero::before {
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, black, transparent 78%);
    mask-image: linear-gradient(180deg, black, transparent 78%);
  }

  .hero-art {
    top: 4%;
    right: -36%;
    width: 122vw;
    height: 56%;
    opacity: 0.68;
  }

  .hero-wordmark {
    top: 24%;
    right: -0.03em;
    font-size: 38vw;
  }

  .hero-content {
    width: 100%;
    padding-top: 0;
  }

  .hero h1 {
    max-width: 390px;
    font-size: clamp(41px, 12.3vw, 58px);
    line-height: 1.09;
  }

  .hero h1 span {
    white-space: normal;
  }

  .hero-copy {
    max-width: 340px;
    margin-top: 22px;
    line-height: 1.7;
  }

  .hero-actions {
    gap: 24px;
    margin-top: 30px;
  }

  .button {
    min-height: 50px;
    gap: 24px;
    padding: 0 18px;
  }

  .hero-meta {
    right: auto;
    bottom: 32px;
    left: var(--page-gutter);
  }

  .projects {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .section-heading {
    display: block;
    padding-bottom: 34px;
  }

  .section-heading .eyebrow {
    margin-bottom: 20px;
  }

  .project {
    min-height: 0;
    grid-template-columns: 42px 1fr;
    gap: 22px 10px;
    padding: 34px 0 40px;
  }

  .project-index {
    grid-row: 1 / span 2;
  }

  .project-main {
    grid-column: 2;
  }

  .project-main strong {
    font-size: 33px;
  }

  .project-description {
    margin-top: 16px;
  }

  .project-visual {
    width: calc(100% + 42px);
    max-width: none;
    grid-column: 1 / 3;
    margin-top: 10px;
  }

  .project-meta {
    grid-column: 1 / 3;
  }

  .about {
    gap: 50px;
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .about h2 {
    font-size: 41px;
  }

  .about-detail {
    margin-left: 0;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    gap: 20px;
  }

  .footer-links {
    grid-column: 1 / 3;
    grid-row: 2;
    justify-content: space-between;
    gap: 12px;
  }
}

@media (max-width: 390px) {
  .brand {
    gap: 9px;
    font-size: 11px;
  }

  .site-nav a:last-child {
    display: none;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero h1 {
    font-size: 40px;
  }
}

@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;
  }

  .observe,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
