:root {
    --primary-color: #9b4dca;
    --secondary-color: #ff69b4;
    --background-color: #f8f9fa;
    --text-color: #333;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Header y Navegación */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Sección Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0 1rem;
}

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

.profile-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
    object-fit: cover;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
}

/* Secciones Generales */
section {
    padding: 5rem 1rem;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d1414
}

/* Sobre Mí */
.about {
    background-color: var(--white);
}

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

/* Proyectos */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tarjetas frontend visualmente mejoradas */
.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 380px;
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(155,77,202,0.10), 0 1.5px 6px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
    margin-bottom: 1.5rem;
    text-decoration: none;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.project-card .video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    object-fit: cover;
    z-index: 1;
    opacity: 0.7;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    pointer-events: none;
}

.project-card .content-overlay {
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem 1rem 1rem 1rem;
    color: var(--white);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.project-card h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    /* margin: 0 0 0.3rem 0; */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.25);
    margin-left: 10px;
    margin-top: 20px;
}

.project-card p {
    font-size: 1rem;
    color: #f3f3f3;
    margin: 0 0 0.5rem 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.18);
    margin-left: 10px;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 12px 32px rgba(155,77,202,0.18), 0 3px 12px rgba(0,0,0,0.12);
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    .project-card {
        min-height: 320px;
    }
    .project-card img, .project-card .video-background {
        height: 160px;
    }
    .project-card .content-overlay {
        min-height: 160px;
    }
}

.project-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-github, .btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease;
}

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

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

.btn-github:hover, .btn-demo:hover {
    transform: translateY(-3px);
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.project-video {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.project-video video {
    width: 100%;
    display: block;
}

.project-info {
    padding: 1rem;
}

.project-info h2 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
}

.project-info h2:first-child {
    margin-top: 0;
}

.project-info ul {
    list-style: none;
    padding: 0;
}

.project-info li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.project-info li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-item {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.skill-category li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

/* Contacto */
.contact {
    background-color: var(--white);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 5px;
    font-size: 1rem;
}

#contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

/* Carrusel de imágenes para proyectos */
.carousel {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
}
.carousel-track {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
    position: relative;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    background: #fff;
}
.carousel-img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s;
    position: absolute;
    top: 0; left: 0;
    border-radius: 18px;
    z-index: 1;
}
.carousel-img.active {
    opacity: 1;
    z-index: 2;
}
.carousel-btn {
    background: rgba(155,77,202,0.8);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    transition: background 0.2s;
}
.carousel-btn:hover {
    background: var(--secondary-color);
}
.carousel-btn.prev {
    left: 10px;
}
.carousel-btn.next {
    right: 10px;
}
@media (max-width: 600px) {
    .carousel {
        max-width: 100%;
        height: 180px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    section {
        padding: 3rem 1rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .project-content {
        grid-template-columns: 1fr;
    }
    
    .project-header h1 {
        font-size: 2rem;
    }
    
    .project-links {
        flex-direction: column;
    }
}

/* Páginas de Proyectos */
.projects-hero {
    height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0 1rem;
    margin-top: 60px;
}

.projects-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.projects-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Navegación activa */
.nav-links a.active {
    color: var(--primary-color);
    font-weight: bold;
}

/* Ajustes para la página de proyectos */
.projects {
    padding-top: 2rem;
}

/* Página de detalle del proyecto */
.project-detail {
    padding: 120px 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-header {
    text-align: center;
    margin-bottom: 3rem;
}

.project-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-github, .btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease;
}

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

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

.btn-github:hover, .btn-demo:hover {
    transform: translateY(-3px);
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.project-video {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.project-video video {
    width: 100%;
    display: block;
}

.project-info {
    padding: 1rem;
}

.project-info h2 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
}

.project-info h2:first-child {
    margin-top: 0;
}

.project-info ul {
    list-style: none;
    padding: 0;
}

.project-info li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.project-info li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-item {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .project-content {
        grid-template-columns: 1fr;
    }
    
    .project-header h1 {
        font-size: 2rem;
    }
    
    .project-links {
        flex-direction: column;
    }
}