@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  --white: #fff;
  --monogrammBlack: #0e0e0f;
  --monogrammRed: #b41412;
  --grey: #d9d9d9;
  interpolate-size: allow-keywords;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1em;
}

#wrapper {
  width: 100%;
  position: relative;
  background-repeat: repeat-y;
}

.start {
  height: 100vh;
}

body,
footer button {
  font-family: "Open Sans", sans-serif;
  color: var(--white);
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  position: fixed;
  top: 0;
  z-index: 2;
}

h1,
h2,
h3 {
  font-family: "Open Sans", sans-serif;
  font-weight: 800;
}

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

button {
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.menuLinks,
.kenntnisse summary,
footer button {
  font-size: 1.3em;
  font-weight: 800;
}

/* Header */
.monogramm {
  width: 25%;
  background-color: var(--white);
  padding: 0.8em;
  margin-left: 6%;
  cursor: pointer;
}

/* Navigation */

header .menuLinks li {
  list-style: none;
}

.menuLinks a {
  cursor: pointer;
  color: var(--white);
  text-decoration: none;
  display: block;
}

/* Navigation Desktop */
.desktopNav {
  height: fit-content;
  padding: 0.8em 1.5em;
  background-color: var(--monogrammBlack);

  .menuLinks ul {
    display: flex;
    gap: 1em;
  }

  .menuLinks li {
    transition: border-width 0.2s ease-out;
  }

  .menuLinks li:hover {
    border-bottom: 10px solid var(--monogrammRed);
  }
}

/* Navigation Mobil */
.mobilNav {
  display: none;

  /* Icon_open */
  .navIconRows {
    width: 3.5em;
    padding: 0.5em 0.6em;
    position: absolute;
    top: 1em;
    right: 1em;
    cursor: pointer;
    border-radius: 5px;
  }

  .navIconRows span {
    display: block;
    height: 4px;
    width: 100%;
    background-color: var(--white);
    border-radius: 9px;
  }

  .navIconRows span:not(:last-child) {
    margin-bottom: 15.5%;
  }

  /* Icon_close */
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 100%;
    transition: 0.5s;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 12px #00000080;
  }

  .show {
    opacity: 1;
    right: 0;
    z-index: 20;
    pointer-events: all;
    background-color: var(--monogrammBlack);
  }

  .show .navIconCross {
    width: 3em;
    height: 3em;
    position: absolute;
    cursor: pointer;
    top: 1em;
    right: 1em;
  }

  .show .navIconCross span {
    display: block;
    height: 4px;
    width: 100%;
    position: absolute;
    top: 50%;
    background-color: var(--white);
    border-radius: 9px;
  }

  .show .navIconCross span:nth-child(1) {
    transform: translateY(-50%) rotate(45deg);
  }

  .show .navIconCross span:nth-child(2) {
    transform: translateY(-50%) rotate(-45deg);
  }

  /* Backdrop */
  .shadow {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0000004f;
    animation-name: shadowAnimation;
    animation-duration: 0.5s;
    animation-play-state: paused;
    z-index: 10;
  }

  @keyframes shadowAnimation {
    100% {
      right: 0;
    }
  }

  /* Menu links Mobil*/
  .menuLinks {
    margin: 5em auto 1em;
  }

  .menuLinks li:hover {
    background-color: var(--grey);
  }

  .menuLinks li {
    padding: 0.7em 1em;
  }
}

/* Main */
main p {
  margin: 0.5em 0;
  line-height: 1.4em;
}

/* About me */
div.foto {
  position: absolute;
  height: 45vh;
  aspect-ratio: 100 / 119;
  border: 18px solid var(--monogrammRed);
  z-index: 1;

  &::before {
    content: "";
    /* z-index: 1; */
    z-index: -1;
    width: 100%;
    height: 100%;
    position: absolute;
    border: 10px solid var(--monogrammRed);
    bottom: 30px;
    left: 30px;
    box-shadow: 30px -30px 0 -10px var(--monogrammBlack), 30px -30px 0 0px var(--monogrammRed);
  }

  img {
    background-color: var(--white);
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
  }
}

