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

/* Hide default cursor on desktop only */
@media (hover: hover) and (pointer: fine) {
    *,
    *::before,
    *::after {
        cursor: none !important;
    }
}

:root {
    /* Light Mode Colors */
    --light-bg: #ffffff;
    --light-bg-alt: #fafafa;
    --light-text: #0a2540;
    --light-text-light: #425466;
    --light-text-lighter: #8898aa;
    --light-border: #e6ebf1;
    --light-accent: #635bff;
    
    /* Dark Mode Colors */
    --dark-bg: #0a0a0a;
    --dark-bg-alt: #141414;
    --dark-text: #ffffff;
    --dark-text-light: #b8b8b8;
    --dark-text-lighter: #6b6b6b;
    --dark-border: #2a2a2a;
    --dark-accent: #635bff;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-2xl: 8rem;
    
    /* Typography */
    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Urbanist', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 3D Room Dimensions */
    --room-width: 100vw;
    --room-height: 100vh;
    --room-depth: 2000px;
}

/* Light Mode */
body.light-mode {
    --color-bg: var(--light-bg);
    --color-bg-alt: var(--light-bg-alt);
    --color-text: var(--light-text);
    --color-text-light: var(--light-text-light);
    --color-text-lighter: var(--light-text-lighter);
    --color-border: var(--light-border);
    --color-accent: var(--light-accent);
    background: var(--light-bg);
    color: var(--light-text);
}

/* Dark Mode */
body.dark-mode {
    --color-bg: var(--dark-bg);
    --color-bg-alt: var(--dark-bg-alt);
    --color-text: var(--dark-text);
    --color-text-light: var(--dark-text-light);
    --color-text-lighter: var(--dark-text-lighter);
    --color-border: var(--dark-border);
    --color-accent: var(--dark-accent);
    background: var(--dark-bg);
    color: var(--dark-text);
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Spafax-ähnlicher, animierter Gradient-Hintergrund für die Startseite */
/* Hintergrund-Styles für Index-Seite entfernt */

/* Allow scrolling on index.html for 3D zoom effect */
body:has(.journey-3d-container),
html:has(.journey-3d-container) {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

/* Also disable scrolling on journey container itself - außer auf Index */
.journey-3d-container:not(.index-scrollable) {
    overflow: hidden !important;
}

body.index-gradient .journey-3d-container {
    overflow: visible !important;
}

/* Disable scrolling on content-2d when in journey */
.journey-3d-container .content-2d {
    overflow: hidden !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
}

/* Main content for separate pages */
.main-content {
    padding-top: 100px;
    padding-bottom: var(--spacing-2xl);
    min-height: calc(100vh - 200px);
}

/* Typography - Headings use Urbanist */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001; /* Above menu (9999) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-cursor.active {
    opacity: 1;
    visibility: visible;
}

.cursor-dot {
    position: absolute;
    width: 0;
    height: 0;
    background: var(--color-text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    will-change: transform;
    opacity: 0;
    z-index: 10000;
    display: none;
}

.cursor-outline {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: border-width 0.2s ease;
    will-change: transform, width, height;
    opacity: 1;
    z-index: 10001; /* Above menu */
    box-sizing: border-box;
}

/* Cursor color: white in dark mode, black in light mode */
body.dark-mode .cursor-outline {
    border-color: #ffffff;
}

body.light-mode .cursor-outline {
    border-color: #000000;
}

.custom-cursor.hover .cursor-dot {
    width: 0;
    height: 0;
    opacity: 0;
}

.custom-cursor.hover .cursor-outline {
    width: 60px;
    height: 60px;
    border-width: 2px;
}

.custom-cursor.link .cursor-outline {
    width: 50px;
    height: 50px;
    border-width: 2px;
}

.custom-cursor.button .cursor-outline {
    width: 80px;
    height: 80px;
    border-width: 2px;
}

.custom-cursor.work .cursor-outline,
.custom-cursor.project .cursor-outline {
    width: 100px;
    height: 100px;
    border-width: 2px;
}

/* Loading Screen - Max Milkin Style */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
    pointer-events: all;
}

