/* ==========================================
   RESET CSS
   ========================================== */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

body {
	line-height: 1;
	overflow: hidden;
  background-color: #fff;
}

ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* ==========================================
   GLOBALS & FONTS
   ========================================== */

@font-face {
    font-family: 'ROM';
    src: url('../assets/fonts/ROM/ROM-Regular.woff2') format('woff2'),
         url('../assets/fonts/ROM/ROM-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ROM';
    src: url('../assets/fonts/ROM/ROM-Bold.woff2') format('woff2'),
         url('../assets/fonts/ROM/ROM-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/Inter-Regular/Inter-Regular.woff2') format('woff2'),
         url('../assets/fonts/Inter-Regular/Inter-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'ROM', Helvetica, sans-serif;
    margin: 0;
    min-height: 100vh;
}

/* ==========================================
   NAVIGATION
   ========================================== */

.mainnav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    font-family: 'ROM-Bold', Helvetica, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    z-index: 100;
    /* background: #ffffff; */
    /* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04); */
}

.mainnav_list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 20px;
    margin: 0;
    justify-content: flex-start;
    opacity: 1;
}

.mainnav_listitem a {
    color: black;
    opacity: 1;
    text-decoration: none;
    font-family: 'ROM-Bold', Helvetica, sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 2.4vw, 3rem);
    transition: color 0.2s ease, transform 0.2s ease;
}

.mainnav_listitem a:hover {
    color: #ff2ecb;
    text-shadow: 0 0 4px rgba(255, 46, 203, 0.7), 0 0 7px rgba(255, 46, 203, 0.45);
    opacity: 1;
    transform: translateY(-2px);
}

.mainnav_listitem svg {
    height: 24px;
    width: 24px;
    transform: translateY(0px);
}

.work-body .mainnav_list {
  justify-content: space-between;
}

.work-body .mainnav_listitem svg {
  height: 25px;
  width: auto;
}

body.custom-cursor-enabled,
body.custom-cursor-enabled * {
  cursor: none !important;
}

body.custom-cursor-enabled::after {
  position: fixed;
  top: var(--cursor-y, -20px);
  left: var(--cursor-x, -20px);
  z-index: 2147483647;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff2ecb;
  box-shadow: 0 0 8px rgba(255, 46, 203, 1), 0 0 18px rgba(255, 46, 203, 0.85), 0 0 36px rgba(255, 46, 203, 0.6);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.12s ease;
}

body.custom-cursor-active::after {
  opacity: 1;
}

.work-body.linear-mode .mainnav_listitem svg {
  height: 25px;
  width: auto;
  transform: translateY(-3px);
}

.layout-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.layout-group-icon {
  display: none;
  width: auto;
  height: clamp(1.8rem, 2.4vw, 3rem);
  filter: invert(1);
}

.work-body.linear-mode .layout-line {
  display: none;
}

.work-body.linear-mode .layout-group-icon {
  display: block;
}

.layout-toggle:focus-visible {
  outline: 2px solid #ff2ecb;
  outline-offset: 4px;
}

.mainnav_listitem:hover svg {
    filter: drop-shadow(0 0 4px rgba(255, 46, 203, 0.7)) drop-shadow(0 0 7px rgba(255, 46, 203, 0.45));
}

.mainnav_listitem:hover .layout-group-icon {
  filter: invert(1) drop-shadow(0 0 4px rgba(255, 46, 203, 0.7)) drop-shadow(0 0 7px rgba(255, 46, 203, 0.45));
}

.icon-rect-nav {
    fill: black;
}

.mainnav_listitem:hover .icon-rect-nav {
    fill: #ff2ecb;
}

.layout-line .icon-rect-nav:nth-child(1),
.layout-line .icon-rect-nav:nth-child(2),
.layout-line .icon-rect-nav:nth-child(3),
.layout-line .icon-rect-nav:nth-child(4),
.layout-line .icon-rect-nav:nth-child(5) {
    transform: translateY(-5px);
}

body.project-page {
  min-height: 100vh;
  background-color: transparent;
  color: #000;
  overflow-x: auto;
  overflow-y: hidden;
}

.project-page-artwork {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: max-content;
  min-width: 100%;
  height: 100vh;
  padding: 72px 24px 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
}

