/* Gerlach Bente — Glas · Objekte · Malerei. Statische Neuauflage 2026.
   Galerie-Ästhetik: viel Weißraum, die Kunst steht im Vordergrund. */
:root {
  --bg: #fcfcfb;
  --surface: #ffffff;
  --ink: #26282a;
  --muted: #70757a;
  --accent: #346577;   /* Glasblau */
  --line: #e6e7e8;
  --shadow: 0 14px 40px -20px rgba(30, 40, 50, .35);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191a1c;
    --surface: #222426;
    --ink: #e9e8e6;
    --muted: #9aa0a5;
    --accent: #7fb0c2;
    --line: #34373a;
    --shadow: 0 14px 40px -20px rgba(0, 0, 0, .8);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 66rem;
  margin: 0 auto;
  padding: .8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  font-family: Iowan Old Style, Palatino Linotype, Palatino, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark small { display: block; font-size: .66rem; font-weight: 400; color: var(--muted); letter-spacing: .22em; text-transform: uppercase; }
nav.main { display: flex; gap: .2rem; flex-wrap: wrap; }
nav.main a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  padding: .45rem .8rem;
  border-radius: 999px;
}
nav.main a:hover { color: var(--ink); background: var(--line); }
nav.main a[aria-current="page"] { color: var(--bg); background: var(--ink); }

main.content { max-width: 66rem; margin: 0 auto; padding: 2.5rem 1.25rem 3.5rem; }
main.content h1 {
  font-family: Iowan Old Style, Palatino Linotype, Palatino, Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  line-height: 1.2;
}
main.content p.sub { color: var(--muted); margin: .4rem 0 0; max-width: 40rem; }
main.content h2 {
  font-family: Iowan Old Style, Palatino Linotype, Palatino, Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 2.2rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}
main.content p { margin: 1em 0; max-width: 44rem; }
/* Textseiten: Lebenslauf-Tabelle und eingebettete Fotos */
main.content table { border-collapse: collapse; margin: 1rem 0; }
main.content td { padding: .3rem .6rem .3rem 0; vertical-align: top; }
main.content td:first-child { color: var(--accent); font-weight: 600; white-space: nowrap; padding-right: 1.25rem; }
main.content > img, main.content p img {
  border-radius: .9rem;
  box-shadow: var(--shadow);
  margin: 0 0 1rem 1.25rem;
}
@media (min-width: 40rem) { main.content > img, main.content p img { float: right; max-width: min(42%, 18rem); } }
p.crumb { margin: 0 0 1rem; font-size: .9rem; }
p.crumb a { text-decoration: none; color: var(--muted); }
p.crumb a:hover { color: var(--ink); }

/* Übersichts-Kacheln */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
a.card {
  position: relative;
  display: block;
  border-radius: .9rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--surface);
}
a.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
a.card:hover img { transform: scale(1.04); }
a.card span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.8rem .8rem .65rem;
  background: linear-gradient(to top, rgba(12, 16, 20, .78), transparent);
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.3;
}
a.card span small { display: block; font-weight: 400; font-size: .75rem; opacity: .75; }

/* Galerie-Grid */
.grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin-top: 1.5rem; }
.grid a.lb {
  display: block;
  border-radius: .7rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.grid a.lb img { display: block; width: 100%; height: 16rem; object-fit: cover; transition: transform .3s ease; }
.grid a.lb:hover img { transform: scale(1.03); }

/* Lightbox — fest zentriert im Viewport */
dialog#lightbox {
  position: fixed;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 94vh;
  outline: none;
}
dialog#lightbox::backdrop { background: rgba(8, 10, 12, .88); }
dialog#lightbox img {
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  border-radius: .5rem;
  cursor: zoom-out;
}

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-inner {
  max-width: 66rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
footer.site a { color: inherit; }
footer.site nav { display: flex; gap: 1.1rem; }

/* Nur fuer Screenreader (Uebersichts-h1 — der Name steht schon im Header) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
