:root {
    --primary-color: #6c5ce7;
    --secondary-color: #fd79a8;
    --dark-bg: #0d1117;
    --dark-card: #161b22;
    --dark-border: #21262d;
    --text-light: #f0f6fc;
    --text-muted: #c9d1d9;
    --gradient: linear-gradient(135deg, #6c5ce7, #fd79a8);
    --gradient-hover: linear-gradient(135deg, #5f3dc4, #e84393);
    --shadow: 0 8px 32px rgba(108, 92, 231, 0.1);
    --shadow-hover: 0 12px 48px rgba(108, 92, 231, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Improved text contrast for better readability */
p, .text-muted {
    color: var(--text-muted) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-light) !important;
}

.lead {
    color: var(--text-light) !important;
    font-weight: 400;
    opacity: 0.9;
}

/* Better contrast for specific elements */
.project-desc, .product-description {
    color: var(--text-light) !important;
    opacity: 0.85;
}

.project-date {
    color: var(--text-light) !important;
    opacity: 0.75;
}

.no-content-text {
    color: var(--text-light) !important;
    opacity: 0.8;
}

.cta-text {
    color: var(--text-light) !important;
    opacity: 0.9;
}

.stat-label {
    color: var(--text-light) !important;
    opacity: 0.85;
}

/* Service card text improvements */
.service-card p {
    color: var(--text-light) !important;
    opacity: 0.85;
}

.dark-theme {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.content-wrapper {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.bg-dark-custom {
    background-color: var(--dark-card) !important;
    border-bottom: 1px solid var(--dark-border);
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.btn-gradient {
    background: var(--gradient);
    border: none;
    color: white;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-gradient:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: white;
}

.btn-outline-gradient {
    background: transparent;
    border: 2px solid;
    border-image: var(--gradient) 1;
    color: var(--primary-color);
    font-weight: 500;
    padding: 10px 28px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-gradient:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

.card-custom {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.hero-buttons .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 100%;
    height: auto;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--gradient);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.service-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.project-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links a {
    background: var(--gradient);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-links a:hover {
    transform: scale(1.1);
}

.product-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-description {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.product-links {
    display: flex;
    gap: 10px;
}

.product-links .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 8px 16px;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    background: var(--gradient);
    color: white;
}

.footer-section {
    margin-top: 80px;
    border-top: 1px solid var(--dark-border);
}

.footer-desc {
    color: var(--text-light) !important;
    opacity: 0.85;
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
    opacity: 1;
}

.footer-address {
    color: var(--text-light);
    opacity: 0.8;
}

.footer-copyright {
    color: var(--text-light) !important;
    opacity: 0.8;
}

.footer-dev-text {
    color: var(--text-light) !important;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--dark-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stats-section {
    padding: 80px 0;
    background: rgba(108, 92, 231, 0.05);
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light) !important;
    margin-top: 10px;
    opacity: 0.85;
}

.contact-form {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    padding: 40px;
}

.form-control {
    background-color: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    color: var(--text-light);
    padding: 12px 20px;
    margin-bottom: 20px;
}

.form-control:focus {
    background-color: var(--dark-bg);
    border-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 80vh;
        text-align: center;
        padding: 40px 0;
    }
    
    .hero-content {
        margin-top: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 20px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Hero Profile Image Styles - Simple gradient border */
.hero-profile-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.hero-profile-image .profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 3px solid var(--dark-bg);
    border-radius: 50%;
    transition: all 0.3s ease;
    display: block;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.2);
}

.hero-profile-image .profile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.hero-placeholder {
    padding: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    width: fit-content;
}

.hero-placeholder-inner {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 3px solid var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.2);
}

.hero-placeholder i {
    font-size: 100px;
    color: white;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Responsive adjustments for hero profile image */
@media (max-width: 768px) {
    .hero-profile-image .profile-img {
        width: 180px;
        height: 180px;
        border-width: 2px;
    }
    
    .hero-placeholder-inner {
        width: 180px;
        height: 180px;
        border-width: 2px;
    }
    
    .hero-placeholder i {
        font-size: 80px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .hero-section {
        padding: 30px 0;
        min-height: 75vh;
    }
    
    .hero-profile-image .profile-img {
        width: 160px;
        height: 160px;
        border-width: 2px;
    }
    
    .hero-placeholder-inner {
        width: 160px;
        height: 160px;
        border-width: 2px;
    }
    
    .hero-placeholder i {
        font-size: 70px;
    }
}