/* --- MINIMALIST PORTFOLIO BASE --- */
body {
    margin: 0;
    padding: 60px 5%;
    background-color: #ffffff;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* --- HEADER / NAVIGATION --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

header h1 {
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin: 0;
}

header a {
    text-decoration: none;
    color: #000;
    transition: opacity 0.3s ease;
}

header a:hover {
    opacity: 0.5;
}

/* Camera Icon Styling */
.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #000;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.icon-button:hover {
    opacity: 0.5;
}

/* --- PROJECT GRID (HOME) --- */
.project-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1500px;
    margin: 0 auto;
}

.project-card {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1500 / 212; 
    overflow: hidden;
    background-color: #f9f9f9;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.5s ease;
}

/* DESKTOP HOVER ONLY */
@media (hover: hover) {
    .project-card:hover img {
        transform: scale(1.02);
        opacity: 0.7;
    }

    .project-card:hover .overlay {
        opacity: 1;
    }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.4s ease;
    z-index: 2;
}

.overlay span {
    color: #000;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border: 1px solid #000;
    pointer-events: none;
}

/* --- PROJECT PAGE STYLES --- */
.project-header {
    max-width: 800px;
    margin: 0 auto 60px auto;
    text-align: center;
}

.project-header h1 {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #444;
    max-width: 600px;
    margin: 0 auto;
}

.description-text {
    margin-bottom: 25px;
}

.project-gear {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #888;
}

/* DYNAMIC EDITORIAL GALLERY */
.project-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px; 
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 90vh; 
    object-fit: contain;
    display: block;
    animation: imageFade 1.2s ease-out forwards;
}

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

.project-footer {
    margin-top: 100px;
    text-align: center;
}

.back-link {
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.7rem;
    color: #000;
    border: 1px solid #000;
    padding: 15px 30px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #000;
    color: #fff;
}

/* --- MODAL STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    align-items: center;
    justify-content: center;
}

.modal.is-active {
    display: flex;
    animation: fadeIn 0.4s ease forwards;
}

.modal-content {
    max-width: 450px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    margin-top: 40px;
}

.modal-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

.close-button {
    cursor: pointer;
    font-size: 2rem;
    position: absolute;
    top: 40px;
    right: 40px;
}

footer {
    margin-top: 120px;
    padding-bottom: 40px;
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 2px;
    opacity: 0.4;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- MOBILE OPTIMIZATION: PANORAMIC PANNING --- */
@media (max-width: 768px) {
    .project-grid {
        gap: 15px;
    }

    .project-card {
        display: flex; 
        aspect-ratio: 3 / 1; 
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        cursor: grab;
    }

    .project-card::-webkit-scrollbar {
        display: none;
    }
    .project-card {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .project-card img {
        width: auto; 
        height: 100%;
        max-width: none;
        object-fit: contain;
        scroll-snap-align: center;
        flex-shrink: 0;
    }

    /* Hide overlay entirely on mobile to prevent it appearing during pans */
    .overlay {
        display: none; 
    }

    .project-gallery { gap: 40px; }
}
