body {
  --glas: color-mix(in hsl, var(--theme) 20%, transparent);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  background: var(--glas);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.main {
  margin: 0;
  padding: 0;
  max-width: none;

  display: grid;
  grid-template-columns:
    [edge-start] 1fr
    [lgap-start] var(--gap)
    [lgap-end content-start] min(
      100% - var(--gap) * 2,
      var(--main-width)
    ) [content-end rgap-start]
    var(--gap) [rgap-end]
    1fr [edge-end];
}

:where(.main > *, .curtain > *) {
  grid-column: content;
}

.hero {
  position: sticky;
  top: 0;

  grid-column: edge;

  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;

  isolation: isolate;
}

.hero-spacer {
  min-height: var(--header-height);
  flex: 1;
}

.hero-center {
  padding: 5lvh 5lvw;
  max-width: 95%;
  border-radius: min(3vmax, 32px);

  background: var(--glas);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text,
.hero-sub {
  line-height: 1.2;
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
}

.hero-sub {
  display: flex;
  flex-direction: column;
}

.hero-text bold {
  font-weight: bolder;
}

.professions {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 2.5em;
}

.profession {
  position: absolute;
  background-color: hotpink;
  padding: 0.2em;
  border-radius: 0.2em;
  font-size: 0.8em;
  line-height: 1.05;
  width: fit-content;
  max-width: 90vw;
  list-style: none;

  perspective: 1.2em;
  transform-origin: center center 1.2em;
  /* Before the animation starts, everything needs to be properly positioned */
  rotate: x -90deg;
  /* Needed for Safari, because otherwise the content is cut off */
  translate: 0 0 99em;
}

:is(.professions:hover, .professions:active, .professions:focus-within) .profession {
  animation-play-state: paused;
}

#waves {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scroll-teaser {
  flex: 1;
  width: min(7vmax, 4.5rem);
  container: scroll-teaser / size;

  display: flex;
  align-items: end;
  overflow: hidden;
}

@container scroll-teaser (height < 5rem) {
  .scroller {
    visibility: hidden;
  }
}

.scroller {
  flex: 1;
  max-height: 100%;
  padding-block-end: clamp(8px, 2lvh, 32px);
}

.curtain {
  display: grid;
  grid-column: edge;
  grid-template-columns: subgrid;
  background: var(--theme);
  z-index: 1;
}

.post-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-block: 32px;
  gap: 32px;
}

@media screen and (width > 768px) {
  .hero-text {
    font-size: 4rem;
  }
}

@media screen and (width > 1200px) {
  .hero-title {
    font-size: 5rem;
  }
}
