/**
 * Faint Film Portfolio Theme
 * Based on Faint Film design system
 */

/* CSS Variables - Design System */
:root {
    /* Colors - Light Mode */
    --background: #ffffff;
    --foreground: #000000;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --border: #e5e5e5;
    --accent: #f3f3f3;

    /* Typography */
    --font-mono: 'IBM Plex Mono', 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;

    /* Spacing Scale */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */

    /* Border Radius */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.625rem;  /* 10px */
    --radius-full: 9999px;

    /* Header Height */
    --header-height: 48px;

    /* Sidebar Widths */
    --sidebar-left: 50%;
    --sidebar-right: 50%;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --background: #000000;
        --foreground: #ffffff;
        --muted: #171717;
        --muted-foreground: #a3a3a3;
        --border: #262626;
        --accent: #171717;
    }
}

[data-theme="dark"] {
    --background: #000000;
    --foreground: #ffffff;
    --muted: #171717;
    --muted-foreground: #a3a3a3;
    --border: #262626;
    --accent: #171717;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
}

.text-xs {
    font-size: 0.75rem;  /* 12px */
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;     /* 16px */
    line-height: 1.5rem;
}

.text-muted {
    color: var(--muted-foreground);
}

/* Header Component - Minimal Style */
.header-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--background);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    border-bottom: 1px solid var(--border);
}

@media (max-width: 480px) {
    .header-modern {
        padding: 0 var(--space-3);
    }
}

.header-brand {
    display: flex;
    align-items: baseline;
    gap: var(--space-6);
}

.header-title {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--foreground);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.header-subtitle {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.4;
}

.header-subtitle-multi {
    display: flex;
    flex-direction: column;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.3;
}

/* Header Navigation */
.header-nav {
    display: none;
    align-items: center;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
    }
}

.header-nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--muted-foreground);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--transition-base);
}

.header-nav-link:hover {
    color: var(--foreground);
}

.header-nav-link.active {
    color: var(--foreground);
    font-weight: 500;
}

/* Menu Toggle Button */
.menu-toggle {
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--foreground);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--accent);
}

.menu-icon {
    width: 20px;
    height: 20px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    z-index: 100;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--space-8);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: var(--space-8) var(--space-6);
    max-width: 400px;
    margin: 0 auto;
}

.mobile-menu-section {
    margin-bottom: var(--space-6);
}

.mobile-menu-section:last-child {
    margin-bottom: 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.mobile-menu-section-title {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: var(--space-3);
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

.mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-item {
    font-size: 1rem;
}

.mobile-menu-link {
    color: var(--muted-foreground);
    text-decoration: none;
    padding: var(--space-2) 0;
    display: block;
    transition: color var(--transition-fast);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
}

.mobile-menu-link:hover {
    color: var(--foreground);
}

.mobile-menu-link.active {
    color: var(--foreground);
    font-weight: 500;
}

/* City Filter Dropdown */
.dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--foreground);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--foreground);
    text-align: left;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

.dropdown-toggle.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    margin-top: var(--space-2);
    padding-left: var(--space-4);
    display: none;
}

.dropdown-content.active {
    display: block;
}

.dropdown-item {
    display: block;
    padding: var(--space-2) 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color var(--transition-base);
}

.dropdown-item:hover {
    color: var(--foreground);
}

.dropdown-item.active {
    color: var(--foreground);
    font-weight: 500;
}

/* Photo Viewer Component */
.photo-viewer {
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.photo-viewer-container {
    width: 100%;
    max-width: 1200px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-viewer-image {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 200px);
    object-fit: contain;
}

.photo-viewer-info {
    margin-top: var(--space-4);
    text-align: center;
}

.photo-viewer-title {
    font-size: 0.875rem;
    margin-bottom: var(--space-1);
}

.photo-viewer-meta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Navigation Arrows */
.photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.photo-nav:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.05);
}

.photo-nav.prev {
    left: var(--space-6);
}

.photo-nav.next {
    right: var(--space-6);
}

/* Project Page Layout */
.project-page {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

.project-thumbnails {
    width: 128px;
    min-width: 128px;
    padding: var(--space-4);
    overflow-y: auto;
    height: calc(100vh - var(--header-height));
}

.thumbnail-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.thumbnail-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: opacity var(--transition-base);
}

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

