:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #66706c;
  --line: #dce4de;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b4f49;
  --gold: #b8872d;
  --soft: #eef5f0;
  --shadow: 0 24px 70px rgba(22, 38, 35, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(238, 245, 240, 0.9) 0, rgba(251, 252, 248, 0.82) 520px, var(--paper) 100%),
    radial-gradient(circle at 20% 8%, rgba(184, 135, 45, 0.12), transparent 28rem);
  color: var(--ink);
  line-height: 1.6;
}

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

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

figure {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(220, 228, 222, 0.82);
  background: rgba(251, 252, 248, 0.88);
  backdrop-filter: blur(18px);
}

.site-titlebar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.home-button,
.brand {
  min-height: 2.35rem;
  border-radius: 8px;
  font-weight: 800;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  padding: 0;
}

.home-button svg {
  width: 1.12rem;
  height: 1.12rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-menu {
  position: relative;
}

.brand {
  border: 0;
  background: transparent;
  padding: 0 0.35rem;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
}

.brand::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.16rem) rotate(45deg);
}

.brand-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 40;
  display: grid;
  min-width: 160px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.brand-menu:hover .brand-dropdown,
.brand-menu:focus-within .brand-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.brand-dropdown a {
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  white-space: nowrap;
}

.home-button:hover,
.brand:hover,
.brand-dropdown a:hover {
  background: var(--soft);
  color: var(--ink);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.94rem;
}

nav a {
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
}

nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

main {
  overflow: hidden;
}

.hero-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.45rem, 4vw, 2.7rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.hero-copy {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow,
.section-kicker,
.viewer-label {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 auto;
  max-width: 860px;
  font-size: clamp(2.15rem, 4.65vw, 3.85rem);
  line-height: 1.01;
  letter-spacing: 0;
}

.subtitle {
  max-width: 680px;
  margin: 0.85rem auto 1rem;
  color: #3e4945;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1rem;
  font-weight: 700;
}

.authors a {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.affiliation,
.notes {
  margin: 0.28rem 0 0;
  color: var(--muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.button,
button,
select {
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1rem;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.button.muted {
  color: var(--muted);
  cursor: default;
}

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

.hero-visual {
  position: relative;
  overflow: hidden;
  margin-top: clamp(1rem, 2.4vw, 1.6rem);
  border: 1px solid rgba(220, 228, 222, 0.95);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  object-fit: contain;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metric-strip div {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: rgba(255, 255, 255, 0.74);
}

.metric-strip strong {
  display: block;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.8rem) 0;
  scroll-margin-top: 5rem;
}

.section.narrow {
  width: min(860px, calc(100% - 2rem));
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.section p {
  color: #46514d;
  font-size: 1.04rem;
}

.method-layout {
  display: grid;
  gap: 1rem;
}

.figure-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.figure-panel img {
  width: 100%;
  object-fit: contain;
}

.method-cards,
.result-grid {
  display: grid;
  gap: 1rem;
}

.method-cards {
  grid-template-columns: repeat(4, 1fr);
}

.method-cards article,
.result-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 1.1rem;
}

.method-cards span {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--gold);
  font-weight: 900;
}

.method-cards p,
.result-grid p {
  margin: 0.55rem 0 0;
  font-size: 0.98rem;
}

.method-figure {
  display: flex;
  align-items: center;
}

.qualitative-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.qualitative-grid .figure-panel,
.wide-figure {
  overflow-x: auto;
  padding: 0.5rem;
}

.qualitative-grid img,
.wide-figure img {
  width: max(100%, 980px);
  max-width: none;
}

figcaption {
  padding: 0.65rem 0.25rem 0.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.point-section {
  width: min(1240px, calc(100% - 2rem));
}

.viewer-shell {
  overflow: hidden;
  border: 1px solid #cfdad3;
  border-radius: 8px;
  background: #111a18;
  box-shadow: var(--shadow);
}

.viewer-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 1fr) auto auto;
  gap: 0.85rem;
  align-items: end;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.viewer-toolbar .viewer-label {
  color: #8fd4ca;
  margin-bottom: 0.35rem;
}

select {
  width: 100%;
  padding: 0 0.72rem;
  background: #f7fbf8;
}

.slider-field,
.toggle-field {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: #dce9e4;
  font-size: 0.95rem;
  font-weight: 700;
}

.slider-field {
  flex-direction: column;
  align-items: stretch;
}

.slider-field input {
  accent-color: var(--accent);
}

.toggle-field input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.viewer-toolbar button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbf8;
}

.canvas-wrap {
  position: relative;
  height: min(70vh, 720px);
  min-height: 440px;
  background:
    linear-gradient(180deg, #0c1211, #16221f 58%, #111816),
    radial-gradient(circle at center, rgba(143, 212, 202, 0.08), transparent 26rem);
}

#pointcloud-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-status {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(9, 14, 13, 0.7);
  color: #eaf3ef;
  padding: 0.58rem 0.75rem;
  font-size: 0.9rem;
}

.cloud-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.cloud-meta div {
  min-width: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: #dce9e4;
}

.cloud-meta strong {
  display: block;
  color: #fff;
  font-size: 1.25rem;
}

.cloud-meta span {
  color: #a6b9b2;
  font-size: 0.88rem;
}

.result-grid {
  grid-template-columns: repeat(4, 1fr);
}

.big-number {
  color: var(--accent-strong) !important;
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  font-weight: 900;
  line-height: 1;
}

pre {
  overflow-x: auto;
  margin: 1.25rem 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101817;
  color: #eaf3ef;
  padding: 1rem;
  font-size: 0.93rem;
  line-height: 1.55;
}

.citation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.citation-heading h2 {
  margin-bottom: 0;
}

.copy-button {
  flex-shrink: 0;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

@media (max-width: 940px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }

  .site-titlebar {
    flex-wrap: wrap;
  }

  nav {
    justify-content: flex-start;
  }

  .hero-section {
    min-height: auto;
  }

  .metric-strip,
  .result-grid,
  .method-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .viewer-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .metric-strip,
  .result-grid,
  .method-cards,
  .cloud-meta,
  .viewer-toolbar {
    grid-template-columns: 1fr;
  }

  .canvas-wrap {
    height: 70vh;
    min-height: 380px;
  }

  .action-row .button {
    width: 100%;
  }

  .hero-copy {
    text-align: left;
  }

  .authors,
  .action-row {
    justify-content: flex-start;
  }

  .qualitative-grid img,
  .wide-figure img {
    width: max(100%, 780px);
  }
}
