/* ===========================================================
   "More by Roach Lifescapes" section: track-record stat strip +
   a grid of the developer's other projects. Link this after
   styles.css:
     <link rel="stylesheet" href="builder-portfolio.css">
   =========================================================== */

.builder-portfolio {
    background: #0c0c0e;
}

/* ----- Stat strip ----- */
.builder-stats-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin: 0 auto 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 900px;
}

.builder-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 140px;
}

.builder-stat-value {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    color: var(--primary-gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.builder-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.4px;
}

/* ----- Project cards ----- */
.builder-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.builder-project-card {
    position: relative;
    padding: 2rem 1.8rem 1.8rem;
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.builder-project-card:hover h3 {
    color: var(--primary-gold);
}

.builder-project-badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 1.2rem;
}

.badge-residential {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary-gold);
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.badge-commercial {
    background: rgba(120, 170, 255, 0.12);
    color: #9dbdff;
    border: 1px solid rgba(120, 170, 255, 0.35);
}

.badge-hospitality {
    background: rgba(212, 100, 150, 0.12);
    color: #f2a3c2;
    border: 1px solid rgba(212, 100, 150, 0.35);
}

.builder-project-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.builder-project-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary-gold);
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ----- Project photo (replaces the icon when a real image is available) ----- */
.builder-project-photo {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.builder-project-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.builder-project-card:hover .builder-project-photo img {
    transform: scale(1.06);
}

/* Graceful fallback if a sourced image URL ever breaks: the onerror handler
   removes the broken <img> and adds this class to the container, restoring
   a tasteful placeholder instead of a blank/broken box */
.builder-project-photo.img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(255, 255, 255, 0.03));
}

.builder-project-photo.img-fallback::after {
    content: "";
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.08);
}

.builder-project-card h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
}

.builder-project-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.builder-projects-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2.5rem;
    opacity: 0.75;
}

.builder-projects-note a {
    color: var(--primary-gold);
    text-decoration: none;
}

.builder-projects-note a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .builder-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .builder-stats-row {
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    /* One card fills the screen at a time (no peek of the next one),
       swipeable, and auto-advanced by builder-projects-carousel.js -
       same single-row carousel pattern as the amenities slideshow. */
    .builder-projects-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        padding-bottom: 0.5rem;
    }
    .builder-projects-grid::-webkit-scrollbar {
        display: none;
    }
    .builder-project-card {
        flex: 0 0 100%;
        scroll-snap-align: start;
    }
    .builder-stat {
        min-width: 45%;
    }
    .builder-project-card {
        padding: 1.6rem 1.4rem 1.4rem;
    }
    .builder-stat-value {
        font-size: 2.1rem;
    }
}

/* ----- Leadership: the people behind Roach Cicada -----
   Now its own section (#team), so no top divider/margin needed - the
   section header above already provides the spacing. */
.leadership-block {
    margin-top: 0;
    padding-top: 0;
}

.leadership-heading {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2.5rem;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
}

.leadership-card {
    text-align: center;
    padding: 1.6rem 1.2rem;
}

.leadership-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.2rem;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.leadership-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.leadership-photo.img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(255, 255, 255, 0.03));
}

.leadership-photo.img-fallback::after {
    content: "";
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.08);
}

.leadership-card h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.leadership-title {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--primary-gold);
    margin-bottom: 0.9rem;
}

.leadership-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .leadership-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .leadership-photo {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 600px) {
    /* 2 per row instead of 1 - the bios are short one-liners now, so
       two cards fit side by side without feeling cramped, and the
       section takes half the scrolling it used to. */
    .leadership-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 0.8rem;
    }
    .leadership-card {
        padding: 0.8rem 0.6rem;
    }
    .leadership-photo {
        width: 80px;
        height: 80px;
        margin-bottom: 0.8rem;
    }
    .leadership-card h4 {
        font-size: 0.95rem;
    }
    .leadership-title {
        font-size: 0.68rem;
        margin-bottom: 0.6rem;
    }
    .leadership-card p {
        font-size: 0.78rem;
        line-height: 1.45;
    }
    .leadership-heading {
        font-size: 1.4rem;
        margin-bottom: 1.8rem;
    }
}