.thumbnail-item:not(.active) {
    opacity: 0.4;
}

.thumbnail-number {
    position: absolute;
    top: var(--space-1);
    left: var(--space-1);
    font-size: 0.75rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.project-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    position: relative;
}

.project-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
}

.project-info {
    position: absolute;
    bottom: var(--space-12);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

/* Grid View Mode */
.project-grid {
    padding: var(--space-6);
}

.project-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.project-grid-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-4);
}

.grid-photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.grid-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* View Mode Toggle */
.view-toggle {
    font-size: 0.75rem;
    padding: var(--space-2) var(--space-4);
    background: var(--foreground);
    color: var(--background);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.view-toggle:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Gallery Archive Page */
.gallery-grid {
    padding: var(--space-6);
    padding-top: calc(var(--header-height) + var(--space-6));
}

.gallery-filters {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.filter-button {
    font-size: 0.875rem;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-button:hover {
    color: var(--foreground);
    border-color: var(--foreground);
}

.filter-button.active {
    background: var(--foreground);
    color: var(--background);
    border-color: var(--foreground);
}

/* Copyright */
.copyright {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Responsive Design */
@media (max-width: 768px) {
    .photo-nav {
        width: 36px;
        height: 36px;
    }

    .photo-nav.prev {
        left: var(--space-3);
    }

    .photo-nav.next {
        right: var(--space-3);
    }

    .project-thumbnails {
        display: none;
    }

    .project-main {
        padding: var(--space-6);
    }

    .project-grid-photos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-2);
    }

    .gallery-grid {
        padding: var(--space-3);
        padding-top: calc(var(--header-height) + var(--space-3));
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.animate-fadeIn {
    animation: fadeIn var(--transition-base) ease-out;
}

.animate-slideInRight {
    animation: slideInRight var(--transition-slow) ease-out;
}

/* ==========================================
   FAINT FILM - Two Column Layout
   ========================================== */

.faint-film-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Left Column - Photo Grid */
.faint-film-grid-column {
    width: var(--sidebar-left);
    background: var(--background);
    padding: var(--space-6);
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
}

/* Right Column - Photo Viewer */
.faint-film-viewer-column {
    width: var(--sidebar-right);
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-8);
}

/* Numbered Photo Grid */
.numbered-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.numbered-photo-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0;
    line-height: 0;
    font-size: 0;
}

.numbered-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--transition-base);
    display: block;
    vertical-align: bottom;
}

.numbered-photo-item.active img {
    opacity: 1;
}

.photo-number {
    position: absolute;
    top: var(--space-1);
    left: var(--space-1);
    font-size: 0.6875rem;
    color: var(--foreground);
    font-weight: 400;
}

/* Year Timeline */
.year-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-8);
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--foreground);
    letter-spacing: -0.02em;
}

.timeline-line {
    width: 120px;
    height: 1px;
    background: var(--foreground);
}

/* Grid/Slider Toggle - Bottom Center */
.view-toggle-bottom {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: var(--muted);
    border-radius: var(--radius-full);
    padding: 4px;
    z-index: 40;
}

