/* =========================================================
   Engineering portfolio: additions to ../about-me/pagestyle.css
   ========================================================= */

/* ---------- Overview hero ---------- */
.eng-hero h1 { max-width: 14ch; }
.eng-hero .contact-line {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.75rem;
    margin: 2rem 0 0;
    font-size: .9375rem;
}
.eng-hero .contact-line a { color: var(--ink); }

.board-figure {
    margin: clamp(48px, 7vw, 88px) 0 0;
    border-top: 1px solid var(--rule);
    padding: clamp(16px, 3vw, 40px) 0 0;
}
.board-figure img { width: 100%; height: auto; }
.board-figure figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 2rem;
    font-size: .875rem;
    color: var(--muted);
    margin-top: 1rem;
}
.board-figure figcaption b { color: var(--ink); font-weight: 500; }

/* ---------- Project index ---------- */
.projects { list-style: none; margin: 0; padding: 0; }
.project {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: start;
    padding: clamp(28px, 4vw, 48px) 0;
    border-top: 1px solid var(--rule);
}
.project:first-child { border-top: 0; padding-top: 1rem; }
.project-media { display: block; }
.project-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.2vw, 2.5rem);
    line-height: 1.08;
    margin: 0 0 .35rem;
}
.project h3 a { color: inherit; text-decoration: none; }
.project .card-sub {
    font-family: var(--serif);
    font-style: italic;
    color: var(--muted);
    font-size: 1.125rem;
    margin: 0 0 1.25rem;
}
.project dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .35rem 1.25rem;
    margin: 1.25rem 0 1.5rem;
    font-size: .9375rem;
}
.project dt { color: var(--muted); }
.project dd { margin: 0; color: var(--ink); }

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

/* ---------- Prototype timeline ---------- */
.timeline { list-style: none; margin: 1rem 0 0; padding: 0; }
.stage {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0 clamp(20px, 3vw, 40px);
    padding: 1.75rem 0;
    border-top: 1px solid var(--rule);
}
.stage-num {
    display: block;
    font-family: var(--serif);
    font-size: 2rem;
    line-height: 1;
    color: var(--silver);
    font-variant-numeric: lining-nums;
}
.stage-date {
    display: block;
    margin-top: .55rem;
    font-size: .8125rem;
    color: var(--muted);
}
.stage h3 { margin: 0 0 .5rem; font-size: 1.125rem; }
.stage p { font-size: 1rem; }
.stage p:last-child { margin-bottom: 0; }

/* Outcome tags: filled = worked, ring = did not, half = partly */
.tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--muted);
    margin: 0 0 .85rem;
}
.tag::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--muted);
    flex: none;
}
.tag.success { color: var(--ink); }
.tag.success::before { background: var(--silver); border-color: var(--silver); }
.tag.partial { color: var(--ink); }
.tag.partial::before { border-color: var(--silver); background: linear-gradient(90deg, var(--silver) 50%, transparent 50%); }
.tag.design { color: var(--ink); }
.tag.design::before { border-style: dashed; border-color: var(--silver); }

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    margin: 0 0 1rem;
}
.legend .tag { margin: 0; }

@media (max-width: 640px) {
    .stage { grid-template-columns: 1fr; }
    .stage > div:first-child { display: flex; align-items: baseline; gap: 1rem; margin-bottom: .75rem; }
    .stage-date { margin-top: 0; }
}

/* ---------- Videos ---------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 1.25rem 0 .5rem;
    align-items: start;
}
.video-grid.single { grid-template-columns: minmax(0, 720px); margin-top: 2.5rem; }
.video { margin: 0; }
.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--rule);
}
.video.vertical .video-frame { aspect-ratio: 9 / 16; max-width: 300px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: .8125rem; line-height: 1.5; color: var(--muted); margin-top: .6rem; max-width: 40ch; }
.video-placeholder { display: grid; place-items: center; border-style: dashed; border-color: var(--rule-strong); }
.video-placeholder span { font-size: .8125rem; color: var(--muted); }

/* A wide video in a grid of phone-shaped ones takes the full row */
.video-grid .video:not(.vertical) { grid-column: 1 / -1; max-width: 720px; }

/* ---------- Scan diagram ---------- */
.scan-diagram { margin: 2.5rem 0; }
.scan-diagram svg { width: 100%; height: auto; }
.scan-diagram figcaption { font-size: .875rem; color: var(--muted); margin-top: .85rem; max-width: 72ch; }

/* ---------- Report metadata ---------- */
.report-meta {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .7rem 2rem;
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    font-size: .9375rem;
    max-width: 860px;
}
.report-meta dt { color: var(--muted); }
.report-meta dd { margin: 0; color: var(--ink); }

@media (max-width: 560px) {
    .report-meta { grid-template-columns: 1fr; gap: .15rem; }
    .report-meta dd { margin-bottom: .75rem; }
}

.pass { color: var(--silver-hi); font-weight: 500; }

/* ---------- Page-to-page navigation at the end of a case study ---------- */
.next-pages {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 clamp(24px, 3vw, 48px);
}
.next-pages a {
    display: block;
    border-top: 1px solid var(--rule-strong);
    padding: 1.1rem 0;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.375rem;
    transition: border-color .2s ease;
}
.next-pages a span { display: block; font-family: var(--sans); font-size: .875rem; color: var(--muted); margin-top: .25rem; }
.next-pages a:hover, .next-pages a:focus-visible { border-top-color: var(--silver); }
