:root {
  color-scheme: light;
  --ink: #102022;
  --muted: #667274;
  --paper: #fbfbf7;
  --mist: #eef3f1;
  --line: #d7ded8;
  --teal: #0b6f68;
  --teal-dark: #064640;
  --red: #a43f34;
  --gold: #b98127;
  --green: #527c48;
  --night: #071514;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(7, 21, 20, 0.14);
  --radius: 8px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: linear-gradient(180deg, rgba(4, 16, 16, 0.76), rgba(4, 16, 16, 0.28));
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius);
  color: var(--night);
  background: var(--white);
  font-size: 0.86rem;
}

.nav-links {
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--white);
}

.hero {
  position: relative;
  display: flex;
  min-height: 76svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 112px clamp(18px, 5vw, 72px) 64px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7, 21, 20, 0.45), rgba(7, 21, 20, 0.2) 48%, rgba(7, 21, 20, 0.55)),
    linear-gradient(180deg, rgba(7, 21, 20, 0.18), rgba(7, 21, 20, 0.5)),
    url("./images/citylens-hero-bg.png") center / cover no-repeat,
    var(--night);
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 30px;
  width: min(1280px, 100%);
  margin: 0 auto;
  justify-items: center;
}

.hero-content {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker,
.section-label,
.metric-tile span {
  margin: 0;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  width: 100%;
  max-width: 1280px;
  font-size: 2.45rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-title-line {
  display: block;
}

.venue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  padding: 8px 14px;
  color: var(--white);
  background: rgba(7, 21, 20, 0.62);
  box-shadow: 0 12px 32px rgba(7, 21, 20, 0.22);
  font-size: 0.98rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.subtitle {
  margin: 18px 0 0;
  font-size: clamp(1.55rem, 4vw, 3rem);
  font-weight: 780;
  line-height: 1.05;
  max-width: 760px;
}

.authors {
  width: 100%;
  max-width: 1280px;
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.35;
  white-space: nowrap;
}

.affiliations,
.corresponding-note {
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.72);
}

.affiliations {
  display: grid;
  gap: 6px;
  max-width: 1080px;
  font-size: 1.12rem;
}

.affiliation-row {
  display: block;
  width: 100%;
}

.corresponding-note {
  font-size: 1.05rem;
}

.hero-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 17px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  color: var(--white);
  background: var(--teal);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.button-dark {
  color: var(--white);
  background: var(--teal-dark);
}

.button-dark:hover {
  background: var(--teal);
}

.button-light {
  color: var(--teal-dark);
  border-color: var(--line);
  background: var(--white);
}

.button-light:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.intro-band {
  border-bottom: 1px solid var(--line);
  background: var(--mist);
}

.intro-layout,
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.intro-layout {
  max-width: 1060px;
  padding: clamp(54px, 8vw, 94px) 0;
  text-align: center;
}

.intro-layout h2,
.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.intro-layout p:last-child,
.section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.intro-layout p.abstract-copy {
  max-width: 1060px;
  margin: 16px 0 0;
  font-size: 1.16rem;
  line-height: 1.62;
}

.section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.section-heading {
  margin: 0 auto clamp(28px, 5vw, 54px);
  max-width: 840px;
  text-align: center;
}

.section-heading p {
  margin: 18px auto 0;
}

.benchmark-heading {
  max-width: 1060px;
}

.benchmark-heading p,
.methods-section .section-heading p,
.citation {
  max-width: 1060px;
  font-size: 1.16rem;
  line-height: 1.62;
}

.intro-layout > .section-label,
.section-heading > .section-label {
  color: var(--gold);
  font-size: 1.16rem;
  line-height: 1.2;
}

.methods-section .section-heading,
.citation-section .section-heading {
  max-width: 1060px;
}

.metric-grid,
.method-grid {
  display: grid;
  gap: 14px;
}

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

.metric-tile,
.method-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 16px 45px rgba(16, 32, 34, 0.06);
}

.metric-tile {
  padding: 20px;
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.15;
}

.metric-tile p,
.method-card p,
.indicator-panel p,
.citation {
  margin: 10px 0 0;
  color: var(--muted);
}