.view-toggle-btn {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8125rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.view-toggle-btn.active {
    background: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Large Photo Display in Viewer Column */
.viewer-photo-container {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.viewer-photo-container img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    transition: transform var(--transition-base);
}


/* ==========================================
   FAINT FILM - Single Photo Page
   ========================================== */

.faint-film-single {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Left Info Panel */
.single-photo-info {
    position: fixed;
    left: var(--space-8);
    bottom: var(--space-8);
    max-width: 200px;
    z-index: 20;
}

.single-photo-year {
    font-size: 0.8125rem;
    color: var(--foreground);
    margin-bottom: var(--space-1);
}

.single-photo-year span {
    font-weight: 500;
}

.single-photo-description {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

/* Center Photo Area */
.single-photo-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    padding-left: 220px;
    padding-right: 180px;
}

.single-photo-main img {
    max-width: 100%;
    max-height: calc(100vh - var(--header-height) - 120px);
    object-fit: contain;
    cursor: zoom-in;
}

.single-photo-main img.zoomed {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

/* Right Thumbnail Strip */
.single-photo-thumbnails {
    position: fixed;
    right: var(--space-6);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
    max-width: 140px;
    justify-content: flex-end;
}

.single-thumb-item {
    width: 56px;
    height: 56px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-base);
    position: relative;
}

.single-thumb-item:hover {
    opacity: 0.8;
}

.single-thumb-item.active {
    opacity: 1;
}

.single-thumb-item.active::before {
    content: '+';
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.625rem;
    color: white;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    z-index: 1;
}

.single-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bottom Navigation Bar */
.nav-bar-bottom {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background: #333;
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-6);
    gap: var(--space-12);
    z-index: 40;
}

.nav-bar-btn {
    color: white;
    text-decoration: none;
    font-size: 0.8125rem;
    padding: var(--space-2);
    transition: opacity var(--transition-base);
}

.nav-bar-btn:hover {
    opacity: 0.7;
}

.nav-bar-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.nav-bar-close {
    color: white;
    font-size: 1rem;
    padding: var(--space-2);
    cursor: pointer;
    transition: opacity var(--transition-base);
}

.nav-bar-close:hover {
    opacity: 0.7;
}

/* Full screen zoom overlay */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.zoom-overlay.active {
    display: flex;
}

.zoom-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}

/* Copyright - Fixed Bottom Right */
.copyright-fixed {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-6);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    z-index: 30;
}

/* ==========================================
   RESPONSIVE - Faint Film Layout
   ========================================== */

@media (max-width: 1024px) {
    .faint-film-layout {
        flex-direction: column;
    }

    .faint-film-grid-column {
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .faint-film-viewer-column {
        width: 100%;
        min-height: 60vh;
    }

    .numbered-photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .single-photo-info {
        position: static;
        padding: var(--space-4);
        max-width: none;
    }

    .single-photo-main {
        padding: var(--space-4);
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    .single-photo-thumbnails {
        position: static;
        transform: none;
        flex-direction: row;
        max-width: none;
        justify-content: center;
        padding: var(--space-4);
    }
}

@media (max-width: 768px) {
    .numbered-photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }

    .timeline-year {
        font-size: 1.25rem;
    }

    .timeline-line {
        width: 80px;
    }

    .single-thumb-item {
        width: 48px;
        height: 48px;
    }

    .nav-bar-bottom {
        padding: var(--space-2) var(--space-4);
        gap: var(--space-8);
    }
}

@media (max-width: 480px) {
    .numbered-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   HOME PAGE - Single Screen Layout
   ========================================== */

.home-layout-centered {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    padding-top: var(--header-height);
    overflow: hidden;
}

.home-content-centered {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - var(--header-height));
    padding: var(--space-6);
    box-sizing: border-box;
    overflow: hidden;
}

.home-photo-viewer-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.viewer-photo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.viewer-photo-wrapper .viewer-photo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.viewer-photo-wrapper.expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 220px;
    bottom: 0;
    background: var(--background);
    z-index: 100;
    padding: var(--space-8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-photo-wrapper.expanded .viewer-photo {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
}

/* Expanded Info Panel - Right sidebar */
.expanded-info-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    background: var(--background);
    border-left: 1px solid var(--border);
    padding: var(--space-8) var(--space-6);
    display: none;
    flex-direction: column;
    justify-content: center;
    z-index: 101;
}

.viewer-photo-wrapper.expanded ~ .expanded-info-panel,
.expanded-info-panel.active {
    display: flex;
}

.expanded-info-panel .info-title {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin: 0 0 var(--space-2);
}

.expanded-info-panel .info-location {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0 0 var(--space-1);
}

.expanded-info-panel .info-date {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin: var(--space-4) 0 0;
}

/* Expanded Close Button */
.expanded-close {
    position: fixed;
    top: var(--space-4);
    right: 230px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--muted-foreground);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 102;
    transition: all var(--transition-base);
}

.expanded-close:hover {
    color: var(--foreground);
    border-color: var(--foreground);
}

.viewer-photo-wrapper.expanded ~ .expanded-close {
    display: flex;
}

