/* landenheine.com: mockup B's palette and type (start.mjs css --page service --palette flour-terracotta --type source-serif),
   then page CSS for what sits inside the visuals. Loaded after the kit's system.css, cards, motion and layout CSS. */
:root {
  --p-bg: #f6f1e7; --p-surface: #ebe3d4; --p-ink: #2b241e; --p-muted: #6a5f54;
  --p-accent: #a3472b; --p-accent-ink: #ffffff; --p-action: #a3472b; --p-action-ink: #ffffff;
  --p-inv-bg: #2b241e; --p-inv-surface: #37302a; --p-inv-ink: #f6f1e7; --p-inv-muted: #a29c94;
  --p-inv-accent: #f6f1e7; --p-inv-accent-ink: #2b241e; --p-inv-action: #f6f1e7; --p-inv-action-ink: #2b241e;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-text: "Libre Franklin", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.02em;
  --display-tracking-xl: -0.026em;
  --cad: #333333;
}

/* a picture frame: a photograph or screenshot filling it, a CAD capture contained on its own dark modelling ground */
.shot { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); min-height: 240px; }
.shot > img, .shot > video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.shot--contain > img { object-fit: contain; padding: var(--s-5); }
.shot--cad { background: var(--cad); }
.shot--video { background: #1b1714; }
.shot--video > video { object-fit: contain; }
.shot--pip, .shot--calc { background: #0d0f12; }
.shot--calc { background: var(--surface); display: grid; place-items: center; padding: var(--s-6); }
.hero__media--shot { height: 100%; }
.hero__media--cad { background: var(--cad); }
.hero__media--cad > img { object-fit: contain; padding: var(--s-6); }

/* project cards: the picture on top, the title and one line under it; each card is a link to its page */
.card--project { color: inherit; text-decoration: none; }
.card--project > .panel { --p-h: 220px; background: var(--surface); overflow: hidden; }
.card--project > .panel > .frame__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.card--project > h3 { margin-top: 0; }
.card--project > p { margin-top: var(--s-2); }
.card--project > .t-label { margin: 0 0 var(--s-1); }
.panel--cad { background: var(--cad) !important; }
.panel--cad > .frame__img { padding: var(--s-4); }
.panel--pip { background: #0d0f12 !important; }
.panel--pip > .pip { position: absolute; inset: 0; }
.panel--pip .pip__log { display: none; }
.panel--pip .pip__eyes { gap: 32px; } .panel--pip .pip__eyes i { width: 30px; height: 48px; } .panel--pip .pip__mouth { width: 44px; height: 12px; margin-top: 16px; border-width: 3px; }
.panel--calc { background: #ffffff !important; display: grid; place-items: center; }
.gun { width: 82%; fill: #1d1d1b; }
#more .card--project > .panel { --p-h: 240px; }
@media (max-width: 639px) { .card--project > .panel, #more .card--project > .panel { --p-h: 200px; } }

/* the What I built / How it works facts, two across */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.fact h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin: 0 0 var(--s-2); }
.fact p { margin: 0; }
.rows .links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
@media (max-width: 639px) { .facts { grid-template-columns: minmax(0, 1fr); } }


/* the about strip's portrait develops once as it comes on screen (moments: picture-develops) */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; min-height: 320px; }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@media (max-width: 1023px) { .develop { margin-top: var(--s-7); min-height: 360px; } .grid.fill > .frame--fill.shot { min-height: 320px; } }

/* the NumWorks screen: a 320 x 240 calculator display in its bezel, the grid drawn on a canvas */
.calc { display: grid; gap: var(--s-4); justify-items: center; width: min(100%, 460px); }
.calc__screen { width: 100%; aspect-ratio: 4 / 3; padding: 14px; border-radius: 18px; background: #1f2326; box-shadow: inset 0 0 0 2px #33383c; }
.calc__screen canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; background: #fff; border-radius: 4px; }
.calc__keys { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; justify-content: center; }
.calc__key { min-width: 72px; height: 44px; padding: 0 var(--s-4); border-radius: 12px; border: 1px solid var(--line-strong, rgb(0 0 0 / .2)); background: var(--bg); color: var(--ink); font: 500 15px/1 var(--font-text); cursor: pointer; }
.calc__key[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.calc__gen { font-size: 14px; color: var(--muted); min-width: 120px; text-align: center; }

/* pip's face on its monitor (live HTML until the photographs come) */
.pip { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; min-height: 0; background: #0d0f12; color: #e9edf2; border-radius: inherit; overflow: hidden; font-family: var(--font-text); }
.pip__face { display: grid; place-items: center; min-height: 0; }
.pip__eyes { display: flex; gap: clamp(36px, 6vw, 72px); }
.pip__eyes i { width: clamp(36px, 5vw, 60px); height: clamp(56px, 8vw, 96px); border-radius: 999px; background: #8fe3c6; box-shadow: 0 0 32px rgb(143 227 198 / .35); }
.pip__mouth { width: clamp(56px, 7vw, 88px); height: clamp(14px, 2vw, 22px); margin: clamp(18px, 3vw, 32px) auto 0; border: 4px solid #8fe3c6; border-top: 0; border-radius: 0 0 999px 999px; }
.pip__log { grid-template-columns: minmax(0, 1fr); min-width: 0; margin: 0; padding: 14px 18px 16px; border-top: 1px solid rgb(255 255 255 / .1); font: 13px/21px var(--font-mono, ui-monospace, monospace); color: #b7c0cb; display: grid; gap: 2px; background: #121519; }
.pip__log b { color: #8fe3c6; font-weight: 500; }
.pip__log span { min-width: 0; }
.pip__state { position: absolute; top: 14px; left: 18px; display: inline-flex; gap: 8px; align-items: center; font: 500 12px/20px var(--font-text); color: #e9edf2; background: rgb(255 255 255 / .08); padding: 0 10px; border-radius: 99px; }
.pip__state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8fe3c6; }

/* four project cards: four across from 1024, two across on a tablet, one column on a phone */
@media (min-width: 640px) and (max-width: 1023px) { .cards4 > .card, .work__grid > .card { grid-column: span 6; } }
@media (max-width: 639px) { .card--project > .panel { --p-h: 160px; } }
.facts { column-gap: var(--gutter, 24px); }
@media (max-width: 639px) { #work .cards4 > .card { grid-column: span 6; } #work .card--project > .panel { --p-h: 140px; } #work .cards4 { row-gap: var(--s-6); } }
@media (min-width: 1024px) { #work .card--project > .panel { --p-h: 300px; } }
@media (max-width: 639px) { .grid.fill > .frame--fill.shot { min-height: 240px; } .develop { min-height: 260px; } .cards4 > .card { grid-column: span 6; } .cards4 .card--project > .panel { --p-h: 140px; } .cards4 .card--project > p { display: none; } .cards4 { row-gap: var(--s-6); } }
@media (max-width: 639px) { .cards2 > .card { grid-column: span 6; } .cards2 .card--project > .panel { --p-h: 140px !important; } .cards2 .card--project > p:last-child { display: none; } }
.clip--wide { aspect-ratio: 16 / 9; min-height: 0; }
video:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.shot--video:focus-within { box-shadow: 0 0 0 2px var(--p-ink); }
/* project card pictures at the screenshots' own 16:10, the title set as a card title at either heading level */
.card--project > .panel--top { aspect-ratio: 16 / 10; }
.card--project > :is(h2, h3, .card__title) { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; margin: 0; }
@media (min-width: 1024px) { #work .card--project > .panel--top { aspect-ratio: 4 / 5; } }

/* phones/tablets: let split rows grow with what they hold so the picture never runs into the next section */
@media (max-width: 1023px) { main > section > .wrap > .grid.fill:has(> .frame--fill, > .develop) { flex: 1 0 auto; } }
/* phones: featured cards keep their one-line description so the section fills its screen */
@media (max-width: 639px) { #work .card--project > p { display: block; font-size: var(--fs-sm, .875rem); } }

/* the projects page: hardware three across, software four then three; every card is a link to its page */
.work__grid { row-gap: var(--s-7); }
@media (min-width: 640px) and (max-width: 1023px) { .cards3 > .card { grid-column: span 6; } }
@media (max-width: 639px) { .cards3 > .card { grid-column: span 6; } .cards3 .card--project > .panel { --p-h: 140px; } .cards3 .card--project > p { display: none; } .cards3 { row-gap: var(--s-6); } }
@media (min-width: 640px) and (max-width: 1279px) { :is(#hardware, #software) .card--project > p { display: none; } }
.panel--contain > .frame__img { padding: var(--s-4); }

/* a project page: the Overview's words on span-7, the facts at a glance on span-4 start-9 */
.prose > * { margin: 0; }
.prose > * + * { margin-top: var(--s-5); }
.prose > h3 { margin-top: var(--s-7); font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.prose > h2 + * { margin-top: var(--head-gap, var(--s-6)); }
.fact h4 { font: 500 var(--t-body)/1.4 var(--font-text); margin: 0 0 var(--s-1); }
.learned { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.learned li::marker { color: var(--accent); }
.meta__lessons { margin-top: var(--s-7); display: grid; gap: var(--s-4); }
.meta__lessons > * { margin: 0; }
.meta__lessons > h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
@media (max-width: 1023px) { .meta { margin-top: var(--s-7); } }
.prose > .facts { margin-top: var(--s-5); }

/* the gallery: one row of frames on the column lines, down to the screen's foot */
.gallery > .shot { min-height: 240px; }
@media (max-width: 639px) { .gallery > .shot { grid-column: 1 / -1; min-height: 260px; } }

/* home: three short facts between the lead and the one button */
.home-facts { max-width: 440px; }
.hero__text > .home-facts { margin-top: var(--s-7); }
.hero__text > .home-facts + .btn-row { margin-top: var(--s-7); }

/* a project with no pictures yet: its name set in type on the dark ground */
.typeset { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4);
  padding: clamp(20px, 3vw, 40px); background: var(--p-inv-bg); color: var(--p-inv-ink);
  background-image: linear-gradient(to right, rgb(246 241 231 / .06) 1px, transparent 1px), linear-gradient(to bottom, rgb(246 241 231 / .06) 1px, transparent 1px);
  background-size: 32px 32px; }
.typeset__label, .typeset__foot { font: 500 var(--t-small)/1.4 var(--font-text); color: var(--p-inv-muted); }
.typeset__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 4.4vw, 64px); line-height: 1.02; letter-spacing: var(--display-tracking); max-width: 12ch; }
.typeset__title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: var(--s-5); background: var(--p-accent); }
.panel--type { background: var(--p-inv-bg) !important; }
.panel--type .typeset { padding: var(--s-5); background-size: 24px 24px; }
.panel--type .typeset__title { font-size: clamp(24px, 2.2vw, 32px); }
.panel--type .typeset__title::after { margin-top: var(--s-3); width: 40px; }
.shot--type { background: var(--p-inv-bg); }

/* the servo programmer's 128 x 64 OLED (live HTML until the close-up photo comes) */
.shot--oled, .panel--oled { background: #14110f !important; display: grid; place-items: center; padding: var(--s-6); }
.oled { width: min(100%, 520px); aspect-ratio: 2 / 1; padding: 6%; border-radius: 10px; background: #050607; box-shadow: inset 0 0 0 2px #26292c, 0 0 0 10px #1d4f8a; }
.oled__screen { height: 100%; display: grid; grid-template-rows: 1fr 1fr; gap: 6%; color: #dfe9ff; font: 600 clamp(14px, 2.2vw, 26px)/1 var(--font-mono); text-shadow: 0 0 6px rgb(160 190 255 / .45); }
.oled__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 1em; row-gap: .45em; }
.oled__row b { font-weight: 700; font-size: 1.35em; }
.oled__row span:first-child { opacity: .8; }
.oled__row i { grid-column: 1 / -1; height: .5em; border: 2px solid currentColor; border-radius: 2px; background: linear-gradient(to right, currentColor calc(var(--a) * 100%), transparent 0); }

/* the projects page from 1024: each screen's card row runs to the screen's foot, the pictures taking the extra height */
@media (min-width: 1024px) {
  :is(#hardware, #software) .group > .grid:last-child { grid-template-rows: minmax(0, 1fr); }
  :is(#hardware, #software) .card--project > .panel--top { aspect-ratio: auto; flex: 1 1 0; min-height: 200px; }
}
/* renders and CAD captures on white sit on white */
.shot--contain:not(.shot--cad), .panel--contain:not(.panel--cad) { background: #f8f8f8 !important; }
.learned { list-style: disc; }
#more .section-head--split { margin-bottom: var(--head-gap, var(--s-7)); }
@media (max-width: 639px) { .hero__facts.home-facts { display: none; } .hero__text > .home-facts + .btn-row { margin-top: var(--s-6); } }
@media (max-width: 639px) { #lessons .frame--fill { min-height: 300px; } }
/* phones: the projects page is one list per kind, a card a row with its line, and each section as tall as its cards */
@media (max-width: 639px) {
  :is(#hardware, #software) { --hm: 1; }
  :is(#hardware, #software) > .wrap > :last-child { margin-block: 0 !important; }
  :is(#hardware, #software) .work__grid > .card { grid-column: 1 / -1; }
  :is(#hardware, #software) .card--project > .panel--top { aspect-ratio: 16 / 10; }
  :is(#hardware, #software) .card--project > p { display: block; }
  :is(#hardware, #software) .work__grid { row-gap: var(--s-7); }
  .panel--type .typeset__title { font-size: 26px; }
}
/* full app screenshots: the frame takes the screenshot's own proportions, so the whole screen shows */
.shot.shot--screen { min-height: 0 !important; height: auto !important; align-self: center; flex: none !important; background: #f5f7fb; box-shadow: 0 0 0 1px var(--line, rgba(0,0,0,.08)); }
.shot.shot--screen > img { object-fit: contain; }
/* the 3D model frame: a CAD still until "View in 3D", then a model the visitor rotates */
.shot--model > model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.shot--model > img { object-fit: contain; padding: var(--s-5); }
.model__bar { position: absolute; left: var(--s-4); bottom: var(--s-4); z-index: 2; display: flex; }
.model__switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in oklab, #1b1714 70%, transparent); backdrop-filter: blur(6px); }
.model__opt { font: inherit; font-size: .875rem; color: #efe7dc; background: transparent; border: 0; border-radius: 999px; padding: .45em 1em; cursor: pointer; transition: background .2s, color .2s; }
.model__opt:hover { background: color-mix(in oklab, #fff 12%, transparent); }
.model__opt[aria-pressed="true"] { background: #efe7dc; color: #1b1714; }
.model__opt:focus-visible, .model__go:focus-visible { outline: 2px solid var(--p-ink, #efe7dc); outline-offset: 2px; }
.model__go[disabled] { opacity: .8; cursor: progress; }
.shot--model .model__go { background: #efe7dc; color: #1b1714; border-color: transparent; }
.shot--model .model__go:hover { background: #fff; }
/* the turntable video standing in for the model until it's clicked */
.shot--model > video.model__spin { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--cad); }
.model__hit { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; background: transparent; cursor: pointer; }
.model__hit[disabled] { cursor: progress; }
/* home: the label card keeps the bottom-left corner, the 3D control takes the bottom-right (top-right on phones) */
.model--home .model__bar { left: auto; right: var(--s-5); bottom: var(--s-5); }
@media (max-width: 639px) { .model--home .model__bar { top: var(--s-4); right: var(--s-4); bottom: auto; } }
/* About: two lists side by side, Education and Robotics teams */
#background h3 { font-size: var(--t-small, .875rem); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 var(--s-4); }
#background .about__bench { margin-top: var(--s-6); }
@media (max-width: 1023px) { #background .grid > .span-5 { margin-top: var(--s-7); } }
/* the top bar: name on the left, the pages and the résumé on the right */
@media (min-width: 1024px) { .nav__links { justify-content: flex-end; } }
.contact-rows { margin: var(--s-6) 0 var(--s-6); }
