/* Reset y variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #9146ff;
    --primary-hover: #7c3aed;
    --secondary-color: #1f2937;
    --background-color: #0f0f23;
    --surface-color: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 80px; /* Espacio para el menú flotante */
}

/* Menú flotante estilo Twitch */
.floating-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 70px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--surface-color);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(145, 70, 255, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

.nav-icon {
    font-size: 1.2rem;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border-radius: 6px;
    margin: 0.25rem;
}

.dropdown-item:hover {
    color: var(--text-primary);
    background-color: var(--surface-color);
}

.dropdown-item.active {
    color: var(--primary-color);
    background-color: rgba(145, 70, 255, 0.1);
}

/* Contenido principal */
.main-content {
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

/* Sección Home */
/* Sección Home - Diseño de Perfil */
.home-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.profile-container {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.profile-info {
    flex: 1;
}

.profile-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(145, 70, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 25px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.social-icon {
    font-size: 1.2rem;
}

.profile-image-container {
    position: relative;
    flex-shrink: 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.profile-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    animation: pulse 2s infinite;
}

.badge-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-text::before {
    content: "●";
    color: #10b981;
    font-size: 1.2rem;
}

.profile-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.profile-content h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.profile-content h3 {
    color: var(--text-primary);
    font-size: 2rem;
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 500;
}

.profile-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.profile-content li {
    margin: 0.5rem 0;
    font-weight: 400;
}

.profile-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.profile-content em {
    color: var(--text-primary);
    font-style: italic;
    font-size: 1.1rem;
    display: block;
    margin-top: 2rem;
    text-align: center;
    padding: 1rem;
    background: rgba(145, 70, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Galería de imágenes */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Overlay sutil en hover */
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(145, 70, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    margin: 2% auto;
    width: 90%;
    max-width: 900px;
    background: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    min-height: 600px;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--primary-color);
    background: rgba(145, 70, 255, 0.2);
}

.modal-body {
    display: flex;
    width: 100%;
    min-height: 600px;
}

.modal-body img {
    width: 60%;
    height: 600px;
    object-fit: cover;
    border-radius: 0;
}

.modal-info {
    width: 40%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--background-color);
}

.modal-info h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.modal-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Sección Gallery */
.gallery-section {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.gallery-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Sección Contact */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.contact-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        font-size: 1rem;
        border-radius: 0;
        justify-content: center;
        border-bottom: 1px solid rgba(55, 65, 81, 0.3);
    }
    
    .nav-link:hover {
        background-color: var(--surface-color);
        transform: none;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .dropdown-menu {
        position: static;
        background: var(--background-color);
        border: none;
        border-radius: 0;
        min-width: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown-menu.show {
        max-height: 200px;
    }
    
    .dropdown-item {
        padding: 1rem 3rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(55, 65, 81, 0.2);
        margin: 0;
        border-radius: 0;
    }
    
    .dropdown-item:hover {
        background-color: rgba(145, 70, 255, 0.1);
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        min-height: auto;
    }
    
    .modal-body {
        flex-direction: column;
        min-height: auto;
    }
    
    .modal-body img {
        width: 100%;
        height: 300px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-info {
        width: 100%;
        padding: 2rem;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .instagram-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .profile-title {
        font-size: 2.5rem;
    }
    
    .profile-subtitle {
        font-size: 1.2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .profile-container {
        padding: 2rem;
    }
    
    .profile-content h2 {
        font-size: 2rem;
    }
    
    .profile-content h3 {
        font-size: 1.5rem;
    }
}

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

.gallery-item,
.home-content,
.contact-content {
    animation: fadeIn 0.6s ease-out;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Estilos para páginas de sección */
.post-list-section,
.contact-section,
.post-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.post-list-section h1,
.contact-section h1,
.post-section h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.post-list-content,
.contact-content,
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.post-list-content h2,
.contact-content h2,
.post-content h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
}

.post-list-content h3,
.contact-content h3,
.post-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 1.5rem 0 0.5rem 0;
}

.post-list-content ul,
.contact-content ul,
.post-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-list-content li,
.contact-content li,
.post-content li {
    margin: 0.5rem 0;
}

.post-list-content a,
.contact-content a,
.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-list-content a:hover,
.contact-content a:hover,
.post-content a:hover {
    color: var(--primary-hover);
}

/* Galería estilo Instagram */
.instagram-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface-color);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(145, 70, 255, 0.8), rgba(124, 58, 237, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gallery-info {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-info p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Additional mobile styles for better UX */
@media (max-width: 768px) {
    /* Prevent horizontal scroll when menu is open */
    body.menu-open {
        overflow-x: hidden;
    }
    
    /* Improve touch targets for mobile */
    .nav-link,
    .dropdown-item {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    /* Better spacing for mobile navigation */
    .nav-brand a {
        font-size: 1.3rem;
    }
    
    /* Ensure hamburger is easily tappable */
    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 7px;
    }
}

/* Responsive para páginas de sección */
@media (max-width: 768px) {
    .post-list-section,
    .contact-section,
    .post-section {
        padding: 1rem;
    }
    
    .post-list-section h1,
    .contact-section h1,
    .post-section h1 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
}
