@font-face {
  font-family: 'Orbitron';
  src: url('fonts/Orbitron-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 900; 
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'FuturText';
  src: url('fonts/ObliviousFont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root{
  --bg1: #06061a;
  --bg2: #08102a;
  --accent:  #6ee7ff;
  --accent-2:#9b6eff;
  --accent-3:#2fa1ff;
  --hover:#2ba3bb;
  --glass: rgba(255,255,255,0.06);
  --glass-strong: rgba(255,255,255,0.10);
  --border: rgba(255,255,255,0.12);
  --glass-blur: 10px;
  --radius: 14px;
}

*{box-sizing:border-box}
html{height:100%}

body{
  margin:0;
  min-height:100%;
  font-family:'Orbitron',sans-serif,Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(155,110,255,0.08), transparent),
              linear-gradient(180deg,var(--bg1),var(--bg2));
  color:#e6eef8;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:20px;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:flex-start;
  overflow-x: hidden;
  width: 100%;
  background-repeat: no-repeat; 
  background-size: cover;
  background-position: center; 
  background-attachment: fixed; 
}

/* Rotating Background Container */
.rotating-bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 150%;
  height: 150%;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.rotating-bg {
  position: absolute;
  top: 40%;
  left: 40%;
  width: 150vmax;
  height: 150vmax;
  background-image: url('background-upscaled2.jpg');
  background-size: cover;
  background-position: center;
  transform: translate(-50%, -50%);
}

/* Container (Hauptkarte) */
.card{
  width:100%;
  max-width:980px;
  background: linear-gradient(180deg, rgba(0,0,0,0.22), rgba(255,255,255,0.21));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding:16px;
  backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  box-shadow: 0 6px 30px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
}

header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 8px 15px 8px 20px;
  background: transparent;
  border: none;
  box-shadow: 
    0 0 0 1.5px var(--accent-3),
    0 0 12px var(--accent-3),
    inset 0 0 12px rgba(47, 161, 255, 0.15);

  display: grid;
  place-items: center;
  font-family: Orbitron, sans-serif;
  font-weight: 700;
  color: var(--accent-3);
  text-shadow: 0 0 10px var(--accent-3);
}

.logo-images {
  display: flex;
  gap: 8px;
  align-items: center;
}

.logo-images img {
  height: 42px;
  width: auto;
  display: block;
}
h1{font-size:1rem;margin:0;font-weight:600}
p.lead{margin:0;font-size:0.8rem;opacity:0.9}

/* Menu Navigation */
nav.menu{
  display:grid;
  gap:8px;
  overflow:visible;
  padding:10px 6px;
  margin-bottom:14px;
  grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 768px) {
  nav.menu {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  nav.menu {
    grid-template-columns: repeat(2, 1fr);
  }
}

.menu a{
  text-decoration:none;
  color:inherit;
  display: block;
}
.menu button{
  width:100%;
  min-width:86px;
  padding:10px 12px;
  border-radius: 8px 15px 8px 20px;
  border:1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05));
  color:#e6eef8;
  font-weight:600;
  font-size:0.9rem;
  display:flex;gap:8px;align-items:center;justify-content:center;
  backdrop-filter: blur(8px);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  cursor:pointer;
  white-space:nowrap;
  font-family:Orbitron, sans-serif;
}

.menu button:active{transform:translateY(1px)}
.menu button:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,0.45), 0 0 8px rgba(43,163,187,0.8), 0 0 8px rgba(43,163,187,0.4);
  border-color: rgb(0, 217, 255);
  background: linear-gradient(180deg, rgba(150, 234, 255, 0.241), rgba(150,234,255,0.13));
  text-shadow: 0 0 10px rgba(255,255,255,0.6), 0 0 20px rgba(255,255,255,0.4);
}
.menu button .dot{
  width:10px;height:10px;border-radius:50%;background:linear-gradient(90deg,var(--accent),var(--accent-2));box-shadow:0 2px 8px rgba(107,86,255,0.16);
}
.menu button.active{
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(224, 249, 255, 0.341), rgba(199, 230, 238, 0.23));
  color:#fff;
  font-weight:700;
  text-shadow: 0 0 10px rgba(255,255,255,0.6), 0 0 20px rgba(255,255,255,0.4);
}

.menu a > button{color:#e6eef8;}

/* Gallery Section & Shared Hero */
.gallery{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.hero{
  min-height:370px;
  border-radius:12px;overflow:hidden;position:relative;
  border:1px solid rgba(255,255,255,0.04);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.hero:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 40px rgba(107,86,255,0.2);
  border-color:var(--accent);
}
.hero.fullscreen:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255,255,255,0.04);
}
.hero img{width:100%;height:100%;object-fit:cover;display:block;filter:contrast(1.05) saturate(1.05)}
.thumb-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.thumb{height:120px;border-radius:12px;overflow:hidden;border:1px solid rgba(255,255,255,0.04)}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
  opacity: 0.7; 
}


