/* Project page styles */

iframe.vimeo-iframe {
    border-width: 0;
    margin-bottom: 20px;
}

.logo-link {
    text-decoration: none;
}

.project-page {
    padding: 0 20px 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-title {
    font-family: 'Futura Cyrillic Demi', sans-serif;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 30px;
}

.project-page a {
    color: #555;
    text-decoration: underline;
}

.project-page a:hover {
    color: #333;
}

.project-image-full {
    width: 100%;
    margin-bottom: 40px;
}

.project-image-full img {
    width: 100%;
    height: auto;
    display: block;
}

/* Full-width video block: same width as .project-page content (no overflow) */
.project-video-full {
    width: 100%;
    max-width: 100%;
    margin-bottom: 40px;
    overflow: hidden;
    box-sizing: border-box;
}

.project-video-full video {
    width: 100%;
    height: auto;
    display: block;
}

/* Vimeo iframe: responsive, class-driven aspect ratio */
.project-video-full iframe {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

.project-video-full iframe.landscape-video {
    aspect-ratio: 16 / 9;
}

.project-video-full iframe.portrait-video {
    aspect-ratio: 9 / 16;
}

/* Desktop: center portrait video (height = viewport, width derived from 9:16) */
@media (orientation: landscape) {
    .project-video-full:has(iframe.portrait-video) {
        display: flex;
        justify-content: center;
    }
}

/* Mobile (viewport portrait: vh >= vw): video always width-driven, full width */
@media (orientation: portrait) {
    .project-video-full iframe.landscape-video {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }
    .project-video-full iframe.portrait-video {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 9 / 16;
    }
}

/* Two-column image block */
.project-two-col-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.project-two-col-image-col img {
    width: 100%;
    height: auto;
    display: block;
}

.project-two-col-image-caption {
    grid-column: 1 / -1;
}

.project-two-col-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-two-col-image .image-footnote {
    text-align: center;
}

/* Full-width text block (single column, full width) */
.project-full-text {
    width: 100%;
    margin-bottom: 40px;
}

.project-full-text .project-description {
    max-width: 100%;
}

/* Five-column image block – same image × 5, seamless full width */
/* 3×2 subproject grid (same width as page content) */
.project-subproject-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 40px;
    width: 100%;
}

.project-subproject-grid-item {
    position: relative;
    display: block;
    text-decoration: none;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
}

.project-subproject-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-subproject-grid-item:hover img {
    transform: scale(1.02);
}

/* Desktop only: hover overlay with project name (same as index gallery) */
@media (min-width: 769px) {
  .project-subproject-grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .project-subproject-grid-item:hover .project-subproject-grid-overlay {
    opacity: 1;
  }
}

.project-five-col-image {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 40px;
    width: 100%;
}

.project-five-col-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-five-col-image-caption {
    grid-column: 1 / -1;
}

/* 5-column thumbnail grid; captions sit under their thumbnail (.organic-grid-item) */
/* #project-body > ... has higher specificity; bare class matches if a wrapper is added later.
   minmax(0,1fr) avoids implicit 1-column fallback when track min-sizes overflow. */
#project-body > .project-organic-electric-grid,
.project-organic-electric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 40px;
    width: 100%;
    min-width: 0;
    align-items: start;
}

.organic-grid-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.organic-grid-item > a {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.organic-grid-item > a:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.organic-grid-item > a img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.organic-grid-item .organic-grid-caption {
    font-size: 13px;
    color: #666;
    line-height: 1.35;
    margin: 8px 0 0 0;
    padding: 0;
}

.image-footnote {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-top: 10px;
    margin-bottom: 0;
}

.project-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.project-two-col-txt-image-col img {
    width: 100%;
    height: auto;
    display: block;
}

/* Image on left, text on right (reverse of default) */
.project-two-col-txt-image.image-left {
    grid-template-columns: 1fr 2fr;
}

.project-description {
    color: #000;
    font-size: 15px;
    line-height: 1.7;
}

.project-description p {
    margin-bottom: 30px;
}

.project-description h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
    margin-top: 40px;
}

.project-details {
    color: #000;
    font-size: 14px;
    line-height: 1.8;
}

.detail-item {
    margin-bottom: 15px;
}

/* Desktop: label and value on separate lines */
.detail-label {
    display: block;
    font-weight: 400;
    color: #666;
    margin-bottom: 2px;
}

.detail-value {
    display: block;
    font-weight: 400;
}

/* Mobile: label and value on the same line */
@media (max-width: 768px) {
    .detail-label {
        display: inline;
        margin-bottom: 0;
        margin-right: 0.35em;
    }

    .detail-value {
        display: inline;
    }
}

/* About page */
.about-content {
    grid-template-columns: 1fr;
    max-width: 720px;
}

.about-links {
    margin-top: 20px;
}

.about-link {
    color: inherit;
    text-decoration: underline;
}

.about-link:hover {
    opacity: 0.8;
}

.about-section {
    margin-bottom: 48px;
    color: #000;
}

.about-section-title {
    font-size: 15px;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 16px;
}

.about-section p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 0;
}

.map-section {
    margin-top: 48px;
}

.map-container {
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
}

.map-container iframe {
    display: block;
}

.map-caption {
    font-size: 14px;
}

/* About page data tables – real <table> for column alignment */
.about-table {
    width: 100%;
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    border-collapse: collapse;
    border-spacing: 0;
}

.about-table td {
    vertical-align: top;
    text-align: left;
    padding: 0 0 6px 0;
    border: none;
}

/* Press: 3 columns – Date | Publication | Content */
.about-table-press td:first-child {
    width: 200px;
    min-width: 12.5em;
    padding-right: 32px;
}

@media (min-width: 769px) {
    .about-table-press td:first-child {
        white-space: nowrap;
    }
}

.about-table-press td:nth-child(2) {
    width: 200px;
    padding-right: 56px;
}

.about-table-press td:nth-child(3) {
    width: auto;
}

/* Exhibitions & Commissions: 2 columns */
.about-table-two-col td:first-child {
    width: 320px;
    padding-right: 56px;
}

.about-table-two-col td:nth-child(2) {
    width: auto;
}

/* Mobile responsive (viewport portrait = mobile; layout breakpoint) */
@media (max-width: 768px) {
    .project-page {
        padding: 0 15px 40px 15px;
    }

    .project-video-full {
        width: 100%;
        max-width: 100%;
    }

    .project-title {
        font-size: 12px;
    }

    .project-content {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .project-two-col-image {
        grid-template-columns: 1fr;
    }

    .project-subproject-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-five-col-image {
        grid-template-columns: 1fr;
    }

    .project-five-col-image img:not(:first-of-type) {
        display: none;
    }

    #project-body > .project-organic-electric-grid,
    .project-organic-electric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-description {
        font-size: 14px;
    }

    .project-details {
        font-size: 13px;
    }

    .about-table td {
        display: block;
        width: auto;
        padding-right: 0;
        padding-bottom: 4px;
    }

    .about-table tr td:last-child {
        padding-bottom: 14px;
    }

    .about-section-title {
        font-size: 14px;
    }
}
