@import url('https://fonts.googleapis.com/css2?family=Product+Sans:wght@400;700&display=swap');

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --dark: #0f172a;
    --light: #f8fafc;
    --text-dark: #e5e7eb; /* Helleres Grau für Standardtext */
    --text-light: #fff;
    --text-muted: #f3f4f6;
}

html.dark body {
    background-color: var(--dark);
    color: var(--text-light);
}

body {
    background-color: var(--light);
    color: var(--text-dark); /* Hellerer Text */
    font-family: 'Product Sans', 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: linear-gradient(120deg, #f97316 0%, #ea580c 100%);
    min-height: 100vh;
}

/* Mobile Menü: Vollbild und Animation */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-40px);
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1), transform 0.4s cubic-bezier(.4,0,.2,1);
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#mobile-menu .nav-link {
    font-size: 2rem;
    margin: 1rem 0;
}
#mobile-menu .flex.items-center {
    margin-top: 2rem;
}

/* Highlighter Hover Effekt für Navigationseinträge (Desktop & Mobile) */
.nav-link {
    position: relative;
    transition: color 0.2s;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.2em;
    width: 100%;
    height: 0.18em;
    background: linear-gradient(90deg, #f97316 60%, #ea580c 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 1;
}
.nav-link:hover::after,
.nav-link:focus::after {
    transform: scaleX(1);
}
.nav-link:active {
    color: var(--primary-dark) !important;
}

/* Highlighter Hover Effekt für Navigation (Desktop & Mobile) */
.nav-link {
    position: relative;
    overflow: hidden;
    transition: color 0.2s;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.2em;
    width: 100%;
    height: 0.18em;
    background: linear-gradient(90deg, var(--primary) 60%, var(--primary-dark) 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 1;
}
.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
    transform: scaleX(1);
}
.nav-link:hover,
.nav-link:focus {
    color: var(--primary) !important;
}

/* Helle Textfarben für bessere Lesbarkeit */
.text-gray-600 { color: #f3f4f6 !important; }
.text-gray-700 { color: #f9fafb !important; }
.text-gray-300 { color: #fff !important; }
.text-gray-400 { color: #fff !important; }
.text-gray-500 { color: #fff !important; }
.text-gray-200 { color: #fff !important; }
.text-gray-100 { color: #fff !important; }

/* Dark Mode: noch hellere Schriftfarben */
html.dark .text-gray-600,
html.dark .text-gray-700,
html.dark .text-gray-500,
html.dark .text-gray-400,
html.dark .text-gray-300,
html.dark .text-gray-200,
html.dark .text-gray-100 {
    color: #fff !important;
}
html.dark .text-white {
    color: #fff !important;
}
html.dark .text-black {
    color: #fff !important;
}
html.dark .bg-white {
    background-color: #232b3a !important;
}
html.dark .bg-gray-100 {
    background-color: #232b3a !important;
}
html.dark .bg-gray-200 {
    background-color: #334155 !important;
}
html.dark .bg-slate-700 {
    background-color: #232b3a !important;
}
html.dark .bg-slate-800 {
    background-color: #1e2533 !important;
}
html.dark .bg-slate-900 {
    background-color: #151a23 !important;
}
html.dark .border-gray-200 {
    border-color: #334155 !important;
}
html.dark .border-gray-300 {
    border-color: #475569 !important;
}
html.dark .border-slate-600 {
    border-color: #475569 !important;
}
html.dark .border-slate-700 {
    border-color: #334155 !important;
}

/* Sprachumschalter auffälliger gestalten */
#language-toggle, #mobile-language-toggle, #footer-language-toggle {
    background: linear-gradient(90deg, #f97316 60%, #ea580c 100%);
    color: #fff !important;
    border: 2px solid #f97316;
    font-weight: bold;
    box-shadow: 0 2px 8px 0 #f9731633;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#language-toggle:hover, #mobile-language-toggle:hover, #footer-language-toggle:hover {
    background: #fff;
    color: #f97316 !important;
    border-color: #ea580c;
    box-shadow: 0 4px 16px 0 #f9731644;
}

/* Floating Animation für das Code-Icon im Hero-Bereich */
.floating {
    animation: floatUpDown 2.5s ease-in-out infinite;
}
@keyframes floatUpDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
    100% { transform: translateY(0); }
}

/* Preloader Styles */
#preloader {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s cubic-bezier(.4,0,.2,1);
}
#preloader.hide {
    opacity: 0;
    pointer-events: none;
}
.preloader-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316 60%, #ea580c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: preloader-bounce 1.2s infinite cubic-bezier(.68,-0.55,.27,1.55);
    box-shadow: 0 0 40px 0 #f9731644;
}
.preloader-logo i {
    color: #fff;
    font-size: 2.5rem;
}
@keyframes preloader-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}
.preloader-bar {
    width: 100vw;
    height: 5px;
    background: linear-gradient(90deg, #f97316 60%, #ea580c 100%);
    position: absolute;
    top: 0; left: 0;
    transform: scaleX(0);
    transform-origin: left;
    animation: preloader-bar-grow 1.5s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes preloader-bar-grow {
    0% { transform: scaleX(0); }
    80% { transform: scaleX(1.05); }
    100% { transform: scaleX(1); }
}
.preloader-bar.swoosh {
    animation: preloader-bar-swoosh 0.6s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes preloader-bar-swoosh {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

/* Projektkarten: Deutlicherer Link-Hover und Touch-Feedback */
.project-card {
    cursor: pointer;
    transition: box-shadow 0.25s, transform 0.18s, border 0.18s;
    border: 2px solid transparent;
    position: relative;
}
.project-card:hover,
.project-card:focus {
    box-shadow: 0 8px 32px 0 #f9731633, 0 0 0 4px #f97316cc;
    border-color: var(--primary);
    transform: translateY(-6px) scale(1.03);
    z-index: 2;
}
.project-card:hover .project-link-indicator,
.project-card:focus .project-link-indicator {
    opacity: 1;
    transform: translateY(0);
}

/* Sichtbarer Link-Indikator (z.B. Pfeil oder Icon) */
.project-link-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    color: var(--primary);
    border-radius: 2em;
    min-width: 2.2em;
    height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    box-shadow: 0 2px 8px #f9731622;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.22s, transform 0.22s;
    pointer-events: none;
    padding: 0 0.7em;
    font-weight: bold;
    gap: 0.3em;
    letter-spacing: 0.01em;
    z-index: 10;
}
.project-link-indicator.always-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: none;
}

/* Immer sichtbar auf Touch-Geräten (Mobile) */
@media (hover: none) and (pointer: coarse) {
  .project-link-indicator.always-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: none;
  }
  .project-link-label .d-none {
    display: inline !important;
  }
  .project-link-label .d-md-inline {
    display: inline !important;
  }
  .project-link-label .d-none.d-md-inline {
    display: inline !important;
  }
  .project-link-label .d-md-inline {
    display: inline !important;
  }
  .project-card:active {
    box-shadow: 0 8px 32px 0 #f9731633, 0 0 0 4px #f97316cc;
    border-color: var(--primary);
    transform: scale(0.98);
  }
}

/* Parallax Overlap Sections mit mehr Tiefe und Bewegung */
section {
  position: relative;
  z-index: 1;
  margin-top: -120px;
  box-shadow: 0 24px 64px 0 #0003, 0 2px 8px 0 #f9731622;
  border-radius: 2.5rem;
  background-clip: padding-box;
  transition: box-shadow 0.5s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
  will-change: transform, box-shadow;
}
section:first-of-type {
  margin-top: 0;
}
section.in-view {
  transform: translateY(-24px);
  box-shadow: 0 48px 96px 0 #0004, 0 4px 16px 0 #f9731644;
}
section:not(.in-view) {
  filter: blur(0.5px) brightness(0.98);
}
@media (max-width: 640px) {
  section {
    margin-top: -60px;
    border-radius: 1.2rem;
  }
}

/* Parallax Overlap Sections */
section {
  position: relative;
  z-index: 1;
  margin-top: -120px;
  box-shadow: 0 16px 48px 0 #0002;
  border-radius: 2.5rem;
  background-clip: padding-box;
}
section:first-of-type {
  margin-top: 0;
  padding-bottom: 150px;
}
@media (max-width: 640px) {
  section {
    margin-top: -60px;
    border-radius: 1.2rem;
  }
}

.extern-label-mobile {
  display: none;
}
@media (hover: none) and (pointer: coarse) {
  .extern-label-mobile {
    display: inline !important;
    font-size: 1em;
    font-weight: bold;
    margin-left: 0.2em;
    letter-spacing: 0.01em;
  }
}