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

body {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
    transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: transparent;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.95;
    z-index: -1;
}

.header-left {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
    text-transform: uppercase;
    font-family: 'Arial Black', sans-serif;
}

.category-label {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    position: relative;
    top: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.language-selector {
    display: flex;
    gap: 3px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 6px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Contraste para fundo claro (documentary) */
body[data-category="documentary"] .lang-btn {
    border-color: rgba(0, 0, 0, 0.3);
    color: rgba(0, 0, 0, 0.6);
}

body[data-category="documentary"] .lang-btn.active {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
    border-color: rgba(0, 0, 0, 0.5);
}

body[data-category="documentary"] .lang-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
}

.imdb-link {
    font-size: 32px;
    color: #fff;
    text-decoration: none;
    border: none;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: relative;
    top: 5px;
}

.imdb-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* MENU TOGGLE */
.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    position: relative;
    z-index: 10;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.menu-toggle:hover span {
    background: rgba(255, 255, 255, 0.7);
}

.menu-toggle:hover span:nth-child(1) {
    transform: translateX(5px);
}

.menu-toggle:hover span:nth-child(3) {
    transform: translateX(-5px);
}

/* SIDE MENU */
.side-menu {
    position: fixed;
    top: 0;
    right: -85%;
    width: 85%;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    padding: 80px 30px;
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.3);
}

.side-menu.active {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 40px;
    right: 40px;
    background: transparent;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: #000;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 50%;
}

.close-menu:hover {
    background: #f0f0f0;
    transform: rotate(90deg);
}

.side-menu ul {
    list-style: none;
}

.side-menu ul li {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(30px);
    animation: slideIn 0.5s forwards;
}

.side-menu.active ul li:nth-child(1) { animation-delay: 0.1s; }
.side-menu.active ul li:nth-child(2) { animation-delay: 0.15s; }
.side-menu.active ul li:nth-child(3) { animation-delay: 0.2s; }
.side-menu.active ul li:nth-child(4) { animation-delay: 0.25s; }
.side-menu.active ul li:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.side-menu ul li a {
    font-size: 28px;
    font-weight: 900;
    color: #000;
    text-decoration: none;
    letter-spacing: -1px;
    transition: all 0.3s;
    display: inline-block;
    position: relative;
}

.side-menu ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: #000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-menu ul li a:hover::after,
.side-menu ul li a.active::after {
    width: 100%;
}

.side-menu ul li a:hover {
    transform: translateX(10px);
}

/* PORTFOLIO GRID */
.portfolio-grid {
    padding: 100px 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100vw;
    min-height: calc(100vh - 100px);
    margin: 0;
}

/* Film Editor & Assistant Editor - Poster format (A3 ratio) */
body[data-category="film-editor"] .portfolio-grid,
body[data-category="assistant-editor"] .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 100px 10px 10px;
    gap: 10px;
}

body[data-category="film-editor"] .grid-item,
body[data-category="assistant-editor"] .grid-item {
    aspect-ratio: 2/3;
}

/* Documentary - 1 column, 4 rows, widescreen format */
body[data-category="documentary"] .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 25vh;
    gap: 0;
    padding: 100px 0 0;
    min-height: calc(100vh - 100px);
    height: auto;
}

body[data-category="documentary"] .grid-item {
    width: 100%;
    height: 100%;
}

/* Advertising - Video embeds */
body[data-category="advertising"] .portfolio-grid {
    grid-template-columns: 1fr;
    padding: 100px 10px 10px;
    gap: 15px;
}

body[data-category="advertising"] .grid-item {
    aspect-ratio: 16/9;
}

body[data-category="advertising"] .grid-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
}

.grid-item.active::before {
    opacity: 1;
}



.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-item:hover {
    z-index: 10;
}

.project-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: #fff;
    text-align: left;
    font-size: 10px;
    line-height: 1.6;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.grid-item.active .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-info p {
    margin: 8px 0;
    opacity: 0;
    transform: translateX(-10px);
}

.grid-item.active .project-info p,
.grid-item:hover .project-info p {
    animation: slideInText 0.4s forwards;
}

.grid-item.active .project-info p:nth-child(1),
.grid-item:hover .project-info p:nth-child(1) {
    animation-delay: 0.1s;
}

.grid-item.active .project-info p:nth-child(2),
.grid-item:hover .project-info p:nth-child(2) {
    animation-delay: 0.15s;
}

.grid-item.active .project-info p:nth-child(3),
.grid-item:hover .project-info p:nth-child(3) {
    animation-delay: 0.2s;
}

.grid-item.active .project-info p:nth-child(4),
.grid-item:hover .project-info p:nth-child(4) {
    animation-delay: 0.25s;
}

