/* ===================================
   ULTRA-PREMIUM PORTFOLIO STYLES
   $50K Designer Quality Presentation
   Making Your Images Truly Stand Out
   ================================== */

/* Navigation colors handled by adaptive system in main.js */

/* ===================================
   CLEAN PORTFOLIO HEADER
   ================================== */

.portfolio-header {
    background: #ffffff;
    padding: 12rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animated Portfolio Background Text */
.portfolio-background-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Inter', sans-serif;
    font-size: 12rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    z-index: 1;
    pointer-events: none;
    line-height: 1;
    letter-spacing: 0.3em;
    white-space: nowrap;
    width: 90vw;
    max-width: 1800px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portfolio-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.portfolio-header.animate .portfolio-letter {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-letter[data-letter="1"] { transition-delay: 0.1s; }
.portfolio-letter[data-letter="2"] { transition-delay: 0.2s; }
.portfolio-letter[data-letter="3"] { transition-delay: 0.3s; }
.portfolio-letter[data-letter="4"] { transition-delay: 0.4s; }
.portfolio-letter[data-letter="5"] { transition-delay: 0.5s; }
.portfolio-letter[data-letter="6"] { transition-delay: 0.6s; }
.portfolio-letter[data-letter="7"] { transition-delay: 0.7s; }
.portfolio-letter[data-letter="8"] { transition-delay: 0.8s; }
.portfolio-letter[data-letter="9"] { transition-delay: 0.9s; }

.header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.portfolio-title {
    font-family: 'Maginia', 'maginiaregular', 'Playfair Display', 'Georgia', serif;
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.1;
    color: #1a1a1a;
    margin: 0 0 2rem 0;
}

.portfolio-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    color: #666;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   CATEGORY NAVIGATION
   ================================== */

.category-nav {
    background: #f8f8f8;
    padding: 4rem 0;
    position: relative;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.tab-btn {
    position: relative;
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.tab-line {
    display: none;
}

.tab-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.tab-btn.active {
    background: #c9a96e;
}

.tab-btn.active .tab-text {
    color: #ffffff;
}

.tab-btn:hover {
    background: rgba(201, 169, 110, 0.1);
}

.tab-btn:hover .tab-text {
    color: #c9a96e;
}

/* ===================================
   PORTFOLIO SHOWCASE
   Premium Image Presentation
   ================================== */

.portfolio-showcase {
    background: #ffffff;
    padding: 4rem 0;
    position: relative;
}

.showcase-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.portfolio-page .portfolio-showcase .project-showcase {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    margin-bottom: 3rem !important;
    align-items: center !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    height: auto !important;
    position: static !important;
    overflow: visible !important;
    cursor: default !important;
}

/* Optimized Portfolio filtering states - instant with smooth transitions */
.portfolio-page .portfolio-showcase .project-showcase {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.portfolio-page .portfolio-showcase .project-showcase.portfolio-hidden {
    display: none !important;
    opacity: 0 !important;
}

.portfolio-page .portfolio-showcase .project-showcase.portfolio-visible {
    display: grid !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.portfolio-page .portfolio-showcase .project-showcase * {
    cursor: default !important;
}

/* Animation indexes removed for stable display */

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

.showcase-image {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #f5f5f5;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(201, 169, 110, 0.15) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.showcase-image:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.15),
        0 12px 35px rgba(0, 0, 0, 0.12);
}

.showcase-image:hover img {
    transform: scale(1.05);
}

.showcase-image:hover .image-overlay {
    opacity: 1;
}

.showcase-content {
    padding: 2rem;
}

.order-first {
    order: -1;
}

.project-badge {
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(201, 169, 110, 0.1);
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #c9a96e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-family: 'Maginia', 'maginiaregular', 'Playfair Display', 'Georgia', serif;
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 2rem 0;
}

.project-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    color: #555;
    margin: 0 0 2rem 0;
}

/* Project details removed for cleaner design */

/* ===================================
   PREMIUM CALL-TO-ACTION
   ================================== */

.portfolio-cta {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    overflow: hidden;
}

.cta-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cta-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #1a1a1a 0%,
        #0f0f0f 25%,
        #1a1a1a 50%,
        #000000 75%,
        #0f0f0f 100%
    );
}

.cta-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(201, 169, 110, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(201, 169, 110, 0.03) 0%, transparent 50%);
    animation: patternMove 25s linear infinite;
}

@keyframes patternMove {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-20px) translateY(20px); }
    100% { transform: translateX(0) translateY(0); }
}

.cta-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.cta-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.cta-title {
    font-family: 'Maginia', 'maginiaregular', 'Playfair Display', 'Georgia', serif;
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.1;
    color: #ffffff;
    margin: 0 0 2rem 0;
}

.cta-title .accent {
    color: #c9a96e;
    font-style: italic;
}

.cta-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 4rem 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 3rem;
    background: transparent;
    border: 2px solid #c9a96e;
    border-radius: 50px;
    color: #c9a96e;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #c9a96e;
    transition: left 0.4s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    color: #1a1a1a;
    transform: translateY(-2px);
}

