:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --container-padding: 8%;
}

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

html {
    font-size: 18px;
    /* Base superior para que todo se vea más grande */
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animation */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary-color), transparent 70%);
    filter: blur(80px);
    opacity: 0.2;
    border-radius: 50%;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--container-padding);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(15px);
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary-color), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

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

.nav-links a:hover::after {
    width: 100%;
}

section {
    padding: 120px var(--container-padding);
    max-width: 1600px;
    /* Evitar que se estire demasiado en pantallas gigantes */
    margin: 0 auto;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    padding-top: 150px;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    /* Escalado fluido */
    line-height: 1.05;
    margin-bottom: 2rem;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 3rem;
}

.hero-img-container {
    position: relative;
    width: 500px;
    height: 500px;
    flex-shrink: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    border-radius: 3rem;
    object-fit: cover;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}

.hero-img:hover {
    transform: scale(1.03) rotate(1deg);
}

.hero-img-container::after {
    content: '';
    position: absolute;
    inset: -20px;
    border: 2px solid var(--primary-color);
    border-radius: 2.5rem;
    z-index: -1;
    opacity: 0.5;
}

.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.4);
}

/* Portfolio Gallery */
.section-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 4rem;
    font-weight: 800;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 2rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    /* Items más grandes */
    gap: 2.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 16/10;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.overlay-title {
    font-weight: 600;
    font-size: 1.4rem;
}

.overlay-category {
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Contact */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass);
    padding: 3rem;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

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

.info-item {
    text-align: center;
}

.info-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.info-item p a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
    border-bottom: 1px solid transparent;
}

.info-item p a:hover {
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-img-container {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 1024px) {
    html {
        font-size: 16px;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-content p {
        margin: 0 auto 3rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Podríamos añadir un menu burger luego si se requiere */
    }

    .hero-img-container {
        width: 300px;
        height: 300px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Music Button Styles */
.music-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--primary-color);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px rgba(0, 210, 255, 0.15);
}

.music-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px rgba(0, 210, 255, 0.3);
}

.music-btn:active {
    transform: scale(0.95);
}

.music-btn.playing {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(0, 210, 255, 0.15);
    }

    50% {
        box-shadow: 0 8px 40px rgba(0, 210, 255, 0.4);
    }
}

.music-icon {
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.music-icon.hidden {
    display: none;
}

@media (max-width: 768px) {
    .music-btn {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .music-icon {
        width: 22px;
        height: 22px;
    }
}