/* Expanded Responsive */
@media (max-width: 768px) {
    .viewer-photo-wrapper.expanded {
        right: 0;
        bottom: 100px;
    }

    .expanded-info-panel {
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: 100px;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: var(--space-3) var(--space-4);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: var(--space-2);
        text-align: center;
    }

    .expanded-close {
        right: var(--space-3);
        top: var(--space-3);
    }
}

/* Navigation Buttons */
.photo-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
    flex-shrink: 0;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--foreground);
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

.nav-btn:focus {
    outline: none;
    border-color: var(--foreground);
}

/* Viewer Photo Info in Home */
.home-photo-viewer-centered .viewer-photo-info {
    margin-top: var(--space-3);
    flex-shrink: 0;
}

/* Welcome Message */
.home-welcome-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.home-welcome-message p {
    margin: 0;
}

/* ==========================================
   HOME PAGE - Collections Sidebar Layout (Legacy)
   ========================================== */

.home-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Left Sidebar - Collections Menu */
.home-sidebar {
    width: 180px;
    min-width: 180px;
    background: var(--background);
    padding: var(--space-8) var(--space-6);
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border-right: 1px solid var(--border);
    box-sizing: border-box;
}

.sidebar-nav {
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding-right: var(--space-2);
}

.sidebar-nav::-webkit-scrollbar {
    width: 2px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.collection-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.collection-menu-item {
    position: relative;
}

.collection-menu-link {
    display: block;
    padding: 6px 0;
    color: var(--muted-foreground);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: color var(--transition-fast);
    line-height: 1.4;
}

.collection-menu-link:hover {
    color: var(--foreground);
}

.collection-menu-item.active .collection-menu-link {
    color: var(--foreground);
    font-weight: 500;
}

.no-collections {
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

/* Right Content - Full Width Photo */
.home-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
}

/* Photo Grid - for collection pages */
.home-photo-grid {
    width: 50%;
    background: var(--background);
    padding: var(--space-6);
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
}

.home-photo-grid .numbered-photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

/* Photo Viewer - Full area */
.home-photo-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    background: var(--background);
    position: relative;
}

.home-photo-viewer .viewer-photo-container {
    cursor: zoom-in;
    max-width: 100%;
    max-height: calc(100vh - 200px);
}

.home-photo-viewer .viewer-photo-container img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    transition: opacity var(--transition-base);
}


.viewer-photo-info {
    text-align: center;
    margin-top: var(--space-4);
}

.viewer-title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--foreground);
    margin: 0 0 var(--space-1);
    letter-spacing: 0.02em;
}

.viewer-location {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0;
    letter-spacing: 0.02em;
}

/* Mobil menü kapatma butonu */
.mobile-menu-close {
    position: fixed;
    top: var(--space-3);
    right: var(--space-4);
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    transition: opacity var(--transition-fast);
}

.mobile-menu-close:hover {
    opacity: 0.6;
}

.mobile-menu-close svg {
    width: 24px;
    height: 24px;
}

.no-photos-message {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    font-family: var(--font-mono);
}

/* ==========================================
   FULLSCREEN LIGHTBOX
   ========================================== */

.fullscreen-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    z-index: 99999;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.fullscreen-lightbox.active {
    display: flex;
    opacity: 1;
}

/* Lightbox Close Button */
.lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-base);
    z-index: 10;
}

.lightbox-close:hover {
    color: var(--foreground);
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--muted-foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 10;
}

.lightbox-nav:hover {
    color: var(--foreground);
    border-color: var(--foreground);
}

.lightbox-prev {
    left: var(--space-6);
}

.lightbox-next {
    right: 240px;
}

/* Lightbox Content - Photo centered vertically */
.lightbox-content {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    padding-right: 240px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* Lightbox Info - Right sidebar */
.lightbox-info {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    background: var(--background);
    border-left: 1px solid var(--border);
    padding: var(--space-8) var(--space-6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    color: var(--foreground);
}

.lightbox-info h3 {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 var(--space-2);
    letter-spacing: 0.02em;
    color: var(--foreground);
}

.lightbox-info p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0 0 var(--space-1);
    line-height: 1.5;
}

.lightbox-title {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin: 0 0 var(--space-2);
    letter-spacing: 0.02em;
}

#lightbox-title {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin: 0 0 var(--space-2);
}

