:root {
  --sd-background: #0b0b0b;
  --sd-surface: #111111;
  --sd-surface-strong: #1a1a1a;
  --sd-border: #2a2a2a;
  --sd-text: #ffffff;
  --sd-text-soft: #cccccc;
  --sd-muted: #999999;
  --sd-soft: #666666;
  --sd-accent: #ff3b30;
  --sd-accent-soft: #e1342a;
  --sd-success: #00ff9c;
  --sd-info: #00d4ff;
  --sd-warning: #ffd60a;
  --sd-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --sd-radius: 0.85rem;
  --sd-font: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html,
body {
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--sd-background);
}

body {
  background: var(--sd-background);
  color: var(--sd-text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.6;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

img.is-lightboxable {
  cursor: zoom-in;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

img.is-lightboxable:hover {
  transform: translateY(-1px);
}

img.is-lightboxable:focus-visible {
  outline: 2px solid var(--sd-accent);
  outline-offset: 0.25rem;
}

code,
pre,
kbd,
samp {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

::selection {
  background: rgba(255, 59, 48, 0.28);
  color: #ffffff;
}

body.lightbox-open {
  overflow: hidden;
}

.sd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.sd-lightbox[hidden] {
  display: none;
}

.sd-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.92);
  backdrop-filter: blur(10px);
}

.sd-lightbox__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  width: min(96vw, 1400px);
  max-height: calc(100vh - 3rem);
}

.sd-lightbox__close {
  justify-self: end;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.88);
  color: var(--sd-text);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    transform 120ms ease;
}

.sd-lightbox__close:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(30, 30, 30, 0.94);
}

.sd-lightbox__close:focus-visible {
  outline: 2px solid var(--sd-accent);
  outline-offset: 0.2rem;
}

.sd-lightbox__figure {
  margin: 0;
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.sd-lightbox__image {
  max-width: min(96vw, 1400px);
  max-height: calc(100vh - 8rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: #050607;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  object-fit: contain;
}

.sd-lightbox__caption {
  max-width: min(88vw, 70rem);
  margin: 0;
  color: var(--sd-text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 640px) {
  .sd-lightbox {
    padding: 1rem;
  }

  .sd-lightbox__panel {
    width: 100%;
    max-height: calc(100vh - 2rem);
  }

  .sd-lightbox__image {
    max-height: calc(100vh - 7rem);
  }
}

