/* Reset und Basis-Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0a0a18;
  --bg-light: #1a1b4b;
  --color-accent: #4a2fbd;
  --color-accent-2: #2f80ed;
  --color-accent-3: #9b51e0;
  --text-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

html {
  height: 100%;
  background: radial-gradient(circle at 50% 50%, var(--bg-light), var(--bg-dark));
}

body {
  min-height: 100vh;
  width: 100%;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  perspective: 1000px;
  overflow: hidden;
  position: relative;
  background: 
    radial-gradient(circle at 0% 0%, 
      rgba(74, 47, 189, 0.2) 0%,
      transparent 50%),
    radial-gradient(circle at 100% 0%, 
      rgba(47, 128, 237, 0.2) 0%,
      transparent 50%),
    radial-gradient(circle at 50% 100%, 
      rgba(155, 81, 224, 0.2) 0%,
      transparent 50%),
    radial-gradient(circle at 50% 50%, 
      var(--bg-light) 0%,
      var(--bg-dark) 100%);
  animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% { 
    background-position: 
      0% 0%,
      100% 0%,
      50% 100%,
      50% 50%;
  }
  50% { 
    background-position: 
      20% 20%,
      80% 20%,
      50% 80%,
      50% 50%;
  }
}

/* Interaktiver Hintergrund */
.parallax-bg {
  position: fixed;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  z-index: 1;
  pointer-events: none;
  animation: bgRotate 120s linear infinite;
  mix-blend-mode: plus-lighter;
  opacity: 0.8;
  will-change: transform;
  transform: translateZ(0);
}

.parallax-bg div {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  mix-blend-mode: plus-lighter;
  will-change: transform, filter;
  transform: translateZ(0);
}

.parallax-bg div:nth-child(1) {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle at center,
    rgba(74, 47, 189, 0.3),
    rgba(74, 47, 189, 0) 70%
  );
  top: 20%;
  left: 10%;
  filter: blur(80px);
  animation: blobFloat 25s ease-in-out infinite;
  mix-blend-mode: screen;
}

.parallax-bg div:nth-child(2) {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at center,
    rgba(47, 128, 237, 0.25),
    rgba(47, 128, 237, 0) 70%
  );
  top: 50%;
  right: 15%;
  filter: blur(100px);
  animation: blobFloat 30s ease-in-out infinite reverse;
  mix-blend-mode: screen;
}

.parallax-bg div:nth-child(3) {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at center,
    rgba(155, 81, 224, 0.2),
    rgba(155, 81, 224, 0) 70%
  );
  bottom: 20%;
  left: 30%;
  filter: blur(60px);
  animation: blobFloat 35s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes bgRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes blobFloat {
  0%, 100% { 
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    border-radius: 50%;
  }
  33% { 
    transform: translate3d(100px, -100px, 0) scale(1.4) rotate(120deg);
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  }
  66% { 
    transform: translate3d(-100px, 100px, 0) scale(0.6) rotate(240deg);
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  }
}

@keyframes bgRotate {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(0, 0, 0) rotate(180deg) scale(1.1); }
  100% { transform: translate3d(0, 0, 0) rotate(360deg) scale(1); }
}

/* Container mit 3D-Effekten */
.container {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 40px;
  width: 90%;
  max-width: 600px;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg);
  transition: transform 0.5s cubic-bezier(0.13, 0.53, 0.38, 0.97);
  border: 1px solid var(--card-border);
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.05),
    0 10px 30px rgba(0,0,0,0.2),
    0 30px 60px rgba(0,0,0,0.3),
    inset 0 0 60px rgba(74, 47, 189, 0.05);
  animation: containerFloat 3s ease-in-out infinite;
}

.container::before,
.container::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 30px;
  background: linear-gradient(
    45deg,
    var(--color-accent),
    var(--color-accent-2),
    var(--color-accent-3),
    transparent,
    transparent
  );
  z-index: -1;
  opacity: 0.3;
  transition: opacity 0.3s ease;
  animation: borderGlow 5s linear infinite;
}

.container::after {
  filter: blur(10px);
}

.container:hover {
  transform: perspective(1000px) rotateX(2deg);
}

.container:hover::before,
.container:hover::after {
  opacity: 0.5;
}

.container h2 {
  color: var(--text-color);
  font-size: 3rem;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    #fff,
    rgba(255,255,255,0.8)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    0 0 30px rgba(255,255,255,0.2),
    0 0 60px rgba(74, 47, 189, 0.3);
  transform: translateZ(20px);
  animation: titlePulse 4s ease-in-out infinite;
}

@keyframes containerFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50% { transform: translateY(-10px) rotateX(1deg); }
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

@keyframes titlePulse {
  0%, 100% { 
    opacity: 1;
    text-shadow: 
      0 0 30px rgba(255,255,255,0.2),
      0 0 60px rgba(74, 47, 189, 0.3);
  }
  50% { 
    opacity: 0.8;
    text-shadow: 
      0 0 40px rgba(255,255,255,0.3),
      0 0 80px rgba(74, 47, 189, 0.4);
  }
}

/* Projektliste mit 3D-Karten */
ul {
  list-style: none;
  display: grid;
  gap: 20px;
  perspective: 1000px;
  transform-style: preserve-3d;
  transform: translateZ(10px);
}

ul li {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

ul li a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: 
    transform 0.3s cubic-bezier(0.2, 0, 0.2, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  transform-style: preserve-3d;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  will-change: transform, background-color, border-color, box-shadow;
}

ul li a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255,255,255,0.1),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

ul li a::after {
  content: '→';
  margin-left: auto;
  font-size: 1.2em;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.3s ease;
}

ul li:hover {
  transform: scale(1.02) translateZ(20px);
}

ul li:hover a {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 
    0 10px 20px rgba(0,0,0,0.15),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  padding-right: 30px;
}

ul li:hover a::before {
  transform: translateX(100%);
}

ul li:hover a::after {
  opacity: 1;
  transform: translateX(0);
}

/* Dynamische Hover-States */
@media (hover: hover) {
  ul li a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
  }

  .container:hover ul li:not(:hover) {
    opacity: 0.7;
    transform: scale(0.98);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
    margin: 20px;
    width: calc(100% - 40px);
  }
  
  .container h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }

  ul li a {
    padding: 15px;
    font-size: 1rem;
  }
  
  .parallax-bg div {
    opacity: 0.5;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-2);
}
