/* Reset y configuraciones generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4F46E5;
    --secondary-color: #10B981;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --text-color: #374151;
    --text-light: #6B7280;
    --border-color: #E5E7EB;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 50px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #4338CA;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background-color: rgba(79, 70, 229, 0.1);
    transform: translateY(-3px);
}

/* Navegación */
.navbar {
    background-color: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    padding: 150px 0 80px;
    margin-top: 70px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.code-animation {
    background-color: var(--dark-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    font-family: 'Courier New', monospace;
    color: #E5E7EB;
    width: 100%;
    max-width: 450px;
}

.code-line {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.code-keyword {
    color: #F472B6;
}

.code-var {
    color: #60A5FA;
}

.code-string {
    color: #34D399;
}

.code-function {
    color: #FBBF24;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.service-description {
    color: var(--text-light);
    margin-bottom: 20px;
}

.service-list {
    list-style: none;
}

.service-list li {
    margin-bottom: 8px;
    padding-left: 22px;
    position: relative;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Portfolio Section */
.portfolio {
    background-color: #F9FAFB;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.portfolio-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.portfolio-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-tech {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.tech-tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
}

.portfolio-content {
    padding: 25px;
}

.portfolio-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.portfolio-description {
    color: var(--text-light);
    margin-bottom: 20px;
}

.portfolio-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.portfolio-link:hover {
    gap: 10px;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.skills {
    margin: 30px 0;
}

.skills h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background-color: #E0E7FF;
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.experience {
    margin-top: 30px;
}

.experience h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.experience-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.experience-item h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.experience-duration {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}

.about-image {
    flex: 1;
}

.developer-image {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, #4F46E5 0%, #10B981 100%);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.stat {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Contact Section */
.contact-content {
    display: flex;
    gap: 60px;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-icon {
    background-color: #E0E7FF;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-details p {
    color: var(--text-light);
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo .logo {
    color: white;
    font-size: 2rem;
    display: block;
    margin-bottom: 15px;
}

.footer-logo p {
    color: #9CA3AF;
    max-width: 300px;
}

.footer-links h3, .footer-services h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul, .footer-services ul {
    list-style: none;
}

.footer-links li, .footer-services li {
    margin-bottom: 10px;
}

.footer-links a, .footer-services a {
    color: #9CA3AF;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover, .footer-services a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9CA3AF;
    font-size: 0.9rem;
}