.loading-screen.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.loader-content {
    text-align: center;
    width: 100%;
    max-width: 520px;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-text-wrapper {
    position: relative;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    margin: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    font-family: var(--font-heading);
    color: var(--color-text);
    pointer-events: none;
}

.loader-letter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    will-change: transform, opacity;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.loader-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.loader-skill {
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-text);
    font-family: var(--font-heading);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-percentage {
    font-size: 0.8rem;
    color: var(--color-text);
    font-weight: 500;
    letter-spacing: 0.2em;
    font-family: var(--font-heading);
}

@keyframes loaderTextReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes loadingProgress {
    to {
        width: 100%;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Grid Canvas für Index-Seite */
#grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* Gravity Canvas für Work */
#gravity-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* Flow Canvas für Projects */
#flow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* Lines Canvas für About */
#lines-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* Cloud Canvas für Contact */
#cloud-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* Ensure content is above canvas */
.journey-3d-container,
.content-2d,
.room-3d {
    position: relative;
    z-index: 1;
}

/* Performance optimizations */
.room-3d,
.journey-3d-scene {
    will-change: transform;
    transform-style: preserve-3d;
}

.work-item,
.project-card {
    will-change: transform;
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 10;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    z-index: 10001;
    opacity: 0.9;
}

.theme-toggle:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--color-accent);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(99, 91, 255, 0.2);
}

.toggle-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.toggle-icon .sun,
.toggle-icon .moon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 20px;
}

body.dark-mode .sun {
    opacity: 0;
    transform: translate(-50%, -50%) rotateY(90deg);
}

body.dark-mode .moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotateY(0deg);
}

body.light-mode .sun {
    opacity: 1;
    transform: translate(-50%, -50%) rotateY(0deg);
}

body.light-mode .moon {
    opacity: 0;
    transform: translate(-50%, -50%) rotateY(-90deg);
}

/* Header - Minimal, no bar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 10000;
    padding: 0;
    pointer-events: none; /* Allow clicks through, but children are clickable */
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-sm);
    pointer-events: all;
}

.logo {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: -0.01em;
    position: fixed;
    top: var(--spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    cursor: pointer;
    background: var(--color-bg-alt);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    opacity: 0.9;
}

.logo:hover {
    color: var(--color-accent);
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--color-bg-alt);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    position: fixed;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    z-index: 10001;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
}

.nav-toggle:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: var(--color-accent);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    display: block;
    position: absolute;
    transform-origin: center;
}

.nav-toggle span:nth-child(1) {
    top: 8px;
}

.nav-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.nav-toggle span:nth-child(3) {
    bottom: 8px;
}

/* Hamburger to X animation */
.nav-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.nav-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Sanfte Fade-In/Fade-Out Animation für Overlay */
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease,
        background 0.35s ease,
        backdrop-filter 0.35s ease;
}

