/* ============================================================
   PROJECT PAGE — Standalone Stylesheet
   Kalpana Mistry Architectural Portfolio
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --project-bg: #D3C7AD;
    --project-text: #2B374A;
    --project-text-muted: rgba(43,55,74,0.6);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--project-bg);
    color: var(--project-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ============================================================
   HEADER
   ============================================================ */
.project-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 100;
    background: color-mix(in srgb, var(--project-bg) 60%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid color-mix(in srgb, var(--project-text) 10%, transparent);
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.project-header.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.header-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px; /* invisible hover zone at top of viewport */
    z-index: 99;
    pointer-events: auto;
}

.header-trigger:hover + .project-header,
.project-header:hover {
    transform: translateY(0) !important;
    opacity: 1 !important;
    background: color-mix(in srgb, var(--project-bg) 85%, transparent) !important;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 48px);
}

.header-logo {
    display: flex;
    flex-direction: column;
    gap: 1px;
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.7;
}

.logo-name {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--project-text);
}

.logo-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--project-text-muted);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
}

.header-nav a {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--project-text-muted);
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--project-text);
}


/* ============================================================
   HERO IMAGE
   ============================================================ */
/* ===== HERO IMAGE & SLIDESHOW ===== */
.project-hero {
    width: 100%;
    padding-top: 0; /* hugs top */
    position: relative;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100vh; /* hugs top */
    object-fit: cover;
    display: block;
}

/* Project Hero Slideshow */
.project-hero-slideshow {
    width: 100%;
    height: 100vh; /* hugs top */
    position: relative;
    overflow: hidden;
}

.project-hero-slideshow-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.project-hero-slide {
    height: 100%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.project-hero-slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 60%,
        rgba(0, 0, 0, 0.25) 100%
    );
    pointer-events: none;
    z-index: 1;
}


/* ============================================================
   PROJECT INFO
   ============================================================ */
.project-info {
    padding: 80px 24px;
}

.info-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-category {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--project-text-muted);
}

.project-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--project-text);
    letter-spacing: -0.01em;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-item {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--project-text-muted);
}

.meta-separator {
    font-size: 0.6rem;
    color: var(--project-text-muted);
    user-select: none;
}

.project-description {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--project-text-muted);
    margin-top: 8px;
    max-width: 640px;
}

.project-description p {
    margin-bottom: 1.25rem;
}

.project-description p:last-child {
    margin-bottom: 0;
}


/* ============================================================
   HORIZONTAL SCROLL GALLERY
   ============================================================ */
.horizontal-scroll-wrapper {
    position: relative;
    /* Height set dynamically by JS based on content width */
}

.horizontal-scroll-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.horizontal-scroll-track {
    display: flex;
    gap: 2vw;
    padding: 0 4vw;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Premium smooth scrolling transition */
}

.gallery-image {
    flex-shrink: 0;
    height: 80vh;
    width: auto;
    max-width: 85vw;
    object-fit: contain;
    border-radius: 0;
}


/* --- Scroll Progress Indicator --- */
.scroll-progress {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.scroll-progress-bar {
    width: 120px;
    height: 2px;
    background: var(--project-text-muted);
    border-radius: 1px;
    overflow: hidden;
}

.scroll-progress-fill {
    height: 100%;
    background: var(--project-text);
    width: 0%;
    transition: width 0.1s linear;
}

.scroll-progress-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--project-text-muted);
    white-space: nowrap;
}


/* ============================================================
   DOWNLOAD BUTTON
   ============================================================ */
.download-section {
    padding: 40px 24px;
    text-align: center;
}

.download-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--project-text);
    background: transparent;
    color: var(--project-text);
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-btn:hover {
    background: var(--project-text);
    color: var(--project-bg);
}


/* ============================================================
   FOOTER
   ============================================================ */
.project-footer {
    padding: 40px 24px 32px;
    border-top: 1px solid color-mix(in srgb, var(--project-text) 10%, transparent);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-copy,
.footer-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--project-text-muted);
}


/* ============================================================
   FADE-IN ANIMATIONS
   ============================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================================
   RESPONSIVE — Mobile (< 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Header */
    .project-header {
        height: 60px;
    }

    .logo-name {
        font-size: 0.7rem;
    }

    .logo-subtitle {
        font-size: 0.5rem;
    }

    .header-nav {
        gap: 14px;
    }

    .header-nav a {
        font-size: 0.65rem;
    }

    /* Hero */
    .project-hero {
        padding-top: 60px;
    }

    .hero-img {
        height: calc(100vh - 60px);
    }

    /* Project Info */
    .project-info {
        padding: 48px 20px;
    }

    .project-description {
        font-size: 1rem;
    }

    /* Gallery — Vertical stack fallback */
    .horizontal-scroll-wrapper {
        height: auto !important;
    }

    .horizontal-scroll-sticky {
        position: relative;
        height: auto;
        align-items: stretch;
    }

    .horizontal-scroll-track {
        flex-direction: column;
        gap: 16px;
        padding: 0 20px;
        transform: none !important;
    }

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

    .scroll-progress {
        display: none;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
}


