:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --link: #1a5276;
  --rule: #e5e5e5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --text: #e8e6e3;
    --muted: #9a9a9a;
    --link: #7fb3d5;
    --rule: #2e3238;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  max-width: 40rem;
  background: var(--bg);
  color: var(--text);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 3rem;
}

header.site .name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

nav a {
  margin-left: 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:first-child {
  margin-left: 0;
}

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

h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 1.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.15rem;
  margin: 2.5rem 0 0.75rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img.portrait {
  width: 9rem;
  height: 9rem;
  object-fit: cover;
  border-radius: 4px;
  float: right;
  margin: 0.25rem 0 1rem 1.5rem;
}

figure {
  margin: 1.5rem 0;
}

figure img {
  max-width: 100%;
  border-radius: 4px;
}

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

ul.links {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-size: 0.95rem;
}

ul.pubs {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.pubs li {
  margin-bottom: 1.1rem;
  padding-left: 0;
}

ul.pubs .venue {
  color: var(--muted);
  font-size: 0.9rem;
}

dl.cv {
  margin: 0;
}

dl.cv dt {
  font-weight: 700;
  margin-top: 1.25rem;
}

dl.cv dd {
  margin: 0.15rem 0 0;
  color: var(--text);
}

dl.cv dd .where {
  color: var(--muted);
  font-size: 0.9rem;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  img.portrait {
    width: 6.5rem;
    height: 6.5rem;
    margin: 0.25rem 0 0.75rem 1rem;
  }
}

/* Photo gallery */
.grid {
  width: min(78rem, calc(100vw - 3rem));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  columns: 4 220px;
  column-gap: 14px;
}

.grid .shot {
  display: block;
  margin: 0 0 14px;
  break-inside: avoid;
  line-height: 0;
}

.grid .shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.grid .shot:hover img {
  transform: scale(1.02);
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.97);
  cursor: zoom-out;
}

.lightbox.on {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-stage {
  margin: 0;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-stage img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 1px;
  cursor: default;
}

.lb-stage figcaption {
  color: #cfcfcf;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  opacity: 0.7;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  padding: 0.5rem;
}

.lightbox button:hover {
  opacity: 1;
}

.lb-close {
  top: 0.5rem;
  right: 1rem;
  font-size: 2.5rem;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
}

.lb-prev {
  left: 0.5rem;
}

.lb-next {
  right: 0.5rem;
}

@media (max-width: 600px) {
  .grid {
    columns: 2 140px;
    column-gap: 8px;
  }
  .grid .shot {
    margin-bottom: 8px;
  }
  .lb-prev,
  .lb-next {
    font-size: 2.5rem;
  }
}