/* Overlay Title in Hero */
.hero .overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(3,7,18,0.6), rgba(3,7,18,0.35));
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.overlay h2{margin:0;font-family:Orbitron, sans-serif;font-size:1rem}
.overlay small{opacity:0.85}

/* Projects Header (Used in index.html too) */
.projects-header {
  margin-bottom: 20px;
  padding: 0 6px;
  min-width: 0;
  overflow-x: visible;
  animation: fadeInText 1s ease forwards;
  animation-delay: 0.6s;
  animation-fill-mode: backwards;
}
.projects-header h2{
  font-family:Orbitron, sans-serif;
  font-size:1.5rem;
  margin:0 0 8px 0;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.projects-header p {
  margin: 0;
  opacity: 0.85;
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
}

/* Contact & Philosophy Text Styles */
.contact-text h2, .philosophy-text h2{
  font-family:Orbitron, sans-serif;
  font-size:1.5rem;
  margin:0 0 8px 0;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  padding: 0 8px;

  animation: fadeInText 1s ease forwards;
  animation-delay: 0.6s;
  animation-fill-mode: backwards;
}
.contact-text p, .philosophy-text p {
  margin: 0;
  opacity: 0.85;
  font-size:0.9rem;
  padding: 0 8px;
  animation: fadeInText 1s ease forwards;
  animation-delay: 1s;
  animation-fill-mode: backwards;
}

.contact-text h2.error-red {
  background: linear-gradient(90deg, #ff4d4d, #ff0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(255, 77, 77, 0.5));
  text-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
  animation: fadeInText 1s ease forwards;
}

.error-red:hover {
  filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.8));
  transition: filter 0.3s ease;
}

@keyframes fadeInText {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.85;
  }
}
.contact-text .small-text, .philosophy-text .small-text {
  font-size: 0.7rem;
}
.contact-text a, .philosophy-text a {
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration 0.25s ease, text-shadow 0.25s ease;
}
.contact-text a:hover, .philosophy-text a:hover {
  text-decoration: underline;
  text-shadow: 0 0 10px rgba(110, 231, 255, 0.6);
}

.philosophy-text .read-text {
  font-family:Orbitron, sans-serif;
  color: #ffffff;
  letter-spacing: 1.2px;
  text-align: justify;
  padding: 0 20px;
  hyphens: auto;
  hyphenate-limit-chars: 6 4 4;
}
.philosophy-text .read-text bold {
  color: cyan;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}
@media (max-width: 900px) {
  .philosophy-text .read-text {
    padding: 0 8px;
    text-justify: inter-character;
    word-spacing: -0.2em;
    hyphenate-limit-chars: 6 3 3;
  }
}

/* Common Media Queries */
@media(min-width:720px){
  .thumb{height:170px}
}
@media(min-width:1024px){
  .hero{min-height:calc(360px * 1.3)}
}
@media (max-width: 838px) {
  .brand { align-items: flex-start; }
  .logo-images { flex-direction: column; align-items: flex-start; gap: 6px; }
  .logo-images img { height: 21px; }
}

/* Hero Video Styles (Used in index.html too) */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

