:root {
    --bg-color: #e2e8e9;
    --text-color: #000;
    --accent-red: #ff0032;
    --dark-bg: #2d2d2d;
    --glass-bg: rgba(45, 45, 45, 0.85);
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-dark: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Host Grotesk', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 200vh;
}

/* --- NAV GLASS MEJORADO --- */
.nav-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: auto;
    pointer-events: none;
}

.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-radius: 100px;
    padding: 15px 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 600px;
    gap: 40px;
    pointer-events: all;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Efecto de gota inicial */
.glass-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--accent-red);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.3;
    filter: blur(10px);
    z-index: -1;
}

/* Logo izquierdo (Hablemos $) */
.logo-left {
    flex-shrink: 0;
}

.logo-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 0, 50, 0.1);
    border: 1px solid rgba(255, 0, 50, 0.3);
    transition: all 0.3s ease;
    position: fixed;
    top: 20px;
    left: 20px;
}

.logo-link:hover {
    background: rgba(255, 0, 50, 0.2);
    transform: scale(1.05);
}

/* Navegación central */
.nav-center {
    display: flex;
    gap: 40px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    position: relative;
    text-decoration: none;
    overflow: hidden;
    height: 50px;
    display: flex;
    align-items: center;
    perspective: 600px;
}

.link-text, .link-hover {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Host Grotesk', sans-serif;
    font-size: medium;
    opacity: 0.8;
}

.link-hover {
    transform: translateY(100%) rotateX(-90deg);
    opacity: 0;
    color: var(--accent-red);
}

.nav-link:hover .link-text {
    transform: translateY(-100%) rotateX(90deg);
    opacity: 0;
}

.nav-link:hover .link-hover {
    transform: translateY(0) rotateX(0);
    opacity: 1;
}

/* Logo derecho (PORTAFOLIO) */
.logo-right {
    flex-shrink: 0;
}

.logo-circle {
    width: 100px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-text {
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    margin-top: 80px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero izquierda */
.hero-left {
    padding-right: 40px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.badge span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-dark);
}

.toggle {
    width: 50px;
    height: 25px;
    background: var(--dark-bg);
    border-radius: 25px;
    position: relative;
    cursor: pointer;
}

.toggle-circle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: var(--accent-red);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle:hover .toggle-circle {
    transform: translateX(25px);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 30px;
    font-weight: 700;
}

.italic {
    font-style: italic;
    position: relative;
    display: inline-block;
}

.italic::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

h1:hover .italic::after {
    transform: scaleX(1);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--gray-dark);
    margin-bottom: 40px;
    max-width: 500px;
}

.counter {
    color: var(--accent-red);
    font-weight: 700;
    font-size: 1.3rem;
    display: inline-block;
    min-width: 50px;
}

/* Botón con vista previa */
.button-wrapper {
    position: relative;
    display: inline-block;
}

.btn-red {
    --glow-color: #ff0032;
    --glow-spread-color: rgba(255, 0, 50, 0.4);
    --btn-color: #ff0032;
    border: .25em solid var(--glow-color);
    padding: 1em 2.5em;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    background-color: var(--btn-color);
    border-radius: 3em;
    outline: none;
    box-shadow: 0 0 1em .25em var(--glow-color),
                0 0 2em 0.5em var(--glow-spread-color);
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.btn-red::after {
    pointer-events: none;
    content: "";
    position: absolute;
    top: 120%;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--glow-spread-color);
    filter: blur(2em);
    opacity: .7;
    transform: perspective(1.5em) rotateX(35deg) scale(1, .6);
}

.btn-red:hover {
    transform: scale(1.05);
    box-shadow: 0 0 1.5em .3em var(--glow-color),
                0 0 3em 1em var(--glow-spread-color);
}

.btn-red:active {
    transform: scale(0.98);
}

/* Vista previa de proyectos */
.projects-preview {
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px;
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 100;
    margin-top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.button-wrapper:hover .projects-preview {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.preview-item {
    border-radius: 10px;
    overflow: hidden;
    height: 120px;
    position: relative;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.preview-item:hover img {
    transform: scale(1.1);
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.preview-item:hover .preview-overlay {
    transform: translateY(0);
}

.preview-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--accent-red);
    transform: scale(1.2);
}

/* Hero derecha (Imagen) */
.hero-right {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.image-frame {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    background: var(--dark-bg);
}

#main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) contrast(110%);
    transition: filter 0.5s ease;
}

.image-frame:hover #main-image {
    filter: grayscale(0%) contrast(120%);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 40px;
    color: white;
}

.overlay-text h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.overlay-text p {
    font-size: 1rem;
    opacity: 0.8;
    max-width: 400px;
}

.floating-dot {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: var(--accent-red);
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.8;
    box-shadow: 0 0 30px rgba(255, 0, 50, 0.5);
    pointer-events: none;
}

/* Secciones adicionales */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 0;
}

.projects-section h2,
.content-section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.projects-section p,
.content-section p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
    color: var(--gray-dark);
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-info p {
    font-size: 0.95rem;
    color: var(--gray-dark);
    margin-bottom: 15px;
    text-align: left;
}

.project-tag {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 0, 50, 0.1);
    color: var(--accent-red);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.content-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 50, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent-red);
    font-size: 1.5rem;
}

.content-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.content-card p {
    color: var(--gray-dark);
    font-size: 0.95rem;
}

/* Efecto de selección de texto */
::selection {
    background-color: var(--text-color);
    color: var(--white);
}

.selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: blur(0px);
    pointer-events: none;
    z-index: 9999;
    transition: backdrop-filter 0.3s ease;
    opacity: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-left {
        padding-right: 0;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto 40px;
    }
    
    .hero-right {
        height: 60vh;
    }
    
    .glass-nav {
        min-width: 500px;
        padding: 12px 30px;
    }
    
    .projects-grid,
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .glass-nav {
        min-width: 90vw;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        border-radius: 30px;
    }
    
    .nav-center {
        gap: 20px;
    }
    
    .hero {
        margin-top: 120px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .projects-preview {
        width: 300px;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
    }
    
    .button-wrapper:hover .projects-preview {
        transform: translateX(-50%) translateY(0);
    }
    
    .projects-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
}