.button-arrow {
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

.cta-button:hover .button-arrow {
    transform: translateX(5px);
}

.cta-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 4rem;
}

.signature-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a96e, transparent);
}

.signature-dot {
    width: 4px;
    height: 4px;
    background: #c9a96e;
    border-radius: 50%;
}

/* ===================================
   ANIMATIONS
   ================================== */

@keyframes badgeReveal {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes descReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statsReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes projectReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   ================================== */

@media (max-width: 1024px) {
    .portfolio-header {
        padding: 10rem 0 4rem;
    }
    
    .portfolio-title {
        font-size: 3.5rem;
    }
    
    .portfolio-background-text {
        font-size: 10rem;
        letter-spacing: 0.2em;
    }
    
    .portfolio-page .portfolio-showcase .project-showcase {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        margin-bottom: 2.5rem !important;
    }
    
    .showcase-content {
        order: 2 !important;
    }
    
    .category-tabs {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .portfolio-header {
        padding: 8rem 0 3rem;
    }
    
    .portfolio-title {
        font-size: 2.8rem;
    }
    
    .portfolio-subtitle {
        font-size: 1.1rem;
    }
    
    .portfolio-background-text {
        font-size: 8rem;
        letter-spacing: 0.1em;
    }
    
    .category-tabs {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .tab-btn {
        padding: 0.8rem 1.5rem;
    }
    
    .portfolio-page .portfolio-showcase .project-showcase {
        gap: 1.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    .project-title {
        font-size: 2.5rem;
    }
    
    .showcase-container {
        padding: 0 1rem;
    }
    
    .showcase-image {
        height: 400px;
    }
    
    .cta-title {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .portfolio-header {
        padding: 6rem 0 2rem;
    }
    
    .portfolio-title {
        font-size: 2.2rem;
    }
    
    .portfolio-subtitle {
        font-size: 1rem;
    }
    
    .portfolio-background-text {
        font-size: 6rem;
        letter-spacing: 0.05em;
    }
    
    .category-tabs {
        gap: 1rem;
    }
    
    .tab-btn {
        padding: 0.6rem 1rem;
    }
    
    .tab-text {
        font-size: 0.8rem;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
    
    .showcase-image {
        height: 300px;
    }
    
    .cta-title {
        font-size: 2.5rem;
    }
    
    .portfolio-showcase {
        padding: 2rem 0;
    }
}

/* Show all projects by default */
.portfolio-showcase .project-showcase {
    display: grid;
    visibility: visible;
    opacity: 1;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

/* Ensure images are visible */
.portfolio-showcase .showcase-image {
    display: block;
    visibility: visible;
}

.portfolio-showcase .showcase-image img {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Force tight spacing */
.showcase-container .project-showcase {
    margin-bottom: 3rem !important;
    gap: 2rem !important;
}

.showcase-container {
    padding: 0 2rem !important;
}

.portfolio-showcase {
    padding: 4rem 0 !important;
}

/* ===================================
   VIEW MORE HINT
   ================================== */

.view-more-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.showcase-image {
    cursor: pointer;
}

.showcase-image:hover .view-more-hint {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   PROJECT MODAL
   ================================== */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.project-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.modal-container {
    position: relative;
    max-width: 60vw;
    width: 100%;
    max-height: 75vh;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    z-index: 10001;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 1.5rem 0.5rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-family: 'Maginia', 'maginiaregular', 'Playfair Display', 'Georgia', serif;
    font-size: 2rem;
    font-weight: 300;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.modal-content {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    max-height: 65vh;
    overflow-y: auto;
}

/* ===================================
   GALLERY
   ================================== */

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    width: fit-content;
    height: fit-content;
    max-width: 100%;
    max-height: 45vh;
    margin: 0 auto;
}

.main-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 45vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.gallery-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.gallery-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.gallery-btn.disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: none;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail.active {
    border-color: #c9a96e;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    border-color: rgba(201, 169, 110, 0.5);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.modal-description {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Hide category tags in modal */
.modal-category {
    display: none !important;
}

/* ===================================
   MODAL RESPONSIVE
   ================================== */

@media (max-width: 768px) {
    .project-modal {
        padding: 0;
    }
    
    .modal-container {
        max-width: 90vw;
        max-height: 85vh;
        border-radius: 8px;
    }
    
    .modal-content {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
        max-height: 80vh;
    }
    
    .gallery-main {
        max-height: 35vh;
    }
    
    .main-image {
        max-height: 35vh;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .gallery-thumbnails {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-container {
        border-radius: 15px;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .view-more-hint {
        bottom: 10px;
        right: 10px;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
}

/* Filter functionality will be handled by JavaScript */

/* ===================================
   PROJECT TITLE BUTTON STYLING
   ================================== */

.project-title-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 25px;
    color: #c9a96e;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.5px;
    margin: 1rem 0 2rem 0;
    cursor: default;
    text-decoration: none;
    user-select: text;
}

.project-title-btn:hover {
    background: rgba(201, 169, 110, 0.08);
    border-color: rgba(201, 169, 110, 0.3);
    color: #c9a96e;
}

.project-title-btn span {
    cursor: default;
    user-select: text;
}
