/* =================================
   RAVIOL.DEV - MAIN STYLESHEET
   Estructura modular y organizada
   ================================= */

/* Importar módulos principales */
@import url('css/variables.css');
@import url('css/reset.css');
@import url('css/background.css');
@import url('css/navigation.css');
@import url('css/components.css');

/* =================================
   SECCIÓN HERO
   ================================= */

.hero {
    height: 65vh;
    padding: calc(var(--nav-height) + 6rem) 0 6rem;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 2rem;
}

.hero-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

.glow-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(var(--glow-primary));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2rem;
    margin: 2rem 0 0 0;
    max-width: 100%;
}

.hero-buttons .btn {
    width: auto;
    min-width: 200px;
    max-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    text-align: center;
}

/* =================================
   VENTANA DE CÓDIGO
   ================================= */

.hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.code-window {
    background: var(--bg-secondary);
    border-radius: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    overflow: hidden;
    backdrop-filter: blur(20px);
    position: relative;
    animation: codeGlow 4s ease-in-out infinite alternate;
}

@keyframes codeGlow {
    0% {
        box-shadow: 
            var(--shadow-xl), 
            0 0 15px rgba(99, 102, 241, 0.2);
        border-color: rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 
            var(--shadow-xl), 
            0 0 20px rgba(139, 92, 246, 0.3);
        border-color: rgba(139, 92, 246, 0.3);
    }
    100% {
        box-shadow: 
            var(--shadow-xl), 
            0 0 18px rgba(6, 182, 212, 0.25);
        border-color: rgba(6, 182, 212, 0.3);
    }
}