/* Star Wars schwebender Text */
.floating-star-wars-text {
  width: 100%;
  max-width: 980px;
  margin: 60px auto 40px auto;
  padding: 20px;
  font-family: 'Orbitron', sans-serif;
  color: var(--accent);
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 2px;
  line-height: 1.6;
  opacity: 0.8;
  text-shadow: 0 0 15px rgba(110, 231, 255, 0.5), 
               0 0 25px rgba(110, 231, 255, 0.3);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  animation: float 6s ease-in-out infinite;
}
.floating-star-wars-text:hover {
  opacity: 1;
  transform: scale(1.02);
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@media (max-width: 600px) {
  .floating-star-wars-text { font-size: 0.95rem; letter-spacing: 1.5px; margin: 40px auto 30px auto; padding: 15px; }
}
@media (max-width: 400px) {
  .floating-star-wars-text { font-size: 0.85rem; letter-spacing: 1px; margin: 30px auto 20px auto; }
  .projects-header p { font-size: 0.65rem; }
}

/* Video Controls & Loader (Shared) */
.video-controls {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 7px 16px;
  background: linear-gradient(to top, rgba(6,6,26,0.95), rgba(6,6,26,0.7), transparent);
  backdrop-filter: blur(10px); display: flex; align-items: center; gap: 12px; z-index: 10;
  opacity: 0; transition: opacity 0.3s ease; border-radius: 0 0 12px 12px;
}
.play-pause-btn, .fullscreen-btn {
  width: 36px; height: 26px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.play-pause-btn:hover, .fullscreen-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
  border-color: var(--accent); box-shadow: 0 0 15px rgba(110,231,255,0.3);
}
.play-pause-btn svg, .fullscreen-btn svg { width: 20px; height: 20px; }
.time-display {
  display: flex; align-items: center; gap: 4px; font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem; color: var(--accent); white-space: nowrap; flex-shrink: 0; min-width: 90px;
}
.time-separator { opacity: 0.6; }

.progress-container { flex: 1; position: relative; height: 24px; display: flex; align-items: center; }
.progress-slider {
  position: absolute; width: 100%; height: 5px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.15); border-radius: 3px; outline: none; cursor: pointer; z-index: 2;
}
.progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); cursor: pointer; box-shadow: 0 0 10px rgba(110,231,255,0.5);
  transition: all 0.2s ease;
}
.progress-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); cursor: pointer; border: none; box-shadow: 0 0 10px rgba(110,231,255,0.5);
  transition: all 0.2s ease;
}
.progress-slider:hover::-webkit-slider-thumb, .progress-slider:hover::-moz-range-thumb {
  width: 16px; height: 16px; box-shadow: 0 0 15px rgba(110,231,255,0.8);
}
.progress-bar {
  position: absolute; height: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px; width: 0%; pointer-events: none; transition: width 0.1s linear; box-shadow: 0 0 10px rgba(110,231,255,0.3);
}

.loader-wrapper {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5;
  pointer-events: none; display: none; flex-direction: column; align-items: center; justify-content: center;
}
.video-loader {
  width: 50px; height: 50px; border: 4px solid rgba(255, 255, 255, 0.1); border-left-color: var(--accent);
  border-radius: 50%; animation: video-spin 1s linear infinite; margin-bottom: 8px;
}
.loader-percentage {
  color: var(--accent); font-family: 'Orbitron', sans-serif; font-size: 0.9rem; font-weight: bold;
  text-shadow: 0 0 10px rgba(110, 231, 255, 0.4); letter-spacing: 1px;
}
@keyframes video-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Fullscreen adjustments */
.hero.fullscreen {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; border-radius: 0; border: none; background-color: #000;
}
.hero.fullscreen .hero-video { object-fit: contain; width: 100%; height: 100%; }
.hero.fullscreen .overlay { font-size: 1.2rem; padding: 12px 16px; }

@media (orientation: portrait) {
  .hero.fullscreen { background-color: #000; }
  .hero.fullscreen .hero-video { object-fit: contain; width: 100%; height: 100%; top: 0; left: 0; transform: none; }
  .hero.fullscreen .video-controls { background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7), transparent); }
}

/* Footer Links */
.footer-links {
  display: flex; justify-content: center; align-items: center; gap: 8px; padding: 16px 0 0 0; font-size: 0.8rem; opacity: 0.85;
}
.footer-links a { color: inherit; text-decoration: none; transition: color 0.25s ease, text-shadow 0.25s ease; }
.footer-links a:hover { color: var(--accent); text-shadow: 0 0 10px rgba(110, 231, 255, 0.6); }
.footer-links span { opacity: 0.6; }

.lang-switch {
  font-size: 0.8rem;
  opacity: 0.85;
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
  
  align-self: flex-start; 
}

.lang-switch:hover {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(110, 231, 255, 0.6);
  cursor: pointer;
}

/* 3D Canvas Styles */
.bg-clone {
  position: absolute;
  top: 0;
  left: 0;
  width: 150vmax; 
  height: 150vmax;
  background-image: url('background-upscaled2.jpg');
  background-size: cover;
  background-position: center;
  pointer-events: none;
  will-change: transform;
  z-index: 1; 
}
#canvas-3d-container {
  display: flex; 
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
@media (max-width: 900px) {
  .window-container {
    display: flex; 
    justify-content: center;
    align-items: center;
  }
  #canvas-3d-container canvas {
    max-width: 100%; 
    max-height: 100%;
  }
}

/* NEON FLICKER TEXT ANIMATION */
.char-span {
  display: inline;
  transition: color 0.1s, text-shadow 0.1s;
}

.flicker-active {
  animation: text-flicker 2s infinite; 
  color: var(--accent); 
}

@keyframes text-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
      color: #ffffff;
      text-shadow: none;
      opacity: 1;
  }
  20%, 24%, 55% {
      color: var(--accent);
      text-shadow: 0 0 4px var(--accent), 0 0 8px var(--accent);
      opacity: 1;
  }
  57% {
      color: var(--accent);
      text-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent);
      opacity: 1;
  }
}