#lightbox-location {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0 0 var(--space-1);
}

#lightbox-date {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin: var(--space-4) 0 0;
}

/* Lightbox Counter */
.lightbox-counter {
    position: absolute;
    bottom: var(--space-6);
    left: var(--space-6);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-family: var(--font-mono);
}

/* Lightbox Responsive */
@media (max-width: 768px) {
    .fullscreen-lightbox {
        flex-direction: column;
    }

    .lightbox-content {
        padding: var(--space-4);
        padding-right: var(--space-4);
        padding-bottom: 120px;
        width: 100%;
    }

    .lightbox-content img {
        max-height: 70vh;
    }

    .lightbox-info {
        position: fixed;
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        max-height: 120px;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: var(--space-3) var(--space-4);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: var(--space-2);
        text-align: center;
    }

    .lightbox-info h3,
    .lightbox-info p {
        margin: 0;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: var(--space-3);
    }

    .lightbox-next {
        right: var(--space-3);
    }

    .lightbox-counter {
        bottom: 130px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==========================================
   HOME PAGE - Responsive
   ========================================== */

@media (max-width: 1024px) {
    .home-layout,
    .home-layout-centered {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
    }

    .home-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: var(--space-4);
        border-right: none;
        border-bottom: 1px solid var(--border);
        justify-content: center;
        align-items: center;
        order: 2;
    }

    .sidebar-nav {
        max-height: none;
        overflow: visible;
        width: 100%;
    }

    .collection-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-2) var(--space-4);
    }

    .collection-menu-link {
        padding: var(--space-2) 0;
        font-size: 0.8125rem;
    }

    .home-photo-viewer {
        min-height: 65vh;
        order: 1;
    }

    .home-content-centered {
        height: auto;
        min-height: 65vh;
        order: 1;
    }

    .home-photo-viewer-centered {
        min-height: 55vh;
    }

    .viewer-photo-wrapper {
        max-height: 55vh;
    }
}

@media (max-width: 768px) {
    .home-sidebar {
        padding: var(--space-3);
        order: 2;
    }

    .collection-menu {
        gap: var(--space-2) var(--space-3);
        justify-content: center;
    }

    .collection-menu-link {
        font-size: 0.75rem;
        padding: 6px 0;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: var(--space-3);
    }

    .lightbox-next {
        right: var(--space-3);
    }

    .lightbox-close {
        top: var(--space-3);
        right: var(--space-3);
        width: 40px;
        height: 40px;
    }

    .home-photo-viewer {
        min-height: 60vh;
        padding: var(--space-4);
        order: 1;
    }

    .home-content-centered {
        min-height: 60vh;
        padding: var(--space-4);
    }

    .photo-nav-buttons {
        margin-top: var(--space-3);
    }

    .nav-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .home-sidebar {
        padding: var(--space-3);
        order: 2;
    }

    .collection-menu {
        gap: var(--space-2);
        justify-content: center;
    }

    .collection-menu-link {
        font-size: 0.6875rem;
        padding: 8px 4px;
    }

    .home-photo-viewer {
        min-height: 55vh;
        padding: var(--space-3);
        order: 1;
    }

    .home-content-centered {
        min-height: 55vh;
        padding: var(--space-3);
    }

    .viewer-photo-wrapper {
        max-height: 50vh;
    }

    .photo-nav-buttons {
        margin-top: var(--space-2);
        gap: var(--space-3);
    }

    .nav-btn {
        width: 32px;
        height: 32px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .viewer-photo-info {
        margin-top: var(--space-2);
    }

    .viewer-location {
        font-size: 0.6875rem;
    }
}

/* Copyright Fixed */
.copyright-fixed {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-6);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    letter-spacing: 0.02em;
    z-index: 20;
}

@media (max-width: 768px) {
    .copyright-fixed {
        bottom: var(--space-2);
        right: var(--space-3);
        font-size: 0.625rem;
    }
}

@media (max-width: 480px) {
    .copyright-fixed {
        display: none;
    }
}

/* ==========================================
   COLLECTION PAGE - Three Column Layout
   ========================================== */

