@font-face {
  font-family: "RespectRegular";
  src: url("Fonts/RespectRegular.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

/* THE MARGIN: change 1.5rem to make the side space bigger or smaller */
body {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  background-color: white;
  color: black;
  font-family: Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

h1 {
  font-family: "RespectRegular", sans-serif;
  font-size: 36px;
  color: #000;
  line-height: 1.2;
}

/* Navigation */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.site-nav a {
  font-family: "RespectRegular", sans-serif;
  color: black;
  text-decoration: none;
}

.site-title {
  font-size: 20px;
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 24px;
}

/* Two images side by side */
.image-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.image-row img {
  display: block;
  width: 100%;
  height: auto;
}

/* Phones: stack the images and the nav */
@media (max-width: 600px) {
  .image-row {
    grid-template-columns: 1fr;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}
/* PAGE BACKGROUND COLOURS: change the colour codes to test */
.bg-home    { background-color: #fdf3e7; }
.bg-insitu  { background-color: #e6efe3; }
.bg-writing { background-color: #e8ecf6; }
.bg-about   { background-color: #f8e6ea; }
.bg-contact { background-color: #f3efe0; }

/* Home page image links with labels */
.image-link {
  position: relative;
  display: block;
}

.image-link span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 7px;
  background: #fdf3e780;
  color: black;
  font-family: "RespectRegular", sans-serif;
  font-size: 30px;
  font-weight: 400;
}
main p { max-width: 65ch; }

/* Grid of cards: In Situ index */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card h2 {
  font-family: "RespectRegular", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0.5rem 0 0.1rem;
}

.card p {
  margin: 0;
}

.card:hover h2,
.card:focus h2 {
  text-decoration: underline;
}

/* Project and post pages */
.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: black;
}

.meta {
  margin-top: 0;
}

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

.gallery figure {
  margin: 0;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery figcaption {
  font-size: 11px;
  line-height: 1.3;
  margin-top: 0.4rem;
}

/* Writing list */
.post-list {
  list-style: none;
  padding: 0;
  max-width: 65ch;
}

.post-list li {
  margin: 0 0 1.5rem;
}

.post-list a {
  font-family: "RespectRegular", sans-serif;
  font-size: 20px;
  color: black;
}

.date {
  display: block;
  font-size: 12px;
}
/* Click-to-enlarge images */
a.zoom {
  display: block;
  cursor: zoom-in;
}

.lightbox {
  border: none;
  padding: 3rem 1rem 1rem;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  color: black;
}
.lightbox::backdrop {
  background: transparent;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

/* The picture always fits inside the window */
.lightbox img {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.lightbox-prev,
.lightbox-next {
  align-self: center;
  padding: 0.5rem 0.75rem;
  font-size: 48px;
  line-height: 1;
  background: none;
  border: 0;
  color: black;
  cursor: pointer;
}

.lightbox-prev { grid-column: 1; grid-row: 1; }
.lightbox-next { grid-column: 3; grid-row: 1; }

.lightbox-caption {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 12px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 32px;
  line-height: 1;
  background: none;
  border: 0;
  color: black;
  cursor: pointer;
}

body:has(.lightbox[open]) {
  overflow: hidden;
}

@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    padding: 0.25rem;
    font-size: 36px;
    font-weight: 400;
  }
}
/* Links to PDFs and reviews on project pages */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  max-width: 65ch;
}

.project-links a {
  color: black;
}

/* Photo credit */
.credit {
  margin-top: 0;
  font-size: 11px;
}
.lightbox-caption {
  justify-self: center;
  max-width: 80ch;
}
/* Smaller line under the venue: curator and other artists */
.meta-detail {
  font-size: 12px;
  line-height: 1;
}

.meta-detail a {
  color: black;
}

/* Images inside writing posts */
article figure {
  margin: 1.5rem 0;
}

article figure img {
  display: block;
  max-width: 100%;
  height: auto;
}