/* Projects section: card grid, tech pills, doc buttons, and the doc modal.
   Colors follow the theme accent (#bd5d38) used elsewhere by .text-primary. */

/* Cards size to their own content, so expanding one card's details does not
   stretch its siblings (the default Bootstrap equal-height behaviour). */
.project-grid {
    align-items: start;
}

/* The whole card is the expand/collapse trigger (assets/js/project-cards.js),
   so it needs pointer/keyboard-focus affordances like a real control. */
.project-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.12);
    border-color: #bd5d38;
}

.project-card:focus-visible {
    outline: 2px solid #bd5d38;
    outline-offset: 2px;
}

/* Nested controls (doc buttons) still need their own pointer cursor and
   should not look like they inherited the card's own focus ring. */
.project-card .project-doc-btn {
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .project-card {
        transition: none;
    }
    .project-card:hover,
    .project-card:focus-within {
        transform: none;
    }
}

/* Figures are plots, not photography — show them whole, fitted to the card
   width, rather than cropping to a fixed aspect ratio. */
.project-card__figure {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

.project-card__body {
    padding: 1.25rem;
}

.project-card__eyebrow {
    font-family: "Barlow Semi Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    font-weight: 700;
    color: #bd5d38;
}

.project-card__title {
    font-family: "Barlow Semi Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: uppercase;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0.15rem 0 0.1rem;
}

.project-card__dates {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.6rem;
}

.project-card__tagline {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
}

/* Tech pills — shared component. Used inside project cards and, via
   .resume-exp-tech in site.css, under each Experience role's date range. */
.tech-pills {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tech-pills li {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    color: #bd5d38;
    background: rgba(189, 93, 56, 0.08);
    border: 1px solid rgba(189, 93, 56, 0.35);
}

/* Supporting-document buttons. Now the first thing inside the details panel,
   rather than always visible above the toggle. */
.project-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.85rem 0 0.5rem;
}

.project-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: 0.3rem;
    border: 1px solid #bd5d38;
    background: transparent;
    color: #bd5d38;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.project-doc-btn:hover,
.project-doc-btn:focus-visible {
    background: #bd5d38;
    color: #fff;
}

/* Expand-in-place details indicator. Purely visual — the whole card is the
   actual trigger (data-card-toggle) — so this is a <div>, not a <button>,
   and its icon swaps off the card's own aria-expanded state. */
.project-details-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-top: 0.25rem;
}

.project-card:hover .project-details-toggle,
.project-card:focus-visible .project-details-toggle {
    color: #bd5d38;
}

.project-details-toggle .icon-plus,
.project-details-toggle .icon-minus {
    font-size: 0.7rem;
}

/* Collapsed: show the plus. Expanded: swap to the minus. */
.project-details-toggle .icon-minus {
    display: none;
}

.project-card[aria-expanded="true"] .project-details-toggle .icon-plus {
    display: none;
}

.project-card[aria-expanded="true"] .project-details-toggle .icon-minus {
    display: inline-block;
}

.project-details ul {
    padding-left: 1.1rem;
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
}

.project-details li {
    margin-bottom: 0.4rem;
}

/* Doc modal ------------------------------------------------------------- */
.doc-modal .modal-body {
    padding: 0;
}

.doc-modal__frame {
    display: block;
    width: 100%;
    height: 78vh;
    border: 0;
}

@media (max-width: 991.98px) {
    .doc-modal__frame {
        height: calc(100vh - 3.5rem);
    }
}