.collection-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
    height: 100vh;
    overflow: hidden;
}

.collection-grid {
    width: 240px;
    min-width: 200px;
    max-width: 280px;
    background: var(--background);
    padding: var(--space-3);
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - var(--header-height));
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.collection-grid .numbered-photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding: 2px;
}

.collection-grid .numbered-photo-grid::-webkit-scrollbar {
    width: 2px;
}

.collection-grid .numbered-photo-grid::-webkit-scrollbar-thumb {
    background: var(--border);
}

.collection-grid .numbered-photo-item {
    aspect-ratio: 1;
    border-radius: 0;
    transition: opacity var(--transition-fast);
    line-height: 0;
    font-size: 0;
}

.collection-grid .numbered-photo-item:not(.active) {
    opacity: 0.5;
}

.collection-grid .numbered-photo-item:hover {
    opacity: 1;
}

.collection-grid .numbered-photo-item img {
    filter: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: bottom;
}

.collection-grid .photo-number {
    font-size: 0.5rem;
    padding: 1px 3px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 2px;
}

.collection-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--background);
    position: fixed;
    right: 0;
    top: var(--header-height);
    bottom: 0;
    width: calc(100% - 180px - 240px);
    min-width: 50%;
}

.collection-viewer .viewer-photo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100vh - var(--header-height) - 120px);
}

.collection-viewer .viewer-photo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.collection-viewer .viewer-photo-container {
    cursor: zoom-in;
    max-width: 100%;
    max-height: calc(100vh - 200px);
}

.collection-viewer .viewer-photo-container img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
}

/* Collection Layout Responsive */
@media (max-width: 1024px) {
    .collection-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    /* Tablet - Sidebar gizle */
    .collection-layout .home-sidebar {
        display: none;
    }

    .collection-grid {
        width: 100%;
        max-width: 100%;
        max-height: none;
        height: auto;
        padding: var(--space-3);
        order: 2;
        justify-content: flex-start;
    }

    .collection-grid .numbered-photo-grid {
        max-height: none;
        grid-template-columns: repeat(5, 1fr);
        gap: 3px;
    }

    .collection-viewer {
        position: static;
        width: 100%;
        min-height: 55vh;
        height: auto;
        order: 1;
        padding: var(--space-4);
    }

    .collection-viewer .viewer-photo-container {
        height: auto;
        max-height: 50vh;
    }

    .collection-viewer .viewer-photo-container img {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .collection-grid .numbered-photo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
    }

    .collection-viewer {
        min-height: 50vh;
        padding: var(--space-3);
    }

    .collection-viewer .viewer-photo-container {
        max-height: 45vh;
    }

    .collection-viewer .viewer-photo-container img {
        max-height: 45vh;
    }

    .viewer-photo-info {
        margin-top: var(--space-2);
    }

    .viewer-title {
        font-size: 0.75rem;
    }

    .viewer-location {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .collection-grid {
        padding: var(--space-2);
    }

    .collection-grid .numbered-photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }

    .collection-viewer {
        min-height: 50vh;
        padding: var(--space-3);
    }

    .collection-viewer .viewer-photo-container {
        max-height: 45vh;
    }

    .collection-viewer .viewer-photo-container img {
        max-height: 45vh;
    }

    .collection-grid .photo-number {
        display: none;
    }
}

/* ==========================================
   COLLECTION PAGE - Mobile-First Redesign
   ========================================== */

/* Thumbnail Grid - Proper vertical layout with hidden scrollbar */
.collection-grid .numbered-photo-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - var(--header-height) - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 4px;
    position: relative;
}

.collection-grid .numbered-photo-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Thumbnail row - 3 items per row */
.thumbnail-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    flex-shrink: 0;
}

/* Scroll indicator arrow */
.scroll-indicator {
    display: none;
    justify-content: center;
    padding: 8px 0;
    opacity: 0.5;
    transition: opacity var(--transition-base);
    cursor: pointer;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator svg {
    width: 16px;
    height: 16px;
    color: var(--muted-foreground);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(4px); }
    60% { transform: translateY(2px); }
}

.scroll-indicator.visible {
    display: flex;
}

/* Loading indicator with flash effect */
.photo-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

