/* GLOBAL RESET & VARIABLES */
:root {
    --black: #000000;
    --white: #FFFFFF;
    --off-white: #f5f5f5; 
    --light-grey: #E0E0E0;
    --medium-grey: #A0A0A0;
    --dark-grey: #1a1a1a; 
    --font-primary: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-primary);
    overflow-x: hidden;
}

/* Global Container Center */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- NAVIGATION --- */
.header-strip {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    z-index: 100;
}

.header-strip nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px;
}

.header-strip nav ul li a {
    color: var(--medium-grey);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-strip nav ul li a.active {
    color: var(--white);
    font-weight: 700;
}

/* --- TITLES (JUMP FIXES) --- */
.page-title, 
.shoot-page-header {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto 20px auto;
    text-align: center;
    min-height: 1.2em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-title h1,
.shoot-page-header h1 {
    margin: 0;
    white-space: nowrap;
}

.shoot-description {
    padding: 0 40px;
    margin: 10px auto 40px auto;
    max-width: 900px;
    min-height: 1.5rem;
}

/* --- HOME PAGE --- */
.home-content {
    width: 100%;
    height: calc(100vh - 80px);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 50;
    pointer-events: none;
}

.center-title h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    margin: 0;
    line-height: 0.9;
}

.center-title h2 {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--medium-grey);
    margin: 10px 0 0 0;
}

/* HOME PHOTO CELLS */
.photo-cells-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    margin-left: -100px; 
}

.floating-cell {
    position: absolute;
    width: 200px;
    aspect-ratio: 3/4;
    background: var(--dark-grey);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

/* --- CONTACT PAGE --- */
main.files-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.contact-info {
    text-align: center;
    margin-top: 10px;
}

.contact-info p {
    font-size: 1.4rem;
    margin: 15px 0;
    color: var(--light-grey);
}

.contact-info a {
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid var(--medium-grey);
}

/* --- SHOOTS GRID --- */
.shoots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 90%;
    max-width: 1200px;
    margin: 20px auto 60px auto;
}

.shoot-box {
    background: var(--dark-grey);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.shoot-box img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.shoot-box-info {
    padding: 2px;
    text-align: center;
    color: var(--off-white);
}
.shoot-box-info h3 {
    margin: 0 0 2px 0;
    font-size: 1.4rem;
}

.shoot-date {
    margin: 0 0 2px 0;
    font-size: 0.7rem;
    color: var(--medium-grey);
}

.shoot-summary {
    margin: 0 0 2px 0;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* --- INDIVIDUAL SHOOT GALLERY --- */
.shoot-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 20px auto 60px auto;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 1.43 / 1; 
    object-fit: cover;
    display: block;
    background: var(--dark-grey);
}

/* --- BACK BUTTON --- */
.sub-shoots-nav {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
}

.sub-shoots-nav a {
    color: var(--medium-grey);
    text-decoration: none;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--medium-grey);
}

/* --- TRANSITION --- */
#page-transition-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--black);
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.2s ease;
    opacity: 1;
}

#page-transition-overlay.fade-out { opacity: 0; visibility: hidden; }
#page-transition-overlay.fade-in { opacity: 1; visibility: visible; }

.gallery-img, .shoot-box img, .floating-cell img, .timeline-thumb {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.gallery-img.loaded, .shoot-box img.loaded, .floating-cell img.loaded, .timeline-thumb.loaded {
    opacity: 1;
}

/* --- FLOATING MODAL OVERLAY --- */
.image-zoom-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none;
    z-index: 10000;
    overflow: hidden;
}

.image-zoom-modal.show { 
    display: flex; 
    justify-content: center;
    align-items: center;
}

.image-zoom-modal.zoomed-active {
    display: block;
    overflow: auto;
    cursor: grab;
}

.modal-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-width: 100vw;
}

.image-zoom-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    cursor: zoom-in;
    display: block;
    user-select: none;
}

.close-button {
    position: fixed;
    top: 30px; right: 40px;
    background: none; border: none;
    color: white; font-size: 3.5rem;
    cursor: pointer; z-index: 10100;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.modal-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    color: white; font-size: 4rem;
    padding: 30px; cursor: pointer;
    z-index: 10100; opacity: 0.5;
    transition: opacity 0.2s;
}

.modal-nav:hover { opacity: 1; }
.nav-prev { left: 10px; }
.nav-next { right: 10px; }

/* --- CORNER LINKS --- */
.top-right-link, .top-left-link {
    position: fixed;
    top: 2rem; 
    z-index: 9999;
    color: var(--white);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.7rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.top-right-link { right: 2rem; }
.top-left-link { left: 2rem; }

.top-right-link:hover, .top-left-link:hover { opacity: 1; }

/* --- VERTICAL TIMELINE STYLES --- */
.timeline-main-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 100px 20px;
    display: flex;
    flex-direction: column;
}

.vertical-timeline-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

/* The Center Vertical Line */
.vertical-timeline-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to bottom, transparent, var(--medium-grey) 5%, var(--medium-grey) 95%, transparent);
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 2px;
}

/* Month/Year Pill Marker */
.timeline-month-marker {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    position: relative;
    z-index: 5;
}

