/* Body styles */
body {
    padding-bottom: 40px;
    padding-left: 40px;
    padding-right: 40px;
}

/* Navigation styles */
.navigation {
    overflow: hidden;
    top: 0px;
}
.navigation ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.navigation li {
    float: left;
    font-size: 18px;
}
.navigation a {
    display: block;
    padding-bottom: 15px;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 15px;
    text-align: center;
    text-decoration: none;
}
.navigation li a:hover {
    text-decoration: underline;
}

/* CV styles */
.cv {
    height: 96%;
}

/* Typography */
p {
    line-height: 1.5;
    text-align: justify;
}
a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Photo gallery */
body.photos { --gap: 28px; --thumb-h: clamp(150px, 35vw, 300px); }

body.photos main.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
  max-width: 1400px;
  margin: 0;
}

@supports (content-visibility: auto) {
  body.photos figure { content-visibility: auto; contain: content; }
}

body.photos figure { margin: 0; }
body.photos figure img { width: 100%; height: auto; display: block; }
body.photos dialog#lightbox { border: 0; padding: 0; background: transparent; }
body.photos dialog::backdrop { background: rgba(0, 0, 0, 0.87); }
body.photos .lb-img { max-width: 96vw; max-height: 96vh; display: block; margin: 0 auto; }

@media (min-width: 900px) {
  body.photos { --thumb-h: 300px; }
}

body.photos main.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: flex-start;
}

body.photos figure { margin: 0; flex: 0 0 auto; }

body.photos a.thumb { display: block; }

body.photos img.thumb {
  height: var(--thumb-h);
  width: auto;
  display: block;
}
body.photos figcaption {
  margin-top: .4rem;
  text-align: center;
}