/* Portfolio Gallery Styles */

:root {
    --primary-black: #000000;
    --secondary-black: #1a1a1a;
    --accent-gray: #666666;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --accent-color: #ff6b6b;
    --border-color: #e0e0e0;
    --sidebar-width: 320px;
}

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

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    color: var(--primary-black);
    background-color: var(--white);
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.site-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 200;
    letter-spacing: 0.2em;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.logo-link:hover .site-title {
    color: var(--accent-color);
}

.site-subtitle {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--accent-gray);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--accent-gray);
    letter-spacing: 0.1em;
}

.breadcrumb .current {
    color: var(--accent-color);
}

/* Main Content Layout */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Project Sidebar */
.project-sidebar {
    background-color: var(--light-gray);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    overflow-y: auto;
    height: calc(100vh - 120px);
    position: sticky;
    top: 120px;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    color: var(--primary-black);
}

.project-count {
    font-size: 0.8rem;
    color: var(--accent-gray);
    font-weight: 300;
}

/* Project Navigation */
.project-navigation {
    margin-bottom: 2rem;
}

.project-item {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.project-item.active::before,
.project-item:hover::before {
    transform: scaleY(1);
}

.project-item.active {
    background-color: rgba(255, 107, 107, 0.05);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 4px;
}

.project-item:hover {
    transform: translateX(5px);
    background-color: rgba(0, 0, 0, 0.02);
}

.project-name {
    font-size: 1rem;
    font-weight: 400;
    color: var(--primary-black);
    margin-bottom: 0.2rem;
    letter-spacing: 0.02em;
}

.project-location {
    font-size: 0.8rem;
    color: var(--accent-gray);
    font-weight: 300;
}

/* Category Navigation */
.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.category-link {
    color: var(--accent-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.category-link.active,
.category-link:hover {
    color: var(--accent-color);
}

/* Project Detail Section */
.project-detail {
    padding: 2rem;
    overflow-y: auto;
    height: calc(100vh - 120px);
}

.project-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.project-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--primary-black);
}

.project-meta {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
    color: var(--accent-gray);
    font-weight: 300;
}

/* Image Gallery */
.image-gallery {
    margin-bottom: 3rem;
}

.main-image {
    position: relative;
    width: 100%;
    min-height: 400px;
    max-height: 80vh;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-quality;
}

.main-image:hover img {
    transform: scale(1.02);
}

.fullscreen-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0;
}

.main-image:hover .fullscreen-btn {
    opacity: 1;
}

.fullscreen-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* Thumbnail Gallery */
.image-thumbnails {
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail-scroll {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.5rem;
}

.thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
}

.thumbnail.active {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.thumbnail:hover {
    transform: scale(1.1);
    border-color: var(--accent-gray);
}

.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.thumbnail:not(.active) img {
    filter: grayscale(30%) brightness(0.8);
}

.thumbnail:hover img,
.thumbnail.active img {
    filter: none;
}

/* Project Information */
.project-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.project-specs h3,
.project-description h3 {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--primary-black);
}

.spec-grid {
    display: grid;
    gap: 1rem;
}

.spec-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.spec-item label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-gray);
    letter-spacing: 0.02em;
}

.spec-item span {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--primary-black);
}

.project-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--primary-black);
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* Fullscreen Modal */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-quality;
}

.close-btn {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--accent-color);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.prev-btn {
    margin-left: -60px;
}

.next-btn {
    margin-right: -60px;
}

/* Footer */
.site-footer {
    background-color: var(--secondary-black);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content h4 {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.footer-content p {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--accent-gray);
}

.contact-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border: 1px solid var(--white);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background-color: var(--white);
    color: var(--primary-black);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .project-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .project-sidebar {
        position: relative;
        height: auto;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .project-detail {
        height: auto;
        padding: 1rem;
    }
    
    .main-image {
        min-height: 250px;
        max-height: 50vh;
    }
    
    .thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .modal-nav .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .prev-btn {
        margin-left: -45px;
    }
    
    .next-btn {
        margin-right: -45px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .project-sidebar {
        padding: 1rem;
    }
    
    .project-detail {
        padding: 1rem;
    }
    
    .main-image {
        min-height: 200px;
        max-height: 40vh;
    }
    
    .thumbnail-scroll {
        gap: 0.5rem;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.2s infinite;
}

@keyframes loading {
    100% {
        left: 100%;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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