.content-figure {
  width: min(900px, 100%);
  margin: clamp(28px, 5vw, 52px) auto 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.content-figure img {
  width: 100%;
  background: transparent;
  border-radius: var(--radius);
}

.content-figure figcaption {
  padding: 14px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.indicator-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1.3fr);
  gap: clamp(18px, 3vw, 34px);
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2.5vw, 22px);
  background: linear-gradient(135deg, #ffffff 0%, #f4f0e8 100%);
}

.indicator-panel h3 {
  margin: 6px 0 0;
  font-size: 1.18rem;
  line-height: 1.18;
}

.indicator-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.indicator-list span {
  border: 1px solid #d1d9d4;
  border-radius: var(--radius);
  padding: 6px 9px;
  color: var(--teal-dark);
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 800;
}

.indicator-list .indicator-row-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
  border: 0;
  padding: 0;
}

.methods-section {
  width: 100%;
  max-width: none;
  border-block: 1px solid var(--line);
  padding-inline: max(18px, calc((100% - 1180px) / 2));
  background: #f4f0e8;
}

.methods-section .section-heading,
.methods-section .method-grid {
  width: min(1180px, 100%);
}

.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
}

.method-card {
  min-height: 250px;
  padding: 26px;
}

.method-index {
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 900;
}

.method-card h3 {
  margin: 18px 0 0;
  font-size: 1.32rem;
  line-height: 1.15;
}

.poster-section {
  border-top: 1px solid var(--line);
}

.poster-preview,
.figure-gallery {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.poster-preview {
  margin: 0;
}

.poster-preview img {
  width: 100%;
  background: var(--white);
}

.poster-preview figcaption {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: var(--white);
}

.figures-section {
  border-top: 1px solid var(--line);
  background: var(--mist);
}

.gallery-stage {
  position: relative;
  display: grid;
  height: clamp(520px, 82vh, 860px);
  place-items: center;
  overflow: hidden;
  background: #f8faf8;
}

.gallery-image-link {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: clamp(22px, 4vw, 44px) clamp(58px, 6vw, 78px);
}

.gallery-image-link img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.figure-gallery[data-gallery-fit="smaller"] .gallery-image-link img {
  max-width: 80%;
  max-height: 80%;
}

.figure-gallery[data-gallery-fit="smallest"] .gallery-image-link img {
  max-width: 75%;
  max-height: 75%;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(16, 32, 34, 0.16);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 32px rgba(16, 32, 34, 0.12);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-arrow:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.gallery-arrow[data-gallery-prev] {
  left: 18px;
}

.gallery-arrow[data-gallery-next] {
  right: 18px;
}

.gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.gallery-caption {
  flex: 1 1 auto;
  max-width: 1020px;
}

.gallery-caption p {
  margin: 0;
}

.gallery-caption-title {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 850;
}

.gallery-caption [data-gallery-caption] {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding: 12px;
  background: #f4f7f5;
}

.gallery-thumb {
  flex: 0 0 116px;
  height: 72px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 0;
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumb[aria-current="true"] {
  border-color: var(--teal);
}

.gallery-empty {
  border-top: 1px solid var(--line);
  padding: 16px;
  color: var(--muted);
}

.gallery-empty code {
  border-radius: 5px;
  padding: 2px 5px;
  background: var(--mist);
}

.citation-section {
  border-top: 1px solid var(--line);
  padding-bottom: clamp(48px, 7vw, 86px);
}

.citation {
  max-width: 1060px;
  margin-top: 18px;
}

.bibtex {
  max-width: 100%;
  margin: 18px 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: #dcefed;
  background: var(--night);
  font-size: 0.9rem;
  line-height: 1.45;
}

.bibtex code {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 106px;
  }

  .intro-layout,
  .indicator-panel {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hero-title {
    font-size: 1.55rem;
  }

  .metric-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .authors {
    white-space: normal;
    font-size: 0.98rem;
  }

  .affiliations {
    font-size: 0.88rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .gallery-stage {
    height: clamp(300px, 62vh, 440px);
  }

  .gallery-image-link {
    padding: 18px 46px;
  }

  .gallery-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .indicator-list .indicator-row-break {
    display: none;
  }

  .gallery-arrow {
    width: 38px;
    height: 38px;
  }

  .gallery-arrow[data-gallery-prev] {
    left: 10px;
  }

  .gallery-arrow[data-gallery-next] {
    right: 10px;
  }
}
