body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  color: #333;
  font-family: system-ui, Sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  scroll-margin-top: 10rem;
  scroll-padding-top: 10rem;
}

* {
  box-sizing: border-box;
}

h1 {
  font-size: 175%;
}

h2 {
  font-size: 150%;
}

h3 {
  font-size: 140%;
}

h4 {
  font-size: 130%;
}

h5 {
  font-size: 120%;
}

h6 {
  font-size: 105%;
}

a[href] {
  color: black;
}

a[href]:focus-visible,
a[href]:hover {
  text-decoration: none;
}

header#kk_head {
  background: #f7f6ca;
  gap: 0;
  position: fixed;
  top: 0;
  box-shadow: 0 0.125rem 0.5rem 0 rgba(0,0,0,0.2);
  width: 100%;
  z-index: 1;
}

span#titel span{
  white-space: nowrap;
}

header img {
  width:  auto;
  height: 10rem;
}

#middle {
  position: relative;
  gap: 2em;
  margin-top: 10rem;
  padding-inline-end: 1.5rem;
  min-height: calc(100dvh - 16.3125rem);
  z-index: 0;
}

nav {
  background: rgba(225, 200, 75, 0.15);
  box-shadow: 0.125rem 0 0.5rem 0 rgba(0, 0, 0, 0.3);
  padding: 1em 1.5em;
  max-width: max-content;
  font-size: 112.5%;
}

nav ul,
footer ul {
  list-style-type: none;
  margin: 0;
  padding-block: 0.25em 0.5em;
  padding-inline: 0;
}

nav ul {
  position: sticky;
  top: 11.125rem;
}

nav ul ul {
  padding-inline-start: 1.25em;
  white-space: nowrap;
}

nav ul li a {
  display: inline-block;
  padding: 0.125rem;
}

.flex-table {
  display: flex;
}

.flex-table-row {
  gap: 1.25em;
}

.flex-table-col {
  flex-direction: column;
  gap: 0.5em;
}

.flex-table-row > :not(img) {
  flex-grow: 1;
}

header > div {
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 120%;
  font-weight: 700;
}

#underline {
  font-size: 80%;  
}

main {
  padding-block: 0 1.5rem;
}

main section {
  display: none;
}

section h2,
section h3,
section h4 {
  margin-block-start: 1.75em;
}

section *:has(+ h2) {
  margin-block-end: 1em;
}

section ul li + li {
  padding-block-start: 0.5em;
}


/* Profil */
#vita.flex-table-row span {
  align-self: flex-start;
  flex-grow: 0;
}

#vita.flex-table-row > span:first-child {
  max-width: max-content;
}

#vita .flex-table-col .flex-table-row > span:first-child {
  min-width: 5rem;
}

footer {
  background: #11120d;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
  border-top: 0.0625rem solid #777;
  padding-block: 1em;
  color: white;
  z-index: 1;
}

 footer a[href] {
   color: white;
}

*:target {
  margin-top: -10rem;
  padding-top: 10rem;
}

button.nav-toggler {
  background-color: #11120d;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 75%;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0.0625rem 0.125rem 0.25rem 0 #f7f6ca;
  border: 0;
  padding: 0;
  width: 2rem;
  height: 2rem;
  color: white;
  font-family: Courier, system-ui, Sans-serif;
  transition: all 0.3s;
}

button.nav-toggler:focus,
button.nav-toggler:hover {
  background-color: #dfd499;
}

button#nav_opener {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="12" x2="20" y2="12"></line><line x1="4" y1="6" x2="20" y2="6"></line><line x1="4" y1="18" x2="20" y2="18"></line></svg>');
  display: block;
}
button#nav_opener:focus,
button#nav_opener:hover {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%2311120d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="12" x2="20" y2="12"></line><line x1="4" y1="6" x2="20" y2="6"></line><line x1="4" y1="18" x2="20" y2="18"></line></svg>');
  box-shadow: 0.0625rem 0.125rem 0.25rem 0 #11120d;
}

nav button#nav_close {
  display: block;
  position: absolute;
  left: 100%;
  opacity: 0;
  z-index: -1;
}

@media all and (max-width: 50.6875rem) {
  body {
    font-size: 0.875rem;
  }
  header#kk_head {
    position: absolute;
  }
  header > div {
    padding-inline-end: 0;
    text-align: right;
  }
  header > img {
    width: auto;
    height: 7.5rem;
  }
  #middle {
    flex-direction: column;
    margin-block-start: 7.5rem;
    padding-inline-start: 1rem;
    min-height: calc(100dvh - 13.0625rem);
    z-index: 1;
  }
  #middle::after {
    content: '';
    background: rgba(0,0,0,0.8);
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    z-index: -1;
    transition: all 0.3s;
  }
  #middle:has(> nav.open)::after {
    opacity: 1;
    visibility: visible;
    z-index: 1;
  }
  #middle nav {
    background: rgba(225, 200, 75, 1);
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    color: black;
    opacity: 0;
    visibility: hidden;
    z-index: 2;
    transition: all 0.3s;
  }
  #middle nav.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
  #middle nav ul {
    visibility: hidden;
  }
  #middle nav.open ul {
    visibility: visible;
  }
  nav.open button#nav_close {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
    opacity: 1;
    z-index: 1;
  }
  nav.open button#nav_close:focus,
  nav.open button#nav_close:hover {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%2311120d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
    box-shadow: 0.0625rem 0.125rem 0.25rem 0 #11120d;
  }
  #middle section span,
  #middle section p {
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  section #vita {
    flex-direction: column;
  }
  #middle:has(> nav.open) + footer {
    z-index: 0;
  }
}

@media all and (max-width: 25rem) {
  header#kk_head {
    align-items: self-end;
  }
  header > div {
    padding-inline-end: 1rem;
    padding-block-end: 1.25rem;
  }
  header > div span {
    width: 100%;
  }
}