.nav-links.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.nav-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(99, 91, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.nav-links.active::before {
    opacity: 1;
}

.nav-link {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 4px 0;
    cursor: pointer;
    transform-style: preserve-3d;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(99, 91, 255, 0.5);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
    transform: translateY(-5px) scale(1.05);
    text-shadow: 0 0 20px rgba(99, 91, 255, 0.3);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 3D Journey Container */
.journey-3d-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    perspective: 2000px;
    perspective-origin: center center;
    overflow: visible;
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    background: transparent;
}

/* Auf Index-Seite: Container muss scrollbar sein */
body.index-gradient .journey-3d-container {
    position: relative;
    height: auto;
    min-height: 100vh;
    pointer-events: auto;
}

.journey-3d-scene {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    /* Transition removed - controlled by JavaScript for smoother animation */
    will-change: transform;
    perspective: 2000px;
}

/* 3D Rooms */
.room-3d {
    position: absolute;
    width: var(--room-width);
    height: var(--room-height);
    transform-style: preserve-3d;
    /* Transition removed - controlled by JavaScript for smoother animation */
    will-change: transform, opacity;
    opacity: 1;
    visibility: visible;
    z-index: 2;
    top: 0;
    left: 0;
}

/* Room Walls */
.room-wall {
    position: absolute;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    opacity: 0.3;
}

.wall-front {
    width: var(--room-width);
    height: var(--room-height);
    transform: translateZ(calc(var(--room-depth) / 2));
    background: transparent;
    border: none;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wall-back {
    width: var(--room-width);
    height: var(--room-height);
    transform: translateZ(calc(var(--room-depth) / -2)) rotateY(180deg);
}

.wall-left {
    width: var(--room-depth);
    height: var(--room-height);
    transform: rotateY(-90deg) translateZ(calc(var(--room-width) / 2));
}

.wall-right {
    width: var(--room-depth);
    height: var(--room-height);
    transform: rotateY(90deg) translateZ(calc(var(--room-width) / 2));
}

.wall-top {
    width: var(--room-width);
    height: var(--room-depth);
    transform: rotateX(90deg) translateZ(calc(var(--room-height) / 2));
}

.wall-bottom {
    width: var(--room-width);
    height: var(--room-depth);
    transform: rotateX(-90deg) translateZ(calc(var(--room-height) / 2));
}

/* 2D Content on Walls */
.content-2d {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) 0;
    transform: translateZ(1px);
    overflow-y: auto;
    overflow-x: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform, opacity;
    position: relative;
    z-index: 3;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}

/* Disable scrolling on content-2d when in journey container */
.journey-3d-container .content-2d {
    overflow: hidden !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
}

.content-2d::-webkit-scrollbar {
    width: 8px;
}

.content-2d::-webkit-scrollbar-track {
    background: transparent;
}

.content-2d::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

/* Hero Room */
#hero-room {
    transform: translateZ(0);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Unsichtiger Bereich unter der Hero-Sektion, um Scrollen für den Namens-Übergang zu ermöglichen */
.hero-scroll-spacer {
    height: 600px;
}

.scroll-indicator {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin: var(--spacing-sm) 0 var(--spacing-md);
    opacity: 0.9;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero-badge {
    font-family: var(--font-heading);
    display: inline-block;
    padding: 8px 20px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Neue Hero Headline (wie spafax.com) */
.hero-headline {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 200;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--color-text);
    margin: 0 0 var(--spacing-md) 0;
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-headline {
    position: relative;
}

.hero-headline:hover {
    transform: translateY(-2px);
}

/* Name Section - erscheint beim Scrollen mit Farbstreifen-Animation */
.name-section {
    position: fixed;
    bottom: 20vh;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    width: 100%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

/* Farbstreifen-Welle, die sich in den Namen verwandelt */
.name-section::before {
    content: '';
    position: absolute;
    top: calc(50% + var(--wave-y, 0px));
    left: 50%;
    width: var(--wave-size, 0px);
    height: var(--wave-size, 0px);
    background: linear-gradient(135deg,
        rgba(255, 0, 150, 0.9) 0%,
        rgba(0, 255, 200, 0.9) 20%,
        rgba(99, 91, 255, 0.9) 40%,
        rgba(255, 120, 200, 0.9) 60%,
        rgba(0, 255, 200, 0.9) 80%,
        rgba(255, 0, 150, 0.9) 100%);
    border-radius: 50% 40% 60% 30%;
    transform: translate(-50%, -50%) rotate(var(--wave-rotation, 0deg));
    filter: blur(25px);
    opacity: var(--wave-opacity, 0);
    transition: all 0.1s linear;
    z-index: -1;
    animation: wavePulse 2s ease-in-out infinite;
}

@keyframes wavePulse {
    0%, 100% {
        border-radius: 50% 40% 60% 30%;
    }
    50% {
        border-radius: 40% 60% 30% 50%;
    }
}

.name-section.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.name-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 200;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #ffffff;
    margin: 0;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    filter: blur(0);
    transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chromatic Aberration Effekt wie auf dem Bild */
.name-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(255, 0, 100, 0.6);
    clip-path: inset(0 0 0 0);
    transform: translate(-1px, -1px);
    z-index: -1;
    filter: blur(0.5px);
}

.name-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(0, 255, 200, 0.6);
    clip-path: inset(0 0 0 0);
    transform: translate(1px, 1px);
    z-index: -1;
    filter: blur(0.5px);
}

.name-line {
    display: block;
    position: relative;
    cursor: default;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.name-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(99, 91, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.name-line:hover {
    color: var(--color-accent);
    text-shadow: 0 0 40px rgba(99, 91, 255, 0.5),
                 0 0 80px rgba(99, 91, 255, 0.3);
    transform: scale(1.05) translateY(-3px);
}

.name-line:hover::before {
    width: 400px;
    height: 400px;
    opacity: 1;
}

.name-line::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-accent) 50%, 
        transparent 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.name-line:hover::after {
    opacity: 0.6;
    animation: shimmer 2s ease-in-out infinite;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 200;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--color-text);
    margin: 0 0 var(--spacing-md) 0;
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.title-line {
    display: block;
    opacity: 1 !important; /* Force visible */
    transform: translateY(0) rotateX(0deg) !important; /* Force visible position */
    animation: fadeInUp3D 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    transform-style: preserve-3d;
}

.title-line:nth-child(1) {
    animation-delay: 0.4s;
}

.title-line:nth-child(2) {
    animation-delay: 0.6s;
}

.title-line::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: shimmer 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xl);
    opacity: 1 !important; /* Force visible */
    animation: fadeInUp 0.8s ease 0.8s forwards;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-cta {
    opacity: 1 !important; /* Force visible */
    animation: fadeInUp 0.8s ease 1s forwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px) translateZ(10px) rotateX(-5deg);
    box-shadow: 0 15px 40px rgba(99, 91, 255, 0.5);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(60px);
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #f5576c;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #667eea;
    bottom: 20%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes float3D {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotateZ(0deg);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1) rotateZ(120deg);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9) rotateZ(240deg);
    }
}

