/* ========================================
   PROJECT DETAIL PAGE
======================================== */

/* Header band (90px) + 36px so the gap above the hero equals the 36px below it */
.main-content.project-detail {
    padding-top: 126px;
}

.project-hero {
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    margin-bottom: 36px;
}

.project-hero img {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: cover;
    display: block;
}

/* Top picture shown whole (set per project with "heroFit": "contain" in work/projects.json):
   same frame height, nothing cropped, page colour at the sides. */
.project-hero--contain img {
    object-fit: contain;
}

/* "heroAlign" (used with "heroFit": "contain") moves the top picture over the main text body:
   the frame starts at the same 355px indent as the title and text below.
   "text"        = the picture's left edge sits on the text's left edge;
   "text-center" = the picture is centred in the space above the text. */
.project-hero--over-text {
    box-sizing: border-box;
    padding-left: 355px;
}

.project-hero--over-text.project-hero--left img {
    object-position: left center;
}

@media (max-width: 880px) {
    .project-hero--over-text {
        padding-left: 0;
    }
}

/* Title row: category kicker | title — same format as the homepage captions.
   Indented (with its hairline) to align with the description column:
   260px meta column + 95px gap. */
.project-title-row {
    display: flex;
    align-items: center;  /* kicker centers vertically on the title's bar */
    gap: 18px;
    flex-wrap: wrap;
    margin-left: 355px;
}

.project-title-row + .detail-divider {
    margin-left: 355px;
}

@media (max-width: 880px) {
    .project-title-row,
    .project-title-row + .detail-divider {
        margin-left: 0;
    }
}

.project-kicker {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-kicker:hover {
    color: var(--text-main);
}

body:not(.dark-mode) .project-kicker {
    font-weight: 600;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-main);
    margin: 0;
    position: relative;
    padding-left: 18px;
}

/* Vertical bar runs cap-top to BASELINE of the title, not its line box
   (canvas-measured at Switzer 1.9rem/1.2: cap top = box + 0.24em,
   baseline = box bottom - 0.24em — symmetric, so no kicker nudge needed) */
.project-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.24em;
    bottom: 0.24em;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.45);
}

body:not(.dark-mode) .project-title::before {
    background-color: rgba(0, 0, 0, 0.45);
}

.detail-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 36px 0;
}

/* Two columns: meta on the left, text + images on the right.
   The gap (95px, was 65px) sets how far the text and pictures sit from the
   project details; keep it in step with the 355px title indent above. */
.project-columns {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 95px;
    align-items: start;
}

.project-meta {
    margin: -100px 0 0; /* Area label rises level with the category kicker */
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 126px; /* header height + breathing room */
}

.project-meta-item dt {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light, #999);
    margin-bottom: 6px;
}

.project-meta-item dd {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
}

.project-meta-item dd.meta-placeholder {
    color: var(--text-light, #999);
}

/* Description runs the full width of its column, to the same right edge as
   the pictures below it, at every screen size (no narrower reading width). */
.project-desc {
    max-width: none;
    width: 100%;
    margin-bottom: 50px;
}

.project-desc p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Placeholder text: muted skeleton lines in the page rhythm */
.placeholder-text {
    margin-bottom: 2rem;
}

.placeholder-text span {
    display: block;
    height: 0.9em;
    width: 100%;
    margin-bottom: 0.7em;
    background-color: var(--border-light);
    border-radius: 2px;
}

/* Placeholder image frame: matches the projects-grid tile style */
.placeholder-frame {
    aspect-ratio: 3 / 2;
    background-color: var(--bg-card, #f2f2f2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-frame span {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light, #999);
}

.project-hero.placeholder-frame {
    aspect-ratio: 21 / 9;
}

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 65px;
    margin-bottom: 65px;
}

.project-gallery img {
    width: 100%;
    display: block;
}

/* Films in the gallery (entries ending in .mp4 or .webm in work/projects.json) */
.project-gallery video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.project-prevnext {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 40px;
}

.project-prevnext a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-prevnext a:hover {
    color: var(--text-main);
}

.project-prevnext .project-all {
    color: var(--text-main);
}

@media (max-width: 880px) {
    .project-columns {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-meta {
        position: static;
        margin-top: 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px 40px;
    }
}

@media (max-width: 768px) {
    .project-title-row {
        flex-direction: column;
        gap: 10px;
    }

    .project-title {
        border-left: none;
        padding-left: 0;
    }

    .project-gallery {
        gap: 36px;
    }
}
