:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #10151c;
  color: #edf3fa;
}

body {
  margin: 0;
  line-height: 1.6;
}

main {
  box-sizing: border-box;
  margin: auto;
  max-width: 1100px;
  padding: 4rem 1.5rem 5rem;
}

.eyebrow {
  color: #8eb9ff;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 5rem);
  letter-spacing: -.06em;
  line-height: 1;
  margin: .3rem 0 1.4rem;
}

h1 span {
  color: #68d6a5;
}

h2 {
  margin-top: 3.5rem;
}

.lede {
  color: #c0ccda;
  font-size: 1.2rem;
  max-width: 48rem;
}

a {
  color: #9bc5ff;
}

.publication-record {
  background: linear-gradient(135deg, #192735, #14251f);
  border: 1px solid #355165;
  border-left: 4px solid #68d6a5;
  border-radius: .75rem;
  display: grid;
  gap: .25rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.2rem;
}

.publication-label {
  color: #68d6a5;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.publication-record cite {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-style: normal;
  font-weight: 750;
  letter-spacing: -.015em;
}

.publication-details {
  color: #c0ccda;
}

.publication-record a {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88rem;
  width: fit-content;
}

.gallery {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

article {
  background: #1a222d;
  border: 1px solid #2a3a4b;
  border-radius: .75rem;
  overflow: hidden;
}

article img {
  display: block;
  width: 100%;
}

article h3,
article dl,
.card-note {
  margin-left: 1rem;
  margin-right: 1rem;
}

dl {
  display: flex;
  gap: 1rem;
}

dl div {
  display: grid;
}

dt {
  color: #a9b7c8;
  font-size: .8rem;
}

dd {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin: 0;
}

.card-note {
  font-size: .9rem;
}

.method-grid,
.walkthrough-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.method-grid article {
  padding: 0 1rem 1rem;
}

.method-grid li {
  margin-bottom: .4rem;
}

.historical-flow {
  background: #1a222d;
  border: 1px solid #2a3a4b;
  border-radius: .75rem;
  margin: 1.4rem 0;
  overflow: hidden;
}

.historical-flow img {
  display: block;
  width: 100%;
}

.historical-flow figcaption {
  color: #c0ccda;
  font-size: .9rem;
  padding: .7rem .9rem;
}

.optional-article {
  background: #141d27;
  border: 1px solid #2a3a4b;
  border-radius: .65rem;
  margin-top: 3.5rem;
  padding: .8rem 1rem;
}

.optional-article summary {
  color: #9bc5ff;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
}

.optional-article[open] summary {
  margin-bottom: 1.2rem;
}

.optional-article p:last-child {
  margin-bottom: .2rem;
}

.walkthrough-grid figure {
  background: #1a222d;
  border: 1px solid #2a3a4b;
  border-radius: .75rem;
  margin: 0;
  overflow: hidden;
}

.walkthrough-grid img {
  display: block;
  width: 100%;
}

.lightbox-trigger {
  cursor: zoom-in;
  transition: filter .18s ease, transform .18s ease;
}

.lightbox-trigger:hover {
  filter: brightness(1.08);
  transform: scale(1.01);
}

.lightbox-trigger:focus-visible {
  outline: 3px solid #8eb9ff;
  outline-offset: -3px;
}

.walkthrough-grid figcaption {
  color: #c0ccda;
  font-size: .9rem;
  padding: .65rem .8rem;
}

.walkthrough-comparison {
  grid-column: 1 / -1;
}

pre {
  background: #080c11;
  border: 1px solid #2a3a4b;
  border-radius: .5rem;
  overflow-x: auto;
  padding: 1rem;
}

.fine-print {
  color: #a9b7c8;
  font-size: .92rem;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  background: transparent;
  border: 0;
  color: inherit;
  max-height: none;
  max-width: none;
  padding: 0;
}

.lightbox::backdrop {
  background: rgb(3 7 12 / .9);
  backdrop-filter: blur(4px);
}

.lightbox-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  max-height: 96vh;
  max-width: 96vw;
  position: relative;
}

.lightbox-image {
  background: #080c11;
  border: 1px solid #40546a;
  border-radius: .65rem;
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / .65);
  display: block;
  max-height: calc(96vh - 5rem);
  max-width: 96vw;
  object-fit: contain;
}

.lightbox-caption {
  background: rgb(8 12 17 / .88);
  border-radius: .45rem;
  color: #dbe6f2;
  margin: .65rem 0 0;
  max-width: min(90vw, 70rem);
  padding: .35rem .7rem;
  text-align: center;
}

.lightbox-close {
  align-items: center;
  background: #edf3fa;
  border: 0;
  border-radius: 999px;
  color: #10151c;
  cursor: pointer;
  display: flex;
  font-size: 1.8rem;
  height: 2.5rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: .6rem;
  top: .6rem;
  width: 2.5rem;
  z-index: 1;
}

.lightbox-close:focus-visible {
  outline: 3px solid #8eb9ff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  main {
    padding: 2.5rem 1rem 4rem;
  }

  .lightbox-image {
    max-height: calc(100vh - 6rem);
  }
}