@keyframes float3D {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotateZ(0deg);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1) rotateZ(120deg);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9) rotateZ(240deg);
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp3D {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Work Room */
#work-room {
    transform: translateZ(calc(var(--room-depth) * 1));
}

.work-section {
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    opacity: 1 !important; /* Force visible */
    transform: translateY(0) !important; /* Force visible position */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-header.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.section-number {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--color-text-lighter);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.1em;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 200;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    text-align: center;
}

.section-description {
    font-size: 1.1rem;
    color: var(--color-text-light);
    font-weight: 300;
}

.work-grid {
    display: grid;
    gap: var(--spacing-2xl);
}

.work-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    border-radius: 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    opacity: 1 !important; /* Force visible */
    transform: translateY(0) rotateX(0deg) !important; /* Force visible position */
    will-change: transform, opacity;
}

.work-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 91, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.work-item:hover::before {
    left: 100%;
}

.work-item.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.work-item:hover {
    transform: translateY(-12px) rotateX(-5deg) rotateY(2deg) scale(1.03);
    box-shadow: 0 40px 100px rgba(99, 91, 255, 0.2);
    border-color: var(--color-accent);
}

.work-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-item:hover .work-image-wrapper {
    transform: rotateY(5deg) rotateX(-3deg) scale(1.05);
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 91, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    transform: scale(0.8) translateZ(-20px);
    transform-style: preserve-3d;
}

