/* Minimalist Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.3;
    color: #222;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    display: flex; /* Aligns Sidebar and Main Content side-by-side */
}

/* --- SIDEBAR NAVIGATION --- */
.sidebar {
    width: 240px;
    height: 100vh;
    position: fixed; /* Keeps menu static while right side scrolls */
    top: 0;
    left: 0;
    background-color: #ffffff;
    padding: 40px 30px;
    box-sizing: border-box;
    border-right: 1px solid #ffffff;
    display: flex;
    flex-direction: column;
}

/* Header Image / Logo */
.logo-link {
    display: inline-block;
    margin-bottom: 40px;
}

.header-logo {
    max-width: 180px; /* Adjust this number to scale your logo image size */
    height: auto;
    display: block;
}

/* Navigation Items */
.site-menu {
    padding-left: 20px; /* Indent menu items slightly for a cleaner look */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    text-decoration: none;
    color: #000000;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.menu-item:hover {
    color: #4f4f4f;
}

.nav-divider {
    border: 0;
    border-top: 0px solid #fafafa;
    margin: 30px 0;
    width: 100%;
}

/* Accordion Dropdowns */
.year-dropdown summary {
    list-style: none; /* Hides standard browser arrow */
    cursor: pointer;
    font-size: 0.75rem;
    color: #000000;
    user-select: none;
    outline: none;
    position: relative;
    padding-right: 15px;
}

/* Optional Custom Minimalist Indicator (+/- or arrow) */
.year-dropdown summary::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 0.75rem;
    color: #000000;
    padding-right: 20px;
}

.year-dropdown[open] summary::after {
    content: '-';
}

.year-dropdown summary:hover {
    color: #686868;
}

/* Content hidden inside dropdown until clicked */
.dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 6px;
    margin-top: 8px;
    margin-bottom: 5px;
}

.dropdown-content a {
    text-decoration: none;
    color: #000000;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.dropdown-content a:hover {
    color: #686868;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    margin-left: 220px; /* Matches the width of the sidebar */
    padding: 40px;      /* Reduced from 60px to give images even more room */
    padding-top: 60px; /* Extra top padding to visually balance the header logo */
    box-sizing: border-box;
    width: calc(100% - 220px); /* Forces the main area to take up exactly the remaining width */
    box-sizing: border-box;
    text-align: center;
    line-height: 0.5;
}

/* Keeps text-heavy pages looking nice and contained while grids stay wide */
.about-section {
    max-width: 700px;
    padding-top: 100px;
}

.hero {
    padding: 40px 0;
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #111;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.05rem;
    color: #666;
    margin: 0;
}

hr {
    border: 0;
    border-top: 1px solid #eaeaea;
    margin: 40px 0;
}

.about-section h2 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.about-content p {
    color: #444;
    margin-bottom: 6px;
}

/* Footer */
footer {
  margin-top: auto;
  line-height: 0.5;
  text-align: left;
  font-size: 0.75rem;
  color: #999;
  padding-top: 40px;
  padding-left: 15px;
}


/* --- GALLERY GRID LAYOUT --- */
.page-title {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: #111;
}

/* The Grid Container */
.image-grid {
    display: grid;
    /* Creates 3 columns that share the space completely equally */
    grid-template-columns: repeat(3, 1fr); 
    /* The gap/spacing between your square pictures */
    gap: 20px; 
    width: 100%;
}

/* The Grid Items */
.grid-item {
    position: relative;
    width: 100%;
    /* This padding trick forces the container to be a perfect 1:1 aspect ratio square */
    padding-top: 100%; 
    overflow: hidden;
    background-color: #f0f0f0; /* Optional: light gray background while images load */
}

/* Perfecting the Square Images */
.grid-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Object-fit makes sure the image fills the square perfectly without distorting */
    object-fit: cover; 
    display: block;
    transition: opacity 0.3s ease;
}


/* --- COMPLETE MOBILE PHONE OPTIMIZATION (Screens under 768px wide) --- */
@media (max-width: 768px) {
    
    /* 1. Reset Body Layout */
    body {
        display: block; /* Changes from desktop side-by-side flex to normal vertical block */
    }

    /* 2. Style the Mobile Menu Bar Button */
    .mobile-menu-button {
        display: block; /* Make it visible on phones */
        text-align: left;
        padding: 20px 30px;
        font-size: 0.85rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        cursor: pointer;
        background-color: #ffffff;
        border-bottom: 1px solid #f5f5f5;
        position: sticky; /* Keeps the menu bar stuck to the top of the phone screen while scrolling */
        top: 0;
        z-index: 1000;
        user-select: none;
    }

    /* 3. Re-style the Sidebar into a Dropdown Drawer */
    .sidebar {
        display: none; /* HIDE IT BY DEFAULT ON MOBILE */
        position: relative; /* Removes the fixed desktop positioning */
        width: 100%;
        height: auto;
        padding: 20px 30px;
        border-right: none;
        border-bottom: 1px solid #f5f5f5;
        z-index: 999;
    }

    /* Hide the logo image inside the menu on mobile to save massive vertical space */
    .logo-link {
        display: none;
    }
    
    /* Pull the footer navigation up closer since the menu is now compact */
    .sidebar footer {
        padding-top: 25px;
    }

    /* 4. THE MAGIC: When the invisible checkbox is checked, SHOW the sidebar! */
    .menu-checkbox-toggle:checked ~ .sidebar {
        display: flex;
    }
    
    /* Change the button text to '✕ Close' when the menu drawer is actively open */
    .menu-checkbox-toggle:checked ~ .mobile-menu-button {
        content: "";
        /* Modifying text requires a slight css trick or just letting it stay '☰ Menu'. 
           If you want to keep it minimal, the symbol alone works great! */
    }

    /* 5. Free Up the Main Gallery Content Area */
    .main-content {
        margin-left: 0; /* Remove the 220px desktop sidebar gap */
        width: 100%;    /* Give your art 100% of the phone screen width */
        padding: 20px;  /* Snug mobile padding so art is as big as possible */
        padding-top: 30px;
    }

    /* 6. Tighten the Gallery Grid Columns */
    .image-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 crisp columns of square art */
        gap: 10px; /* Clean, tight modern spacing */
    }

    /* Adjust text-heavy about page layout sizes for phone screens */
    .about-section {
        padding-top: 30px;
        margin: 0 auto;
    }
}


/* --- DESKTOP PROTECTION RULE --- */
/* This ensures the mobile toggle helpers are completely invisible when viewing on a computer monitor */
@media (min-width: 769px) {
    .mobile-menu-button,
    .menu-checkbox-toggle {
        display: none !important;
    }
}