/* --- Navigation --- */
nav {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    box-sizing: border-box;
    z-index: 10;
    opacity: 0;
    transition: opacity 2s ease 1s;
}
nav.visible { opacity: 1; }

nav h1 {
    margin: 0;
    color: var(--accent-bright);
    font-size: 1.2rem;
    letter-spacing: 4px;
    font-weight: normal;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.4s ease;
}

nav a:hover { color: var(--accent-bright); }

/* Hamburger Menu Icon */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background-color: var(--text-light);
    transition: 0.3s ease;
}


/* --- Core Styling & Palette --- */
:root {
    --bg-color: #191A19;
    --text-main: #D8E9A8;
    --text-muted: rgba(216, 233, 168, 0.6);
    --accent-bright: #4E9F3D;
    --accent-dark: #1E5128;
    --text-light: #D8E9A8;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    margin: 0;
    padding: 4rem 0;
    overflow-x: hidden;
}

/* --- Layout --- */
.gallery-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-header h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 300;
    margin: 0 0 1rem 0;
    letter-spacing: 2px;
}

.gallery-header p {
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- Filter Controls --- */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--accent-dark);
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--accent-bright);
    color: var(--bg-color);
    background-color: var(--text-main);
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.art-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--accent-dark);
    border-radius: 4px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0; /* For scroll animation */
    transform: translateY(30px); /* For scroll animation */
}

.art-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.art-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(30, 81, 40, 0.3); /* Subtle dark green glow */
    border-color: var(--accent-bright);
}

.art-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.art-card:hover .art-img {
    transform: scale(1.05);
}

/* --- Modal (Side-by-Side Layout) --- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(25, 26, 25, 0.95);
}

.preview-modal-content {
    position: relative;
    display: flex;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background-color: var(--bg-color);
    border: 1px solid var(--accent-dark);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    z-index: 1001;
}

.preview-image-container {
    flex: 0 0 60%;
    min-width: 0; /* Prevents Flexbox stretching */
    border-right: 1px solid var(--accent-dark);
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Scales image beautifully without cropping */
}

.preview-text-container {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.preview-text-container h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.category-tag {
    display: inline-block;
    color: var(--accent-bright);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.preview-text-container p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1rem;
}

.close-modal {
    position: absolute;
    top: 15px; right: 25px;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 1002;
}

.close-modal:hover {
    color: var(--accent-bright);
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .preview-modal-content {
        flex-direction: column;
        height: 90vh;
    }
    .preview-image-container {
        flex: 0 0 50%;
        border-right: none;
        border-bottom: 1px solid var(--accent-dark);
    }
    .preview-text-container {
        padding: 2rem;
    }
}

/* --- Responsive / Mobile Friendly Adjustments --- */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        background: linear-gradient(to bottom, rgba(25,26,25,0.95), rgba(25,26,25,0.8));
        padding: 1.5rem 5%;
    }
    .hamburger {
        display: flex;
    }
    nav ul {
        display: none; 
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding-top: 2rem;
        gap: 1.5rem;
    }
    nav ul.active {
        display: flex; 
    }

}