/* === High-Fashion Model Portfolio (Desktop First) === */
:root {
    --sidebar-width: 340px; /* Slightly wider for better text flow */
    --gap: 60px; /* Reduced for better screen utilization */
}

/* 
  Desktop First: The base styles are for wide screens.
*/
.model-showcase {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    max-width: 1800px; /* Allow for a wider, more cinematic layout */
    margin: 0 auto;
    padding: 60px 50px; /* Reduced from 100px to bring content closer to header */
    min-height: calc(100vh - var(--header-h)); /* Ensure container is tall enough for sticky behavior */
    gap: var(--gap);
}

/* Sticky Sidebar */
.model-details {
    width: var(--sidebar-width);
    position: sticky;
    top: calc(var(--header-h) + 40px); /* Anchor for short sidebars */
    bottom: 40px; /* Anchor for long sidebars */
    flex-shrink: 0;
    height: fit-content; /* Crucial: prevents the sidebar from stretching to match the grid height */
    align-self: flex-start; /* Crucial: ensures sidebar height isn't forced to match image grid */
    z-index: 10; /* Ensure it stays above images during scroll */
    margin-bottom: 0;
}

.model-details h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

/* 
  Mobile Layout: When the screen is 899px or narrower,
  override the desktop styles to create a stacked layout.
*/
@media (max-width: 899px) {
    .model-showcase {
        flex-direction: column;
        padding: 60px 20px 40px; /* Increased top padding to prevent content from hiding under the fixed header */
        gap: 0; /* No gap for stacked layout */
    }

    .model-details {
        width: 100%;
        position: static; /* Remove stickiness on mobile */
        margin-bottom: 40px;
    }

    .model-name {
        font-size: clamp(3rem, 12vw, 4rem) !important; /* Fluid scaling to prevent overflow */
    }

    .model-feed {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on mobile for better overview */
        gap: 10px !important; /* Tighter gap on mobile */
    }

    .feed-section-title {
        margin-top: 10px !important;
        padding-top: 30px !important;
    }
}

/* --- Typography & Details --- */

.model-name {
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    font-size: 6rem; /* WOW FACTOR: A much larger, more impactful name */
    line-height: 0.9;
    margin: 0 0 2.5rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.model-stats {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid #eee; /* A subtle separator */
}

.model-stats li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.model-stats li span {
    font-weight: normal; /* Revert previous bolding */
    opacity: 0.6; /* Make the label more subtle */
    margin-right: 20px;
}

.model-bio {
    margin-bottom: 2.5rem;
    font-size: 1rem; /* Slightly larger for better readability */
    line-height: 1.8;
    color: #333;
}

.social-link {
    display: inline-block;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: border-color 0.3s;
}

.social-link:hover {
    border-color: #000;
}

.jump-link {
    display: block;
    width: fit-content;
    margin-top: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: border-color 0.3s;
}

.jump-link:hover {
    border-color: #000;
}

/* Image Feed */
.model-feed {
    flex: 1;
    display: grid;
    /* Define 5 columns: [Pair 1] [Pair 1] [Center Gutter] [Pair 2] [Pair 2] */
    grid-template-columns: 1fr 1fr 40px 1fr 1fr; 
    grid-auto-flow: dense; /* Automatically fills gaps created by landscape images */
    gap: 15px 15px; /* Row gap and internal column gap */
    width: 100%;
}

/* Container for portfolio and digitals next to the sidebar */
.model-content-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 60px; /* Space between Portfolio and Digitals */
}

/* Spacing for the Digitals section when nested inside the content column */
.digitals-section {
    width: 100%;
}

/* Use a pseudo-element to block the middle column, creating the "two and two" split */
.model-feed::before {
    content: '';
    grid-column: 3;
    grid-row: 1 / span 100; /* Reduced from 1000 to prevent infinite height issues in some browsers */
    pointer-events: none;
}

/* On medium screens (tablets), drop to 2 columns */
@media (min-width: 900px) and (max-width: 1200px) {
    .model-feed {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .model-feed::before {
        display: none; /* Remove the gutter split on tablet */
    }
}

/* Spanning for Landscape Images */
.model-feed picture.landscape {
    grid-column: span 2; /* Landscapes take up two columns on desktop */
}

@media (max-width: 899px) {
    .model-feed picture.landscape {
        grid-column: span 2; /* Landscapes take up full width on 2-column mobile */
    }

    .model-feed::before {
        display: none; /* Ensure gutter is removed on mobile */
    }
}

.model-feed img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.4s ease;
}

.model-feed img:hover {
    opacity: 0.9;
}

/* Section Title for Digitals/Polaroids */
.feed-section-title {
    grid-column: 1 / -1; /* Span full width of the grid */
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-top: 20px;
    padding-top: 60px;
    border-top: 1px solid #eee;
    color: var(--primary-color);
}