/* =====================================================
   LANDING PAGE - PORTAL DE PROYECTOS
   Diseño 3D Moderno y Futurista
   ===================================================== */

/* Variables CSS */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-dark: #0f0f23;
    --bg-darker: #080816;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #0ea5e9 50%, #22d3ee 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.5) 0%, rgba(34, 211, 238, 0.3) 100%);
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(99, 102, 241, 0.5);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* =====================================================
   ANIMATED BACKGROUND
   ===================================================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    top: 60%;
    right: -5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    bottom: -5%;
    left: 30%;
    animation-delay: -10s;
}

.shape-4 {
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    top: 30%;
    left: 60%;
    animation-delay: -15s;
}

.shape-5 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    top: 40%;
    left: -10%;
    animation-delay: -7s;
}

.shape-6 {
    width: 280px;
    height: 280px;
    background: var(--secondary);
    bottom: 20%;
    right: 20%;
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(30px, -30px) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) rotate(-5deg) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) rotate(3deg) scale(1.02);
    }
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition-normal);
    background: transparent;
}

.header.scrolled {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 5%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--border-radius-md);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 8% 80px;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease;
}

.hero-badge i {
    color: var(--primary-light);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.hero-cta {
    animation: fadeInUp 0.6s ease 0.3s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.floating-card {
    width: 300px;
    height: 300px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: heroFloat 6s ease-in-out infinite;
}

.floating-card .card-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient-glow);
    filter: blur(40px);
    opacity: 0.5;
    z-index: -1;
}

.hero-icon {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.5));
    animation: pulse 3s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0) rotateX(5deg) rotateY(-5deg);
    }
    50% {
        transform: translateY(-20px) rotateX(-5deg) rotateY(5deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(99, 102, 241, 0.7));
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   PROJECTS SECTION
   ===================================================== */
.projects-section {
    padding: 100px 8%;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.section-tag i {
    color: var(--primary-light);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
    transform-style: preserve-3d;
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.project-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-card .card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

.project-card:hover .card-glow {
    opacity: 0.1;
}

.project-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.project-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    box-shadow: var(--shadow-glow);
}
.project-icon-img img {
    max-width: 55px;
    max-height: 55px;
    object-fit: contain;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--primary-light);
}

.project-arrow {
    position: absolute;
    bottom: 35px;
    right: 35px;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.project-card:hover .project-arrow {
    background: var(--gradient-primary);
    color: var(--text-primary);
    transform: translateX(5px);
    border-color: transparent;
}

.project-status {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.project-status.active i {
    animation: blink 1.5s infinite;
}

.project-status.upcoming {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Coming Soon Card */
.project-card.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.project-card.coming-soon:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: none;
}

.project-card.coming-soon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(15, 15, 35, 0.5) 100%);
    pointer-events: none;
}

/* Add Project Card */
.project-card.add-project {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    border-style: dashed;
    opacity: 0.5;
    cursor: default;
}

.project-card.add-project:hover {
    transform: none;
}

.add-icon {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.add-project p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =====================================================
   ABOUT SECTION
   ===================================================== */
.about-section {
    padding: 100px 8%;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 50%, transparent 100%);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
    opacity: 0;
    transform: translateX(-30px);
}

.about-text.animate-in {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 20px 0 30px;
}

.tech-stack {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 25px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: var(--transition-normal);
}

.tech-item:hover {
    border-color: var(--border-glow);
    transform: translateY(-5px);
}

.tech-item i {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.about-visual {
    flex: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    text-align: center;
    transition: var(--transition-normal);
    opacity: 0;
    transform: scale(0.9);
}

.stat-item.animate-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-item:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    padding: 40px 8%;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.footer-logo span {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-normal);
}

.footer-links a:hover {
    background: var(--gradient-primary);
    color: var(--text-primary);
    border-color: transparent;
    transform: translateY(-3px);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 1200px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-visual {
        margin-top: 50px;
    }
    
    .floating-card {
        width: 250px;
        height: 250px;
    }
    
    .hero-icon {
        width: 120px;
        height: 120px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tech-stack {
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 5%;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 120px 5% 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .projects-section,
    .about-section {
        padding: 60px 5%;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        padding: 25px;
    }
    
    .project-arrow {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .floating-card {
        width: 200px;
        height: 200px;
    }
    
    .hero-icon {
        width: 90px;
        height: 90px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .tech-stack {
        gap: 10px;
    }
    
    .tech-item {
        padding: 15px 20px;
    }
}

/* =====================================================
   SCROLLBAR CUSTOMIZATION
   ===================================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* =====================================================
   SELECTION COLOR
   ===================================================== */
::selection {
    background: var(--primary);
    color: var(--text-primary);
}

/* =====================================================
   LOADING ANIMATION
   ===================================================== */
.project-card:nth-child(1) { transition-delay: 0.1s; }
.project-card:nth-child(2) { transition-delay: 0.2s; }
.project-card:nth-child(3) { transition-delay: 0.3s; }
.project-card:nth-child(4) { transition-delay: 0.4s; }

.stat-item:nth-child(1) { transition-delay: 0.1s; }
.stat-item:nth-child(2) { transition-delay: 0.2s; }
.stat-item:nth-child(3) { transition-delay: 0.3s; }
.stat-item:nth-child(4) { transition-delay: 0.4s; }
