:root {
  --ink: #07111f;
  --ink-soft: #0b192a;
  --panel: rgba(15, 32, 51, 0.78);
  --line: rgba(177, 204, 223, 0.17);
  --text: #ecf5f5;
  --muted: #9babb8;
  --accent: #67e8c3;
  --accent-blue: #77bdfb;
  --mono: SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 12%, rgba(69, 171, 180, 0.13), transparent 24rem),
    radial-gradient(circle at 20% 80%, rgba(51, 97, 162, 0.11), transparent 30rem),
    var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
}

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  transform: translateY(-150%);
  color: var(--ink);
  background: var(--accent);
  border-radius: 0.25rem;
}

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

.site-header {
  width: min(88rem, calc(100% - 3rem));
  margin: 0 auto;
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand,
.site-header nav,
footer > div {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border-radius: 0.35rem 0.35rem 0.35rem 0;
  font-family: var(--mono);
  font-weight: 500;
}

.site-header nav {
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-header nav a { transition: color 180ms ease; }
.site-header nav a:hover { color: var(--text); }
.site-header .nav-link-strong { color: var(--accent); }

main,
footer {
  width: min(88rem, calc(100% - 3rem));
  margin-inline: auto;
}

.hero {
  min-height: calc(100svh - 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(28rem, 0.95fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  padding: 5rem 0 6rem;
}

.eyebrow,
.section-index,
.project-kind,
.project-number,
.map-index,
.map-caption {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.7rem;
  color: var(--accent);
  font-size: 0.8rem;
}

.eyebrow span { width: 2rem; height: 1px; background: currentColor; }

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

h1 {
  max-width: 12ch;
  margin-bottom: 2rem;
  font-size: clamp(3.25rem, 6.5vw, 7.5rem);
  line-height: 1.05;
  letter-spacing: -0.065em;
  font-weight: 800;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 245, 245, 0.7);
}

.hero-intro {
  max-width: 43rem;
  margin-bottom: 2.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.button {
  min-height: 3.2rem;
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.button-primary:hover { background: #8ef0d2; }
.button-secondary:hover { border-color: rgba(236, 245, 245, 0.5); background: rgba(255, 255, 255, 0.04); }

.work-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 38rem;
  justify-self: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(8, 23, 38, 0.6);
  box-shadow: inset 0 0 5rem rgba(82, 206, 186, 0.05), 0 2rem 6rem rgba(0, 0, 0, 0.2);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 3.25rem 3.25rem;
  mask-image: radial-gradient(circle, #000 44%, transparent 76%);
}

.map-index,
.map-caption {
  position: absolute;
  z-index: 3;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.map-index { top: 12%; left: 18%; }
.map-caption { right: 17%; bottom: 13%; }

.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(103, 232, 195, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one { width: 55%; height: 55%; }
.orbit-two { width: 82%; height: 82%; border-style: dashed; animation: spin 40s linear infinite; }

.map-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 34%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  text-align: center;
  background: var(--accent);
  color: var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 0.7rem rgba(103, 232, 195, 0.06), 0 0 4rem rgba(103, 232, 195, 0.17);
}

.map-core span, .map-node small, .node-number { font-family: var(--mono); }
.map-core span { margin-bottom: 0.65rem; font-size: 0.65rem; }
.map-core strong { font-size: clamp(1rem, 2vw, 1.65rem); line-height: 1.05; letter-spacing: -0.04em; }

.map-node {
  position: absolute;
  z-index: 4;
  min-width: 8.2rem;
  padding: 0.8rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  background: rgba(8, 24, 40, 0.92);
  border: 1px solid rgba(145, 190, 206, 0.28);
  border-radius: 0.25rem;
  box-shadow: 0 0.8rem 2.5rem rgba(0, 0, 0, 0.25);
}

.map-node::before {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  content: "";
  background: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 0.9rem var(--accent-blue);
}

.node-number { grid-row: span 2; align-self: center; color: var(--muted); font-size: 0.66rem; }
.map-node strong { font-size: 0.9rem; }
.map-node small { color: var(--muted); font-size: 0.62rem; }
.node-hade { top: 15%; right: 8%; }
.node-hade::before { left: -1.65rem; bottom: -0.8rem; }
.node-write { left: 6%; top: 55%; }
.node-write::before { right: -2.25rem; top: -0.2rem; }
.node-agent { right: 12%; bottom: 17%; }
.node-agent::before { left: -1.5rem; top: -1.2rem; }

.section { padding: clamp(6rem, 12vw, 11rem) 0; border-top: 1px solid var(--line); }

.section-heading {
  display: grid;
  grid-template-columns: 0.55fr 1.15fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 4rem;
}

.section-index, .project-kind, .project-number { color: var(--accent); font-size: 0.72rem; }
.section-heading h2 { margin: 0; font-size: clamp(2.4rem, 4.5vw, 5rem); line-height: 1.05; letter-spacing: -0.055em; }
.section-heading > p:last-child { max-width: 25rem; color: var(--muted); }
.project-list { border-top: 1px solid var(--line); }

.project {
  position: relative;
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 220ms ease;
}

.project::before {
  position: absolute;
  inset: 0 -1.5rem;
  z-index: -1;
  content: "";
  opacity: 0;
  background: rgba(255, 255, 255, 0.025);
  transition: opacity 220ms ease;
}

.project:hover::before { opacity: 1; }

.project-featured::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--accent), transparent 72%);
}

.project-topline,
.project-body,
.project-links {
  display: grid;
  grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
}

.project-topline { margin-bottom: 2.5rem; }
.project-state { color: var(--accent); font-family: var(--mono); font-size: 0.72rem; }

.project-state i {
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  display: inline-block;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0.7rem currentColor;
}

.project-state-muted { color: var(--muted); }
.project-number { margin-bottom: 0.75rem; color: var(--muted); }
.project-body h3 { margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -0.045em; }
.project-body > p { max-width: 42rem; color: var(--muted); font-size: 1.05rem; }
.project-links { margin-top: 2rem; }
.project-links::before { content: ""; }

.project-links > a {
  width: fit-content;
  margin-right: 2rem;
  display: inline-block;
  color: var(--accent);
  font-size: 0.9rem;
}

.project-links > a span, .text-link span { display: inline-block; transition: transform 180ms ease; }
.project-links > a:hover span, .text-link:hover span { transform: translate(0.2rem, -0.1rem); }

.principles {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(3rem, 8vw, 9rem);
}

.principles .section-heading { display: block; margin: 0; }
.principles .section-heading h2 { margin-top: 1.5rem; }
.principle-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.principle-list li {
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.principle-list > li > span { color: var(--accent); font-family: var(--mono); font-size: 0.74rem; }
.principle-list h3 { margin-bottom: 0.6rem; font-size: 1.3rem; }
.principle-list p { margin-bottom: 0; color: var(--muted); }

.closing {
  position: relative;
  min-height: 37rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.closing::before {
  position: absolute;
  z-index: -1;
  width: min(48rem, 85vw);
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(103, 232, 195, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 9rem rgba(103, 232, 195, 0.08);
}

.closing h2 { margin: 1.25rem 0 1.5rem; font-size: clamp(3rem, 7vw, 7rem); line-height: 1.05; letter-spacing: -0.06em; }
.closing > p:not(.section-index) { max-width: 38rem; color: var(--muted); }
.text-link { margin-top: 1rem; padding-bottom: 0.25rem; color: var(--accent); border-bottom: 1px solid rgba(103, 232, 195, 0.35); }

footer {
  min-height: 8rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 2rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
}

footer > div { gap: 0.65rem; color: var(--text); }
footer .brand-mark { width: 1.7rem; height: 1.7rem; }
footer p { margin: 0; }
footer p:last-child { text-align: right; }

.js .reveal {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-top: 2rem; }
  .work-map { width: min(100%, 36rem); justify-self: center; }
  .section-heading { grid-template-columns: 0.45fr 1fr; }
  .section-heading > p:last-child { grid-column: 2; }
}

@media (max-width: 720px) {
  .site-header, main, footer { width: min(100% - 2rem, 88rem); }
  .site-header { min-height: 5rem; }
  .site-header nav a:not(.nav-link-strong) { display: none; }
  .hero { min-height: auto; padding: 4.5rem 0 5rem; }
  h1 { font-size: clamp(3rem, 14vw, 5rem); }
  .hero-intro { font-size: 1rem; }
  .work-map { max-width: 31rem; }
  .map-node { min-width: 6.6rem; padding: 0.65rem 0.75rem; }
  .node-number { display: none; }
  .section-heading, .project-topline, .project-body, .project-links, .principles { grid-template-columns: 1fr; gap: 1.3rem; }
  .section-heading > p:last-child { grid-column: auto; }
  .project-links::before { display: none; }
  .principles .section-heading { margin-bottom: 3rem; }
  footer { padding: 2rem 0; grid-template-columns: 1fr auto; }
  footer > p:nth-child(2) { display: none; }
}

@media (max-width: 440px) {
  .hero-actions .button { width: 100%; }
  .work-map { transform: scale(1.08); margin: 1.5rem 0; }
  .map-caption, .map-index { display: none; }
  .map-core { width: 38%; }
  .map-core strong { font-size: 0.9rem; }
  .node-hade { top: 11%; right: 3%; }
  .node-write { left: 1%; }
  .node-agent { right: 3%; bottom: 12%; }
}

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