:root {
  --paper: #f5f5f0;
  --surface: #ffffff;
  --ink: #171714;
  --muted: #5f6158;
  --line: #d8d9d0;
  --accent: #225b4f;
  --accent-soft: #dce9e4;
  --focus: #b4522f;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  line-height: 1.65;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header p,
footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

main { padding: 72px 0 96px; }

.intro {
  max-width: 720px;
  margin-bottom: 52px;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.intro p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 28px;
}

.asset {
  display: block;
  color: inherit;
  text-decoration: none;
}

.asset figure { margin: 0; }

.asset img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}

.asset:hover img {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.asset figcaption {
  display: grid;
  gap: 3px;
  padding-top: 14px;
}

.asset strong {
  font-size: 1.08rem;
  line-height: 1.4;
}

.asset span {
  color: var(--muted);
  font-size: 0.92rem;
}

.back {
  display: inline-block;
  margin-bottom: 34px;
  font-weight: 650;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  gap: 56px;
  align-items: start;
}

.preview {
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.preview img {
  display: block;
  width: 100%;
  height: auto;
}

.metadata h1 {
  margin-bottom: 34px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts dd { margin: 0; }

.citation {
  margin-top: 34px;
  padding: 20px;
  background: var(--accent-soft);
}

.citation h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.citation pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 0.84rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.copy {
  margin-top: 14px;
  padding: 9px 14px;
  border: 1px solid var(--accent);
  border-radius: 0;
  color: var(--surface);
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.copy:hover { background: #17473d; }

footer {
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .site-header {
    display: block;
    padding-top: 22px;
  }

  .site-header p { margin-top: 4px; }
  main { padding: 48px 0 72px; }
  .gallery { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; gap: 36px; }
  .metadata { order: -1; }
  .preview { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .asset img { transition: none; }
}