.project-page-artwork img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: calc(100vh - 120px);
  max-width: none;
  object-fit: contain;
  scroll-snap-align: none;
}

.project-page-artwork .project-animation {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: calc(100vh - 120px);
  max-width: none;
  object-fit: contain;
  scroll-snap-align: none;
}

.collection-page .project-page-artwork {
  gap: 5px;
  padding-left: clamp(38px, 5vw, 64px);
  padding-right: clamp(38px, 5vw, 64px);
}

/* Alle Bilder und Animationen teilen sich dieselbe Fläche wie die 1897-Animation */
.project-page-artwork:not(.cd-artwork) img,
.collection-page .project-page-artwork .project-animation {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  margin-left: 0;
  margin-right: 0;
  object-fit: contain;
}

.project-page-artwork.cd-artwork {
  top: 0;
}

.project-page-artwork.cd-artwork img {
  width: auto;
  height: calc(100vh - 120px);
  max-width: none;
}

.rote-lichter-page {
  --rote-lichter-width: max(528px, calc(141.45vh - 170px));
}

.rote-lichter-page .project-page-artwork.cd-artwork img {
  transform: scale(1.2);
  margin-left: max(0px, calc((100vw - var(--rote-lichter-width)) / 2));
}

.rote-lichter-player {
  flex: 0 0 auto;
  align-self: center;
  width: var(--rote-lichter-width);
  margin: 0 0 0 10px;
}

.rote-lichter-player p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.2;
}

.rote-lichter-player iframe {
  display: block;
  width: 100%;
  height: 228px;
  border: 0;
  border-radius: 12px;
}

.dopaminmangel-page .project-page-artwork.cd-artwork img {
  transform: scale(1.2);
  margin-left: max(0px, calc((100vw - var(--dopaminmangel-width)) / 2));
}

.dopaminmangel-page {
  --dopaminmangel-width: max(528px, calc(141.45vh - 170px));
}

.dopaminmangel-player {
  flex: 0 0 auto;
  align-self: center;
  width: var(--dopaminmangel-width);
  margin: 0 0 0 10px;
}

.dopaminmangel-player p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.2;
}

.dopaminmangel-player iframe {
  display: block;
  width: 100%;
  height: 228px;
  border: 0;
  border-radius: 12px;
}

.ackro-page .project-page-artwork {
  gap: 5px;
  padding: 72px 0 0 clamp(38px, 5vw, 64px);
  clip-path: inset(0 clamp(38px, 5vw, 64px));
}

.ackro-page .project-page-artwork img:first-child {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  object-fit: contain;
  margin-left: 0;
  margin-right: 0;
}

.ackro-page .project-page-artwork img:nth-child(2) {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  object-fit: contain;
  margin-left: 0;
  margin-right: 0;
}

.ackro-page .project-page-artwork img:last-child {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  margin-left: 0;
}

.ae-page .project-page-artwork {
  gap: 5px;
  padding: 72px clamp(38px, 5vw, 64px) 0;
}

.ae-page .project-page-artwork img:first-child {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  object-fit: contain;
  margin-left: 0;
  margin-right: 0;
}

.ae-page .project-page-artwork img:last-child {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  object-fit: contain;
  margin-left: 0;
  margin-right: 0;
}

.phenomenology-page .project-page-artwork {
  gap: 5px;
  padding: 72px clamp(38px, 5vw, 64px) 0;
}

.phenomenology-page .project-animation {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  object-fit: contain;
  margin-left: 0;
}

.phenomenology-page .project-page-artwork img:first-child {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  object-fit: contain;
  margin-left: 0;
  margin-right: 0;
}

.phenomenology-page .project-page-artwork img:not(:first-child) {
  margin-left: 0;
}

body:not(.ackro-page) .project-page-artwork img:first-child {
  width: calc(100vw - clamp(76px, 10vw, 128px));
  max-width: calc(100vw - clamp(76px, 10vw, 128px));
  height: calc(100vh - 110px);
  object-fit: contain;
  margin-left: 0;
  margin-right: 0;
}

