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

:root {
    --color-bg:#e0e0e0;
    --color-text: #1f1f1f;
    --color-accent: #ec523e;
    --color-dark: #121212;
    --color-gray: #f5f5f5;
    --color-gray-dark: #333333;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    /* letter-spacing: -2px; */
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

.letter-spacing{
    letter-spacing: -2px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Navegación Superior */
.top-nav {
    position: absolute;
    top: 0;
    background: transparent;
    width: 100%;
    z-index: 1000;
    padding: 20px 60px;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    letter-spacing: -2px;
}

.top-nav.scrolled {
    /* background: rgba(224, 224, 224, 0.9); */
    /* backdrop-filter: blur(10px); */
    position: absolute;
}

.top-nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    gap: 50px;
}

.top-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.3s;
}

.top-nav a:hover {
    color: var(--color-accent);
}

/* Botón Hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-line {
    width: 30px;
    height: 3px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
    border-radius: 3px;
}

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

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

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

/* Menú Fullscreen Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-close {
    position: absolute;
    top: 30px;
    right: 60px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1003;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active .menu-close {
    opacity: 1;
}

.menu-close span {
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--color-text);
    top: 50%;
    left: 50%;
    transition: all 0.3s ease;
}

.menu-close span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.menu-close span:nth-child(2) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.menu-fullscreen {
    text-align: center;
}

.menu-fullscreen ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-fullscreen li {
    margin: 30px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.menu-overlay.active .menu-fullscreen li {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay.active .menu-fullscreen li:nth-child(1) {
    transition-delay: 0.1s;
}

.menu-overlay.active .menu-fullscreen li:nth-child(2) {
    transition-delay: 0.2s;
}

.menu-overlay.active .menu-fullscreen li:nth-child(3) {
    transition-delay: 0.3s;
}

.menu-overlay.active .menu-fullscreen li:nth-child(4) {
    transition-delay: 0.4s;
}

.menu-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 600;
    letter-spacing: -3px;
    transition: all 0.3s ease;
    display: inline-block;
}

.menu-link:hover {
    color: var(--color-accent);
    transform: translateX(20px);
}

/* Redes Sociales Laterales */
.social-sidebar {
    position: absolute;
    left: 30px;
    top: 85%;
    transform: translateY(-50%);
    z-index: 100;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
}

.social-link i {
    font-size: 18px;
}

.social-link:hover {
    color: var(--color-accent);
}

.social-link span {
    opacity: 0;
    transition: opacity 0.3s;
}

.social-link:hover span {
    opacity: 1;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* border: 15px solid white;
    border-radius: 40px; */
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
    background-image: url('../images/img2.webp');
    /* background-size: cover; */
    background-repeat: no-repeat;
    background-position: center;
    filter: grayscale(90%) saturate(2.5);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
}

.hero-content {
    position: absolute;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 120px;
}

.hero-name {
    font-size: clamp(40px, 15vw, 290px);
    font-weight: 600;
    color: var(--color-text);
    line-height: 1;
    letter-spacing: -17px;
    text-align: center;
    white-space: nowrap;
    max-width: 95vw;
    text-shadow:
        -0.5px -0.5px 0 var(--color-bg),
         0.5px -0.5px 0 var(--color-bg),
        -0.5px  0.5px 0 var(--color-bg),
         0.5px  0.5px 0 var(--color-bg);
}

.hero-subtitle {
    position: absolute;
    bottom: 80px;
    right: 120px;
    text-align: right;
    font-size: clamp(20px, 4vw, 72px);
    font-weight: 500;
    letter-spacing: -5px;
    color: var(--color-text);
    text-shadow:
        -1px -1px 0 var(--color-bg),
         1px -1px 0 var(--color-bg),
        -1px  1px 0 var(--color-bg),
         1px  1px 0 var(--color-bg);
}

/* About Section */
.about-section {
    background-color: var(--color-dark);
    color: white;
    padding: 120px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.about-content {
    max-width: 1000px;
}

.about-title {
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.4;
    margin-bottom: 40px;
    font-weight: 400;
}

.text-accent {
    color: var(--color-accent);
    font-weight: 500;
}

.box-about {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
}

.about-description {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 50px;
    max-width: 700px;
}

.btn-work {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    color: var(--color-gray);
    text-decoration: none;
    border: 1px solid var(--color-gray-dark);
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-transform: uppercase;
    border-radius: 50px;
}

.btn-work:hover {
    background-color: white;
    color: var(--color-dark);
}

/* Services Section */
.services-section {
    background-color: var(--color-dark);
    color: white;
    padding: 100px 0;
}

.section-label {
    color: var(--color-accent);
    font-size:1.5rem;
    letter-spacing: -2px;
    /* text-transform: uppercase; */
    margin-bottom: 80px;
    font-weight: 500;
}

.service-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 60px;
    margin-bottom: 120px;
    padding-bottom: 120px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-item:last-child {
    border-bottom: none;
}

.service-number {
    font-size: 180px;
    font-weight: 300;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    line-height: 1;
}

.service-title {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: -2px;
}

.service-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 50px;
    line-height: 1.8;
    max-width: 600px;
}

.service-list {
    list-style: none;
}

.service-list li {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    transition: color 0.3s;
}

.service-list li:hover {
    color: var(--color-accent);
}

