/* ====================================
   CSS: Art Gallery Website
   Mobile-first responsive design with modern typography and animations
   ==================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - Inspired by the logo */
    --primary-dark: #2a2520;
    --primary-light: #F8F3ED;
    --accent-gray: #f0e6dd;
    --accent-warm: #c79c7d;
    --accent-cool: #7b8aa2;
    --text-primary: #322b24;
    --text-secondary: #7e7062;
    --border-color: #ddd1c5;
    --overlay-dark: rgba(24, 18, 12, 0.72);

    /* Enhanced Spacing */
    --spacing-xs: 0.75rem;
    --spacing-sm: 1.25rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    /* Enhanced Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ====================================
   RESET & GLOBAL STYLES
   ==================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: var(--text-primary);
    background-color: var(--primary-light);
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Container for max-width layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ====================================
   NAVIGATION BAR
   ==================================== */

.navbar {
    position: sticky;
    top: 0;
    background: rgba(248, 243, 237, 0.95);
    border-bottom: 1px solid rgba(221, 209, 197, 0.5);
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-brand {
    position: absolute;
    left: var(--spacing-lg);
}

.nav-brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-normal);
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-brand img {
    height: 48px;
    width: auto;
    display: block;
    transition: transform var(--transition-normal);
}

.nav-brand a:hover img {
    transform: scale(1.05);
}

.nav-brand a:hover {
    color: var(--accent-warm);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    margin: 0 auto;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
    padding: var(--spacing-xs) 0;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--accent-warm);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-warm), var(--accent-cool));
    border-radius: 1px;
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        padding: var(--spacing-sm);
    }

    .nav-menu {
        gap: var(--spacing-sm);
        font-size: 0.9rem;
    }
}

/* ====================================
   HERO SECTION
   ==================================== */

.hero {
    --hero-bg-offset: 0px;
    height: auto;
    min-height: 80vh;
    padding: var(--spacing-2xl) 0;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-gray) 55%, rgba(199, 156, 125, 0.08) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: float 25s linear infinite;
    opacity: 0.4;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateY(var(--hero-bg-offset));
}

.hero.hero-visible::before {
    opacity: 0.55;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(280px, 400px);
    grid-template-rows: auto auto;
    justify-content: center;
    gap: var(--spacing-xl);
    width: 100%;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.hero-photo-container,
.hero-logo-container {
    width: clamp(280px, 30vw, 400px);
    height: clamp(280px, 30vw, 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
}

.hero-bio-container {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(50px);
}

.hero-logo-container::before,
.hero-photo-container::before,
.hero-bio-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.hero-logo-container.animate-slide-up::before,
.hero-photo-container.animate-slide-up::before,
.hero-bio-container.animate-slide-up::before {
    opacity: 1;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.hero-photo:hover {
    transform: translateY(-6px) scale(1.04) rotate(-0.5deg);
    box-shadow: 0 22px 72px rgba(0, 0, 0, 0.22);
    filter: brightness(1.05) contrast(1.03);
}

.hero-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.hero-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.12));
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.hero-logo:hover {
    transform: scale(1.05) rotate(0.5deg);
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.22));
}

.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    text-align: left;
    min-height: 400px;
}

.hero-bio {
    background: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-xl);
    border-radius: 24px;
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.hero-bio:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

.hero-bio-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-primary);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
    max-width: 100%;
}

.hero-bio-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-align: center;
}

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

/* ====================================
   SCROLL ANIMATIONS
   Premium scroll-triggered effects
   ==================================== */

.animate-in {
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-float-active {
    animation: float 25s linear infinite;
}

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

@keyframes float {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(15px, -8px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Enhanced hero background animation */
.hero.animate-float-active::before {
    animation: float 25s linear infinite;
}

/* ====================================
   ABOUT SECTION
   ==================================== */

.about {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(180deg, var(--accent-gray) 0%, rgba(240, 230, 221, 0.8) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-content {
    max-width: 700px;
    text-align: center;
    width: 100%;
}

.about-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xl);
    letter-spacing: 0.02em;
    color: var(--text-primary);
    position: relative;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-warm), var(--accent-cool));
    border-radius: 2px;
}

.about-content p {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
}

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

.gallery-section {
    padding: var(--spacing-2xl) 0;
    background-color: var(--primary-light);
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xl);
    text-align: center;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    position: relative;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-warm), var(--accent-cool));
    border-radius: 2px;
}

/* Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-2xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    background-color: var(--primary-light);
    color: var(--text-primary);
    transition: all var(--transition-normal);
    letter-spacing: 0.02em;
    text-transform: capitalize;
    border-radius: 32px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(199, 156, 125, 0.1), transparent);
    transition: left var(--transition-smooth);
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    border-color: var(--accent-warm);
    background-color: rgba(199, 156, 125, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(199, 156, 125, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-cool));
    color: var(--primary-light);
    border-color: var(--accent-warm);
    box-shadow: 0 4px 20px rgba(199, 156, 125, 0.3);
}

.gallery-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.load-more-btn {
    min-width: 220px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    animation: fadeIn 0.6s ease-out;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-dark);
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-info {
    color: var(--primary-light);
    animation: slideUp 0.3s ease-out;
}

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

.gallery-item-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.gallery-item-category {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: capitalize;
}

/* Responsive Gallery Grid */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* ====================================
   LIGHTBOX / MODAL
   ==================================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-dark);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    width: min(96vw, 900px);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: var(--spacing-sm);
    border-radius: 28px;
    background: rgba(248, 243, 237, 0.98);
    border: 1px solid var(--border-color);
    box-shadow: 0 28px 80px rgba(42, 37, 32, 0.15);
    animation: zoomIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-image-container {
    width: 100%;
    flex: 1 1 auto;
    min-height: 240px;
    max-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm);
    border-radius: 20px;
    background: var(--primary-light);
    border: 1px solid rgba(221, 209, 197, 0.75);
    box-shadow: inset 0 0 0 1px rgba(221, 209, 197, 0.15);
    overflow: hidden;
}

.lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, calc(100vw - 4rem));
    max-height: calc(100vh - 320px);
    object-fit: contain;
    animation: fadeIn 0.3s ease-out;
    margin: 0 auto;
    align-self: center;
}

@media (max-width: 768px) {
    .lightbox-content {
        width: min(96vw, 760px);
        max-height: calc(100vh - 1rem);
        padding: var(--spacing-xs);
    }

    .lightbox-image-container {
        max-height: calc(100vh - 260px);
        padding: var(--spacing-xs);
        min-height: 200px;
    }

    .lightbox-image {
        max-width: min(100%, calc(100vw - 2rem));
        max-height: calc(100vh - 320px);
    }

    .lightbox-info {
        padding: 0 var(--spacing-xs);
    }
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--primary-light);
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-normal);
    z-index: 1001;
}

.lightbox-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: var(--spacing-md);
}

.lightbox-next {
    right: var(--spacing-md);
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 2rem;
    color: var(--primary-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
    z-index: 1001;
}

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

/* Lightbox Info */
.lightbox-info {
    width: 100%;
    text-align: center;
    color: var(--text-primary);
}

.lightbox-info h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.05em;
}

.lightbox-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    text-transform: capitalize;
}

/* Mobile Lightbox */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: var(--spacing-sm);
    }

    .lightbox-next {
        right: var(--spacing-sm);
    }

    .lightbox-close {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    .lightbox-info h3 {
        font-size: 1.2rem;
    }
}

/* Mobile Hero */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero-photo-container,
    .hero-logo-container,
    .hero-bio-container {
        width: clamp(280px, 80vw, 400px);
        height: auto;
    }

    .hero-bio-container {
        grid-column: auto;
    }

    .hero-logo,
    .hero-photo {
        border-radius: 16px;
    }

    .hero-bio {
        padding: var(--spacing-md);
    }

    .hero-bio-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* ====================================
   FOOTER
   ==================================== */

.footer {
    background-color: var(--primary-dark);
    color: var(--primary-light);
    padding: var(--spacing-lg) 0;
    text-align: center;
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ====================================
   EMPTY STATE
   ==================================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 1rem;
}

/* ====================================
   ACCESSIBILITY & UTILITY
   ==================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .filter-container,
    .lightbox-nav,
    .lightbox-close {
        display: none;
    }
}
