/* Page-specific styles for the Bio page */

/*
 * BIO CONTAINER
 * Main container for all content on the bio page.
 */
.bio-container {
    /* Sets a maximum width for the content for better readability on large screens. */
    max-width: 1100px;
    /* Centers the container on the page. */
    margin: 2rem auto;
    /* Adds padding on the sides for smaller screens. */
    padding: 0 2rem;
}

/*
 * BIO MAIN CONTENT
 * The flex container for the two-column layout (headshot and text).
 */
.bio-main-content {
    /* Uses flexbox to create the two-column layout. */
    display: flex;
    /* Allows items to wrap onto the next line on smaller screens. */
    flex-wrap: wrap;
    /* Adds a gap between the columns. */
    gap: 2rem;
    /* Aligns items to the start of the container. */
    align-items: flex-start;
}

/*
 * LEFT COLUMN
 * Contains the headshot and buttons.
 */
.bio-left-column {
    /* The column will try to be 300px wide. */
    flex-basis: 300px;
    /* It can grow if needed, but won't shrink below its basis. */
    flex-grow: 1;
    /* Sticks the column to the top when scrolling on larger screens. */
    position: sticky;
    top: 2rem;
}

/*
 * RIGHT COLUMN
 * Contains the main bio text.
 */
.bio-right-column {
    /* The column will take up the remaining space, with a basis of 60%. */
    flex-basis: 0;
    flex-grow: 999;
    min-width: 60%;
}

/*
 * BIO HEADSHOT
 * Styling for the main image on the bio page.
 */
.bio-headshot {
    /* Ensures the image scales with its container. */
    max-width: 100%;
    /* Maintains the image's aspect ratio. */
    height: auto;
    /* Adds a border with the primary accent color. */
    border: 4px solid var(--primary-accent);
    /* Adds a subtle shadow for depth. */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/*
 * BIO BUTTONS CONTAINER
 * Styles the container holding the CV and Contact buttons.
 */
.bio-buttons {
    /* Adds space above the buttons. */
    margin-top: 1.5rem;
    /* Uses flexbox to lay out the buttons. */
    display: flex;
    /* Adds a gap between the buttons. */
    gap: 1rem;
}

.bio-buttons .btn {
    /* Allows buttons to grow equally to fill the container space. */
    flex-grow: 1;
    /* Centers the text within the buttons. */
    text-align: center;
}

/* 2x2 grid for bio-buttons */
.bio-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}
.bio-buttons-grid .btn {
    width: 100%;
    height: 3rem;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 500px) {
    .bio-buttons-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }
}

/*
 * "IN ACTION" GALLERY SECTION
 * Styles the section for the three process photos.
 */
.in-action-gallery {
    /* Adds significant space above this section to separate it from the main bio content. */
    margin-top: 4rem;
    /* Adds a border above the section. */
    border-top: 2px solid var(--secondary-accent);
    /* Adds padding above the border. */
    padding-top: 2rem;
}

.in-action-gallery h2 {
    /* Centers the heading for this section. */
    text-align: center;
    /* Adds space below the heading. */
    margin-bottom: 2rem;
}

/*
 * GALLERY GRID
 * The grid container for the three "in action" images.
 */
.gallery-grid {
    /* Uses CSS Grid for the layout. */
    display: grid;
    /* Creates three columns of equal width. */
    grid-template-columns: repeat(3, 1fr);
    /* Adds a gap between grid items. */
    gap: 1rem;
}

.gallery-grid img {
    /* Ensures images fill the grid cell they are in. */
    width: 100%;
    /* Maintains aspect ratio. */
    height: auto;
    /* Adds a subtle transition effect for hover states (optional). */
    transition: transform 0.3s ease;
}

.gallery-grid img:hover {
    /* Slightly enlarges the image on hover for an interactive feel. */
    transform: scale(1.05);
}

/*
 * RESPONSIVE ADJUSTMENTS
 * Styles for screens smaller than 768px.
 */
@media (max-width: 768px) {
    .bio-main-content {
        /* Stacks the columns vertically. */
        flex-direction: column;
    }

    .bio-left-column {
        /* Removes the sticky positioning on mobile. */
        position: static;
        /* Centers the content of the column. */
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .bio-headshot {
        /* Sets a max-width for the headshot on smaller screens. */
        max-width: 300px;
    }

    /* Adjusts the grid for the "in action" photos to a single column on mobile. */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
