* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  width: 100%;
  height: auto;
}

html {
  font:
    100%/1.5 "Helvetica Neue",
    Verdana,
    Sans-Serif;
}

body {
  background-color: white;
}

a,
a:visited {
  color: inherit;
  text-decoration: none;
}

/* =========================== header =========================== */

header {
  background: black;
  padding: 0 1vw;
  background-image: linear-gradient(to right, black 60%, rgb(200, 0, 0));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  height: 10vh;
  top: 0;
  left: 0;
  z-index: 1000;
}

h1 {
  color: white;
  font-weight: 200;
  font-size: clamp(1rem, 4vw, 3rem);
}

#naviButton {
  border: none;
  background: none;
  width: 44px;
  color: white;
  font-size: 2rem;
  font-weight: 200;
  cursor: pointer;
  transition: all 0.3s;
}

.gedreht {
  transform: rotate(-90deg);
}

#naviButton:hover {
  opacity: 0.6;
}

#naviButton img {
  width: 30px;
}

/* =========================== nav =========================== */

nav {
  padding: 0 1vw;
  width: 100%;
  /* header hat 10vh… */
  height: 90vh;
  /* ganze Browserfenster-Höhe */
  position: absolute;
  /* Menü nach oben, außerhalb des sichtbaren Bereiches verschieben */
  left: 0;
  top: -1000px;

  /* ganz sicher im Vordergrund */
  z-index: 500;
  background-color: rgba(255, 255, 255, 0.9);
  color: black;
  font-weight: 200;
  font-size: clamp(1rem, 4vw, 3rem);
  transition: all 0.3s ease-in-out;
}

/* Klasse "sichtbar" wird via Javascript gesetzt */
nav.sichtbar {
  top: 10vh;
}

nav ul {
  height: 100%;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

nav li {
  padding: 2vh 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

/* Menüpunkt der Seite, auf der man sich gerade befindet */
nav li.current {
  background-image: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.3) 1%,
    transparent
  );
}

/* =========================== galerie =========================== */

.galerie {
  width: clamp(320px, 80%, 960px);
  margin: 8em auto;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 2%;

  position: relative;
}

.galerie figure {
  /* das Eltern-Element hier definieren! */
  position: relative;
  /* sonst sieht man den Text unterhalb des Bildes */
  overflow: hidden;
  /* sonst ist unten ein Abstand, der stört. STRANGE! */
  height: 97%;
  cursor: pointer;
}

.galerie figcaption {
  text-align: center;
  width: 100%;
  position: absolute;

  /* schiebt figcaption nach links, außerhalb des sichtbaren Bereiches */
  left: -400px;
  top: 0;

  /* damit deckt figcaption das gesammte Bild ab */
  bottom: 0;

  font-weight: bold;
  padding-top: 60px;
  font-size: 150%;
  background-color: rgba(255, 255, 255, 0.6);

  /* ohne Transition gibt es einen harten Übergang, 0.4s ist die Dauer des Übergangs */
  transition: left 0.4s ease-in-out;
}

/* Klasse "angeklickt" wird via Javascript vergeben
-> wird von x=-400 auf x=0 geschoben y=top bleibt 0*/
.galerie figure.angeklickt figcaption {
  left: 0;
}

.galerie figcaption p {
  padding: 0.4em 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.4);
}

.galerie figure img {
  transition: all 0.5s;
}

.galerie figure:hover img {
  transform: scale(1.3);
  transform-origin: center;
}

/* =========================== star =========================== */

#star {
  margin-top: 0px;
  margin-left: 0px;

  animation-duration: 10s;
  animation-name: stern;
  animation-iteration-count: infinite;
}

@keyframes stern {
  0% {
    transform: rotate(360deg);
  }
}
