/* GLOBAL LAYOUT
----------------------------------------------------------- */

@font-face {
  font-family: "Suisse";
  src: url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.eot") format("embedded-opentype"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.woff2") format("woff2"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.woff") format("woff"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.ttf") format("truetype"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.svg") format("svg");
  font-weight: normal;
  font-style: normal;
}

:root {
  --rand: clamp(1.2rem, 1.5vw, 3.5rem);
  --color1: #ffffff;
  --color2: #000000;
  --size-1: 1.2rem;
  --size-2: 1rem;
  --line: 1.5px;
  --content-width: 66%;
}

html {
  scroll-behavior: smooth;
}

*:focus {
  outline: none;
}

body {
  font-family: "Suisse", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color1);
  color: var(--color2);
  font-size: var(--size-1);
  font-weight: 400;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
  padding: var(--rand);
  font-size: var(--size-1);
}

main {
  box-sizing: border-box;
  padding: var(--rand);
}

/* TYPOGRAPHY
----------------------------------------------------------- */

a {
  color: var(--color2);
  transition: opacity 0.3s ease;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: var(--line);
  text-underline-offset: 0.3em;
}

/* HEADER
----------------------------------------------------------- */

.header {
  padding: var(--rand);
  margin-bottom: calc(var(--rand) * 2);
  position: relative;
}

.header-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  position: relative;
  font-size: var(--size-1);
}

.header-nav .header-claim {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-nav a {
  text-decoration: none;
}

.header-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: var(--line);
  text-underline-offset: 0.3em;
}

/* GRID
----------------------------------------------------------- */

#project-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  padding-bottom: calc(var(--rand) * 3);
}

.grid-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.grid-item {
  width: 100%;
  position: relative;
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.grid-item.visible {
  opacity: 1;
  filter: blur(0);
}

.grid-item img,
.grid-item video {
  width: 100%;
  display: block;
  object-fit: cover;
  padding: 0.2rem;
  box-sizing: border-box;
}

/* PROJECT INFO OVERLAY */

.projectinfo {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--color2);
  font-size: var(--size-2);
  line-height: 1.1;
  padding: calc(var(--rand) / 2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  box-sizing: border-box;
}

.grid-item:hover .projectinfo,
.grid-item.touch-active .projectinfo {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

/* LAZY LOAD */

.lazy-media {
  filter: blur(20px);
  opacity: 0.4;
  transition: filter 0.8s ease, opacity 0.8s ease;
  will-change: filter, opacity;
}

.lazy-media.loaded {
  filter: blur(0);
  opacity: 1;
}

/* TEXTKACHEL */

.grid-item--text {
  pointer-events: none;
  box-sizing: border-box;
  aspect-ratio: 2/3;
  display: flex;
  align-items: flex-start;
  opacity: 1 !important;
  filter: none !important;
}

.grid-item__title,
.grid-item__subtitle,
.grid-item__description {
  font-size: var(--size-2);
  line-height: 1.3;
}

.grid-item__description {
  margin-top: 1rem;
}

/* LIGHTBOX
----------------------------------------------------------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 100;
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
}

.lightbox.visible {
  display: flex;
}

.lightbox__inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__media {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

/* KONTAKTSEITE
----------------------------------------------------------- */

.contact-page {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: calc(var(--rand) * 2);
  align-items: start;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: calc(var(--rand) * 2);
  max-width: var(--content-width);
}

.contact-text {
  font-size: var(--size-2);
  line-height: 1.4;
}

.contact-text .contact-mail {
  margin-top: calc(var(--rand) * 1.5);
}

.contact-image {
  align-self: start;
}

.contact-image img {
  width: 100%;
  display: block;
}

.contact-caption {
  font-size: var(--size-2);
  margin-top: 0.4rem;
}

.cv-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--rand);
  padding: 0.4rem 0;
  border-top: 2px solid var(--color2);
  font-size: var(--size-2);
}

.cv-row:last-child {
  border-bottom: 2px solid var(--color2);
}

/* TEXTSEITE
----------------------------------------------------------- */

.text-page {
  max-width: var(--content-width);
}

.text-page h1,
.text-page h2,
.text-page h3 {
  font-size: var(--size-1);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.text-page p {
  font-size: var(--size-2);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.text-page a {
  text-decoration: underline;
  text-decoration-thickness: var(--line);
  text-underline-offset: 0.3em;
}

/* RESPONSIVENESS
----------------------------------------------------------- */

@media only screen and (min-width: 1400px) {
  html { font-size: 120%; }
}

@media only screen and (min-width: 2000px) {
  html { font-size: 140%; }
}

@media only screen and (max-width: 700px) {
  .header-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .header-nav h1 {
    margin-bottom: 1rem;
  }

  .header-nav .header-claim {
    position: static;
    transform: none;
  }

  .header {
    margin-bottom: calc(var(--rand) * 1.5);
  }

  .contact-page {
    grid-template-columns: 1fr;
  }

  .contact-image {
    order: 1;
  }
}

@media only screen and (max-width: 600px) {
  :root {
    --rand: 1rem;
    --content-width: 100%;
  }

  .header {
    margin-bottom: 2rem;
  }

  .grid-item img,
  .grid-item video {
    padding: 0.15rem;
  }

  .grid-item--text {
    aspect-ratio: unset;
    padding-bottom: 1.5rem;
  }

  .cv-row {
    grid-template-columns: 1fr;
    gap: 0.1rem;
    padding: 0.6rem 0;
  }

  footer {
    font-size: var(--size-1);
  }
}