.work-item:hover .work-overlay {
    transform: scale(1) translateZ(0);
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-meta {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
}

.work-category {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.work-year {
    font-size: 0.85rem;
    color: var(--color-text-lighter);
    font-weight: 400;
}

.work-tags {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: 400;
    transition: all 0.3s ease;
}

.work-item:hover .tag {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.work-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.book-cover {
    width: 160px;
    height: 240px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateY(0deg);
}

.work-item:hover .book-cover {
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateZ(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.book-cover:hover {
    transform: scale(1.05);
}

.book-1 {
    background: linear-gradient(135deg, #635bff 0%, #8b7fff 100%);
}

.book-2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.book-3 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.book-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--spacing-xs);
}

.book-subtitle {
    font-size: 0.9rem;
    opacity: 0.95;
    text-align: center;
    font-weight: 500;
}

.work-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.work-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.work-author {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

.work-description {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    font-size: 1.05rem;
}

.work-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.work-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.work-link:hover {
    gap: 12px;
}

.work-link:hover::after {
    width: 100%;
}

.work-link svg {
    transition: transform 0.3s ease;
}

.work-link:hover svg {
    transform: translateX(4px);
}

/* Projects Room */
#projects-room {
    transform: translateZ(calc(var(--room-depth) * 2));
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.project-card {
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-bg-alt);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    opacity: 1 !important; /* Force visible */
    transform: translateY(0) rotateX(0deg) scale(1) !important; /* Force visible position */
    will-change: transform, opacity;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 91, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-12px) rotateX(-5deg) rotateY(-2deg) scale(1.05);
    box-shadow: 0 40px 100px rgba(99, 91, 255, 0.2);
    border-color: var(--color-accent);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.project-card:hover .project-icon {
    transform: scale(1.2) rotateY(15deg) rotateX(5deg) translateZ(20px);
}

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.project-card p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.project-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-light);
    opacity: 0.8;
    margin-bottom: var(--spacing-sm);
    font-weight: 400;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--color-text-light);
    opacity: 0.7;
}

.project-category {
    font-weight: 500;
}

.project-year {
    font-weight: 400;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.project-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.project-link:hover {
    gap: 12px;
}

.project-link:hover::after {
    width: 100%;
}

.project-link svg {
    transition: transform 0.3s ease;
}

.project-link:hover svg {
    transform: translateX(4px);
}

/* About Room */
#about-room {
    transform: translateZ(calc(var(--room-depth) * 3));
}

/* About Page Animations */
.about-text p {
    opacity: 1; /* Sichtbar von Anfang an */
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-text p.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade-in beim Scrollen (optional) */
.about-text p:not(.visible) {
    opacity: 0.3;
    transform: translateY(10px);
}

.about-text .lead {
    transition-delay: 0.1s;
}

.about-text p:nth-child(2) { transition-delay: 0.2s; }
.about-text p:nth-child(3) { transition-delay: 0.3s; }
.about-text p:nth-child(4) { transition-delay: 0.4s; }
.about-text p:nth-child(5) { transition-delay: 0.5s; }
.about-text p:nth-child(6) { transition-delay: 0.6s; }
.about-text p:nth-child(7) { transition-delay: 0.7s; }

/* Highlight Words Animation */
.highlight-word {
    position: relative;
    display: inline-block;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.highlight-word::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.highlight-word.visible::before {
    width: 100%;
    opacity: 0.6;
}

.highlight-word:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

.highlight-word:hover::before {
    opacity: 1;
    height: 3px;
}

/* Parallax Effect for About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

.about-text .lead {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #ffffff; /* Weiß */
    margin-bottom: var(--spacing-md);
    font-weight: 300;
}

.about-text p {
    color: #ffffff; /* Weiß */
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Contact Room */
#contact-room {
    transform: translateZ(calc(var(--room-depth) * 4));
}

.contact-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    min-height: auto;
}

/* Contact page specific - fit on screen without scrolling */
body:has(.contact-wrapper) .main-content {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
}

body:has(.contact-wrapper) .section-header {
    margin-bottom: var(--spacing-xl);
}

body:has(.contact-wrapper) .section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--spacing-sm);
}

body:has(.contact-wrapper) .section-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: var(--spacing-lg);
}

body:has(.contact-wrapper) .footer {
    display: none;
}

/* Floating Social Icons */


.contact-form-container {
    position: relative;
    padding: var(--spacing-2xl);
    border-radius: 0;
    border: none;
    backdrop-filter: blur(20px);
    box-shadow: none;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
}

.social-icons-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    background: transparent;
}

.social-icon-link:hover {
    color: var(--color-accent);
    transform: scale(1.1);
    background: rgba(var(--color-accent-rgb, 99, 91, 255), 0.1);
}

.social-icon-link svg {
    width: 24px;
    height: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.form-header h3 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    line-height: 1.2;
}

