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

:root {
    /* Light mode colors (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --overlay-bg: rgba(0, 0, 0, 0.95);
    --gallery-item-bg: #f5f5f5;
    --header-gradient: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-tertiary: #999999;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --overlay-bg: rgba(0, 0, 0, 0.95);
    --gallery-item-bg: #2a2a2a;
    --header-gradient: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
}

body {
    font-family: 'Borel', cursive;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header Styles */
.site-header {
    padding: 60px 20px;
    text-align: center;
    background: var(--header-gradient);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.site-title {
    font-family: 'Borel', cursive;
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.site-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Gallery Container */
.gallery-container {
    flex: 1;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    animation: fadeIn 0.8s ease-in;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--gallery-item-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 3/2;
    border: 1px solid var(--border-color);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-title {
    font-family: 'Borel', cursive;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 5px;
}

.gallery-item-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: scaleIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    font-size: 1rem;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 60px;
    cursor: pointer;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Footer */
.site-footer {
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}

.site-footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: var(--bg-secondary);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    fill: var(--text-primary);
    transition: fill 0.3s ease;
}

.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        padding: 5px 10px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 2rem;
    }
    
    .site-subtitle {
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-image {
        max-width: 95%;
        max-height: 70vh;
    }
}