/* Scrollen ist deaktiviert, gewechselt wird über die Pfeile */
body.project-page,
.project-page .project-page-artwork,
.project-page .rotor-gallery {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.page-arrow {
  position: fixed;
  top: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.page-arrow[hidden] {
  display: none;
}

.page-arrow-prev {
  left: 12px;
}

.page-arrow-next {
  right: 12px;
}

.page-arrow:hover {
  background: transparent;
  filter: drop-shadow(0 0 4px rgba(255, 46, 203, 0.95)) drop-shadow(0 0 10px rgba(255, 46, 203, 0.8)) drop-shadow(0 0 20px rgba(255, 46, 203, 0.55));
  transform: translateY(calc(-50% - 1px));
}

.page-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Schwarzes Band hinter den Bildern: Bildhöhe, volle Displaybreite */
body.project-page:not(.rote-lichter-page):not(.dopaminmangel-page)::before {
  content: '';
  position: fixed;
  top: var(--band-top, 91px);
  bottom: 19px;
  left: 0;
  width: 100vw;
  background: #000;
  pointer-events: none;
  transition: top 0.25s ease;
}

.project-page .rotor-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: transparent;
}

.project-page .rotor-nav .mainnav_list {
  justify-content: space-between;
}

.project-page .rotor-nav .mainnav_listitem a,
.project-page .rotor-info summary {
  color: #000;
}

.project-page .rotor-nav .mainnav_listitem a:hover {
  text-shadow: 0 0 8px rgba(255, 46, 203, 0.95), 0 0 18px rgba(255, 46, 203, 0.8), 0 0 32px rgba(255, 46, 203, 0.55);
}

.project-page .rotor-info {
  position: static;
}

.project-page .rotor-info summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #000 !important;
  font: 700 clamp(1.8rem, 2.4vw, 3rem)/1 'ROM', Helvetica, sans-serif;
  cursor: pointer;
  list-style: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: none !important;
}

.project-page .rotor-info summary::-webkit-details-marker {
  display: none;
}

.project-page .rotor-info summary:hover {
  color: #000 !important;
  background: transparent !important;
  text-shadow: 0 0 8px rgba(255, 46, 203, 0.95), 0 0 18px rgba(255, 46, 203, 0.8), 0 0 32px rgba(255, 46, 203, 0.55);
  transform: translateY(-1px);
}

.project-page .rotor-info summary:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

.project-page .rotor-nav .mainnav_listitem:has(.mute-toggle) {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-page .mute-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.project-page .mute-toggle:hover {
  background: transparent;
  filter: drop-shadow(0 0 4px rgba(255, 46, 203, 0.95)) drop-shadow(0 0 10px rgba(255, 46, 203, 0.7));
  transform: translateY(-1px);
}

.project-page .mute-toggle:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

.project-page .mute-toggle[aria-pressed="true"] .mute-waves,
.project-page .mute-toggle[aria-pressed="false"] .mute-slash {
  display: none;
}

.project-page .rotor-description {
  position: absolute;
  top: 56px;
  left: 20px;
  right: 20px;
  z-index: 101;
  box-sizing: border-box;
  padding: 10px 0;
  background: #fff !important;
  color: #000 !important;
  font: 400 clamp(0.75rem, 1vw, 1rem)/1.3 'ROM', Helvetica, sans-serif;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.project-page .rotor-description p {
  margin: 0;
}

.project-page .rotor-info[open] .rotor-description {
  opacity: 1;
  visibility: visible;
}

/* ==========================================
   SPÄTER ERSCHEINENDE NAVIGATION
   ========================================== */

.mainnav {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.mainnav.visible {
  opacity: 1;
  visibility: visible;
}

/* ==========================================
   NAME ANIMATION & HOME LAYOUT
   ========================================== */

.home-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 70px);
  width: 100vw;
  max-width: 100vw;
  max-height: calc(100vh - 70px);
  overflow: hidden !important;
}

.work-body .home-container {
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
  padding: 65px;
}

.typewriter-box {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.typewriter-wrapper {
  font-family: 'ROM', Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 4.5rem);
  
  display: block;
  margin: 0 auto;
  white-space: nowrap;
  width: 0;
  
  animation: 
    typing 2s steps(22, end) 0s forwards,
    allowOverflow 0.1s linear 2s forwards;
}

.first-name {
  display: inline-block;
  animation: slideLeft 1.2s cubic-bezier(0.65, 0, 0.35, 1) 2.2s forwards;
}

.last-name {
  display: inline-block;
  animation: slideRight 1.2s cubic-bezier(0.65, 0, 0.35, 1) 2.2s forwards;
}

.middle-name {
  display: inline-block;
  animation: fadeOutName 0.3s ease-in-out 7.2s forwards;
}

/* ==========================================
   PROJECTS ROTATING CIRCLE
   ========================================== */

.projects-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  
  animation: rotateCircle6Times 4s ease-in forwards 3.2s;
}

