/* Art Haptonstahl portfolio. Visual style follows the former
   WordPress Twenty Twenty-One theme as configured on the old site. */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --accent: #c25100;
  --rule: #000000;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --content: 610px;
  --wide: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.7;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover, a:focus-visible, a[aria-current="page"] { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  padding: 0.5em 1em;
  z-index: 10;
}
.skip-link:focus { left: 1em; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 72px var(--gutter) 90px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em 2em;
}
.site-title {
  font-size: 24px;
  line-height: 1.3;
  text-transform: uppercase;
  text-decoration: none;
}
.site-description { margin: 0.25em 0 0; font-size: 18px; line-height: 1.4; }
.site-header nav { display: flex; gap: 1.3em; font-size: 20px; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { text-decoration: underline; }

/* Content column */
main {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main h1 {
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  margin: 0 0 1.5em;
}
main hr + h1 { margin-top: 1.5em; }

.caption { text-align: center; margin: 0 0 1em; }

hr {
  border: 0;
  border-bottom: 2px solid var(--rule);
  opacity: 0.6;
  margin: 30px 0;
}

figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
figure a { display: block; }
.single img { max-height: 85vh; width: auto; margin: 0 auto; }

/* Galleries: equal-height cropped tiles, like the WP "is-cropped" gallery */
.gallery { display: grid; gap: 16px; }
.gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery figure { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.gallery figure a { height: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery.landscape figure { aspect-ratio: 16 / 9; }
.gallery figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2em 0.6em 0.4em;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 482px) {
  .gallery.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.prose p { margin: 0 0 1.2em; }
.prose figure { margin-top: 1.5em; }

/* Footer */
.site-footer {
  max-width: var(--wide);
  margin: 120px auto 0;
  padding: 0 var(--gutter) 60px;
  font-size: 18px;
}
.site-name {
  border-top: 3px solid var(--rule);
  padding-top: 1.5em;
  margin: 0;
  font-size: 24px;
  text-transform: uppercase;
}
.site-name a { color: var(--fg); }