/* ============================================================
   RESPONSIVE — Large screens (> 1600px)
   ============================================================ */
@media (min-width: 1600px) {
    .gallery-image {
        height: 85vh;
    }
}


/* ============================================================
   GALLERY PANEL — wrapper for each image + caption
   ============================================================ */
.gallery-panel {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    height: 75vh;
}

.gallery-panel .gallery-image {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    border-radius: 4px;
}

.gallery-caption {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--project-text-muted, rgba(43,55,74,0.6));
    text-transform: uppercase;
    white-space: nowrap;
    padding-bottom: 8px;
}


/* ============================================================
   PLACEHOLDER CARD — shown when no assets exist for a project
   ============================================================ */
.gallery-placeholder {
    flex-shrink: 0;
    width: 480px;
    height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border: 1px dashed color-mix(in srgb, var(--project-text, #2B374A) 20%, transparent);
    border-radius: 6px;
}

.placeholder-initials {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: color-mix(in srgb, var(--project-text, #2B374A) 12%, transparent);
    line-height: 1;
    user-select: none;
}

.placeholder-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: color-mix(in srgb, var(--project-text, #2B374A) 35%, transparent);
    text-transform: uppercase;
}

/* Mobile overrides for new panels */
@media (max-width: 768px) {
    .gallery-panel {
        height: auto;
        width: 100%;
    }

    .gallery-placeholder {
        width: 100%;
        height: 300px;
    }

    .placeholder-initials {
        font-size: 5rem;
    }
}


/* ============================================================
   NEW FEEDBACK ADDITIONS
   ============================================================ */

/* Landing page project title (morphs only its size and position from logo scale to project title scale) */
.landing-project-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.0rem; /* starting size decreased by half (2.5x logo size) */
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #000000; /* starts black */
    position: fixed;
    bottom: 33px; /* same distance from bottom of screen as logo is from top */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.1s linear;
}

/* Scroll down indicator on hero */
.scroll-down-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.4s ease;
}

.scroll-down-indicator .scroll-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 700;
}

.scroll-indicator-arrow {
    width: 2px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scroll-indicator-arrow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    animation: scrollLineAnim 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes scrollLineAnim {
    0% { transform: translateY(-100%); }
    80% { transform: translateY(100%); }
    100% { transform: translateY(100%); }
}

/* Gallery edge opacity layers and nav arrows */
.gallery-fade-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: calc(75vh + 0.2vh); /* 75vh asset height + 0.1vh overlap at top/bottom */
    width: 20vw;
    z-index: 10;
    display: flex;
    align-items: center;
    pointer-events: auto; /* enable click zone */
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-fade-overlay.disabled {
    pointer-events: none; /* disable clicks when boundary reached */
    cursor: default;
}

.gallery-fade-overlay.disabled .gallery-nav-arrow {
    opacity: 0.15;
}

.left-fade {
    left: 0;
    justify-content: flex-end;
    background: linear-gradient(to right, 
        var(--project-bg) 0%, 
        transparent 100%
    );
}

.right-fade {
    right: 0;
    justify-content: flex-start;
    background: linear-gradient(to left, 
        var(--project-bg) 0%, 
        transparent 100%
    );
}

.gallery-nav-arrow {
    background: none;
    border: none;
    color: var(--project-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem; /* larger arrow icon */
    font-weight: 300;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none; /* click events handled by parent zone */
    margin: 0 20px;
}

.left-fade .gallery-nav-arrow {
    margin-right: 132px;
}

.right-fade .gallery-nav-arrow {
    margin-left: 132px;
}

.gallery-fade-overlay:hover .gallery-nav-arrow {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .gallery-fade-overlay {
        display: none !important;
    }
}

/* Project dynamic specifications details grid */
.project-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 32px;
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid color-mix(in srgb, var(--project-text) 15%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--project-text) 15%, transparent);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--project-text-muted);
    font-weight: 700;
}

.spec-value {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.35;
    color: var(--project-text);
}

@media (max-width: 768px) {
    .project-spec-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 24px 0;
        padding: 20px 0;
    }
}

/* Project navigation overlay (previous/next buttons) */
.project-nav-overlay {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 48px);
    pointer-events: none;
    z-index: 20;
}

.project-nav-btn {
    pointer-events: auto;
    color: var(--project-text);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.65;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    text-transform: uppercase;
}

.project-nav-btn:hover {
    opacity: 1;
    border-bottom-color: var(--project-text);
}

.prev-project-btn:hover {
    transform: translateX(-4px);
}

.next-project-btn:hover {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .project-nav-overlay {
        position: relative;
        bottom: auto;
        display: flex;
        justify-content: space-between;
        padding: 40px 20px;
        pointer-events: auto;
    }
}