.project-item {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  
  --radius: clamp(140px, 22vw, 280px);
  
  animation: 
    popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards var(--delay, 3.2s),
    counterRotateItem 4s ease-in forwards 3.2s,
    spiralToCenter 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards var(--collapse-delay, 6.0s),
    explosiveDisperse 0.3s cubic-bezier(0.05, 0.9, 0.1, 1) forwards 7.2s,
    floatRandomly var(--float-duration, 14s) ease-in-out infinite alternate 7.5s;
}

.project-item img {
  display: block;
  width: clamp(40px, 6vw, 80px);
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  cursor: pointer;
  z-index: 10;
  filter: blur(0px);
  opacity: 1;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

/* Fixiert in der exakten Display-Mitte beim Hover */
.project-title {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  
  font-family: 'ROM-Bold', Helvetica, sans-serif !important;
  font-weight: 700 !important;
  --project-title-font-size: clamp(1.8rem, 2.4vw, 3rem);
  font-size: var(--project-title-font-size) !important;
  color: #ff2ecb !important;
  text-shadow: 0 0 4px rgba(255, 46, 203, 0.7), 0 0 7px rgba(255, 46, 203, 0.45);
  text-align: center !important;
  
  box-sizing: border-box;
  max-width: calc(100vw - 48px);
  white-space: normal !important;
  overflow-wrap: break-word;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
  z-index: 9999 !important;
  background: transparent !important;
  padding: 12px 24px !important;
}

.work-body .projects-circle:not(.linear-mode) .project-title {
  --project-title-font-size: clamp(0.72rem, 0.96vw, 1.2rem);
  font-size: var(--project-title-font-size) !important;
}

.project-item:hover {
  animation-play-state: paused !important;
  z-index: 999;
}

.project-item:hover img {
  filter: blur(0px) !important;
  opacity: 1 !important;
  transform: scale(1);
}

.project-item:hover .project-title {
  opacity: 1 !important;
  visibility: visible !important;
}

.projects-circle:has(.project-item img:hover) .project-item:not(:hover) img {
  filter: blur(6px);
  opacity: 0.3;
}

.project-item:nth-child(1) { 
  --delay: 3.2s; --collapse-delay: 6.00s; 
  --target-x: -28vw; --target-y: -15vh; 
  --float-x1: -3vw;  --float-y1: -6vh;
  --float-x2:  5vw;  --float-y2:  8vh;
  --float-x3: -2vw;  --float-y3:  10vh;
  --float-duration: 13.5s;
}

.project-item:nth-child(2) { 
  --delay: 3.4s; --collapse-delay: 6.00s; 
  --target-x:  28vw; --target-y: -18vh; 
  --float-x1:  4vw;  --float-y1:  8vh;
  --float-x2: -5vw;  --float-y2: -4vh;
  --float-x3:  3vw;  --float-y3:  6vh;
  --float-duration: 17.2s;
}

.project-item:nth-child(3) { 
  --delay: 3.6s; --collapse-delay: 6.00s; 
  --target-x: -30vw; --target-y:  12vh; 
  --float-x1: -4vw;  --float-y1: -10vh;
  --float-x2:  4vw;  --float-y2:  8vh;
  --float-x3: -3vw;  --float-y3: -4vh;
  --float-duration: 11.8s;
}

.project-item:nth-child(4) { 
  --delay: 3.8s; --collapse-delay: 6.00s; 
  --target-x:  30vw; --target-y:  18vh; 
  --float-x1:  4vw;  --float-y1: -8vh;
  --float-x2: -4vw;  --float-y2:  6vh;
  --float-x3:  5vw;  --float-y3: -8vh;
  --float-duration: 15.4s;
}

.project-item:nth-child(5) { 
  --delay: 4.0s; --collapse-delay: 6.00s; 
  --target-x: -14vw; --target-y:  24vh; 
  --float-x1: -5vw;  --float-y1: -10vh;
  --float-x2:  6vw;  --float-y2: -4vh;
  --float-x3: -3vw;  --float-y3:  8vh;
  --float-duration: 18.0s;
}

.project-item:nth-child(6) { 
  --delay: 4.2s; --collapse-delay: 6.00s; 
  --target-x:  14vw; --target-y: -10vh; 
  --float-x1:  3vw;  --float-y1: -8vh;
  --float-x2: -5vw;  --float-y2:  10vh;
  --float-x3:  6vw;  --float-y3: -3vh;
  --float-duration: 12.6s;
}

.project-item:nth-child(7) { 
  --delay: 4.4s; --collapse-delay: 6.00s; 
  --target-x:  -4vw; --target-y: -22vh; 
  --float-x1: -4vw;  --float-y1:  8vh;
  --float-x2:  6vw;  --float-y2: -5vh;
  --float-x3: -3vw;  --float-y3:  10vh;
  --float-duration: 16.0s;
}

.project-item:nth-child(8) { 
  --delay: 4.6s; --collapse-delay: 6.00s; 
  --target-x:  32vw; --target-y:   2vh; 
  --float-x1:  5vw;  --float-y1: -12vh;
  --float-x2: -6vw;  --float-y2:  6vh;
  --float-x3:  3vw;  --float-y3: -10vh;
  --float-duration: 14.1s;
}

/* ==========================================
   KEYFRAME ANIMATIONS
   ========================================== */

@keyframes typing {
  from { width: 0; overflow: hidden; }
  to { width: 100%; overflow: hidden; }
}

@keyframes allowOverflow {
  to { overflow: visible; }
}

@keyframes slideLeft {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-100vw); opacity: 0; }
}

