* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0A0C10;
    font-family: 'Inter', sans-serif;
    color: #E9ECF2;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h1, h2, h3, .logo, .nav-links a, .btn, .service-card h3 {
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(46, 54, 68, 0.5);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(10, 12, 16, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #FFFFFF 0%, #fe9e4f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.logo span {
    background: none;
    color: #fae19ee0;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #feb84f;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #D1D8E7;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #feb84f, #ff6b3d);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #feb24f;
}

.btn-outline {
    border: 1px solid #feac4f;
    padding: 8px 18px;
    border-radius: 40px;
    background: transparent;
    color: #feac4f;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(254, 172, 79, 0.1);
    transform: translateY(-2px);
}

/* Work Section */
.work {
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #FFFFFF, #feb84f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.port-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.port-item {
    background: linear-gradient(135deg, #0F1117, #0A0C10);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(254, 184, 79, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

.port-item:nth-child(1) { --delay: 1; }
.port-item:nth-child(2) { --delay: 2; }
.port-item:nth-child(3) { --delay: 3; }
.port-item:nth-child(4) { --delay: 4; }

.port-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254, 184, 79, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.port-item:hover::before {
    left: 100%;
}

.port-item:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(254, 184, 79, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(254, 184, 79, 0.2);
}

.port-item:active {
    transform: scale(0.98);
}

.port-img {
    background: linear-gradient(135deg, #1A1E28, #13161E);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #fea44f;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.port-img i {
    transition: all 0.3s ease;
}

.port-item:hover .port-img i {
    transform: scale(1) rotate(1deg);
    color: #feb84f;
}

.port-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(254, 184, 79, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.port-item:hover .port-img::after {
    opacity: 1;
}

.port-info {
    padding: 1.8rem;
    position: relative;
    z-index: 1;
}

.port-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #feb84f;
    transition: transform 0.3s ease;
}

.port-item:hover .port-info h4 {
    transform: translateX(5px);
}

.port-info p {
    font-size: 0.9rem;
    color: #9aa9c1;
    line-height: 1.6;
}

/* Modal de Vista Previa de la Página Web */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.preview-modal.active {
    display: flex;
    opacity: 1;
}

.preview-container {
    background: #0F1117;
    width: 95%;
    max-width: 1500px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid rgba(219, 140, 36, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.preview-modal.active .preview-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.preview-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #1A1E28, #13161E);
    border-bottom: 1px solid rgba(254, 184, 79, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    color: #feb84f;
    font-size: 1.2rem;
}

.preview-buttons {
    display: flex;
    gap: 1rem;
}

.preview-btn {
    padding: 8px 20px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.preview-btn.visit {
    background: linear-gradient(135deg, #feb84f, #ff6b3d);
    color: #0A0C10;
}

.preview-btn.visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 184, 79, 0.4);
}

.preview-btn.close {
    background: transparent;
    border: 1px solid #feb84f;
    color: #feb84f;
}

.preview-btn.close:hover {
    background: rgba(254, 184, 79, 0.1);
    transform: translateY(-2px);
}

.preview-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

/* Efecto Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(254, 184, 79, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Footer */
footer {
    border-top: 1px solid rgba(254, 184, 79, 0.2);
    padding: 40px 0;
    text-align: center;
    color: #7D8B9F;
    background: #0A0C10;
}

/* Responsive */
@media (max-width: 850px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, #0F1117, #0A0C10);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        padding: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .container {
        padding: 0 24px;
    }

    .work {
        padding: 100px 0 70px;
    }
    
    .preview-container {
        width: 95%;
        height: 90vh;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .port-items {
        grid-template-columns: 1fr;
    }
    
    .preview-header h3 {
        font-size: 0.7rem;
    }
    
    .preview-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .preview-container {
        width: 95%;
        height: 95vh;
    }
}