:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: #e3e1dc;
  --max-width: 1400px;
  --gap: 1.25rem;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  color: var(--text);
  padding: 0.5rem 1rem;
  z-index: 200;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header / nav */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-title a {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Gallery masonry grid */

.gallery {
  column-count: 1;
  column-gap: var(--gap);
}

@media (min-width: 560px) {
  .gallery { column-count: 2; }
}

@media (min-width: 900px) {
  .gallery { column-count: 3; }
}

@media (min-width: 1300px) {
  .gallery { column-count: 4; }
}

.artwork {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 100%;
  text-align: left;
  display: block;
}

.artwork img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: var(--border);
}

.artwork figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.artwork figcaption .artwork-title {
  color: var(--text);
}

.gallery-status {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  max-height: 100%;
  width: 100%;
}

.lightbox-image-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lightbox-details {
  color: #f0efec;
  padding: 1rem 0 0;
}

.lightbox-details h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-meta {
  margin: 0 0 0.5rem;
  color: #c9c7c2;
  font-size: 0.9rem;
}

.lightbox-description {
  margin: 0;
  color: #e3e1dc;
  font-size: 0.9rem;
  max-width: 60ch;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lightbox-close {
  top: 1rem;
  right: 1.5rem;
}

.lightbox-nav.prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .lightbox-nav {
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* About page */

.about-content {
  max-width: 65ch;
}

.about-content h1 {
  margin-top: 0;
}

.contact-links {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