@keyframes slideRight {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(100vw); opacity: 0; }
}

@keyframes popIn {
  0% { opacity: 0; filter: blur(4px); }
  100% { opacity: 1; filter: blur(0); }
}

@keyframes rotateCircle6Times {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-2160deg); }
}

@keyframes counterRotateItem {
  0% {
    transform: 
      translate(-50%, -50%) 
      rotate(var(--angle)) 
      translateY(calc(-1 * var(--radius))) 
      rotate(calc(-1 * var(--angle))) 
      rotate(0deg);
  }
  100% {
    transform: 
      translate(-50%, -50%) 
      rotate(var(--angle)) 
      translateY(calc(-1 * var(--radius))) 
      rotate(calc(-1 * var(--angle))) 
      rotate(2160deg);
  }
}

@keyframes spiralToCenter {
  0% {
    transform: 
      translate(-50%, -50%) 
      rotate(var(--angle)) 
      translateY(calc(-1 * var(--radius))) 
      rotate(calc(-1 * var(--angle)));
  }
  100% {
    transform: 
      translate(-50%, -50%) 
      rotate(calc(var(--angle) - 180deg)) 
      translateY(0px) 
      rotate(calc(-1 * (var(--angle) - 180deg)));
  }
}

@keyframes fadeOutName {
  to { opacity: 0; visibility: hidden; }
}

@keyframes explosiveDisperse {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
  }
  60% {
      transform: translate(-50%, -50%) translate(clamp(-40vw, calc(var(--target-x) * 1.05), 40vw), clamp(-35vh, calc(var(--target-y) * 1.05), 35vh)) rotate(0deg) scale(calc(var(--float-scale, 4) * 1.05));
  }
  100% {
      transform: translate(-50%, -50%) translate(clamp(-40vw, var(--target-x), 40vw), clamp(-35vh, var(--target-y), 35vh)) rotate(0deg) scale(var(--float-scale, 4));
  }
}

