/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure all elements respect container boundaries */
*,
*::before,
*::after {
    box-sizing: inherit;
}

:root {
    /* Vibrant Modern Color Scheme - Purple/Blue/Orange */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #f59e0b;
    --accent-color: #ec4899;
    --accent-2: #10b981;
    --success-color: #10b981;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    /* Vibrant Attractive Gradients */
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
    --gradient-3: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-4: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    --gradient-5: linear-gradient(135deg, #10b981 0%, #6366f1 100%);
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Font loading optimization - use system fonts as fallback */
@supports (font-variation-settings: normal) {
    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.1;
}

.animated-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent-color);
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero-profile-image {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3), 0 0 0 10px rgba(236, 72, 153, 0.1);
    transition: all 0.3s ease;
}

.hero-profile-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 80px rgba(99, 102, 241, 0.4), 0 0 0 10px rgba(236, 72, 153, 0.2);
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    animation: fadeIn 1s ease-out 0.2s both;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.title-line {
    display: block;
}

.highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 1s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-light);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

/* ============================================
   SECTION STYLES
   ============================================ */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-text h3:not(:first-child) {
    margin-top: 2rem;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
}

.feature-item i {
    color: var(--success-color);
}

.about-features .feature-item i {
    color: var(--primary-color);
}

.about-image {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid white;
    box-shadow: 0 25px 80px rgba(99, 102, 241, 0.25), 
                0 0 0 15px rgba(236, 72, 153, 0.1),
                0 0 0 25px rgba(245, 158, 11, 0.05);
    transition: all 0.4s ease;
    z-index: 2;
    position: relative;
}

.profile-image:hover {
    transform: scale(1.03);
    box-shadow: 0 30px 100px rgba(99, 102, 241, 0.35), 
                0 0 0 15px rgba(236, 72, 153, 0.15),
                0 0 0 25px rgba(245, 158, 11, 0.1);
}

.profile-image-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-1);
    opacity: 0.3;
    z-index: 1;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.floating-cards {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 1.2rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: floatCard 3s infinite ease-in-out;
    border: 2px solid rgba(99, 102, 241, 0.1);
    z-index: 3;
}

