/* ============================================================================
   TANINA MUNCHKINA — STYLE
   Clean, minimal artist portfolio
   ============================================================================ */

/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */

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

:root {
    --color-bg: #faf9f7;
    --color-text: #1a1a1a;
    --color-text-light: #6b6b6b;
    --color-border: #e5e3df;
    --color-accent: #1a1a1a;
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    --transition: 0.3s ease;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}


/* --------------------------------------------------------------------------
   HOME PAGE
   -------------------------------------------------------------------------- */

.page-home {
    display: flex;
    flex-direction: column;
}

.home {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-md);
    min-height: calc(100vh - 80px);
}

.home-content {
    text-align: center;
    max-width: 600px;
}

.artist-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

.artist-tagline {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 300;
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

/* Gallery Navigation */
.gallery-nav {
    margin-bottom: var(--space-lg);
}

.gallery-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.gallery-list li a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition);
}

.gallery-list li a:hover {
    opacity: 1;
    padding-left: var(--space-sm);
}

.gallery-name {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.gallery-count {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
}

.no-galleries {
    font-style: italic;
    color: var(--color-text-light);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.social-links svg {
    width: 22px;
    height: 22px;
}


/* --------------------------------------------------------------------------
   GALLERY PAGE
   -------------------------------------------------------------------------- */

.page-gallery {
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    padding: var(--space-md);
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 100;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.back-link svg {
    width: 20px;
    height: 20px;
}

/* Gallery */
.gallery {
    flex: 1;
    padding: 0 var(--space-md) var(--space-lg);
}

.gallery-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* Flexbox grid with same-height thumbnails, varying widths, centered rows */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    cursor: pointer;
    transition: transform var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
}

/* Image container with overlay for protection */
.image-container {
    position: relative;
    aspect-ratio: 1 / 1;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}

/* Transparent overlay to prevent easy image saving */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.gallery-item figcaption {
    margin-top: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-light);
    text-align: center;
}

.no-images {
    text-align: center;
    font-style: italic;
    color: var(--color-text-light);
}


/* --------------------------------------------------------------------------
   LIGHTBOX
   -------------------------------------------------------------------------- */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition);
    z-index: 10;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.6;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition);
    z-index: 10;
}

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

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

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
}

.lightbox-prev svg,
.lightbox-next svg {
    width: 32px;
    height: 32px;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    max-width: 85vw !important;
    max-height: 75vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.lightbox-caption {
    margin-top: var(--space-md);
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}


/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
    padding: var(--space-md);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    letter-spacing: 0.03em;
}


/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 100px;
        transform: none;
    }
    
    .lightbox-prev {
        left: 25%;
    }
    
    .lightbox-next {
        right: 25%;
    }
    
    .lightbox-image-container img {
        max-width: 95vw;
        max-height: 65vh;
    }
}

@media (max-width: 480px) {
    :root {
        --space-md: 1.5rem;
        --space-lg: 3rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}


/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */

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


/* --------------------------------------------------------------------------
   PRINT STYLES (hide images for print)
   -------------------------------------------------------------------------- */

@media print {
    .gallery-grid,
    .lightbox {
        display: none !important;
    }
}