  body {
    max-width: 100ch;
  }

/* Navigation */
header {
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid currentColor;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-name {
  font-weight: bold;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  border-top: 1px solid currentColor;
  margin-top: 3rem;
  padding-top: 1rem;
  font-size: 0.85em;
}

/* Skills */
.skills {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.skills li {
  border: 1px solid currentColor;
  padding: 0.1em 0.55em;
  font-size: 0.85em;
}

/* Sort buttons (papers page) */
.sort-btn {
  background: none;
  border: 1px solid currentColor;
  padding: 0.15em 0.6em;
  font-size: 0.85em;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

.sort-btn.active {
  background: #ccc;
}

.sort-btn.active-label {
  color: var(--body-bg-color, white);
}

/* Photo gallery */
.gallery {
  columns: 1;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 540px) {
  .gallery {
    columns: 2;
  }
}

@media (min-width: 800px) {
  .gallery {
    columns: 3;
  }
}

.gallery-btn {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  break-inside: avoid;
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
}

.gallery-btn img {
  width: 100%;
  display: block;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lightbox-img {
  max-height: 80vh;
  max-width: 80vw;
}

#lightbox-close,
#lightbox-prev,
#lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
}

#lightbox-close {
  top: 1rem;
  right: 1rem;
}

#lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

#lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* CV iframe */
.cv-embed {
  width: 100%;
  height: 80vh;
  border: 1px solid currentColor;
  margin-top: 1rem;
}

/* Experience list */
.experience-list {
  list-style: none;
  padding: 0;
}

.experience-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid currentColor;
}

.experience-list li:last-child {
  border-bottom: none;
}

.exp-period {
  font-size: 0.8em;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exp-position {
  font-weight: bold;
  margin: 0.2em 0;
}

.exp-company {
  margin: 0 0 0.3em;
}

.exp-desc {
  margin: 0;
  font-size: 0.95em;
}