.timeline-month-marker span {
    background: var(--dark-grey);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

/* Timeline Row/Node */
.timeline-row {
    display: flex;
    position: relative;
    margin: -15px 0; /* NEGATIVE MARGIN FOR OVERLAPS */
    width: 100%;
    box-sizing: border-box;
    z-index: 2; /* Base stacking order */
    transition: z-index 0.3s ease;
}

/* Bring hovered rows to the very front */
.timeline-row:hover {
    z-index: 20; 
}

.timeline-row.left {
    padding-right: 50%;
    justify-content: flex-end;
}

.timeline-row.right {
    padding-left: 50%;
    justify-content: flex-start;
}

/* The Dot on the Track */
.timeline-row::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    z-index: 3;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); /* Subtle glow */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-row:hover::before {
    transform: translate(-50%, -50%) scale(1.6);
    background: var(--medium-grey);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Card Styling - Ultra sleek, shrunk down, overlapping */
.timeline-card {
    width: 160px; /* SHRUNK EVEN FURTHER for dense visual impact */
    background: var(--dark-grey);
    border-radius: 12px; /* Smoother outer corners */
    padding: 8px;
    position: relative;
    opacity: 0;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05); /* Deep shadow + Glassy top edge */
    transition: all 0.5s cubic-bezier(0.2, 1.2, 0.3, 1); /* Bouncy impressive animation */
}

/* Dynamic Hover Effects - Pop out, scale, and angle slightly */
.timeline-row.left .timeline-card:hover {
    transform: translateX(-45px) scale(1.2) rotate(-3deg) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.9), 0 0 20px rgba(255,255,255,0.08);
}

.timeline-row.right .timeline-card:hover {
    transform: translateX(45px) scale(1.2) rotate(3deg) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.9), 0 0 20px rgba(255,255,255,0.08);
}

/* Alternating Placement Defaults */
.timeline-row.left .timeline-card {
    margin-right: 40px;
    transform: translateX(-35px);
}

.timeline-row.right .timeline-card {
    margin-left: 40px;
    transform: translateX(35px);
}

/* Connecting Lines to Center */
.timeline-row.left .timeline-card::after {
    content: '';
    position: absolute;
    right: -35px;
    top: 50%;
    width: 35px;
    height: 2px;
    background: var(--medium-grey);
    transform: translateY(-50%);
    opacity: 0.5; /* Fade the line slightly so cards stand out more */
    transition: all 0.3s ease;
}

.timeline-row.right .timeline-card::after {
    content: '';
    position: absolute;
    left: -35px;
    top: 50%;
    width: 35px;
    height: 2px;
    background: var(--medium-grey);
    transform: translateY(-50%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* Solidify connecting line on hover */
.timeline-row:hover .timeline-card::after {
    opacity: 1;
    background: var(--white);
}

/* Animation triggers */
.timeline-row.visible.left .timeline-card,
.timeline-row.visible.right .timeline-card {
    opacity: 1;
    transform: translateX(0);
}

.timeline-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px; /* Inner photo rounding */
    background: var(--black);
}

.timeline-date {
    text-align: center;
    margin-top: 8px;
    font-size: 0.65rem; /* Shrunk text for the compact cards */
    font-weight: 700;
    color: var(--medium-grey);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- VIDEO ELEMENTS --- */
.modal-video {
    max-width: 90vw;
    max-height: 80vh;
    outline: none;
}

/* Styling for the filename under videos */
.video-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-filename {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--medium-grey);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    padding-bottom: 5px;
    opacity: 0.8;
}

.video-item .gallery-img {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Remove underlining globally for the contact section */
.contact-info a, .contact-info span {
    text-decoration: none !important;
    border-bottom: none !important;
}

.exif-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10001;
    backdrop-filter: blur(5px);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-zoom-modal.show .exif-overlay {
    opacity: 1;
}

@keyframes pulse {
    0% { background-color: #1a1a1a; }
    50% { background-color: #252525; }
    100% { background-color: #1a1a1a; }
}

.gallery-item:not(.loaded), .timeline-card:not(.loaded) img {
    animation: pulse 1.5s infinite;
}

.gallery-item.video-item {
    background-color: transparent !important;
    animation: none !important;
}

.gallery-item.video-item .gallery-img {
    background-color: transparent !important;
}

.gallery-item.image-item {
    background-color: #111;
    animation: pulse 3s infinite ease-in-out;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .shoots-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .shoot-box {
        width: 100% !important;
        grid-column: 1 / -1 !important;
    }

    .top-right-link, .top-left-link {
        display: none; 
    }

    .photo-cells-container {
        display: none !important;
    }
    
    .home-content {
        height: 60vh;
    }

    /* Compress Timeline for Mobile */
    .vertical-timeline-track { 
        left: 30px !important; 
    }
    
    .timeline-row {
        margin: -25px 0; /* Huge overlap for mobile to create a dense stack */
    }

    .timeline-row::before { 
        left: 30px !important; 
    }

    .timeline-month-marker {
        justify-content: flex-start;
        padding-left: 50px;
        margin: 60px 0 40px 0; /* Give the pills some breathing room away from the overlaps */
    }

    .timeline-row.left,
    .timeline-row.right {
        padding-right: 0;
        padding-left: 0;
        justify-content: flex-start; /* Stack them all to the right of the line */
    }

    .timeline-row.left .timeline-card,
    .timeline-row.right .timeline-card {
        width: 150px; /* Keep it ultra sleek on mobile */
        margin-left: 70px; /* Makes room for the timeline track */
        margin-right: 0;
        transform: translateX(30px);
    }

    /* Mobile hover effects - don't fly off screen */
    .timeline-row.left .timeline-card:hover,
    .timeline-row.right .timeline-card:hover {
        transform: translateX(10px) scale(1.1) rotate(2deg) !important;
    }

    /* Connecting lines for mobile stack */
    .timeline-row.left .timeline-card::after,
    .timeline-row.right .timeline-card::after {
        left: -40px;
        right: auto;
        width: 40px;
    }
}