/* MOHR2IT - Custom Styles */

/* Smooth dark/light mode transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, fill 0.3s ease;
}

/* Prevent transition on initial page load to avoid flash */
.mud-theme-provider {
    transition: background-color 0.3s ease, color 0.3s ease;
}

html, body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100%;
}

/* Ensure box-sizing on all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Prevent MudBlazor containers from overflowing */
.mud-container, .mud-grid, .mud-grid-item {
    max-width: 100%;
}

/* Prevent MudDrawer from causing horizontal overflow */
.mud-layout, .mud-main-content {
    overflow-x: hidden;
    max-width: 100%;
}

.mud-drawer {
    position: fixed !important;
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading spinner on initial load */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

/* Sticky navbar helper */
.sticky-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Navbar button hover effects */
.mud-app-bar .mud-button-root {
    transition: all 0.3s ease !important;
}

.mud-app-bar .mud-button-root:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding: 2rem;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-logo {
    height: 120px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0s forwards;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

/* Profile Photo */
.profile-photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.profile-photo-container .mud-avatar {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo-container .mud-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(26, 115, 232, 0.3);
}

.hero-tagline {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
    transition: all 0.3s ease !important;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.5), 0 0 30px rgba(26, 115, 232, 0.4) !important;
    filter: brightness(1.1);
}

/* Floating Tech Icons */
.tech-icons-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.floating-icon:nth-child(2) {
    top: 25%;
    right: 15%;
    animation-delay: 1s;
    animation-duration: 6s;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.floating-icon:nth-child(4) {
    bottom: 30%;
    right: 10%;
    animation-delay: 1.5s;
    animation-duration: 7.5s;
}

.floating-icon:nth-child(5) {
    top: 40%;
    left: 5%;
    animation-delay: 0.5s;
    animation-duration: 6.5s;
}

.floating-icon:nth-child(6) {
    top: 50%;
    right: 8%;
    animation-delay: 2.5s;
    animation-duration: 7s;
}

.floating-icon:nth-child(7) {
    top: 20%;
    left: 25%;
    animation-delay: 1.2s;
    animation-duration: 8.5s;
}

.floating-icon:nth-child(8) {
    bottom: 15%;
    right: 20%;
    animation-delay: 0.8s;
    animation-duration: 6.8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Responsive Hero Section */
@media (max-width: 768px) {
    .hero-logo {
        height: 80px;
    }

    .hero-tagline {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .floating-icon {
        font-size: 2rem;
        opacity: 0.1;
    }

    .profile-photo-container .mud-avatar {
        width: 140px !important;
        height: 140px !important;
    }
}

@media (max-width: 375px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem;
    }

    .hero-tagline {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .floating-icon {
        font-size: 1.5rem;
        opacity: 0.08;
    }
}

/* Skills Section - Scroll Animations */
.expertise-section .skill-category {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.expertise-section .skill-category:nth-child(1) {
    animation-delay: 0.1s;
}

.expertise-section .skill-category:nth-child(2) {
    animation-delay: 0.2s;
}

.expertise-section .skill-category:nth-child(3) {
    animation-delay: 0.3s;
}

.expertise-section .skill-category:nth-child(4) {
    animation-delay: 0.4s;
}

.skill-card-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.skill-card-item:nth-child(1) { animation-delay: 0.1s; }
.skill-card-item:nth-child(2) { animation-delay: 0.15s; }
.skill-card-item:nth-child(3) { animation-delay: 0.2s; }
.skill-card-item:nth-child(4) { animation-delay: 0.25s; }
.skill-card-item:nth-child(5) { animation-delay: 0.3s; }
.skill-card-item:nth-child(6) { animation-delay: 0.35s; }

.skill-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Animated progress bars */
.skill-progress {
    animation: progressFill 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressFill {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Service Cards Hover Effects */
#diensten .mud-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    cursor: pointer;
}

#diensten .mud-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(26, 115, 232, 0.25) !important;
}

/* Portfolio Section - Project Card Hover Effects */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(26, 115, 232, 0.3), 0 0 20px rgba(26, 115, 232, 0.2);
    filter: brightness(1.05);
}

/* Fade-in scroll animation for sections */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

/* Responsive fixes for mobile */
@media (max-width: 600px) {
    .mud-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .mud-card {
        width: 100% !important;
    }

    /* Ensure technology chips wrap and don't overflow */
    .mud-chip-set {
        flex-wrap: wrap !important;
        max-width: 100% !important;
    }

    .mud-chip {
        margin-bottom: 4px !important;
        font-size: 0.75rem !important;
        max-width: 100% !important;
    }

    /* Ensure grid items don't overflow */
    .mud-grid-item {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Prevent text overflow */
    h1, h2, h3, h4, h5, h6, p, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 601px) and (max-width: 960px) {
    .mud-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Desktop responsive - ensure content centered */
@media (min-width: 1280px) {
    .mud-container {
        max-width: 1280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (min-width: 1920px) {
    .mud-container.mud-container-maxwidth-xl {
        max-width: 1536px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