.floating-card i {
    font-size: 1.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-card span {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.card-1 {
    top: 5%;
    left: -10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: -15%;
    transform: translateY(-50%);
    animation-delay: 1s;
}

.card-3 {
    bottom: 5%;
    left: 0%;
    animation-delay: 2s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Skill Cards with Different Color Schemes */
.skill-card-1 .service-icon {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

.skill-card-2 .service-icon {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
}

.skill-card-3 .service-icon {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.skill-card-4 .service-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.skill-card-5 .service-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.skill-card-6 .service-icon {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
}

.skill-card {
    border-top: 4px solid transparent;
    transition: all 0.3s ease;
}

.skill-card-1 {
    border-top-color: #6366f1;
}

.skill-card-2 {
    border-top-color: #ec4899;
}

.skill-card-3 {
    border-top-color: #10b981;
}

.skill-card-4 {
    border-top-color: #f59e0b;
}

.skill-card-5 {
    border-top-color: #8b5cf6;
}

.skill-card-6 {
    border-top-color: #6366f1;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-features li {
    color: var(--text-dark);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio {
    background: var(--bg-light);
    padding: 6rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 550px), 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 0;
}

.portfolio-item {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Initial state - will be animated by JS */
    opacity: 1;
    transform: translateY(0);
}

/* Animation only when JS adds the class */
.portfolio-item.animate-in {
    -webkit-animation: fadeInUpCard 0.8s ease-out forwards;
    animation: fadeInUpCard 0.8s ease-out forwards;
}

.portfolio-item.animate-in:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item.animate-in:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item.animate-in:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item.animate-in:nth-child(4) { animation-delay: 0.4s; }

/* Fallback: if animation not supported, ensure visibility */
@supports not (animation: fadeInUpCard) {
    .portfolio-item {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

@keyframes fadeInUpCard {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@-webkit-keyframes fadeInUpCard {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* Card Loader */
.card-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 28px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.card-loader.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
    z-index: -1 !important;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { 
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    to { 
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover {
    -webkit-transform: translateY(-12px) scale(1.01);
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.2);
}

.portfolio-item:hover::before {
    opacity: 1;
    height: 4px;
}

.portfolio-item:hover .portfolio-showcase {
    -webkit-transform: scale(1.005);
    transform: scale(1.005);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-showcase {
    position: relative;
    background: #f8fafc;
    padding: 2rem 1rem;
    height: 350px;
    min-height: 350px;
    max-height: 350px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.4s ease;
}

.portfolio-showcase::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-showcase::after {
    opacity: 1;
}

.mobile-showcase {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #fbbf24 100%);
    padding: 2rem 1rem;
    height: 350px;
    min-height: 350px;
    max-height: 350px;
}

.web-showcase {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a78bfa 100%);
    padding: 1.5rem 1rem;
    height: 350px;
    min-height: 350px;
    max-height: 350px;
}

.cloudgate-showcase {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    height: 350px;
    min-height: 350px;
    max-height: 350px;
}

/* Image Carousel Styles */
.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-sizing: border-box;
    padding: 1rem;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 2;
}

.portfolio-screenshot {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 300px;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    display: block;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
}

/* Hide broken images gracefully */
.portfolio-screenshot[src=""],
.portfolio-screenshot:not([src]),
img[style*="display: none"] {
    display: none !important;
}

.carousel-slide:has(img[style*="display: none"]) {
    display: none;
}

.mobile-showcase .portfolio-screenshot {
    max-width: min(200px, 85%);
    max-height: 300px;
    height: auto;
    border-radius: 20px;
    padding: 0.5rem;
}

.web-showcase .portfolio-screenshot {
    max-width: min(100%, 95%);
    max-height: 300px;
    height: auto;
    border-radius: 12px;
    padding: 0.5rem;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
    font-size: 1.1rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Carousel Dots Indicator */
.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
    transform: scale(1);
}

/* Pause on hover */
.image-carousel:hover .carousel-btn {
    opacity: 1;
}

.image-carousel:not(:hover) .carousel-btn {
    opacity: 0.7;
}

/* Fallback for missing images */
.portfolio-screenshot[src=""],
.portfolio-screenshot:not([src]) {
    display: none;
}

.carousel-slide:has(.portfolio-screenshot:not([src])),
.carousel-slide:has(.portfolio-screenshot[src=""]) {
    display: none;
}


/* Portfolio Content */
.portfolio-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    min-height: auto;
}

/* Fallback for older browsers */
@supports not (background: linear-gradient(to bottom, white, #fafbfc)) {
    .portfolio-content {
        background: white;
    }
}

.portfolio-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-content::before {
    opacity: 1;
}

.project-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.project-type-badge.mobile-badge {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    color: #ec4899;
    border: 2px solid rgba(236, 72, 153, 0.3);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.1);
}

.project-type-badge.mobile-badge:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(245, 158, 11, 0.25) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

.project-type-badge.web-badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--primary-color);
    border: 2px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.project-type-badge.web-badge:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.project-type-badge i {
    font-size: 0.9rem;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.portfolio-item:hover .project-title {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    max-height: 4.5em;
    overflow: hidden;
}

.project-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 2px solid rgba(99, 102, 241, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    max-height: 180px;
    overflow-y: auto;
}

/* Placeholder when images are missing */
.no-images .carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-placeholder {
    color: #0f172a;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.portfolio-item:hover .project-features {
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: inset 0 2px 8px rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

/* Handle projects with more features */
.portfolio-item .project-features {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(5px);
}

.portfolio-content .feature-item i {
    color: var(--success-color);
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.feature-item:hover i {
    transform: scale(1.2);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.tech-tag {
    padding: 0.6rem 1.1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: var(--primary-color);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.tech-tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.tech-tag:hover::before {
    left: 100%;
}

.portfolio-actions {
    margin-top: auto;
}

.btn-view-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.1rem 2rem;
    background: var(--gradient-1);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    width: 100%;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-view-demo::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-view-demo:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
}

.btn-view-demo:hover::before {
    left: 100%;
}

.btn-view-demo i {
    transition: transform 0.3s ease;
}

.btn-view-demo:hover i {
    transform: translateX(3px);
}

.btn-view-demo i {
    font-size: 0.9rem;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-rating {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.testimonial-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.author-info h4 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.info-icon i {
    font-size: 1.5rem;
    color: white;
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-card a:hover {
    color: var(--primary-dark);
}

.info-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        height: 400px;
        margin-top: 2rem;
    }

    .profile-image-wrapper {
        width: 280px;
        height: 280px;
    }

    .hero-profile-image img {
        width: 150px;
        height: 150px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .portfolio-item {
        max-width: 100%;
        width: 100%;
    }

    .portfolio-showcase {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        padding: 1.5rem 1rem;
        width: 100%;
    }

    .mobile-showcase {
        padding: 1.5rem 1rem;
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }

    .web-showcase {
        padding: 1.5rem 1rem;
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }

    .image-carousel {
        min-height: 300px;
        max-height: 100%;
    }

    .carousel-slide {
        padding: 0.5rem;
    }

    .mobile-showcase .portfolio-screenshot {
        max-width: min(200px, 85%);
        max-height: min(400px, 85%);
    }

    .web-showcase .portfolio-screenshot {
        max-width: min(100%, 90%);
        max-height: min(300px, 85%);
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-prev {
        left: 0.5rem;
    }

    .carousel-next {
        right: 0.5rem;
    }

    .carousel-dots {
        bottom: 1rem;
        padding: 0.4rem 0.75rem;
    }

    .portfolio-content {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
    }

    .project-features {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .portfolio-item .project-features {
        grid-template-columns: 1fr;
    }

    .project-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .portfolio-content {
        padding: 1.5rem;
    }
}

    .floating-card {
        padding: 1rem 1.2rem;
        font-size: 0.85rem;
    }

    .card-1 {
        left: -5%;
        top: 10%;
    }

    .card-2 {
        right: -5%;
    }

    .card-3 {
        left: 5%;
        bottom: 10%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .services-grid,
    .portfolio-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .phone-frame {
        width: 140px;
        height: 280px;
    }

    .portfolio-showcase {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
        padding: 1.5rem 0.75rem;
    }

    .mobile-showcase {
        padding: 1.5rem 0.75rem;
    }

    .web-showcase {
        padding: 1rem;
    }

    .mobile-showcase .portfolio-screenshot {
        max-width: 160px;
        max-height: 320px;
    }

    .web-showcase .portfolio-screenshot {
        max-height: 250px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .carousel-dots {
        gap: 0.5rem;
        padding: 0.3rem 0.5rem;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .dot.active {
        width: 20px;
    }

    .portfolio-content {
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-features {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .btn-view-demo {
        width: 100%;
        justify-content: center;
    }

    .about-image {
        height: 350px;
    }

    .profile-image-wrapper {
        width: 250px;
        height: 250px;
    }

    .hero-profile-image img {
        width: 120px;
        height: 120px;
        border-width: 4px;
    }

    .floating-card {
        padding: 0.8rem 1rem;
        font-size: 0.75rem;
    }

    .floating-card i {
        font-size: 1.5rem;
    }
}

