/* Shared layout for all engineering project pages. */
:root {
    --paper: #f7f5f0;
    --ink: #252923;
    --muted: #64695f;
    --accent: #ad4628;
    --line: #d8d9ce;
    --surface: #eeece5;
    --sage: #e4e9de;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Helvetica Neue", Arial, sans-serif; line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 50; background: var(--ink); color: white; padding: 10px 16px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.logo { font-size: 32px; font-weight: 700; letter-spacing: -2px; }
.logo span { color: var(--accent); }
.header-inner nav { display: flex; gap: 30px; font-size: 13px; }
.project-intro { padding-block: 30px 38px; max-width: 900px; }
.back-link { display: inline-block; color: var(--muted); font-size: 12px; margin-bottom: 38px; }
.eyebrow, .section-number { font: 10px/1.6 "Courier New", monospace; text-transform: uppercase; letter-spacing: 1.3px; color: var(--muted); }
.eyebrow { margin-bottom: 14px; }
h1 { font-size: clamp(36px, 4.8vw, 58px); letter-spacing: -.04em; line-height: 1.12; font-weight: 400; }
.lead { max-width: 740px; margin-top: 20px; color: var(--muted); font-size: 18px; line-height: 1.75; }
.project-facts { display: grid; grid-template-columns: .9fr 1.05fr 1.3fr; gap: 30px; border-block: 1px solid var(--line); padding-block: 24px; margin: 0 0 38px; }
.project-facts dt { font: 10px/1.6 "Courier New", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; }
.project-facts dd { margin: 0; font-size: 13px; line-height: 1.8; }
.project-media { margin-bottom: 45px; }
.project-media img { width: 100%; max-height: 480px; object-fit: contain; background: var(--surface); }
.project-media figure { max-width: 100%; margin: 0 auto; transform: none; }
.project-media .hero-photo, .project-media .hero-figure { padding: 0; }
.project-media .status { display: none; }
.project-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 70px; align-items: start; }
.sidebar { position: sticky; top: 118px; padding-top: 9px; }
.sidebar nav { display: flex; flex-direction: column; gap: 14px; font-size: 12px; color: var(--muted); }
.project-story { min-width: 0; }
.project-section { padding-bottom: 48px; margin-bottom: 38px; border-bottom: 1px solid var(--line); }
.project-section:last-child { margin-bottom: 0; border: 0; }
.section-number { margin-bottom: 10px; color: var(--accent); }
h2 { font-size: clamp(25px, 2.6vw, 32px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 24px; }
h3 { font-size: 19px; line-height: 1.4; font-weight: 500; letter-spacing: -.015em; margin: 27px 0 12px; }
.project-story p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.project-story li { color: var(--muted); font-size: 15px; padding-left: 4px; margin-bottom: 10px; }
.project-story ul { padding-left: 21px; margin: 15px 0 24px; }
.project-story strong { color: var(--ink); font-weight: 500; }
.project-story a:not(:has(img)) { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.project-story a:hover { text-decoration-color: var(--accent); }
.technical-topic { margin-top: 38px; }
.technical-topic:first-of-type { margin-top: 0; }
.topic-title { padding-top: 18px; border-top: 1px solid var(--line); font-size: 22px; }
.project-story figure { margin-block: 28px 34px; }
.project-story figure img { width: 100%; max-height: 560px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.project-story img.compact-image { max-width: 620px; margin-inline: auto; }
.project-story img.testing-photo { max-height: 480px; }
figcaption { font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: 10px; }
.image-pair, .gallery, .component-grid, .requirements, .feature-grid, .lesson-grid, .progress { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-block: 25px; }
.image-pair figure, .gallery figure { margin: 0; }
.component-grid article, .requirements article, .feature, .lesson-grid>div, .progress article { padding: 21px; border: 1px solid var(--line); border-radius: 3px; }
.component-grid h3, .feature h3, .lesson-grid h3, .progress h3 { margin-top: 10px; font-size: 17px; }
.component-grid article>span, .lesson-grid>div>span, .progress-label, .model>span { font: 10px/1.6 "Courier New",monospace; color: var(--accent); letter-spacing: .5px; }
.component-grid p, .feature p, .lesson-grid p, .progress p { font-size: 13px; margin-bottom: 0; }
.requirements strong { display: block; font-size: 22px; margin-bottom: 8px; }
.requirements span { display: block; color: var(--muted); font-size: 13px; }
.sequence { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-block: 28px; }
.sequence>div { border-top: 1px solid var(--line); padding-top: 14px; }
.sequence b { color: var(--accent); font-size: 12px; margin-right: 10px; }
.sequence strong { font-size: 15px; }
.sequence span { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
.evidence-card, .source-note, .model { background: var(--surface); padding: 24px; margin-block: 24px; border-radius: 3px; }
.evidence-card h3, .model h3 { margin-top: 8px; }
.source-note p { font-size: 12px; margin: 8px 0 0; }
.contribution { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.contribution>span { color: var(--accent); font: 11px/2 "Courier New",monospace; }
.contribution h3 { margin-top: 0; }
.contribution p { margin-bottom: 0; }
.equation { font: 20px/1.8 Georgia,serif; overflow-x: auto; padding-block: 12px; }
.model p { margin-bottom: 0; font-size: 14px; }
.loop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 20px; border: 1px solid var(--line); margin-block: 25px; }
.loop span { background: var(--sage); padding: 6px 10px; font-size: 12px; }
.loop b { color: var(--accent); font-weight: 400; }
.loop small { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.method-list { padding-left: 22px; }
.method-list li { padding-bottom: 10px; }
.method-list h3 { margin-top: 0; }
.video-frame { aspect-ratio: 16/9; background: var(--surface); margin-top: 25px; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-note, .public-source, .small-note { font-size: 12px!important; }
.rover-video { max-width: 480px; margin: 28px auto; }
.rover-video iframe { width: 100%; height: 650px; border: 1px solid var(--line); background: white; }
.schematic { margin-block: 25px; }
.schematic svg { display: block; width: 100%; height: auto; max-height: 420px; background: var(--surface); }
.achievement { border-left: 3px solid var(--accent); padding: 18px 24px; background: var(--sage); margin-block: 25px; }
.achievement p { margin-bottom: 0; }
.achievement strong { display: block; margin-block: 8px; }
.resource-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; }
.role-label { color: var(--ink)!important; font-size: 13px!important; }
details { border-top: 1px solid var(--line); padding-block: 16px; }
summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.button { display: inline-block; border: 1px solid var(--line); border-radius: 3px; padding: 10px 15px; font-size: 13px; }
.project-end, .footer { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-block: 28px; font-size: 12px; }
.footer { color: var(--muted); font-size: 11px; }
.footer p { margin-right: auto; }
@media(max-width:900px) {
    .wrap { width: calc(100% - 48px); }
    .project-layout { grid-template-columns: 155px minmax(0,1fr); gap: 35px; }
    .project-facts { gap: 20px; }
}
@media(max-width:650px) {
    html { scroll-padding-top: 100px; }
    .wrap { width: calc(100% - 36px); }
    .header-inner { min-height: 74px; gap: 15px; }
    .header-inner nav { gap: 16px; font-size: 12px; }
    .project-intro { padding-block: 24px 28px; }
    .back-link { margin-bottom: 28px; }
    .lead { font-size: 16px; }
    .project-facts { grid-template-columns: 1fr; gap: 18px; margin-bottom: 28px; }
    .project-facts dt { margin-bottom: 4px; }
    .project-layout { grid-template-columns: 1fr; gap: 30px; }
    .sidebar { position: static; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 10px 18px; font-size: 11px; }
    .project-section { padding-bottom: 28px; margin-bottom: 30px; }
    .component-grid, .requirements, .feature-grid, .lesson-grid, .progress { grid-template-columns: 1fr; }
    .image-pair, .gallery { grid-template-columns: 1fr; }
    .sequence { grid-template-columns: 1fr; }
    .rover-video iframe { height: 580px; }
    .project-end, .footer { flex-wrap: wrap; }
    .footer p { flex-basis: 100%; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }
