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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #ffffff;
    color: #272223;
    overflow-x: hidden;
}

/* Navegación */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: #e888e2;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

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

.nav-links a {
    color: #272223;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #667eea;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    max-width: none;
    margin: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("img/img/banner.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.5rem;
    color: #000000;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Secciones */
section {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

#proyectos {
    padding: 5rem 5%;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Grid de Proyectos Dinámico - Masonry Style */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: 200px;
    gap: 1.5rem;
}

.project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Diferentes tamaños para grid dinámico */
.project-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}
.project-card:nth-child(2) {
    grid-row: span 2;
}
.project-card:nth-child(3) {
    grid-row: span 3;
}

.project-card:nth-child(4) {
    grid-row: span 2;
}

.project-card:nth-child(5) {
    grid-row: span 2;
}

.project-card:nth-child(6) {
    grid-row: span 3;
}

.project-card:nth-child(7) {
    grid-row: span 2;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.project-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: opacity 0.3s;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-card:nth-child(1) .project-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.project-card:nth-child(2) .project-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.project-card:nth-child(3) .project-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.project-card:nth-child(4) .project-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.project-card:nth-child(5) .project-image {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.project-card:nth-child(6) .project-image {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.project-card:nth-child(7) .project-image {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.project-overlay p {
    color: #b0b0b0;
}
.project-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #b0b0b0;
    z-index: 10;
}
/* Página de Detalle del Proyecto */
.project-detail {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.project-detail.active {
    display: block;
}

.detail-header {
    padding: 6rem 5% 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #272223;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.back-button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: translateX(-5px);
}

.detail-hero {
    height: 60vh;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.detail-hero img,
.detail-hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

.detail-content {
    padding: 0 5% 5rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-value {
    color: #272223;
    font-size: 1.1rem;
}

.detail-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 3rem;
}

.detail-section {
    margin-bottom: 4rem;
}

.detail-section h2 {
    font-size: 2rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.detail-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1rem;
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.detail-image {
    width: 100%;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* Sección Sobre Mí */
.about {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 30px;
    padding: 5rem;
}

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

.about p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-tag {
    padding: 0.7rem 1.5rem;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 50px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    font-size: 0.9rem;
}

/* Contacto */
.contact {
    text-align: center;
}

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

.contact-link {
    color: #272223;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50px;
    transition: all 0.3s;
}

.contact-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #ffffff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 3001;
}

.lightbox-close:hover {
    color: #667eea;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

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

    .nav-links {
        display: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .project-card:nth-child(1),
    .project-card:nth-child(2),
    .project-card:nth-child(3),
    .project-card:nth-child(4),
    .project-card:nth-child(5),
    .project-card:nth-child(6) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .about {
        padding: 3rem 2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .detail-content h1 {
        font-size: 2rem;
    }

    .detail-hero {
        height: 40vh;
        font-size: 3rem;
    }

    .detail-meta {
        flex-direction: column;
        gap: 1rem;
    }
}