.text {
  position: absolute;
  width: 30%;
  margin: auto;
  color: var(--monogrammBlack);

  p:first-child {
    font-size: clamp(2rem, 2.3vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 0.1em;
  }

  p:nth-child(2) {
    margin-top: 0;
  }

  p:last-child {
    margin-bottom: 0;
  }
}

/* Kentnisse */
.kenntnisse {
  width: 35%;
  position: absolute;
  top: 55vh;
  margin-left: 0.5em;

  details::details-content {
    transition: height 0.5s ease-in-out, content-visibility 0.5s ease allow-discrete;
    height: 0;
    overflow: clip;
    margin-bottom: 0.8em;
  }

  .image {
    margin: auto;
  }

  .image {
    width: 80px;
    height: 80px;
  }

  .interessen .image {
    width: 70px;
    height: 70px;
  }

  img {
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
  }

  p {
    text-align: center;
  }

  details[open]::details-content {
    height: auto;
  }

  summary {
    border-bottom: 0.2em solid var(--white);
    margin-bottom: 0.7em;
    padding-bottom: 0.2em;
    cursor: pointer;
  }

  ::marker {
    font-size: 1.3em;
    color: var(--monogrammRed);
  }
}

/* Fähgkeiten */
.faehigkeiten::details-content {
  display: grid;
  gap: 1.2em 1em;
  grid-template-columns: repeat(3, minmax(max-content, 90px));
}

.faehigkeiten {
  & > div {
    text-wrap: nowrap;
    border: 5px solid var(--monogrammRed);
    padding: 0.15em 0.4em;
  }

  p {
    margin: 0;
  }
}

:is(.interessen, .sprachen)::details-content {
  display: flex;
  gap: 1em;
}

/* Sprachen */
.sprachen {
  > div {
    position: relative;
  }

  p:first-of-type {
    position: absolute;
    top: 40px;
    right: 50%;
    transform: translate(50%, -50%);
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--monogrammBlack);
    text-shadow: 0px 0px 20px rgb(255, 255, 255, 0.7);
  }
}

summary {
  transition: width 0.5s ease-out;
}

.faehigkeiten summary {
  width: 75%;
}

.faehigkeiten[open] summary {
  width: 68%;
}

.faehigkeiten:has(~ details[open]) summary {
  width: 65%;
}

.interessen summary {
  width: 90%;
}

.interessen[open] summary {
  width: 80%;
}

.interessen:has(+ .sprachen[open]) summary {
  width: 75%;
}

.sprachen summary {
  width: 100%;
}

.sprachen[open] summary {
  width: 85%;
}

/* Work */
.grid {
  display: grid;
  grid-template: 100vh / 1fr;
  grid-auto-rows: 100vh;
}

.images {
  display: flex;
  gap: 1em;
  width: 70%;
  /* margin: 2em auto; */
  margin: 0 2em;
  padding: 1em;
  background-color: rgb(from var(--monogrammRed) r g b / 0.1);
  border: 10px solid var(--monogrammRed);
  align-self: center;

  &:nth-child(even) {
    justify-self: end;
  }

  h1 {
    /* flex: 0 0 30%; */
    color: var(--monogrammRed);
    font-size: 5rem;
  }
}

.imagesGrid {
  display: grid;
  /* grid-template: repeat(2, 50%) / repeat(9, 1fr); */
  grid-template-columns: repeat(12, 1fr);
  /* grid-auto-rows: 200px; */
  gap: 1em;

  h1 {
    grid-column: 1 / span 3;
    grid-row: 1;
    z-index: 1;
  }
}

/* Web */
.swissed {
  grid-column: 9 / span 4;
  grid-row: 1;
}

.artemis {
  grid-column: 5 / span 4;
  grid-row: 1;
}

.tasteTheWorld {
  grid-column: 3 / span 4;
  grid-row: 2;
  align-self: start;
}

.paulasGarden {
  grid-column: 7 / span 4;
  grid-row: 2;
}

/* Print */
#print h1 {
  grid-row: 1 / span 2;
}

.friseurkette {
  grid-column: 8 / span 4;
  grid-row: 1 / span 2;
  align-self: end;
}

.weihnachtskarte {
  grid-column: 4 / span 4;
  grid-row: 2;
  align-self: end;
}

.weingut {
  grid-column: 5 / span 4;
  grid-row: 3 / span 2;
}

.klimt {
  grid-column: 9 / span 4;
  grid-row: 3;
  align-self: start;
}

/* Illustrationen */
.stilisiertesAuge {
  grid-column: 4 / span 5;
  grid-row: 1 / span 3;
  align-self: start;
}

.monogramme {
  grid-column: 9 / span 4;
  grid-row: 1;
}

.sport1 {
  grid-column: 11 / span 2;
  grid-row: 2 / span 2;
}

