@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
}

body {
  margin: 0;
  background: #050505;
  color: #EEEEEE;
  font-family: "Instrument Serif", serif;

  font-weight: 200;
}

.highlight {
  font-style: italic;
}

img {
  display: block;
}

header {
  font-size: 2.5rem;
  padding: 6vw 6vw;
  box-sizing: border-box;
}

.smallheader {
  font-size: 1.7rem;
  color: #aeaeae;
  margin:0;
  margin-top:25px;
}

a {
  color: #EEEEEE;
}

footer {
  font-size: 1rem;
  padding: 0vw 8vw 6vw 6vw;
  box-sizing: border-box;
}

nav {
  padding: 6vw 8vw 1.5vw 6vw;
  box-sizing: border-box;
}


h1 {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.1;
  max-width: 95%;
}

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

.portfolio {
  padding: 6vw 0vw;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6vw;
}

.lightbox-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(20px) saturate(100%) contrast(120%) brightness(85%);
  -webkit-backdrop-filter: blur(20px) saturate(100%) contrast(120%) brightness(85%);
  z-index: 999;
}

body:has(.lightbox-image:target) .lightbox-backdrop {
  display: block;
}

.lightbox-image {
  display: none !important;
}

.lightbox-image:target {
  display: block !important;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  /* still good, but no longer needed for sizing */
  z-index: 1000;
  cursor: zoom-out;
}

.thumb-link {
  display: block;
  background-size: cover;
  background-position: center;
  aspect-ratio: 1 / 1;
  /* keeps the cell's shape even with nothing inside */
}


@media (min-width: 481px) {

  .portfolio {
    padding: 3vw 12vw;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5vw;
  }


  header {
    font-size: 2.5rem;
    padding: 3vw 12vw;
    box-sizing: border-box;
  }

  footer {
    font-size: 1.3rem;
    padding: 0vw 12vw 3vw 12vw;
    box-sizing: border-box;
  }

  nav {
    padding: 6vw 12vw 1.5vw 12vw;
    box-sizing: border-box;
  }

  h1 {
    max-width: 65%;
  }

}

/* Keep keyboard focus visible without changing the resting layout. */
a:focus-visible {
  outline: 2px solid #EEEEEE;
  outline-offset: 4px;
}

.lightbox-backdrop:focus-visible {
  outline-offset: -4px;
}
