/* Engineering register: the same paper, type and quiet rows as About, and an
   image-first grid like the Inspo wall. SF Pro only; no mono. */
@import url("/fonts/sf-pro.css");

.eng {
  /* Ink, paper, line and gutter come from the shared film tokens so the
     header and the page share one grid. Local names are aliases only. */
  --bg: var(--paper, #F8F7F3);
  --wash: var(--paper-2, #EFEDE7);
  --focus: var(--signal, #D8191F);
  --col: var(--page, 1146px);
  --sans: var(--font-sans, "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif);
  --display: var(--font-display, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif);

  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.eng *, .eng *::before, .eng *::after { box-sizing: border-box; }
.eng a { color: inherit; }
.eng a:focus-visible, .eng main:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.eng :where(p, h1, h2, h3, ul, dl, dd) { margin: 0; }
.eng :where(ul) { padding: 0; list-style: none; }
.eng .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eng-skip { position: absolute; left: 16px; top: -100px; z-index: 50; padding: 10px 12px; background: var(--bg); border: 1px solid var(--ink); }
.eng-skip:focus { top: 12px; }

/* Same as .film-page a in film.css, scoped to the shared header so
   Work / Writing / About are not underlined. Footer links stay as links. */
.eng .site-header a { color: inherit; text-decoration: none; }

/* Main and footer line up with the shared site header. */
.eng main, .eng-footer {
  width: min(var(--page, var(--col)), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
}

.eng-intro { padding: 32px 0 56px; border-top: 1px solid var(--ink); }
.eng-eyebrow, .eng.film-page.site .eng-section > h2 { font: 400 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--meta); }
.eng-eyebrow span, .eng-section > h2 span { margin-right: 10px; }
.eng.film-page.site .eng-intro h1 { margin-top: 36px; max-width: 20ch; font: 500 clamp(32px, 5vw, 44px)/1.12 var(--display); letter-spacing: -0.03em; }
.eng-intro h1 em { font-style: italic; }
.eng-lede { margin-top: 20px; max-width: 48ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.eng-figures { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 14px; color: var(--meta); }
.eng-figures b { font-weight: 500; color: var(--ink); }

.eng-section { padding-bottom: clamp(40px, 7vw, 64px); }
.eng-section > h2 { padding: 16px 0; border-top: 1px solid var(--line); }

/* Projects: two-column 16:9 stills, a title, one sentence, who and when. */
.eng-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; margin-top: 8px; }
.eng-project { min-width: 0; }
.eng-demo { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--wash); border-radius: 2px; text-decoration: none; }
.eng-demo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.eng-demo img.eng-crop { position: absolute; max-width: none; object-fit: fill; }
.eng-demo iframe { display: block; width: 100%; height: 100%; border: 0; }
.eng-play { position: absolute; left: 12px; bottom: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); opacity: 0.9; transition: opacity 0.2s ease, background 0.2s ease; }
.eng-play::after { content: ""; position: absolute; left: 12px; top: 9px; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent #fff; }
.eng-demo:hover .eng-play, .eng-demo:focus-visible .eng-play { opacity: 1; background: rgba(0, 0, 0, 0.8); }
.eng-project-text { margin-top: 12px; }
.eng.film-page.site .eng-project h3 { font: 500 17px/1.25 var(--display); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.eng-blurb { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.eng-meta { margin-top: 4px; font-size: 13px; color: var(--meta); }
.eng-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.eng-links a { color: var(--ink-2); text-underline-offset: 3px; }

/* A project without a demo reads as a full-width text row under the grid. */
.eng-rows { margin-top: 40px; border-top: 1px solid var(--line); }
.eng-project.is-row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.eng-project.is-row .eng-project-text { margin-top: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: baseline; }
.eng-project.is-row .eng-blurb { grid-column: 1; max-width: none; margin-top: 0; }
.eng-project.is-row h3 { grid-column: 1; }
.eng-project.is-row .eng-meta { grid-column: 2; grid-row: 1; margin-top: 0; text-align: right; }
.eng-project.is-row .eng-links { grid-column: 2; grid-row: 2; margin-top: 0; justify-content: flex-end; }

/* Experience, education and honors: one tight row each. */
.eng-list { border-top: 1px solid var(--line); }
.eng-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) auto; gap: 4px 24px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.eng-row-name { font-weight: 500; }
.eng-row-detail { color: var(--ink-2); }
.eng-row-detail a { text-underline-offset: 3px; }
.eng-row-when { font-size: 13px; color: var(--meta); text-align: right; white-space: nowrap; }

.eng-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--meta); }
.eng-contact { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.eng-contact a { color: var(--ink-2); text-underline-offset: 3px; }
.eng-films { flex-basis: 100%; }
.eng-films a { color: var(--ink); text-underline-offset: 3px; }

@media (max-width: 720px) {
  .eng-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .eng-intro { padding-bottom: 40px; }
  .eng.film-page.site .eng-intro h1 { margin-top: 28px; max-width: none; }
  .eng-row { grid-template-columns: minmax(0, 1fr) auto; }
  .eng-row-name { grid-column: 1; }
  .eng-row-when { grid-column: 2; grid-row: 1; }
  .eng-row-detail { grid-column: 1 / -1; font-size: 14px; }
  .eng-project.is-row .eng-project-text { grid-template-columns: minmax(0, 1fr); }
  .eng-project.is-row .eng-meta, .eng-project.is-row .eng-links { grid-column: 1; grid-row: auto; text-align: left; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .eng *, .eng *::before, .eng *::after { animation: none !important; transition: none !important; }
}
