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

:root {
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-900);
    line-height: 1.6;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Animaciones */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-links a.active {
    color: var(--indigo-600);
}

.nav-cta {
    background: var(--indigo-600);
    color: var(--white);
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-cta:hover {
    background: var(--indigo-700);
}

.nav-login {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-login:hover {
    color: var(--indigo-600);
}

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

/* Hero */
.hero {
    padding: 10rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--indigo-600);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
}

/* Masonry Grid */
.projects-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.project-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
}

.project-item img {
    width: 100%;
    display: block;
    border-radius: 1rem;
    transition: transform 0.4s ease;
}

/* Placeholder para proyectos sin imagen */
.project-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}

.project-placeholder i {
    font-size: 3rem;
    color: var(--gray-400);
}

.project-placeholder span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-500);
}

/* Overlay con descripción */
.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.3) 100%);
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

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

.project-item:hover img {
    transform: scale(1.05);
}

.project-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--indigo-600);
    background: rgba(255,255,255,0.95);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 0.75rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-techs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tech-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}

.project-link:hover {
    gap: 0.75rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* CTA Section */
.cta-section {
    padding: 6rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--indigo-600);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.cta-button:hover {
    background: var(--indigo-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: #fff;
    padding: 4rem 2rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

/* Responsive */

@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        position: relative;
        z-index: 1000;
    }

    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        flex-direction: column;
        padding: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin-bottom: 1rem;
        list-style: none;
        padding: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        border-radius: 0.5rem;
        transition: background 0.2s;
    }

    .nav-links a:hover {
        background: var(--gray-100);
    }

    .nav-cta, .nav-login {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
        position: relative;
    }

    .masonry-grid {
column-count: 1;
    }

    .hero {
padding: 8rem 1.5rem 3rem;
    }

    .footer-grid {
grid-template-columns: 1fr;
gap: 2rem;
    }
}