.form-header p {
    color: var(--color-text-light);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px 0 10px 0;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: clamp(1rem, 2vw, 1.1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group label {
    position: absolute;
    left: 0;
    top: 16px;
    font-size: 1rem;
    color: var(--color-text-lighter);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-24px) scale(0.85);
    color: var(--color-accent);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

.form-group-textarea {
    margin-top: var(--spacing-sm);
}

.form-group textarea {
    resize: none;
    min-height: 120px;
    padding-top: 24px;
}

.submit-btn {
    padding: 18px 40px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: var(--spacing-md);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 91, 255, 0.3);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(99, 91, 255, 0.5);
}

.submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-message {
    padding: var(--spacing-sm);
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
}

.form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-message.success {
    background: rgba(6, 255, 165, 0.1);
    color: #06ffa5;
    border: 1px solid rgba(6, 255, 165, 0.3);
}

.form-message.error {
    background: rgba(239, 71, 111, 0.1);
    color: #ef476f;
    border: 1px solid rgba(239, 71, 111, 0.3);
}

.contact-social {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.social-intro {
    color: var(--color-text-light);
    font-size: 1rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-bg-alt);
    transform-style: preserve-3d;
}

.social-link:hover {
    border-color: var(--color-accent);
    transform: translateX(4px) translateZ(10px) rotateY(-5deg);
    box-shadow: 0 8px 20px rgba(99, 91, 255, 0.2);
}

.social-link svg {
    stroke: var(--color-text);
    transition: var(--transition);
}

.social-link:hover svg {
    stroke: var(--color-accent);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 0.9rem;
    background: var(--color-bg);
    backdrop-filter: blur(20px);
    z-index: 999;
}

/* Height-based Responsiveness (wenn das Fenster sehr niedrig ist) */
@media (max-height: 750px) {
    /* Erlaube Scrollen, statt alles in 100vh zu quetschen */
    .journey-3d-container {
        position: relative;
        height: auto;
        pointer-events: auto;
        overflow: visible !important;
    }

    .journey-3d-scene {
        height: auto;
    }

    #hero-room,
    .room-3d {
        height: auto;
    }

    .content-2d {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-title {
        font-size: clamp(2.4rem, 5vw, 4.5rem);
    }

    .hero-subtitle {
        margin-bottom: var(--spacing-lg);
    }
}

@media (max-height: 550px) {
    .hero-title {
        font-size: clamp(2rem, 4.5vw, 3.5rem);
    }

    .hero-content {
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
    }

    .hero-subtitle {
        letter-spacing: 0.08em;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .work-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .custom-cursor {
        display: none;
    }
    
    *,
    *::before,
    *::after {
        cursor: auto !important;
    }
}

@media (max-width: 768px) {
    /* Mobile: Scrollen auf Index-Seite deaktivieren, damit Hero-Inhalt immer sichtbar bleibt */
    body:has(.journey-3d-container),
    html:has(.journey-3d-container) {
        overflow: hidden !important;
        height: 100vh;
        position: fixed;
        width: 100%;
    }
    
    /* Mobile: 3D-Journey deaktivieren, Inhalte flach und im Viewport fixieren */
    .journey-3d-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        perspective: none;
        transform: none;
        pointer-events: auto;
        overflow: hidden !important;
    }

    .journey-3d-scene {
        position: relative;
        height: auto;
        transform: none !important;
    }

    .room-3d {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform-style: flat !important;
        perspective: none !important;
    }
    
    /* Alle 3D-Wände auf Mobile komplett verstecken */
    .room-wall {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .wall-front {
        display: flex !important;
        position: relative !important;
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent !important;
        border: none !important;
        z-index: 10 !important;
    }
    
    .wall-back,
    .wall-left,
    .wall-right,
    .wall-top,
    .wall-bottom {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .journey-3d-container .content-2d {
        overflow: hidden !important;
        height: 100vh;
        padding: var(--spacing-lg) var(--spacing-md);
        padding-top: calc(70px + var(--spacing-md));
        transform: none !important;
        display: flex !important;
        align-items: flex-start;
        justify-content: center;
        transform-style: flat !important;
        perspective: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
    }
    
    .hero-content {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 20 !important;
        position: relative !important;
    }
    
    .hero-headline,
    .hero-subtitle,
    .hero-cta {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    
    /* Alle 3D-Transforms auf Mobile komplett deaktivieren */
    .journey-3d-scene,
    .room-3d,
    .content-2d,
    .room-wall,
    .wall-front {
        transform-style: flat !important;
        perspective: none !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Journey-Container komplett flach machen */
    .journey-3d-container {
        transform-style: flat !important;
        perspective: none !important;
    }

    /* Auf Mobile den Scroll-Spacer komplett entfernen,
       der wird nur für den 3D-Scroll-Effekt auf Desktop gebraucht */
    .scroll-spacer {
        height: 0 !important;
    }

    .theme-toggle {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        width: 48px;
        height: 48px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        padding: var(--spacing-md);
        padding-top: var(--spacing-lg);
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: fit-content;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        box-sizing: border-box;
    }
    
    .hero-headline {
        font-size: clamp(2rem, 7vw, 3rem);
        line-height: 1.05;
        margin-bottom: var(--spacing-sm);
    }
    
    .name-section {
        bottom: 5vh;
    }
    
    .name-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(0.5rem, 1.4vw, 0.65rem);
        letter-spacing: 0.04em;
        padding: 0 var(--spacing-sm);
        margin-bottom: var(--spacing-md);
        word-break: break-word;
        text-wrap: balance;
        text-align: center;
        line-height: 1.4;
    }
    
    .hero-cta {
        margin-top: var(--spacing-sm);
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .hero-cta .btn-primary {
        padding: 7px 14px !important;
        font-size: clamp(0.5rem, 1.3vw, 0.65rem) !important;
        white-space: nowrap;
        background: rgba(99, 91, 255, 0.9) !important;
        color: white !important;
        border: 1px solid rgba(99, 91, 255, 0.8) !important;
        max-width: 140px !important;
        margin: 0 auto !important;
        gap: 8px !important;
    }
    
    .hero-cta .btn-primary svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .hero-cta .btn-primary:hover {
        background: rgba(99, 91, 255, 1) !important;
        border-color: rgba(99, 91, 255, 1) !important;
    }
    
    
    .hero-cta {
        margin-top: var(--spacing-xs) !important;
        margin-bottom: 0 !important;
    }
    
    .floating-shape {
        display: none;
    }
    
    /* Footer auf Mobile für Index-Seite anpassen */
    body:has(.journey-3d-container) .footer {
        position: fixed;
        bottom: 0;
        z-index: 1000;
    }
}

/* Mobile Landscape (Querformat) - Text sichtbar machen und 3D-Elemente entfernen */
@media (max-width: 768px) and (orientation: landscape) {
    /* Alle 3D-Wände komplett verstecken */
    .room-wall,
    .wall-back,
    .wall-left,
    .wall-right,
    .wall-top,
    .wall-bottom {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .wall-front {
        display: flex !important;
        position: relative !important;
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent !important;
        border: none !important;
        z-index: 10 !important;
    }
    
    .journey-3d-container .content-2d {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 20 !important;
        display: flex !important;
    }
    
    .hero-content {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 30 !important;
        position: relative !important;
        display: flex !important;
    }
    
    .hero-headline,
    .hero-subtitle,
    .hero-cta {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .journey-3d-container .content-2d {
        padding-top: calc(60px + var(--spacing-sm));
    }
    
    .hero-content {
        padding-top: var(--spacing-md);
    }
    
    /* Noch kleinere Schriftgrößen für sehr kleine Screens */
    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: var(--spacing-xs);
    }
    
    .hero-subtitle {
        font-size: clamp(0.45rem, 1.3vw, 0.6rem);
        letter-spacing: 0.03em;
        margin-bottom: var(--spacing-sm);
        line-height: 1.3;
    }
    
    .hero-cta .btn-primary {
        padding: 6px 12px !important;
        font-size: clamp(0.45rem, 1.2vw, 0.6rem) !important;
        background: rgba(99, 91, 255, 0.9) !important;
        color: white !important;
        border: 1px solid rgba(99, 91, 255, 0.8) !important;
        max-width: 130px !important;
        margin: 0 auto !important;
        gap: 6px !important;
    }
    
    .hero-cta .btn-primary svg {
        width: 12px !important;
        height: 12px !important;
    }
    
    .hero-cta .btn-primary:hover {
        background: rgba(99, 91, 255, 1) !important;
        border-color: rgba(99, 91, 255, 1) !important;
    }
    
    .hero-cta {
        margin-top: var(--spacing-xs) !important;
        margin-bottom: 0 !important;
    }
}

/* Selection */
::selection {
    background-color: rgba(99, 91, 255, 0.3);
    color: var(--color-text);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