/* Flash burst effect */
.photo-loading-flash {
    position: relative;
    width: 40px;
    height: 40px;
}

.photo-loading-flash::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: flashCore 1.8s ease-in-out infinite;
}

.photo-loading-flash::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255, 230, 120, 0.9) 0%, rgba(255, 200, 60, 0.6) 30%, rgba(255, 180, 0, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: flashBurst 1.8s ease-out infinite;
}

/* Flash rays */
.flash-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
}

.flash-rays::before,
.flash-rays::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 230, 150, 0.8) 50%, transparent 100%);
    transform-origin: center;
    animation: flashRays 1.8s ease-out infinite;
}

.flash-rays::before {
    width: 50px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.flash-rays::after {
    width: 50px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Diagonal rays */
.flash-rays-diagonal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
}

.flash-rays-diagonal::before,
.flash-rays-diagonal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 240, 180, 0.5) 50%, transparent 100%);
    transform-origin: center;
    animation: flashRays 1.8s ease-out infinite;
    animation-delay: 0.05s;
}

.flash-rays-diagonal::before {
    width: 35px;
    height: 1px;
    transform: translate(-50%, -50%) rotate(45deg);
}

.flash-rays-diagonal::after {
    width: 35px;
    height: 1px;
    transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes flashCore {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 230, 120, 0.8);
    }
    30% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    }
}

@keyframes flashBurst {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    10% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0.9;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.7;
    }
    35% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

@keyframes flashRays {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0);
    }
    10% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scaleX(1);
    }
    30% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(1.2);
    }
}

.photo-loading-text {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    letter-spacing: 0.15em;
    text-transform: lowercase;
    animation: textPulse 1.8s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.5; }
    15% { opacity: 1; }
    30% { opacity: 0.7; }
}

.viewer-photo-container.loading img {
    opacity: 0.3;
}

/* Photo metadata panel for homepage */
.home-photo-meta {
    position: fixed;
    right: 0;
    top: var(--header-height);
    bottom: 0;
    width: 220px;
    background: var(--background);
    border-left: 1px solid var(--border);
    padding: var(--space-6);
    display: none;
    flex-direction: column;
    justify-content: center;
    z-index: 50;
}

.home-photo-meta.active {
    display: flex !important;
    animation: slideInMeta 0.3s ease forwards;
}

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

.home-photo-meta .meta-group {
    margin-bottom: var(--space-4);
}

.home-photo-meta .meta-label {
    font-size: 0.625rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-1);
    display: block;
}

.home-photo-meta .meta-value {
    font-size: 0.75rem;
    color: var(--foreground);
    display: block;
}

.home-photo-meta .meta-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: var(--space-3);
}

/* When meta panel is active, shrink main content */
body.meta-panel-active .home-content-centered {
    margin-right: 220px;
    transition: margin-right var(--transition-base);
}

body.meta-panel-active .copyright-fixed {
    right: 230px;
}

/* ==========================================
   MOBILE-FIRST DESIGN - Collection View
   ========================================== */