@keyframes floatRandomly {
  0% {
    transform: translate(-50%, -50%) translate(clamp(-40vw, var(--target-x), 40vw), clamp(-35vh, var(--target-y), 35vh)) scale(var(--float-scale, 4));
  }
  25% {
    transform: translate(-50%, -50%) translate(clamp(-40vw, calc(var(--target-x) + var(--float-x1)), 40vw), clamp(-35vh, calc(var(--target-y) + var(--float-y1)), 35vh)) scale(var(--float-scale, 4));
  }
  50% {
    transform: translate(-50%, -50%) translate(clamp(-40vw, calc(var(--target-x) + var(--float-x2)), 40vw), clamp(-35vh, calc(var(--target-y) + var(--float-y2)), 35vh)) scale(calc(var(--float-scale, 4) * 0.96));
  }
  75% {
    transform: translate(-50%, -50%) translate(clamp(-40vw, calc(var(--target-x) + var(--float-x3)), 40vw), clamp(-35vh, calc(var(--target-y) + var(--float-y3)), 35vh)) scale(calc(var(--float-scale, 4) * 1.04));
  }
  100% {
    transform: translate(-50%, -50%) translate(clamp(-40vw, var(--target-x), 40vw), clamp(-35vh, var(--target-y), 35vh)) scale(var(--float-scale, 4));
  }
}

@keyframes floatCircular {
  0% {
    transform: translate(-50%, -50%) translate(var(--target-x), calc(var(--target-y) - var(--orbit-y))) scale(var(--float-scale-current));
  }
  12.5% {
    transform: translate(-50%, -50%) translate(calc(var(--target-x) + var(--orbit-x) * 0.707), calc(var(--target-y) - var(--orbit-y) * 0.707)) scale(var(--float-scale-current));
  }
  25% {
    transform: translate(-50%, -50%) translate(calc(var(--target-x) + var(--orbit-x)), var(--target-y)) scale(var(--float-scale-current));
  }
  37.5% {
    transform: translate(-50%, -50%) translate(calc(var(--target-x) + var(--orbit-x) * 0.707), calc(var(--target-y) + var(--orbit-y) * 0.707)) scale(var(--float-scale-current));
  }
  50% {
    transform: translate(-50%, -50%) translate(var(--target-x), calc(var(--target-y) + var(--orbit-y))) scale(var(--float-scale-current));
  }
  62.5% {
    transform: translate(-50%, -50%) translate(calc(var(--target-x) - var(--orbit-x) * 0.707), calc(var(--target-y) + var(--orbit-y) * 0.707)) scale(var(--float-scale-current));
  }
  75% {
    transform: translate(-50%, -50%) translate(calc(var(--target-x) - var(--orbit-x)), var(--target-y)) scale(var(--float-scale-current));
  }
  87.5% {
    transform: translate(-50%, -50%) translate(calc(var(--target-x) - var(--orbit-x) * 0.707), calc(var(--target-y) - var(--orbit-y) * 0.707)) scale(var(--float-scale-current));
  }
  100% {
    transform: translate(-50%, -50%) translate(var(--target-x), calc(var(--target-y) - var(--orbit-y))) scale(var(--float-scale-current));
  }
}

@media (max-width: 768px) {

  .home-container {
    height: calc(100vh - 60px);
  }

  .typewriter-wrapper {
    font-size: clamp(1.4rem, 6vw, 2.5rem);
  }
}

/* ==========================================
   ZENTRale GRÖSSEN-STEUERUNG FÜR DEN FLOAT SPACE
   ========================================== */
:root {
  --float-scale: 4;         /* Desktop Grösse */
  --float-scale-mobile: 3.2; /* Mobile Grösse */
}

/* ==========================================
   ÜBERSPRINGEN DER INTRO-ANIMATION (SKIP)
   ========================================== */

html.skip-animation .typewriter-wrapper {
  display: none !important;
}

html.skip-animation .projects-circle {
  animation: none !important;
  transform: rotate(0deg) !important;
}

html.skip-animation .project-item {
  opacity: 1 !important;
  transform: translate(-50%, -50%) translate(var(--target-x), var(--target-y)) scale(var(--float-scale));
  animation: floatRandomly calc(var(--float-duration, 14s) * 0.25) ease-in-out infinite alternate !important;
}