.window-header {
    background: var(--bg-tertiary);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.close { background: #ff5f57; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #28ca42; }

.window-title {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.code-content {
    padding: 1.5rem;
    padding-bottom: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    min-height: 60px;
    transition: all 0.1s ease-out;
    overflow: hidden;
    height: auto;
    max-height: none;
}

/* Colores del código */
.code-comment { color: #6b7280; }
.code-keyword { color: #8b5cf6; }
.code-variable { color: #06b6d4; }
.code-property { color: #10b981; }
.code-string { color: #f59e0b; }
.code-method { color: #ef4444; }

/* =================================
   SECCIÓN APLICACIONES
   ================================= */

.apps {
    padding: 120px 0.1rem 40px;
    margin-top: 20px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: stretch;
}

.app-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-xl), var(--glow-secondary);
}

.app-card.coming-soon {
    opacity: 0.7;
}

.app-image {
    width: 100%;
    height: 120px;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.app-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
}

.app-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.app-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.app-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.app-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
    min-height: 120px;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    min-height: 32px;
    align-items: flex-start;
    flex-shrink: 0;
}

.app-status {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    flex-shrink: 0;
}

.app-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-gradient);
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.app-card:hover .app-glow {
    opacity: 0.1;
}

/* =================================
   SECCIÓN ABOUT
   ================================= */

.about {
    padding: 40px 0.1rem 25px;
    margin-top: 15px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: start;
}

.about-description p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.skills-section {
    margin-top: 3rem;
}

.skills-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.skill-item {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--glow-primary);
}

.skill-name {
    display: block;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.skill-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Tarjeta de perfil */
.profile-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.profile-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
}

.profile-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.3;
    z-index: -1;
}

.profile-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =================================
   FOOTER
   ================================= */

.footer {
    background: rgba(10, 10, 15, 0.6);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding: 1.5rem 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(17, 17, 24, 0.4) 0%, rgba(10, 10, 15, 0.7) 100%);
    z-index: -1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    width: 24px;
    height: 24px;
}

.footer-text p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* =================================
   RESPONSIVE DESIGN PRINCIPAL
   ================================= */

@media (max-width: 1024px) {
    .hero {
        height: 60vh;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-buttons {
        align-items: center;
        justify-content: center;
        margin: 2rem auto 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .profile-card {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 40px 0;
    }
    
    .hero {
        height: 60vh;
        padding: calc(var(--nav-height) + 5rem) 0 4rem;
        margin-top: 1rem;
    }
    
    .apps {
        padding: 40px 0 60px;
    }
    
    .about {
        padding: 60px 0 40px;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-container {
        padding: 0 0.1rem;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        justify-content: center;
        align-items: center;
        max-width: 350px;
        margin: 0 auto;
        padding-top: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Ocultar botón "saber más" en tablets */
    .hero-buttons .btn:nth-child(2) {
        display: none;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .app-card {
        padding: 1.5rem;
        margin: 0 0.5rem 1.5rem 0.5rem;
    }
    
    .app-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        padding: 0 1rem;
    }
    
    .profile-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 1rem 0;
    }
    
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
        justify-content: center;
    }
    
    .footer-links a {
        padding: 0.5rem 0;
        background: none;
        border: none;
        border-radius: 0;
        width: auto;
        text-align: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        margin: 0;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }
    
    .footer-links a:hover {
        color: var(--accent-primary);
        background: none;
        transform: none;
    }
    
    .footer-links a img {
        width: 14px;
        height: 14px;
    }
    
    /* Card "Next Project" mismo ancho que otras cards pero menos altura */
    .app-card.coming-soon {
        padding: 1.25rem 1.5rem;
        margin: 0 0 1rem 0;
        max-width: none;
        height: auto;
    }
    
    .app-card.coming-soon .app-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .app-card.coming-soon .app-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        min-height: auto;
    }
    
    .app-card.coming-soon .app-content h3 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .app-card.coming-soon .app-content {
        min-height: auto;
    }
    
    .app-card.coming-soon .app-tags {
        margin-bottom: 1rem;
        min-height: auto;
    }
    
    .app-card.coming-soon .app-status {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 500px;
        padding: calc(var(--nav-height) + 100px) 0 60px;
        margin-top: 1rem;
    }
    
    .hero-container {
        padding: 0 0.1rem;
        gap: 30px;
        max-width: 350px;
        margin: 0 auto;
        text-align: center;
        grid-template-columns: 1fr;
        justify-content: center;
        align-items: center;
        padding-top: 60px;
    }
    
    .hero-visual {
        display: block !important;
        width: 100%;
        order: 2;
        padding: 0 0.1rem;
    }
    
    .code-window {
        margin: 0 !important;
        border-radius: 0.5rem;
        max-width: 100%;
        min-height: 200px;
    }
    
    .code-content {
        padding: 1.5rem !important;
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
        min-height: 80px;
    }
    
    .hero-content {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        order: 1;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-top: 40px;
        margin-bottom: 25px;
        padding: 0 0.1rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        max-width: 100%;
        margin-bottom: 30px;
        padding: 0 0.1rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-buttons {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 18px;
        margin: 25px auto 0;
        max-width: 280px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 260px;
        padding: 0.875rem 1.25rem;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.875rem;
    }
    
    /* Ocultar botón "saber más" en móvil */
    .hero-buttons .btn:nth-child(2) {
        display: none;
    }

    .apps {
        padding: 120px 0.1rem 50px;
        margin-top: 1rem;
    }
    
    .about {
        padding: 50px 0.1rem 30px;
        margin-top: 1rem;
    }
    
    .footer {
        margin-top: 2rem;
        padding: 2rem 0;
    }
    
    .footer-content {
        gap: 1rem;
        padding: 0.75rem 0;
    }
    
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
    }
    
    .footer-links a {
        padding: 0.25rem 0;
        background: none;
        border: none;
        border-radius: 0;
        width: auto;
        text-align: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        margin: 0;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }
    
    .footer-links a:hover {
        color: var(--accent-primary);
        background: none;
        transform: none;
    }
    
    .footer-links a img {
        width: 12px;
        height: 12px;
    }
    
    /* Card "Next Project" mismo ancho que otras cards pero más compacta en móvil */
    .app-card.coming-soon {
        padding: 1rem 1.5rem;
        margin: 0 0 1rem 0;
        max-width: none;
        height: auto;
    }
    
    .app-card.coming-soon .app-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.75rem;
    }
    
    .app-card.coming-soon .app-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1rem;
        min-height: auto;
    }
    
    .app-card.coming-soon .app-content h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .app-card.coming-soon .app-content {
        min-height: auto;
    }
    
    .app-card.coming-soon .app-tags {
        margin-bottom: 0.75rem;
        min-height: auto;
    }
    
    .app-card.coming-soon .app-status {
        margin-top: 0.25rem;
    }
} 