.sport2 {
  grid-column: 9 / span 2;
  grid-row: 2 / span 2;
  width: 70%;
  align-self: center;
  justify-self: center;
}

.bau1 {
  grid-column: 7 / span 3;
  grid-row: 4 / span 2;
}

.bau2 {
  grid-column: 10 / span 3;
  grid-row: 4 / span 2;
}

/* Photoshop */
.metal {
  grid-column: 10 / span 3;
  grid-row: 1 / span 2;
}

.galaxyImAuge {
  grid-column: 7 / span 3;
  grid-row: 1;
}

/* Fotografie */
.kreativfoto {
  grid-column: 10 / span 3;
  grid-row: 1 / span 2;
}

.architekturfoto {
  grid-column: 7 / span 3;
  grid-row: 2 / span 2;
}

.fotoEichhörnchen {
  grid-column: 4 / span 3;
  grid-row: 1 / span 2;
}

.fotoRabe {
  grid-column: 7 / span 3;
  grid-row: 1;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3em 8em 3em 2em;
  color: var(--white);
  background-color: var(--monogrammBlack);
}

footer button {
  /* display: block; */
  border: none;
  cursor: pointer;
  margin: 0 0.5em;
  background-color: transparent;
}

#toTop {
  position: fixed;
  right: 2%;
  bottom: 2%;
  color: var(--monogrammRed);
  font-size: 5rem;
  font-weight: 800;
  text-decoration: none;
}

/* Popover */
div[popover] {
  margin: auto;
  padding: 2em;
  width: fit-content;
  min-width: 600px;
  max-width: 50%;
  height: fit-content;
  min-height: 50vh;
  max-height: 90vh;
  background-color: var(--monogrammBlack);
  color: var(--white);
  overflow-x: hidden;

  .close {
    color: rgba(18, 18, 13, 0.4);
    color: rgb(from var(--white) r g b / 0.4);
    background-color: transparent;
    border: none;
    font-size: 50px;
    line-height: 1;
    font-weight: 500;
    position: absolute;
    right: 20px;
    top: 10px;
  }

  &:popover-open:not(footer > *) {
    display: grid;
    grid-template-rows: 60% minmax(30%, 50%);
    /* flex-direction: column; */
  }

  &:hover::after,
  &:focus::after {
    color: rgb(from var(--white) r g b / 0.7);
    cursor: pointer;
  }

  &::backdrop {
    background-color: rgba(18, 18, 13, 0.6);
    background-color: rgb(from var(--monogrammBlack) r g b / 0.8);
  }

  img {
    width: auto;
    max-width: 100%;
    /* max-height: 50%; */
    max-height: 100%;
    margin: 0 auto;
    /* flex: 0 1 auto; */
  }

  .zoom-container {
    height: 100%;
  }

  .zoom-container input[type="checkbox"] {
    display: none;
  }

  .zoom-container img {
    transition: transform 0.3s ease;
    transform-origin: top;
    cursor: zoom-in;
  }

  .zoom-container input[type="checkbox"]:checked ~ label img {
    transform: scale(1.4);
    cursor: zoom-out;
  }

  .imgContainer {
    position: relative;
    width: fit-content;
    margin: 0 auto;
  }

  .imgContainer p {
    position: absolute;
    left: 0;
    z-index: -1;
    font-size: 0.5em;
  }

  .imgContainer p a {
    color: var(--white);
  }

  .imageText {
    /* flex: 0 0 auto; */
    margin-top: 1.5em;
  }

  h2 {
    margin-bottom: 0.5em;
    font-size: clamp(1.7em, 2.1vw, 2.2rem);
  }
}

div :is(#photoshop, #fotografie) :popover-open {
  display: grid;
  grid-template-rows: minmax(50%, 100%) minmax(10%, 50%);
  /* flex-direction: column; */
}

footer div[popover] {
  h2,
  h3 {
    margin-bottom: 0.3em;
  }

  h2 {
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  }

  h3 {
    margin-top: 0.4em;
    font-size: clamp(1.4rem, 2vw, 2rem);
  }
}

footer #kontakt {
  text-align: center;
  font-size: 1.1em;

  p {
    margin-bottom: 0.3em;
  }

  p:first-of-type {
    margin-bottom: 1.2em;
  }

  p:nth-of-type(2) {
    font-size: 1.3em;
    margin-bottom: 0.6em;
  }
}

#impressum p {
  margin-bottom: 1em;
}

#datenschutz {
  max-width: 70%;
  line-height: 1.3;

  p {
    margin-bottom: 0.5em;
  }
}