/* ==========================================
   WORK-SEITE: KEINE INTRO-ANIMATIONEN, NUR SCHWEBEN
   ========================================== */

.work-body .projects-circle {
  animation: none !important;
  transform: rotate(0deg) !important;
}

.work-body .project-item {
  --float-scale-current: var(--float-scale);
  opacity: 1 !important;
  transform: translate(-50%, -50%) translate(var(--target-x), var(--target-y)) scale(var(--float-scale));
  animation: floatRandomly calc(var(--float-duration, 14s) * 0.375) ease-in-out infinite alternate !important;
}

.work-body .project-item.circular-float {
  animation-name: floatCircular !important;
}

.work-body .project-track {
  display: contents;
}

.work-body .projects-circle.linear-mode {
  position: fixed;
  inset: 65px 0;
  z-index: 50;
  display: flex;
  width: 100vw;
  height: auto;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  gap: 0;
  animation: none !important;
  transform: none !important;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  scrollbar-width: none;
}

.work-body .projects-circle.linear-mode::-webkit-scrollbar {
  display: none;
}

.work-body .projects-circle.linear-mode .project-track {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 30px;
  width: max-content;
  height: 100%;
  box-sizing: border-box;
  padding: 0 0 0 30px;
}

.work-body .project-track.loop-copy {
  display: none;
}

.work-body .projects-circle.linear-mode .project-track.loop-copy {
  display: flex;
}

.work-body .projects-circle.linear-mode .project-item {
  position: relative;
  top: auto;
  left: auto;
  display: flex;
  flex: 0 0 clamp(220px, 34vw, 420px);
  width: clamp(220px, 34vw, 420px);
  height: 100%;
  align-items: flex-end;
  justify-content: center;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  scroll-snap-align: start;
}

.work-body .projects-circle.linear-mode .project-item > a {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  align-self: flex-end;
}

.work-body .projects-circle.linear-mode .project-item img {
  display: block;
  width: 100%;
  max-width: calc(100vw - 48px);
  height: auto;
  max-height: none;
  object-fit: contain;
  transform: none;
  filter: blur(0);
  opacity: 1;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.work-body .projects-circle.linear-mode .project-item img:hover {
  filter: blur(0) !important;
  opacity: 1 !important;
  transform: none !important;
}

.work-body .projects-circle.linear-mode:has(.project-item img:hover) .project-item img:not(:hover) {
  filter: blur(6px);
  opacity: 0.3;
}

.work-body .projects-circle.linear-mode .project-title {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal !important;
  overflow-wrap: break-word;
  text-align: center !important;
  font-size: var(--project-title-font-size) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
  transform: translate(-50%, -50%) !important;
}

.work-body .projects-circle.linear-mode .project-item:has(img:hover) .project-title {
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 768px) {
  .work-body .projects-circle.linear-mode .project-item {
    width: clamp(220px, 72vw, 420px);
  }

  .work-body .projects-circle.linear-mode .project-item img {
    max-width: calc(100vw - 48px);
  }
}

.work-body .project-item:nth-child(3) img,
.work-body .project-item:nth-child(7) img,
.work-body .project-item:nth-child(8) img {
  width: clamp(56px, 8.4vw, 112px);
}

@media (max-width: 768px) {
  .work-body .project-item:nth-child(3) img,
  .work-body .project-item:nth-child(7) img,
  .work-body .project-item:nth-child(8) img {
    width: clamp(39.2px, 8.4vw, 63px);
  }
}

/* ==========================================
   ABOUT PAGE
   ========================================== */

.about-container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 70vh;
  padding: 20px;
  box-sizing: border-box;
}

.about-text {
  text-align: center;
  font-family: 'ROM-Regular', Helvetica, sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.35;
  color: #000;
  margin: 0;
}

.brand-name {
  font-family: 'ROM-Bold', Helvetica, sans-serif;
  font-weight: 700;
}

.about-text a {
    color: black;
    opacity: 1;
    text-decoration: none;
    font-family: 'ROM-Regular', Helvetica, sans-serif;
    font-weight: 400;
    transition: color 0.2s ease, transform 0.2s ease;
}