/* Mobile base styles (default) */
@media (max-width: 767px) {
    .collection-layout {
        flex-direction: column;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    /* Hide sidebar on mobile */
    .collection-layout .home-sidebar {
        display: none;
    }

    /* Mobile viewer - fixed at top, stable height */
    .collection-viewer {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100%;
        height: calc(100vh - var(--header-height) - 120px);
        padding: var(--space-3);
        padding-bottom: var(--space-2);
        order: 1;
        z-index: 10;
        background: var(--background);
    }

    .collection-viewer .viewer-photo-container {
        height: calc(100vh - var(--header-height) - 180px);
        max-height: calc(100vh - var(--header-height) - 180px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .collection-viewer .viewer-photo-container img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

    /* Mobile thumbnail strip - horizontal scroll at bottom */
    .collection-grid {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 120px;
        max-width: 100%;
        padding: var(--space-2) 0;
        order: 2;
        justify-content: flex-start;
        overflow: hidden;
        background: var(--background);
        border-top: 1px solid var(--border);
        z-index: 20;
    }

    .collection-grid .numbered-photo-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: var(--space-2);
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: var(--space-2) var(--space-3);
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .collection-grid .numbered-photo-grid::-webkit-scrollbar {
        display: none;
    }

    .thumbnail-row {
        display: contents;
    }

    .collection-grid .numbered-photo-item {
        flex: 0 0 auto;
        width: 80px;
        height: 80px;
        aspect-ratio: 1;
        scroll-snap-align: center;
        border-radius: var(--radius-sm);
        transition: transform var(--transition-fast), opacity var(--transition-fast);
    }

    .collection-grid .numbered-photo-item.active {
        transform: scale(1.05);
        box-shadow: 0 0 0 2px var(--foreground);
    }

    .collection-grid .numbered-photo-item:not(.active) {
        opacity: 0.5;
    }

    .collection-grid .photo-number {
        display: none;
    }

    .scroll-indicator {
        display: none !important;
    }

    /* Mobile photo info */
    .viewer-photo-info {
        margin-top: var(--space-2);
        padding: 0 var(--space-2);
        text-align: center;
    }

    .viewer-title {
        font-size: 0.75rem;
    }

    .viewer-location {
        font-size: 0.6875rem;
    }

    /* Mobile lightbox adjustments */
    .fullscreen-lightbox .lightbox-main {
        flex-direction: column;
    }

    .fullscreen-lightbox .lightbox-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        max-height: 160px;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 12px 16px;
        background: var(--background);
        overflow-y: auto;
    }

    .lightbox-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .lightbox-card-title {
        width: 100%;
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 4px;
        line-height: 1.3;
        text-align: left;
    }

    .lightbox-card-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .lightbox-meta-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        line-height: 1.4;
        color: var(--muted-foreground);
    }

    .lightbox-meta-item .meta-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--muted-foreground);
        min-width: 70px;
    }

    .lightbox-meta-item .meta-value {
        color: var(--foreground);
    }

    .lightbox-card-counter {
        position: absolute;
        top: 8px;
        right: 16px;
        font-size: 10px;
        color: var(--muted-foreground);
    }

    .lightbox-next {
        right: var(--space-3);
    }

    /* Hide home photo meta panel on mobile */
    .home-photo-meta {
        display: none !important;
    }

    /* Hide copyright on mobile collection pages */
    .copyright-fixed {
        display: none;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .collection-grid {
        height: 100px;
    }

    .collection-viewer {
        height: calc(100vh - var(--header-height) - 100px);
    }

    .collection-viewer .viewer-photo-container {
        height: calc(100vh - var(--header-height) - 160px);
        max-height: calc(100vh - var(--header-height) - 160px);
    }

    .collection-grid .numbered-photo-item {
        width: 70px;
        height: 70px;
    }

    .collection-grid .photo-number {
        display: none;
    }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1023px) {
    .collection-layout {
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
    }

    .collection-layout .home-sidebar {
        display: none;
    }

    .collection-grid {
        width: 200px;
        min-width: 180px;
        max-width: 220px;
        height: calc(100vh - var(--header-height));
        order: 1;
    }

    .collection-grid .numbered-photo-grid {
        display: flex !important;
        flex-direction: column;
        max-height: calc(100vh - var(--header-height) - 80px);
    }

    .thumbnail-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .collection-viewer {
        position: relative;
        flex: 1;
        width: auto;
        height: calc(100vh - var(--header-height));
        order: 2;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .collection-layout {
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
    }

    .collection-layout .home-sidebar {
        display: flex;
        width: 160px;
        min-width: 140px;
    }

    .collection-grid {
        width: 220px;
        min-width: 200px;
        max-width: 260px;
        height: calc(100vh - var(--header-height));
    }

    .collection-grid .numbered-photo-grid {
        display: flex !important;
        flex-direction: column;
        max-height: calc(100vh - var(--header-height) - 80px);
    }

    .thumbnail-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .collection-viewer {
        position: fixed;
        right: 0;
        top: var(--header-height);
        bottom: 0;
        width: calc(100% - 160px - 220px);
    }

    .scroll-indicator.visible {
        display: flex;
    }

    /* Home photo meta panel visible on desktop */
    .home-photo-meta {
        display: none;
    }

    .home-photo-meta.active {
        display: flex;
    }
}