/* Grundlegende Einstellungen */

:root {
    --real-vh: 100vh;

    /* === DESIGN TOKENS: LIGHT MODE === */

    /* Surfaces */
    --surface-base:     #fafafa;
    --surface-raised:   #ffffff;
    --surface-elevated: #f5f5f7;
    --surface-overlay:  #ebebef;

    /* Borders */
    --border-subtle:  #e8e8ed;
    --border-default: #d1d1dc;
    --border-strong:  #a0a0b8;

    /* Text */
    --text-primary:   #0c0c14;
    --text-secondary: #4a4a60;
    --text-muted:     #8888a0;

    /* Accent — Azure-Blau (Dynamics 365 connection) */
    --accent:       #2563eb;
    --accent-muted: #dbeafe;
    --accent-dim:   #eff6ff;

    /* Status */
    --status-success: #16a34a;
    --status-error:   #dc2626;

    /* Legacy compat aliases */
    --bg-primary:   var(--surface-base);
    --bg-secondary: var(--surface-elevated);
    --border-color: var(--border-default);
    --card-bg:      var(--surface-raised);
}

/* === DESIGN TOKENS: DARK MODE === */
.dark {
    --surface-base:     #0a0a0f;
    --surface-raised:   #111118;
    --surface-elevated: #18181f;
    --surface-overlay:  #1e1e28;

    --border-subtle:  #1f1f2e;
    --border-default: #2a2a3a;
    --border-strong:  #3a3a52;

    --text-primary:   #f0f0f4;
    --text-secondary: #9898b0;
    --text-muted:     #52526a;

    --accent:       #3b82f6;
    --accent-muted: #1e3a5f;
    --accent-dim:   #172035;

    --status-success: #22c55e;
    --status-error:   #ef4444;

    /* Legacy compat aliases */
    --bg-primary:   var(--surface-base);
    --bg-secondary: var(--surface-elevated);
    --border-color: var(--border-default);
    --card-bg:      var(--surface-raised);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    background-color: var(--surface-base);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark body {
    color: var(--text-primary);
}

/* ===== SCROLL REVEAL ANIMATIONEN ===== */
.fade-in-section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback für statische Darstellung (kein JS) */
.no-js .stagger-item,
.no-js .fade-in-section {
    opacity: 1;
    transform: translateY(0);
}

/* ===== KARTEN HOVER (border-only, kein scale) ===== */
.modern-card-hover {
    transition: border-color 0.15s ease;
}

.modern-card-hover:hover {
    border-color: var(--border-strong);
}

/* ===== MODAL / DRAWER STYLES ===== */
/* Nur Alpine.js Transitions verwenden - keine CSS Animations um Flackern zu vermeiden */

/* ===== GRADIENT OVERLAYS ===== */
/* ===== DARK MODE SUPPORT ===== */
/* Alle Komponenten verwenden CSS-Variablen via --surface-* / --text-* / --border-*.
   Die folgenden Regeln sind Fallbacks für legacy Tailwind-Klassen die noch nicht
   auf Token-basierte Klassen umgestellt wurden. */

.dark .project-tile {
    background-color: var(--surface-raised) !important;
}

.dark .bg-white\/90,
.dark .backdrop-blur-sm {
    background-color: var(--surface-elevated) !important;
}

.dark .bg-white {
    background-color: var(--surface-raised) !important;
}

.dark .fixed.bg-white,
.dark .absolute.bg-white {
    background-color: var(--surface-elevated) !important;
}

.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="number"],
.dark input[type="date"],
.dark input:not([type]),
.dark textarea,
.dark select {
    background-color: var(--surface-overlay) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-default) !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: var(--text-muted) !important;
}

.dark .text-gray-800,
.dark .text-gray-900,
.dark .text-neutral {
    color: var(--text-primary) !important;
}

.dark .text-gray-600,
.dark .text-gray-700 {
    color: var(--text-secondary) !important;
}

.dark .text-gray-500 {
    color: var(--text-muted) !important;
}

.dark .border-gray-200,
.dark .border-gray-300 {
    border-color: var(--border-subtle) !important;
}

.dark .bg-gray-200 {
    background-color: var(--surface-overlay) !important;
}

.dark .hover\:bg-gray-300:hover {
    background-color: var(--surface-elevated) !important;
}

/* ===== ENDE DARK MODE SUPPORT ===== */

.gradient-overlay {
    position: relative;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.project-tile {
    transform: scale(1);
    transition: transform 0.3s ease-in-out;
    position: relative;
}

/* Im Desktopmodus wird der normale Hover genutzt (Tailwind: hover:scale-105) */
.project-tile.active {
    transform: scale(1.05);
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    font-weight: 600;
}

.navbar-brand {
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    height: 60vh;
    color: #fff;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
}

.hero p.lead {
    font-size: 1.25rem;
}

/* Projekte Section */
#projects .card {
    border: none;
    transition: transform 0.3s ease;
    background-color: #f7f7f7;
}

#projects .card:hover {
    transform: translateY(-5px);
}

#projects .card-title {
    font-weight: 700;
}

/* Section Überschriften */
section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Über mich */
#about img {
    max-width: 200px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    font-size: 0.9rem;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .fix-height {
        height: var(--real-vh);
    }

    /* Stagger-Animation schneller auf Mobile */
    .stagger-item {
        transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    }
}

/* ===== SMOOTH SCROLL BEHAVIOR ===== */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ===== BUTTON & LINK HOVER EFFECTS ===== */
a,
button {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* ===== ENHANCED SHADOWS ===== */
.shadow-soft {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.shadow-strong {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}


@media (max-width: 1024px) {
    .skill-text {
        display: none !important;
    }
}

/* WIP-Stempel für Kacheln (Standard oben rechts) */
.wip-stamp {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    z-index: 10;
}

.wip-stamp img {
    width: 100%;
    height: 100%;
    transform: rotate(40deg);
    opacity: 0.75;
}

/* WIP-Stempel für erweiterte Infos (rechts & links) */
.wip-stamp-info {
    position: absolute;
    top: -30px;
    width: 140px;
    height: 140px;
    z-index: 15;
}

/* Wenn das WIP-Element links sein soll */
.wip-left {
    left: -30px;
    transform: rotate(-25deg);
}

/* Wenn das WIP-Element rechts sein soll */
.wip-right {
    right: -30px;
    transform: rotate(25deg);
}


/* #github-projects .project-tile {
    overflow: visible !important;
} */

#github-projects .modal-content {
    overflow: visible !important;
}

/* Sicherstellen, dass das WIP-Element sichtbar bleibt */
[x-cloak] {
    display: none !important;
}

.flash-message {
    animation: fadeOut 0.5s ease-in-out 3s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* SVG Icon Farb-Filter */
/* filter-primary = neues Accent-Blau (#3b82f6) */
.filter-primary {
    filter: brightness(0) saturate(100%) invert(44%) sepia(62%) saturate(875%) hue-rotate(195deg) brightness(101%) contrast(98%);
}

/* Legacy: werden in Phase 4 durch filter-primary ersetzt */
.filter-accent {
    filter: brightness(0) saturate(100%) invert(44%) sepia(62%) saturate(875%) hue-rotate(195deg) brightness(101%) contrast(98%);
}

.filter-success {
    filter: brightness(0) saturate(100%) invert(44%) sepia(62%) saturate(875%) hue-rotate(195deg) brightness(101%) contrast(98%);
}

.filter-warning {
    filter: brightness(0) saturate(100%) invert(44%) sepia(62%) saturate(875%) hue-rotate(195deg) brightness(101%) contrast(98%);
}