/* ========================================
   PEDRO ANDRADE - PORTFOLIO
   project.css - Estilos das Páginas de Projeto
   ======================================== */

/* ========================================
   PROJECT PAGE LAYOUT
   ======================================== */
.project-page {
    background: var(--color-bg);
    overflow-x: hidden;
}

.project-container {
    position: relative;
    min-height: 100vh;
}

/* ========================================
   PROJECT HEADER (Titulo + Tags - ATRAS das imagens)
   ======================================== */
.project-header-fixed {
    position: fixed;
    left: 0;
    top: 80px;
    width: 45%;
    padding: var(--spacing-md);
    z-index: 10;
    pointer-events: none;
}

.project-header-fixed .project-number {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: var(--spacing-xs);
}

.project-header-fixed .project-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 0.9;
    margin-bottom: 0.35rem;
    color: #000;
}

.project-header-fixed .project-tags {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    line-height: 1.5;
}

/* ========================================
   PROJECT DESCRIPTION (ABAIXO das imagens)
   ======================================== */
.project-description-fixed {
    position: fixed;
    left: 0;
    top: 350px;
    width: 40%;
    max-width: 380px;
    padding: var(--spacing-md);
    padding-top: 0;
    z-index: 10;
    pointer-events: none;
}

.project-description-fixed p {
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.55;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem;
}

/* Links na descricao: clicaveis e sublinhados */
.project-description-fixed a {
    pointer-events: auto;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    color: inherit;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

.project-description-fixed a:hover {
    color: #000;
    opacity: 1;
}

/* ========================================
   PROJECT GALLERY (Images that scroll)
   ======================================== */
.project-gallery-horizontal {
    position: relative;
    width: 100%;
}

.gallery-track {
    position: fixed;
    left: 0;
    top: 80px;
    width: 100vw;
    height: calc(100vh - 140px);
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    padding-left: 45%;
    will-change: transform;
    z-index: 50;
    pointer-events: none;
}

.gallery-image {
    flex-shrink: 0;
    height: 100%;
    border-radius: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.gallery-image img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

/* Spacer to create scroll height */
.scroll-spacer {
    height: 1500vh;
    width: 100%;
    pointer-events: none;
}

/* ========================================
   PROJECT FOOTER (Bottom bar)
   ======================================== */
.project-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: var(--spacing-md);
    background: var(--color-bg);
    z-index: 500;
}

.project-meta-left {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-type {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.35);
}

.project-year {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.35);
}

.project-nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-prev,
.nav-next {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: rgba(0, 0, 0, 0.35);
    transition: color var(--transition-fast);
}

.nav-prev:hover,
.nav-next:hover {
    color: #000;
    opacity: 1;
}

.nav-counter {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.25);
}

/* ========================================
   RESPONSIVE - TABLETS
   ======================================== */
@media screen and (max-width: 1024px) {
    .project-container {
        display: block;
        padding-top: 80px;
    }

    .project-header-fixed {
        position: relative;
        top: 0;
        width: 100%;
        padding: var(--spacing-md);
        pointer-events: auto;
    }

    .project-description-fixed {
        position: relative;
        top: 0;
        width: 100%;
        max-width: 100%;
        padding: var(--spacing-md);
        padding-top: 0;
    }

    .project-gallery-horizontal {
        position: relative;
        width: 100%;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-track {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
        height: 50vh;
        min-height: 350px;
        padding-left: var(--spacing-md);
        transform: none !important;
    }

    .scroll-spacer {
        display: none;
    }

    .gallery-image {
        height: 100%;
        width: auto;
    }

    .gallery-image img {
        height: 100%;
        width: auto;
    }

    .project-footer {
        position: relative;
        margin-top: var(--spacing-md);
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media screen and (max-width: 768px) {
    .project-header-fixed .project-title {
        font-size: 2rem;
    }

    .project-description-fixed p {
        font-size: 0.8125rem;
    }

    .gallery-image {
        height: 100%;
        width: auto;
    }

    .gallery-track {
        height: 40vh;
        min-height: 280px;
    }

    .project-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .project-nav-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ========================================
   RESPONSIVE - MOBILE SMALL
   ======================================== */
@media screen and (max-width: 480px) {
    .project-header-fixed {
        padding: var(--spacing-sm);
    }

    .project-header-fixed .project-title {
        font-size: 1.75rem;
    }

    .project-header-fixed .project-tags {
        font-size: 0.625rem;
    }

    .project-description-fixed {
        padding: var(--spacing-sm);
    }

    .project-description-fixed p {
        font-size: 0.75rem;
    }

    .gallery-image {
        height: 100%;
        width: auto;
    }

    .nav-prev,
    .nav-next {
        font-size: 0.6875rem;
    }
}

/* ========================================
   LARGE SCREENS
   ======================================== */
@media screen and (min-width: 1440px) {
    .project-header-fixed {
        width: 40%;
        padding: var(--spacing-lg);
    }

    .project-header-fixed .project-title {
        font-size: 5rem;
    }

    .project-description-fixed {
        width: 35%;
        max-width: 420px;
        padding-left: var(--spacing-lg);
    }

    .gallery-track {
        padding-left: 40%;
    }

    .gallery-image {
        height: 100%;
        width: auto;
    }
}

/* ========================================
   CURSOR VISIBILITY
   ======================================== */
/* mix-blend-mode: difference no cursor garante visibilidade em qualquer fundo */
.project-page .cursor-follower {
    border-color: rgba(128, 128, 128, 0.4);
}
/* ========================================
   DARK MODE - PROJECT PAGE
   ======================================== */
[data-theme="dark"] .project-page {
    background: var(--color-bg);
}