/* Reset und Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #f8fafc;
    background: linear-gradient(135deg, #111827 0%, #1f2937 25%, #374151 50%, #1f2937 75%, #111827 100%);
    background-attachment: fixed;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga', 'kern';
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #f59e0b;
    color: #000;
    padding: 0.5rem 1rem;
    font-weight: 500;
    z-index: 50;
}

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Grid System */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Responsive Grid */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Flexbox */
.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-x-8 > * + * { margin-left: 2rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Dimensions */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-16 { width: 4rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-16 { height: 4rem; }

.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin: 0 auto; }

/* Padding & Margin */
.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }
.mt-8 { margin-top: 2rem; }
.pt-8 { padding-top: 2rem; }

/* Typography */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }

.leading-relaxed { line-height: 1.625; }

/* Responsive Typography */
@media (min-width: 768px) {
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
    .md\:flex { display: flex; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
}

/* Colors */
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-amber-400 { color: #fbbf24; }
.text-white { color: #ffffff; }

.bg-amber-500\/10 { background-color: rgba(245, 158, 11, 0.1); }

.border { border-width: 1px; }
.border-amber-500\/20 { border-color: rgba(245, 158, 11, 0.2); }
.border-amber-500\/30 { border-color: rgba(245, 158, 11, 0.3); }
.border-slate-700\/50 { border-color: rgba(55, 65, 81, 0.5); }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }

.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-t-xl { border-top-left-radius: 0.75rem; border-top-right-radius: 0.75rem; }

/* Transitions */
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Responsive Display */
@media (min-width: 768px) {
    .md\:flex { display: flex; }
}

/* Aspect Ratio */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Custom Classes */

/* Metallische Oberflächen-Effekte */
.metallic-surface {
    background: linear-gradient(135deg, #374151 0%, #1f2937 25%, #111827 50%, #1f2937 75%, #374151 100%);
    position: relative;
    overflow: hidden;
}

.metallic-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
    will-change: transform;
}

.matte-surface {
    background: linear-gradient(145deg, #2d3748, #1a202c);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 -1px 1px rgba(255, 255, 255, 0.1);
}

.hero-gradient {
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.95) 0%,
        rgba(31, 41, 55, 0.9) 25%,
        rgba(55, 65, 81, 0.85) 50%,
        rgba(31, 41, 55, 0.9) 75%,
        rgba(17, 24, 39, 0.95) 100%);
}

/* Text Gradients */
.text-gradient {
    background: linear-gradient(135deg, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-metallic {
    background: linear-gradient(135deg, #94a3b8, #e5e7eb, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.tech-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(to right, #475569, #64748b);
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid #64748b;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    will-change: transform;
}

.tech-button:hover {
    background: linear-gradient(to right, #64748b, #475569);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(1.05);
}

.tech-button:active {
    transform: scale(0.95);
}

.tech-button::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;
    will-change: transform;
}

.tech-button:hover::before {
    left: 100%;
}

/* Cards */
.tech-card {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.5), rgba(30, 41, 59, 0.5));
    border: 1px solid rgba(55, 65, 81, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    position: relative;
    will-change: transform;
}

.tech-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.5), transparent);
}

.tech-card.hover\:border-amber-500\/30:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.group-hover\:translate-x-1 {
    transition: transform 0.15s ease;
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

/* Header */
header {
    backdrop-filter: blur(10px);
}

/* Navigation */
nav a {
    transition: color 0.15s ease;
}

nav a:hover {
    color: #ffffff;
}

/* Responsive Navigation */
@media (max-width: 767px) {
    .hidden.md\:flex {
        display: none;
    }
}

/* Hover Effects */
.hover\:text-white:hover {
    color: #ffffff;
}

.hover\:text-amber-400:hover {
    color: #fbbf24;
}

.hover\:text-amber-300:hover {
    color: #fcd34d;
}

/* Background Gradients */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-amber-500\/20 {
    --tw-gradient-from: rgba(245, 158, 11, 0.2);
    --tw-gradient-to: rgba(245, 158, 11, 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-amber-600\/20 {
    --tw-gradient-to: rgba(217, 119, 6, 0.2);
}

.from-slate-700 {
    --tw-gradient-from: #334155;
    --tw-gradient-to: rgba(51, 65, 85, 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-slate-800 {
    --tw-gradient-to: #1e293b;
}

/* Animations */
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Lists */
ul {
    list-style: none;
}

/* Address */
address {
    font-style: normal;
}

.not-italic {
    font-style: normal;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .text-gradient,
    .text-metallic,
    .text-gold {
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
}

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

/* High-DPI Optimierungen */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tech-card,
    .tech-button {
        border-width: 0.5px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8, #64748b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

/* Additional Responsive Styles */
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .text-5xl {
        font-size: 2.5rem;
    }

    .text-7xl {
        font-size: 3.5rem;
    }

    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

/* Focus and Accessibility */
button:focus,
a:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* SVG Icons */
svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Additional utility classes */
.cursor-pointer {
    cursor: pointer;
}

.select-none {
    user-select: none;
}

.will-change-transform {
    will-change: transform;
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Custom component styles */
.tech-card .bg-gradient-to-br.from-amber-500\/20.to-amber-600\/20 {
    background: linear-gradient(to bottom right, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
}
