:root {
    --primary: #4e54c8;
    --primary-gradient: linear-gradient(90deg, #4e54c8, #8f94fb);
    --accent: #00c6ff;
    --dark: #121212;
    --dark-lighter: #1e1e1e;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    background-color: var(--dark);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* Preload Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Navbar */
.navbar {
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.navbar.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-brand span {
    color: var(--accent);
}

.navbar-brand:focus,
.navbar-brand:hover {
    color: var(--primary) !important;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
}

.nav-link.active::after {
    content: "";
    display: block;
    width: 50%;
    height: 2px;
    background: var(--primary-gradient);
    margin: 3px auto 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 100%, rgba(78, 84, 200, 0.1), transparent 40%);
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 0%, rgba(0, 198, 255, 0.1), transparent 40%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.animate-heading {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 600px;
}

/* Buttons */
.btn-custom {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary-custom {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(78, 84, 200, 0.3);
}

.btn-outline-custom {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

.btn-outline-custom:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(78, 84, 200, 0.3);
}

/* About Section */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
}

.about-img {
    position: relative;
    z-index: 1;
}

.about-img::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    z-index: -1;
    transition: all 0.3s ease;
}

.about-img:hover::before {
    top: -10px;
    left: -10px;
}

.about-img img {
    width: 100%;
    border-radius: 5px;
    object-fit: cover;
}

.skill-item {
    position: relative;
    margin-bottom: 30px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-bar {
    height: 10px;
    background-color: var(--dark-lighter);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    border-radius: 10px;
    background: var(--primary-gradient);
    position: relative;
    width: 0;
    transition: width 1.5s ease;
}

/* Services Section */
.service-card {
    background-color: var(--dark-lighter);
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.1;
    z-index: -1;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    transform: scale(3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Portfolio Section */
.portfolio-filter {
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 20px;
    margin: 0 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-btn.active {
    color: var(--text-primary);
}

.filter-btn.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background: var(--primary-gradient);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
}

.portfolio-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    transition: all 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(78, 84, 200, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: all 0.5s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

/* Testimonials */
.testimonial-card {
    background-color: var(--dark-lighter);
    border-radius: 10px;
    padding: 30px;
    position: relative;
    margin-bottom: 60px;
}

.testimonial-card::after {
    content: '\201D';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    font-family: serif;
}

.client-info {
    text-align: center;
    margin-top: 40px;
}

.client-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.client-position {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-info-item {
    display: flex;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 20px;
}

.contact-form .form-control {
    background-color: var(--dark-lighter);
    border: none;
    height: 50px;
    color: var(--text-primary);
    border-radius: 5px;
    margin-bottom: 20px;
}

.contact-form textarea.form-control {
    height: 160px;
    resize: none;
}

.contact-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.25);
}

/* Footer */
footer {
    background-color: var(--dark-lighter);
    padding: 30px 0;
    text-align: center;
}

.social-icons {
    margin-bottom: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark);
    color: var(--text-secondary);
    border-radius: 50%;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-5px);
}

/* Particle Background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Estilo para el área de respuesta */
.response-message {
    padding: 15px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    margin-top: 20px;
    display: none;
    /* Ocultar por defecto */
}

.response-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #28a745;
}

.response-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* Animated Background Gradient */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animation {
    background: linear-gradient(-45deg, #4e54c8, #8f94fb, #00c6ff, #0072ff);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .animate-heading {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .animate-heading {
        font-size: 2.5rem;
    }

    section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .animate-heading {
        font-size: 2rem;
    }
}