@keyframes slideInText {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.project-info p:first-child {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.imdb-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #f5c518;
    color: #000;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    pointer-events: none;
}

.grid-item.active .imdb-btn {
    pointer-events: auto;
    animation: slideInText 0.4s forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: translateX(-10px);
}

.imdb-btn:hover {
    background: #fff;
}

/* CATEGORY THEMES */
body[data-category="film-editor"] {
    background-color: #000;
}

body[data-category="film-editor"] header::before {
    background: #000;
}

body[data-category="documentary"] {
    background-color: #f5f5f5;
}

body[data-category="documentary"] header::before {
    background: #f5f5f5;
}

body[data-category="documentary"] .logo,
body[data-category="documentary"] .category-label,
body[data-category="documentary"] .imdb-link {
    color: #000;
}

body[data-category="documentary"] .imdb-link {
    color: #000;
}

body[data-category="documentary"] .imdb-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

body[data-category="documentary"] .menu-toggle span {
    background: #000;
}

body[data-category="documentary"] .menu-toggle:hover span {
    background: rgba(0, 0, 0, 0.7);
}

body[data-category="advertising"] {
    background: linear-gradient(135deg, #ff6600 0%, #ff8833 100%);
}

body[data-category="advertising"] header::before {
    background: linear-gradient(135deg, #ff6600 0%, #ff8833 100%);
}

body[data-category="advertising"] .logo {
    color: #0033ff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

body[data-category="advertising"] .category-label {
    color: rgba(0, 0, 0, 0.7);
}

body[data-category="advertising"] .imdb-link {
    color: #000;
}

body[data-category="advertising"] .imdb-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

body[data-category="advertising"] .menu-toggle span {
    background: #000;
}

/* RESPONSIVE - TABLET */
@media (min-width: 768px) {
    header {
        padding: 30px 40px;
    }
    
    .logo {
        font-size: 36px;
    }
    
    .category-label {
        font-size: 12px;
        letter-spacing: 2.5px;
    }
    
    .header-left {
        flex-direction: row;
        align-items: baseline;
        gap: 30px;
    }
    
    .header-right {
        gap: 20px;
    }
    
    .imdb-link {
        font-size: 42px;
        width: 42px;
        height: 42px;
    }
    
    .menu-toggle {
        width: 42px;
        height: 42px;
        gap: 7px;
    }
    
    .menu-toggle span {
        width: 36px;
    }
    
    .side-menu {
        width: 400px;
        right: -400px;
        padding: 90px 60px;
    }
    
    .side-menu ul li a {
        font-size: 32px;
    }
    
    .portfolio-grid {
        padding: 120px 0 0;
        min-height: calc(100vh - 120px);
    }
    
    body[data-category="film-editor"] .portfolio-grid,
    body[data-category="assistant-editor"] .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 120px 20px 20px;
        gap: 20px;
    }
    
    body[data-category="documentary"] .portfolio-grid {
        padding: 120px 0 0;
        min-height: calc(100vh - 120px);
    }
    
    body[data-category="advertising"] .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 120px 20px 20px;
        gap: 20px;
    }
    
    .project-info {
        font-size: 11px;
        bottom: 30px;
        left: 30px;
        right: 30px;
    }
    
    .project-info p:first-child {
        font-size: 14px;
    }
}

/* RESPONSIVE - DESKTOP */
@media (min-width: 1024px) {
    header {
        padding: 40px 80px;
    }
    
    .logo {
        font-size: 48px;
    }
    
    .category-label {
        font-size: 14px;
        letter-spacing: 3px;
        top: -5px;
    }
    
    .header-left {
        gap: 40px;
    }
    
    .header-right {
        gap: 30px;
    }
    
    .imdb-link {
        font-size: 56px;
        width: 56px;
        height: 56px;
    }
    
    .menu-toggle {
        width: 56px;
        height: 56px;
        gap: 9px;
    }
    
    .menu-toggle span {
        width: 48px;
        height: 3px;
    }
    
    .side-menu {
        width: 500px;
        right: -500px;
        padding: 100px 80px;
    }
    
    .side-menu ul li a {
        font-size: 36px;
    }
    
    .portfolio-grid {
        padding: 140px 0 0;
        min-height: calc(100vh - 140px);
    }
    
    body[data-category="film-editor"] .portfolio-grid,
    body[data-category="assistant-editor"] .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        padding: 140px 40px 40px;
        gap: 30px;
    }
    
    body[data-category="documentary"] .portfolio-grid {
        padding: 140px 0 0;
        min-height: calc(100vh - 140px);
    }
    
    body[data-category="advertising"] .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        padding: 140px 40px 40px;
        gap: 30px;
    }
    
    .project-info {
        font-size: 13px;
        line-height: 1.8;
        bottom: 50px;
        left: 50px;
        right: 50px;
        opacity: 0;
        transform: translateY(20px);
    }
    
    .grid-item:hover .project-info {
        opacity: 1;
        transform: translateY(0);
    }
    
    .grid-item::before {
        opacity: 0;
    }
    
    .grid-item:hover::before {
        opacity: 1;
    }
    
    .project-info p:first-child {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .imdb-btn {
        font-size: 12px;
        padding: 8px 16px;
        margin-top: 15px;
    }
    
    .grid-item:hover .imdb-btn {
        pointer-events: auto;
        animation: slideInText 0.4s forwards;
        animation-delay: 0.3s;
        opacity: 0;
        transform: translateX(-10px);
    }
}