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

:root {
    /* Futuristic Premium Color Palette */
    --primary-color: #0a0a0a;
    --secondary-color: #1a1a1a;
    --accent-color: #2386ff;
    --accent-hover: #186ac6;
    --accent-light: #5ec8ff;
    --accent-glow: rgba(35, 134, 255, 0.4);
    --text-primary: #1e3a5f;
    --text-secondary: #2d4a6b;
    --text-light: #4a6b8a;
    --bg-primary: #ffffff;
    --bg-secondary: #fafbfc;
    --bg-tertiary: #f5f6f8;
    --bg-accent: #f8f9fa;
    --border-color: #e5e7eb;
    --border-light: #f0f2f5;
    
    /* Futuristic Shadows with Glow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px rgba(35, 134, 255, 0.3);
    --shadow-glow-lg: 0 0 60px rgba(35, 134, 255, 0.25);
    --shadow-glow-xl: 0 0 80px rgba(35, 134, 255, 0.2);
    --shadow-neon: 0 0 20px rgba(35, 134, 255, 0.5), 0 0 40px rgba(35, 134, 255, 0.3);
    
    /* Futuristic Gradients */
    --gradient-primary: linear-gradient(135deg, #2386ff 0%, #186ac6 100%);
    --gradient-hero: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    --gradient-accent: linear-gradient(135deg, rgba(35, 134, 255, 0.15) 0%, rgba(24, 106, 198, 0.08) 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 100%);
    --gradient-glow: radial-gradient(circle, rgba(35, 134, 255, 0.2) 0%, transparent 70%);
    --heading-gradient-start: #1e3a5f;
    --heading-gradient-end: #2386ff;
    --heading-gradient-angle: 135deg;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --nav-link-color: #2386ff;
    --logo-hue: 0deg;
    --logo-sat: 1;
    --logo-bright: 1;
    --logo-overlay-color: #2386ff;
    --logo-overlay-opacity: 0;
    --heading-glow-color: #2386ff;
    --heading-glow-intensity: 0.2;
    --heading-glow-blur: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.01em;
    position: relative;
    opacity: 1;
}

/* Prevent image overflow */
img {
    max-width: 100%;
    height: auto;
}

body:not(.page-loaded) {
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.page-loaded {
    opacity: 1;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(35, 134, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(35, 134, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Modern Navigation with Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-bottom: 1px solid rgba(35, 134, 255, 0.1);
    z-index: 1000;
    padding: 0.95rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 30px rgba(35, 134, 255, 0.08), 0 1px 0 0 rgba(0, 0, 0, 0.05);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(35, 134, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.navbar.scrolled::before {
    opacity: 1;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    background: var(--bg-primary);
    box-shadow: 0 8px 40px rgba(35, 134, 255, 0.12), 0 2px 0 0 rgba(0, 0, 0, 0.05);
    border-bottom-color: rgba(35, 134, 255, 0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    isolation: isolate;
}

.logo-image {
    height: 85px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 12px rgba(35, 134, 255, 0.2))
        hue-rotate(var(--logo-hue, 0deg))
        saturate(var(--logo-sat, 1))
        brightness(var(--logo-bright, 1));
    position: relative;
}

.logo-image::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(35, 134, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.logo-image:hover {
    transform: scale(1.08) translateY(-2px);
    filter: drop-shadow(0 8px 20px rgba(35, 134, 255, 0.3))
        hue-rotate(var(--logo-hue, 0deg))
        saturate(calc(var(--logo-sat, 1) + 0.1))
        brightness(calc(var(--logo-bright, 1) + 0.05));
}

.logo-image:hover::after {
    opacity: 1;
}

.logo-color-layer {
    position: absolute;
    inset: 0;
    background: var(--logo-overlay-color, transparent);
    opacity: var(--logo-overlay-opacity, 0);
    pointer-events: none;
    mix-blend-mode: multiply;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    mask-image: url('CXBD5052.JPG');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('CXBD5052.JPG');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    padding: 0.5rem;
    background: transparent;
    border-radius: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    text-decoration: none;
    color: var(--nav-link-color, var(--accent-color));
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 1rem;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(35, 134, 255, 0.6), 0 0 20px rgba(35, 134, 255, 0.3);
    filter: blur(1px);
}

.nav-link::after {
    display: none;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: calc(100% - 2rem);
}

.nav-link:hover::after,
.nav-link.active::after {
    display: none;
}

.nav-link:hover {
    color: var(--nav-link-color, var(--accent-color));
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--nav-link-color, var(--accent-color));
    font-weight: 700;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}


.draggable-image {
    cursor: grab !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.portfolio-item.draggable {
    cursor: grab !important;
    transition: none;
}

.portfolio-item.draggable.dragging {
    cursor: grabbing !important;
    z-index: 10000;
    transform: none !important; /* Remove any transforms that might cause positioning issues */
    box-shadow: 0 12px 40px rgba(35, 134, 255, 0.3);
    opacity: 0.95;
}

/* Keep dragged items in their dropped position */
.portfolio-item.draggable[style*="position: fixed"] {
    transition: none !important;
}

.portfolio-item.draggable .portfolio-img {
    pointer-events: none;
}


.theme-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.25rem;
    background: transparent;
    border-radius: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
}

.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.theme-btn:hover {
    background: rgba(35, 134, 255, 0.1);
    transform: translateY(-2px);
    color: var(--accent-color);
}

.theme-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(35, 134, 255, 0.3);
}

/* Customize panel styles removed */

.btn-mini {
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.05em;
}

.btn-mini::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-mini:hover::before {
    transform: scaleX(1);
}

.btn-mini:hover {
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(35, 134, 255, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
    padding: 0.5rem;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section - Futuristic & Slick */
.hero {
    /* Reduce overall hero panel height by ~15% (less tall) */
    padding: 8.5rem 0 8.5rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    min-height: auto;
    display: flex;
    align-items: flex-start;
    /* Slightly stronger separation line across full page width */
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(35, 134, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(35, 134, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(35, 134, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    filter: blur(60px);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
    z-index: 2;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    max-width: 900px;
}

.hero-stats-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem 3rem;
}

.hero-stats {
    margin: 6.5rem auto 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    position: relative;
    z-index: 2;
    align-items: start;
}

.hero-image-carousel {
    position: relative;
    width: 100%;
    /* Slightly narrower than the stats wrapper so the right edge comes in a bit */
    max-width: 92%;
    /* Taller image */
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(35, 134, 255, 0.05);
    border: 1px solid rgba(35, 134, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Align with left edge of stats, pull right edge in slightly */
    margin: 0.75rem 0 3rem;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-image.active {
    opacity: 1;
}

.carousel-image img,
.carousel-image canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.15);
    max-width: 100%;
}

@media (max-width: 768px) {
    .carousel-image img,
    .carousel-image canvas {
        transform: scale(1);
    }
}

.carousel-drawing {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.hero-title {
    font-size: clamp(2.7rem, 5.4vw, 6rem);
    font-weight: 300;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin: 0 0 2.5rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    max-width: 100%;
    word-wrap: break-word;
    text-align: left;
    position: relative;
    z-index: 2;
    padding-bottom: 0.2em;
    overflow: visible;
    background: linear-gradient(
        var(--heading-gradient-angle, 135deg),
        var(--heading-gradient-start, var(--text-primary, #1e3a5f)) 0%,
        var(--heading-gradient-end, var(--accent-color, #2386ff)) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.5s ease-out 0.1s both;
    filter: var(--heading-glow-filter, none);
    text-shadow: var(--heading-glow-shadow, none);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--text-secondary);
    margin: 1.1rem 0 3.5rem;
    line-height: 1.8;
    font-weight: 400;
    max-width: 100%;
    letter-spacing: 0;
    word-wrap: break-word;
    text-align: left;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}


/* Modern Buttons */
.btn-primary,
.btn-secondary {
    padding: 1.125rem 2.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    border: none;
}

.btn-primary {
    background: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(35, 134, 255, 0.4), 0 0 40px rgba(35, 134, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(35, 134, 255, 0.5), 0 0 60px rgba(35, 134, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    position: relative;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-secondary:hover {
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-secondary:hover::before {
    transform: scaleX(1);
}

/* Hero Stats - Modern Cards */

.stat-item {
    background: transparent;
    padding: 0 0 0 0.5rem;
    text-align: left;
    transition: color 0.3s ease;
    border: none;
    position: relative;
    cursor: pointer;
}

.stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--accent-color);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover::before {
    height: 100%;
}

.stat-item:hover {
    color: var(--accent-color);
}

.stat-item:not(:last-child) {
    border-right: 1px solid var(--border-light);
    padding-right: 3rem;
}

.stat-number {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 300;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    padding-bottom: 0.1em;
    background: linear-gradient(
        var(--heading-gradient-angle, 135deg),
        var(--heading-gradient-start, var(--text-primary, #1e3a5f)) 0%,
        var(--heading-gradient-end, var(--accent-color, #2386ff)) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: none;
    position: relative;
}

.stat-number::after {
    content: attr(data-number);
    position: absolute;
    inset: 0;
    background: linear-gradient(
        var(--heading-gradient-angle, 135deg),
        var(--heading-gradient-end, var(--accent-color, #2386ff)) 0%,
        var(--accent-light, #5ec8ff) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.3s ease;
}

.stat-item:hover .stat-number::after {
    opacity: 0.3;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* Services Section - Modern Cards */
.services {
    padding: 10rem 0;
    background: var(--bg-primary);
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

.section-header {
    text-align: left;
    margin-bottom: 7rem;
    max-width: 900px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 4.5rem);
    font-weight: 300;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    word-wrap: break-word;
    background: linear-gradient(
        var(--heading-gradient-angle, 135deg),
        var(--heading-gradient-start, #1e3a5f) 0%,
        var(--heading-gradient-end, #2386ff) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: var(--heading-glow-filter, drop-shadow(0 2px 10px rgba(35, 134, 255, 0.2)));
    text-shadow: var(--heading-glow-shadow, 0 0 30px rgba(35, 134, 255, 0.1));
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border: 1px solid rgba(35, 134, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(35, 134, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(35, 134, 255, 0.05) 0%, rgba(24, 106, 198, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(35, 134, 255, 0.15), 0 0 0 1px rgba(35, 134, 255, 0.2), 0 0 60px rgba(35, 134, 255, 0.1);
    border-color: rgba(35, 134, 255, 0.3);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(35, 134, 255, 0.1);
    box-shadow: 0 4px 15px rgba(35, 134, 255, 0.1);
}

.service-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(35, 134, 255, 0.3), rgba(24, 106, 198, 0.2));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(8px);
}

.service-card:hover .service-icon::before {
    opacity: 1;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-primary);
    box-shadow: 0 8px 25px rgba(35, 134, 255, 0.4), 0 0 40px rgba(35, 134, 255, 0.2);
    border-color: rgba(35, 134, 255, 0.3);
}

.service-icon .icon {
    font-size: 2rem;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.service-card:hover .service-icon .icon {
    color: white;
}

.service-card h3 {
    font-size: 1.75rem;
    font-weight: 400;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
    font-weight: 400;
}

/* Portfolio Section */
.portfolio {
    padding: 10rem 0;
    background: var(--bg-primary);
    /* Faint line separating the section above */
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.portfolio-project {
    margin-bottom: 6rem;
}

.portfolio-project:last-child {
    margin-bottom: 0;
}

.portfolio-project-title {
    font-size: 2.5rem;
    font-weight: 300;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(35, 134, 255, 0.05);
    border: 1px solid rgba(35, 134, 255, 0.1);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.portfolio-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(35, 134, 255, 0.1) 0%, rgba(24, 106, 198, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(35, 134, 255, 0.2), 0 0 0 1px rgba(35, 134, 255, 0.2), 0 0 80px rgba(35, 134, 255, 0.15);
    border-color: rgba(35, 134, 255, 0.3);
}

.portfolio-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-drawing {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #fff;
    cursor: zoom-in;
}

.portfolio-item:hover .portfolio-img,
.portfolio-item:hover .portfolio-drawing {
    transform: scale(1.05);
}

.portfolio-caption {
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-light);
    background: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Contact Section */
.contact {
    padding: 10rem 0;
    background: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 6rem;
    align-items: start;
}

.contact-info h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-wrap: break-word;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    font-size: 1.125rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-accent);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    background: var(--gradient-primary);
    transform: scale(1.1) rotate(5deg);
    border-color: var(--accent-color);
}

.contact-item:hover .contact-icon .icon {
    color: white;
}

.contact-icon .icon {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.contact-item h4 {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.contact-item p {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.125rem;
    font-weight: 400;
}

.contact-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 4rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(35, 134, 255, 0.1), 0 0 0 1px rgba(35, 134, 255, 0.1);
    border: 1px solid rgba(35, 134, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.contact-form::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(35, 134, 255, 0.03) 0%, rgba(24, 106, 198, 0.01) 100%);
    border-radius: 20px;
    z-index: -1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(35, 134, 255, 0.15), 0 4px 15px rgba(35, 134, 255, 0.2), 0 0 30px rgba(35, 134, 255, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.form-message-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-message-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-light);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal.slide-up { transform: translateY(20px); }
.reveal.slide-down { transform: translateY(-20px); }
.reveal.slide-left { transform: translateX(-20px); }
.reveal.slide-right { transform: translateX(20px); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Navbar enter */
.navbar {
    transform: translateY(-20px);
    opacity: 0;
}

body.page-loaded .navbar {
    transform: translateY(0);
    opacity: 1;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    will-change: transform, opacity;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

body.page-loaded .slide-in-left {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-container,
    .container,
    .hero-content,
    .hero-stats-wrapper {
        padding: 0 3rem;
    }
    
    .services-grid {
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-content,
    .hero-stats-wrapper {
        padding: 0 2rem;
    }
    
    .hero-image-carousel {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .stat-item:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding-right: 0;
        padding-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-container,
    .container,
    .hero-content,
    .hero-stats-wrapper {
        padding: 0 2rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        display: flex;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu .nav-link {
        display: block;
        width: 100%;
        padding: 1rem;
        text-align: center;
    }
    
    .hero {
        padding: 9rem 0 5rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }
    
    .logo-image {
        height: 65px;
    }
    
    .hero-image-carousel {
        height: 350px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .section-header {
        margin-bottom: 4rem;
    }
    
    .services,
    .portfolio,
    .contact {
        padding: 6rem 0;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-container,
    .container,
    .hero-content,
    .hero-stats-wrapper {
        padding: 0 1.5rem;
    }
    
    .hero {
        padding: 7rem 0 3rem;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
        margin: 0.75rem 0 2rem;
    }
    
    .hero-image-carousel {
        height: 250px;
        margin: 1rem 0 2rem;
        border-radius: 12px;
    }
    
    .carousel-image img {
        transform: scale(1);
    }
    
    .hero-stats {
        margin-top: 2rem;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-item:not(:last-child) {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .services,
    .portfolio,
    .contact {
        padding: 4rem 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 0.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.5rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        gap: 1.5rem;
    }
    
    .portfolio-item {
        border-radius: 12px;
    }
    
    .portfolio-img {
        aspect-ratio: 1;
    }
    
    .portfolio-caption {
        padding: 1rem;
        font-size: 0.75rem;
    }
    
    .portfolio-project-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
    
    .contact-info h3 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-info p {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }
    
    .contact-item {
        gap: 1rem;
    }
    
    .contact-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .contact-item h4 {
        font-size: 0.75rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 0 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.875rem;
    }
}

/* iPhone SE and very small screens (375px and below) */
@media (max-width: 375px) {
    html {
        font-size: 14px;
    }
    
    .nav-container,
    .container,
    .hero-content,
    .hero-stats-wrapper {
        padding: 0 1rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo-image {
        height: 45px;
    }
    
    .nav-menu {
        top: 70px;
        padding: 1.5rem;
    }
    
    .hero {
        padding: 6rem 0 2.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        margin: 0.5rem 0 1.5rem;
    }
    
    .hero-image-carousel {
        height: 200px;
        margin: 0.75rem 0 1.5rem;
    }
    
    .hero-stats {
        margin-top: 1.5rem;
        gap: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-item:not(:last-child) {
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .services,
    .portfolio,
    .contact {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
    
    .service-card {
        padding: 1.5rem 1.25rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
    }
    
    .service-icon {
        width: 56px;
        height: 56px;
    }
    
    .service-icon .icon {
        font-size: 1.75rem;
    }
    
    .portfolio-grid {
        gap: 1.25rem;
    }
    
    .portfolio-project-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .portfolio-caption {
        padding: 0.875rem;
        font-size: 0.7rem;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
    }
    
    .contact-info p {
        font-size: 0.85rem;
    }
    
    .contact-form {
        padding: 1.25rem;
    }
    
    .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.75rem;
    }
    
    .footer {
        padding: 2.5rem 0 1.25rem;
    }
    
    .footer-content {
        gap: 2rem;
        padding: 0 1rem;
    }
}

/* Preloader */
body.loading {
    overflow: hidden;
}

.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.preloader-logo-img {
    height: 64px;
    width: auto;
    animation: floatUpDown 1.8s ease-in-out infinite;
}

.preloader-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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


/* Theme Styles */
/* Modern theme uses default root variables */