.item-number {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

/* Projects Section */
.projects-section {
    background-color: var(--color-dark);
    /* padding: 120px 0; */
    position: relative;
    margin-top: -100px;
    padding-bottom: 100px;
}

.projects-section .section-label {
    color: var(--color-accent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    gap: 5px;
    margin-top: 60px;
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* border-radius: 10px; */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(233, 218, 216, 0.033) 0%, rgba(18, 18, 18, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.project-card:hover .project-image {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.project-card:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: contrast(0.8) brightness(0.9);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 50%, transparent 100%);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.project-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
    color: white;
    letter-spacing: -1px;
}

.project-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bento Box Layout - Diferentes tamaños */
.project-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.project-card:nth-child(2) {
    grid-column: span 2;
    grid-row: span 1;
}

.project-card:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}

.project-card:nth-child(4) {
    grid-column: span 1;
    grid-row: span 2;
}

.project-card:nth-child(5) {
    grid-column: span 2;
    grid-row: span 1;
}

.project-card:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
}

.project-card:nth-child(7) {
    grid-column: span 2;
    grid-row: span 2;
}

.project-card:nth-child(8) {
    grid-column: span 1;
    grid-row: span 1;
}

/* Contact Section */
.contact-section {
    background-color: var(--color-dark);
    color: white;
    padding: 120px 0 100px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
}

.contact-left {
    padding-right: 40px;
}

.contact-title {
    font-size: clamp(28px, 3.5vw, 28px);
    margin-bottom: 50px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -1px;
}

.btn-contact-outline {
    display: inline-block;
    padding: 20px 60px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 14px;
    letter-spacing: 2px;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: 500;
}

.btn-contact-outline:hover {
    background-color: white;
    color: var(--color-dark);
    border-color: white;
}

.contact-right {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-link {
    font-size: clamp(20px, 2.5vw, 22px);
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--color-accent);
}

.contact-socials {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-social-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    text-decoration: none;
    font-size: clamp(18px, 2vw, 24px);
    transition: color 0.3s;
    font-weight: 400;
}

.contact-social-link i {
    font-size: clamp(20px, 2.2vw, 28px);
}

.contact-social-link:hover {
    color: var(--color-accent);
}

/* Footer */
.footer {
    background-color: var(--color-dark);
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 40px 0;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Botón Scroll to Top */
.scroll-to-top {
    position: absolute;
    bottom: 200px;
    right: 140px;
    width: 90px;
    height: 90px;
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--color-gray-dark);
}

.scroll-to-top:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
    transform: translateY(-5px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Cursor personalizado */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
    transform: translate(-50%, -50%);
}

/* Selección de texto personalizada */
::selection {
    background-color: var(--color-accent);
    color: white;
}

::-moz-selection {
    background-color: var(--color-accent);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }
    
    .top-nav {
        padding: 20px 40px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    
    .top-nav ul {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .menu-close {
        right: 40px;
    }
    
    .hero-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 100%);
    }
    
    .hero-content {
        padding: 60px 40px;
    }
    
    .hero-subtitle {
        bottom: 60px;
        right: 40px;
    }
    
    .service-item {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .service-number {
        font-size: 80px;
    }
    
    .contact-grid {
        gap: 60px;
    }
    
    .contact-left {
        padding-right: 20px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 280px;
        gap: 15px;
    }
    
    .project-card:nth-child(1),
    .project-card:nth-child(7) {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .project-card:nth-child(2),
    .project-card:nth-child(5) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .project-card:nth-child(3),
    .project-card:nth-child(6),
    .project-card:nth-child(8) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .project-card:nth-child(4) {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .top-nav {
        padding: 15px 20px;
    }
    
    .top-nav ul {
        gap: 20px;
    }
    
    .social-sidebar {
        display: none;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .hero-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 40%, rgba(255, 255, 255, 0.2) 100%);
    }

    .hero-name{
        font-size:70px;
        letter-spacing: -5px;
        text-shadow:
            -1px -1px 0 var(--color-bg),
            1px -1px 0 var(--color-bg),
            -1px  1px 0 var(--color-bg),
            1px  1px 0 var(--color-bg);
    }
    
    .hero-content {
        padding: 40px 20px;
        justify-content: center;
        text-align: center;
    }
    
    .hero-subtitle {
        color: var(--color-gray);
        align-self: center;
        text-align: center;
        margin-top: 30px;
        font-size: 50px;
        letter-spacing: -3px;
        text-shadow: none;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 320px;
        gap: 15px;
    }
    
    .project-card:nth-child(1),
    .project-card:nth-child(2),
    .project-card:nth-child(3),
    .project-card:nth-child(4),
    .project-card:nth-child(5),
    .project-card:nth-child(6),
    .project-card:nth-child(7),
    .project-card:nth-child(8) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .project-info {
        opacity: 1;
        transform: translateY(0);
    }
    
    .service-list li {
        font-size: 16px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .contact-left {
        padding-right: 0;
    }
    
    .contact-right {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .top-nav ul {
        gap: 15px;
    }
    
    .top-nav a {
        font-size: 12px;
    }
    
    /* .hero-name {
        font-size: clamp(30px, 12vw, 50px);
        letter-spacing: -8px;
    } */
    
    /* .hero-subtitle {
        font-size: 18px;
    } */
}

