:root {
  --footer-color: rgba(0,0,0, 0.4);
  --line-color: black;
  --line-padding: 0.525rem;
  --header-h: 64px;
  --footer-h: 64px;
  --gap: 1.05rem;
  --bg: white;
}

@font-face {
  font-family: "ABC Whyte";
  src: url("../fonts/ABCWhyte-Regular.woff2") format("woff2"),
       url("../fonts/ABCWhyte-Regular.woff") format("woff");
}

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

html {
  font-family: "ABC Whyte", sans-serif;
  font-feature-settings: "ss01" 1, "ss02" 1;
  font-weight: normal;

  /* scrollbalken ausblenden */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column; /* header, main, footer */
  background-color: var(--bg);
}

/* layout main */

main.about,
main.default {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin: 0 1rem;
}

.about-image,
.default-image {
  padding: 5rem 5rem;
  display: flex;
  flex: 1;
  justify-content: center;
  position: sticky;
  top: var(--header-h);
  min-width: 0;
  align-self: flex-start;

  /* höhe ohne text erzwingen */
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
}

.default-image {
  mix-blend-mode: multiply;
  filter: grayscale(100%);
  filter: opacity(0.8);
}

.about-image img,
.default-image img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 10rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.about-info,
.default-info {
  flex: 0 0 396px;
  position: sticky;
  top: 0;
  padding: 0.75rem;
  align-self: flex-start;
}

/* effekt scroll-reveal */
.about-image,
.about-info,
.default-image,
.default-info {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* sobald in viewport */
.about-image.in-view,
.about-info.in-view,
.default-image.in-view,
.default-info.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* verzögerung text */
.default-info {
  transition-delay: 0.2s;
}

/* sonderfall home und project */

.project-gallery img {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.project-gallery img.in-view {
  opacity: 1;
}

/* layout header */

.layout-flex-left {
  flex: 1;
}

.layout-fixed-right {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 396px;
  flex-shrink: 0;
}

/* accordion */

.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s ease;
}

/* header im normalen dokumentenfluss (nicht fixed) */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  gap: 2rem;
  background-color: var(--bg);

  /* für die weiche slide-animation */
  transform: translateY(0);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

/* state »versteckt« (bewegt sich nach oben aus dem bild) */
.site-header--hidden {
  transform: translateY(-100%);
}

/* state »fixiert beim zeigen« */
.site-header--fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}

.hamburger-menu {
  display: none;
}

/* haupt- und legal-nav inline */
.main-nav ul, .legal-nav ul {
  display: flex;
  gap: 1.5rem;
}

/* padding nur dann, wenn header fixed ist */
.site-header--fixed + main {
  padding-top: 4rem;
}


.site-footer {
  padding: 1.5rem 2rem;
  color: var(--footer-color);
}

.logo {
  flex-shrink: 0;
}

.legal-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  color: #5C5C5C;
}

.main-nav {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
}

.main-nav a.active,
.legal-nav a.active {
  /* border-bottom: 1.5px solid; */
}


/* schrift allgemein */

body {
  font-size: 0.875rem;
  line-height: var(--gap);
}

ul {
  margin-bottom: var(--line-padding);
}

.site-header, .site-footer, h1, h2, h3, dt {
  text-transform: uppercase;
  font-size: inherit;
  font-weight: inherit;
}

.about-vita li {
  list-style-type: none;
}

/* schrift-linien */

h1 {
  border-bottom: 1.5px solid;
  margin-bottom: var(--line-padding);
}

h2 {
  padding-top: var(--line-padding);
  border-top: 1.5px solid black;
}

h1 + h2, h1 + * h2 {
  border-top: none;
}

h1:has(+ h2) {
  margin-bottom: 0;
}

h1, dd, p, .about-vita li, .about-degree {
  padding-bottom: var(--line-padding);
}

dt, .about-vita li {
  border-top: 1.5px solid;
  border-color: var(--line-color);
  padding-top: var(--line-padding);
}

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

p a {
  border-bottom: 1.5px dotted;
}

strong {
  font-weight: normal;
}


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

.project-preview {
  /* height: 100%; */
}

.project-preview {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.project-preview.in-view {
  opacity: 1;
  transform: translateY(0);
}

.project-info {
  padding: 0.75rem;
}


/* Media Queries */

@media (max-width: 600px) {
  .site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .logo {
    order: 1;
    flex: 1 1 auto;
  }

  .open-icon {
    order: 2;
    flex: 0 0 auto;
    display: block;
    cursor: pointer;
  }

  .main-nav,
  .close-icon,
  .legal-nav {
    display: none;
  }

  .legal-nav {
    justify-content: flex-start;
  }

  .site-header, .site-footer {
    padding: 1.5rem 1.5rem;
  }

  .project-info {
    /* padding: 1rem */
  }

  .site-header.open {
    gap: 0.75rem;
  }

  .site-header.open .logo,
  .site-header.open .open-icon {
    display: none;
  }

  .site-header.open .main-nav {
    display: flex;
    order: 1;
    flex: 1 1 auto;
    gap: 1rem;
  }

  .site-header.open .close-icon {
    display: block;
    order: 2;
    flex: 0 0 auto;
    cursor: pointer;
    margin-left: auto;
  }

  .site-header.open .legal-nav {
    display: flex;
    order: 3;
    flex: 1 1 100%;
    gap: 1rem;

  }

  .project-info {
    width: 100%;
    margin-left: 0;
    margin-top: 0.75rem;
    padding: 0.75rem;
  }

  main.about,
  main.default {
    margin: 0.75rem;
    margin-bottom: 0;
    margin-top: 0;
    display: flex;
    display: block;
  }

  .about-image,
  .default-image {
    padding: 0;
  }

  .about-image,
  .about-info,
  .default-image,
  .default-info {
    min-height: 0;
    position: static;
    margin: 0.75rem 0rem;
  }

  .about-info {
    padding: 0;
    margin-top: 2rem;
    margin-bottom: 0;
  }

}
