/* Heike Behrens – Stylesheet
   Reines CSS, keine externen Schriften. */

:root {
  --papier: #faf9f6;
  --flaeche: #f1efe9;
  --text: #1f1f1f;
  --leise: #6a6760;
  --linie: #dedad1;
  --akzent: #b3261e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --seitenleiste: 15rem;
}

/* Dunkelmodus: folgt automatisch der Einstellung des Geräts */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #141413;
    --flaeche: #1f1e1c;
    --text: #e8e5de;
    --leise: #9d988e;
    --linie: #33312d;
    --akzent: #ef6b5f;
  }
  .galerie img { box-shadow: none; }
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: var(--linie); text-underline-offset: .2em; }
a:hover { color: var(--akzent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--text); color: var(--papier); padding: .5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

/* ---------- Grundlayout: Seitenleiste + Inhalt ---------- */

.seite {
  display: grid;
  grid-template-columns: var(--seitenleiste) minmax(0, 1fr);
  min-height: 100vh;
}

.kopf {
  position: sticky; top: 0;
  height: 100vh;
  padding: 3rem 2rem 2rem;
  border-right: 1px solid var(--linie);
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.name {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: normal;
  margin: 0;
  letter-spacing: .01em;
}
.name a { text-decoration: none; }
.untertitel { margin: .35rem 0 0; color: var(--leise); font-size: .9rem; }

.menue-schalter, .menue-knopf { display: none; }

.nav { margin-top: 2.75rem; display: flex; flex-direction: column; flex: 1; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a {
  display: inline-block;
  padding: .2rem 0;
  text-decoration: none;
  color: var(--text);
}
.nav a:hover { color: var(--akzent); }
.nav a[aria-current="page"] { color: var(--akzent); }
.nav a[aria-current="page"]::before { content: "— "; }

.nav-titel {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--leise);
  margin: 0 0 .4rem;
}
.nav-gruppe + .nav-gruppe { margin-top: 1.75rem; }

/* ---------- Inhalt ---------- */

main {
  padding: 3rem clamp(1.25rem, 4vw, 4rem) 4rem;
  max-width: 78rem;
  width: 100%;
}

h1, h2, h3 { font-family: var(--serif); font-weight: normal; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 2rem; }
h2 { font-size: 1.5rem; margin: 3rem 0 1rem; }

.text { max-width: 40rem; }
.text p { margin: 0 0 1.1em; }
.text h2:first-child { margin-top: 0; }

.fuss {
  grid-column: 2;
  padding: 1.5rem clamp(1.25rem, 4vw, 4rem) 2.5rem;
  color: var(--leise);
  font-size: .875rem;
  border-top: 1px solid var(--linie);
}
.fuss a { color: var(--leise); }
.fuss a[aria-current="page"] { color: var(--akzent); }

/* ---------- Startseite ---------- */

.start-bild { margin: 0; max-width: 42rem; }
.start-bild img { width: 100%; }

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

/* ---------- Galerie ---------- */


.galerie {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
}
.galerie li { scroll-margin-top: 2rem; }
.galerie a {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
  background: var(--flaeche);
  padding: 1rem;
}
.galerie img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .3s ease;
}
.galerie a:hover img { transform: scale(1.02); }

/* ---------- Großansicht (nur CSS: :target + Scroll-Snap zum Wischen) ---------- */

.gross {
  display: none;
  position: fixed; inset: 0; z-index: 50;
  background: rgba(18, 18, 18, .97);
  color: #eee;
}
.gross:has(:target) { display: block; }

.streifen {
  list-style: none; margin: 0; padding: 0;
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.streifen::-webkit-scrollbar { display: none; }

.streifen > li {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
  padding: 3.5rem 4.5rem;
}

.gross .hintergrund { position: absolute; inset: 0; cursor: zoom-out; }

.gross figure {
  position: relative;
  margin: 0;
  max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.gross img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  max-height: calc(100dvh - 7rem);
  width: auto; height: auto;
  object-fit: contain;
}

.gross .knopf {
  position: absolute;
  color: #ddd;
  text-decoration: none;
  font-size: 2.25rem;
  line-height: 1;
  padding: .75rem 1rem;
  z-index: 2;
}
.gross .knopf:hover { color: #fff; }
.gross .knopf:focus-visible { outline: 2px solid #fff; }
.gross .schliessen { top: .5rem; right: .75rem; font-size: 2rem; }
.gross .zurueck { left: .5rem; top: 50%; transform: translateY(-50%); }
.gross .weiter { right: .5rem; top: 50%; transform: translateY(-50%); }

/* ---------- Vita ---------- */

.vita-kopf { display: grid; grid-template-columns: minmax(0, 16rem) 1fr; gap: 2.5rem; align-items: start; }
.vita-kopf img { width: 100%; }

.jahre { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.jahre li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: .55rem 0;
  border-top: 1px solid var(--linie);
}
.jahre li:last-child { border-bottom: 1px solid var(--linie); }
.jahr { color: var(--leise); font-variant-numeric: tabular-nums; }

/* ---------- Mobil ---------- */

@media (max-width: 52rem) {
  .seite { display: block; }

  .kopf {
    position: static; height: auto;
    padding: 1.25rem 1rem;
    border-right: 0; border-bottom: 1px solid var(--linie);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    overflow: visible;
  }
  .name { font-size: 1.35rem; }
  .untertitel { font-size: .8rem; margin-top: .1rem; }

  .menue-knopf {
    display: block;
    cursor: pointer;
    border: 1px solid var(--linie);
    padding: .35rem .8rem;
    font-size: .9rem;
    user-select: none;
  }
  .menue-knopf::after { content: " ☰"; }
  .menue-schalter:checked ~ .menue-knopf::after { content: " ✕"; }
  .menue-schalter:focus-visible ~ .menue-knopf { outline: 2px solid var(--akzent); outline-offset: 2px; }

  .nav { display: none; grid-column: 1 / -1; margin-top: 1.25rem; }
  .menue-schalter:checked ~ .nav { display: flex; }
  .nav a { padding: .35rem 0; }

  /* Checkbox zugänglich, aber unsichtbar */
  .menue-schalter { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }

  main { padding: 2rem 1rem 3rem; }
  h1 { margin-bottom: 1.5rem; }
  .fuss { padding: 1.25rem 1rem 2rem; }

  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .galerie a { padding: .5rem; }

  .streifen > li { padding: 3.5rem .5rem; }
  .gross img { max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); }
  /* Auf dem Handy wird gewischt; Pfeile ausblenden */
  .gross .zurueck, .gross .weiter { display: none; }

  .vita-kopf { grid-template-columns: 1fr; gap: 1.5rem; }
  .vita-kopf img { max-width: 14rem; }
  .jahre li { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .kopf, .fuss, .gross { display: none !important; }
  .seite { display: block; }
}
.vita-kopf h2 { margin-top: 0; }