.about-text a:hover {
    color: #ff2ecb;
    text-shadow: 0 0 4px rgba(255, 46, 203, 0.7), 0 0 7px rgba(255, 46, 203, 0.45);
    opacity: 1;
    transform: translateY(-2px);
}

/* ==========================================
   MOBILE: LINEARE ANSICHT UND PROJEKTSEITEN UNTEREINANDER
   ========================================== */

@media (max-width: 768px) {
  .work-body .projects-circle.linear-mode {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
    touch-action: pan-y;
    overscroll-behavior: contain;
  }

  .work-body .projects-circle.linear-mode .project-track {
    flex-direction: column;
    width: 100%;
    height: auto;
    gap: 24px;
    padding: 24px 24px 0;
  }

  .work-body .projects-circle.linear-mode .project-item {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    scroll-snap-align: none;
  }

  .work-body .projects-circle.linear-mode .project-item img {
    max-width: 100%;
  }

  body.project-page .page-arrow {
    display: none !important;
  }

  body.project-page::before {
    display: none !important;
  }

  body.project-page main.project-page-artwork,
  body.project-page main.rotor-gallery {
    position: fixed !important;
    top: var(--band-top, 91px) !important;
    bottom: 19px !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 24px !important;
    width: 100vw !important;
    min-width: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding: 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    scroll-snap-type: none !important;
    clip-path: none !important;
    background: #000;
    transition: top 0.25s ease;
  }

  body.rote-lichter-page main.project-page-artwork,
  body.dopaminmangel-page main.project-page-artwork {
    background: transparent;
  }

  body.project-page main > img,
  body.project-page main > .project-animation {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    scale: none !important;
    object-fit: contain !important;
  }

  body.project-page main > aside {
    width: 100% !important;
    margin: 0 !important;
  }

  body.project-page .rotor-video-slide {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1997 / 2496;
    margin: 0 !important;
  }
}

@media (max-width: 768px) {
  .about-container {
    position: fixed;
    inset: 0;
    min-height: 0;
    padding: 70px 24px;
  }

  .about-text {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================
   FLOAT WORLD: GLITZERNDER PINKER HINTERGRUND
   ========================================== */

html:has(body.work-body:not(.linear-mode))::before,
body.work-body:not(.linear-mode)::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Wandernder Neon-Verlauf */
html:has(body.work-body:not(.linear-mode))::before {
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%) 0 0 / 250% 100%,
    linear-gradient(135deg, #ff10d8, #ff00a0, #ff5cf5, #d400ff, #ff2f9e, #ff10d8) 0 0 / 400% 400%,
    #ff10d8;
  animation: gradientDrift 10s linear infinite, glitterShimmer 1.2s ease-in-out infinite alternate;
}

/* Feiner Glitzer, sehr schnell */
body.work-body:not(.linear-mode)::before {
  background:
    radial-gradient(circle, #fff 0 0.5px, transparent 1px) 0 0 / 19px 23px,
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 0.5px, transparent 1px) 7px 11px / 29px 31px,
    radial-gradient(circle, rgba(255, 220, 250, 0.95) 0 0.6px, transparent 1.2px) 13px 5px / 41px 37px,
    radial-gradient(circle, #fff 0 0.7px, transparent 1.4px) 3px 17px / 59px 53px,
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 0.8px, transparent 1.6px) 29px 41px / 83px 89px;
  animation: glitterDrift 0.9s linear infinite, glitterTwinkle 0.35s steps(2, end) infinite alternate;
}

@keyframes gradientDrift {
  from {
    background-position: 150% 0, 0% 0%, 0 0;
  }
  to {
    background-position: -100% 0, 100% 100%, 0 0;
  }
}

@keyframes glitterDrift {
  from {
    background-position: 0 0, 7px 11px, 13px 5px, 3px 17px, 29px 41px;
  }
  to {
    background-position: 38px 46px, -51px 73px, 95px -69px, -115px 123px, 195px -137px;
  }
}

@keyframes glitterShimmer {
  from {
    filter: brightness(0.97) saturate(1.3);
  }
  to {
    filter: brightness(1.12) saturate(1.6);
  }
}

@keyframes glitterTwinkle {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.work-body:not(.linear-mode))::before,
  body.work-body:not(.linear-mode)::before {
    animation: none;
  }
}
