:root {
  color-scheme: dark;
  --canvas: #000000;
  --panel: #0a0a0a;
  --panel-soft: #121212;
  --ink: #ffffff;
  --muted: #f0f0fa;
  --quiet: #9a9aa2;
  --line: #3a3a3f;
  --line-strong: #55555c;
  --accent: #ffffff;
  --shadow: rgba(0, 0, 0, 0.6);
  --content: min(1260px, calc(100vw - 44px));
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* The header is sticky and 74px tall, 64px on small screens. Without
     this, any in-page anchor scrolls its target underneath the header
     and the first line is hidden. Added 2026-08-18. */
  scroll-padding-top: 88px;
}

@media (max-width: 620px) {
  html { scroll-padding-top: 78px; }
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  width: 100%;
}

/* Images are served as WebP with a JPEG fallback. display:contents
   keeps <picture> out of the layout entirely, so every selector below
   that targets an img still matches and nothing needed rewriting.
   Added 2026-08-18. */
picture {
  display: contents;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(18px);
}

.site-header,
.project-shell {
  padding-inline: max(22px, calc((100vw - 1260px) / 2));
}

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
}








h1,
h2,
p {
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  line-height: 0.96;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(4.4rem, 14vw, 10.5rem);
}

h2 {
  max-width: 720px;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
}

.project-shell {
  padding-top: clamp(54px, 7vw, 100px);
  padding-bottom: clamp(76px, 8vw, 118px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, 340px));
  gap: 6px;
  align-items: start;
  justify-content: start;
}

.project-card {
  min-width: 0;
}

.project-plate {
  position: relative;
  display: block;
  min-width: 0;
  transition: none;
}

.cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: var(--panel-soft);
}







/* Recessed edge. A radial falloff plus a tight inset rim, so the tile
   reads as something you are looking into rather than a flat plate.
   z-index 1 puts it over the image; the label and arrow sit at 2.
   Added 2026-08-18 at Nick's request. */
.cover-wrap::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background: radial-gradient(
    118% 128% at 50% 44%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.14) 64%,
    rgba(0, 0, 0, 0.38) 84%,
    rgba(0, 0, 0, 0.60) 100%
  );
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.50),
    inset 0 0 64px rgba(0, 0, 0, 0.26);
}

.cover-wrap img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 500ms cubic-bezier(0.2, 0, 0.2, 1);
}







.project-plate:hover .cover-wrap img { transform: scale(1.045); }



















@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(0, 300px));
  }

}

@media (max-width: 620px) {
  .site-header,
  .project-shell {
    padding-inline: 16px;
  }

  .site-header {
    min-height: 64px;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .tile-label { left: 16px; bottom: 13px; }
  .tile-arrow { right: 14px; bottom: 12px; }

}

/* ---------------------------------------------------------------
   Project detail page. Added 2026-08-18.
   Text sits on a readable measure; figures are allowed to run wider.
   No filters on figure images: on an FEA plot the colour is the data.
   --------------------------------------------------------------- */

.project-page {
  --measure: 68ch;
  padding-inline: max(22px, calc((100vw - 1260px) / 2));
  padding-top: clamp(38px, 5vw, 68px);
  padding-bottom: clamp(70px, 8vw, 120px);
}

.project-page > article {
  display: grid;
  grid-template-columns: minmax(0, var(--measure));
  justify-content: start;
  gap: 0;
}

.project-head {
  margin-bottom: clamp(30px, 4vw, 52px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-page h1 {
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.standfirst {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.5;
  color: var(--muted);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin: 28px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-meta div { min-width: 0; }

.project-meta dt {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-meta dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.summary-card {
  margin-top: 30px;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}

.summary-card h2 {
  margin: 0 0 12px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.summary-card ul {
  margin: 0;
  padding-left: 1.05em;
  display: grid;
  gap: 10px;
}

.summary-card li {
  font-size: 1rem;
  line-height: 1.55;
}

.project-page section { margin-top: clamp(34px, 4vw, 54px); }

.project-page h2 {
  max-width: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.project-page section h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.project-page p {
  margin: 15px 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
}

.fig {
  margin: clamp(26px, 3vw, 38px) 0 0;
  width: 100%;
}

/* Let key figures break out past the reading measure. */
.fig-wide {
  width: min(calc(100vw - 44px), 1100px);
}

/* The opening image. Wider than the measure and set before the first
   section, so the article leads with the object rather than with prose.
   Added 2026-08-18 at Nick's request. */
.fig-hero {
  width: min(calc(100vw - 44px), 1100px);
  margin: clamp(30px, 4vw, 52px) 0 clamp(10px, 2vw, 20px);
}

.fig-hero img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 52%;
}

/* The hero runs wider than the measure, so its caption gets a wider
   measure too. At 62ch it wrapped to three cramped lines under a
   793px image and read as an accident. */
.fig-hero figcaption {
  max-width: 80ch;
}

@media (max-width: 620px) {
  .fig-hero img { aspect-ratio: 4 / 3; }
}

.fig img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--panel-soft);
}

.fig figcaption {
  margin-top: 10px;
  max-width: 62ch;
  color: var(--quiet);
  font-size: 0.84rem;
  line-height: 1.55;
}

.project-foot {
  margin-top: clamp(46px, 6vw, 76px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  font-weight: 700;
}

@media (max-width: 620px) {
  .project-page { padding-inline: 16px; }
  .fig-wide { width: 100%; }
  .project-meta { gap: 10px 22px; }
}

/* The card is now an anchor. Keep it from inheriting link styling. */
a.project-plate { text-decoration: none; color: inherit; }

a.project-plate:focus-visible,
.project-foot a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

a
/* Identity block. Name, then the two links that are worth linking. */
.brand-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand-sep { color: rgba(255, 255, 255, 0.26); }

.social {
  color: var(--quiet);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

/* Hairline rule between the nav items. Without it RESUME LINKEDIN
   GITHUB reads as one uppercase string, since they share a weight, a
   colour and a tracking. Added 2026-08-18. */
.social + .social {
  padding-left: 11px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.social:hover,
.social:focus-visible { color: var(--ink); }

.social:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (max-width: 620px) {
  .brand-block { gap: 8px; }
  .social { font-size: 0.82rem; }
  .social + .social { padding-left: 8px; }
  .brand-sep { display: none; }
}


/* ---------------------------------------------------------------
   About block on the projects page, and the resume page.
   Added 2026-08-18.
   --------------------------------------------------------------- */

.about {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 34px);
  padding-inline: max(22px, calc((100vw - 1260px) / 2));
  padding-top: clamp(24px, 3.2vw, 40px);
  max-width: calc(760px + 2 * max(22px, (100vw - 1260px) / 2));
}

.portrait {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
}

.about-text { min-width: 0; }

.about-text h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.resume-inline {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.22em;
}

.resume-inline:hover { color: var(--ink); }

.about-text p {
  margin: 9px 0 0;
  max-width: 66ch;
  font-size: 0.97rem;
  line-height: 1.55;
}

.about-text p:first-of-type {
  color: var(--muted);
  font-size: 1.06rem;
}

.rule {
  width: var(--content);
  margin: clamp(20px, 2.6vw, 32px) auto 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* The project grid follows the rule, so it no longer needs the big top pad. */
.gallery-page .project-shell {
  padding-top: clamp(20px, 2.6vw, 32px);
  padding-bottom: clamp(24px, 3vw, 40px);
}

@media (max-width: 620px) {
  .about {
    padding-inline: 16px;
    gap: 16px;
  }
  .portrait { width: 92px; height: 92px; }
  .resume-page { padding-inline: 16px; }
  .entry-head span, .entry-sub span { white-space: normal; }
}


/* ---------------------------------------------------------------
   Resume. A literal sheet of paper carrying the same document as
   resume.pdf: Computer Modern, centred small-caps name, small-caps
   section heads over a rule, indented blocks. Rebuilt 2026-08-18
   against a render of the PDF rather than from the LaTeX source.
   Fonts are self-hosted because the upstream package ships
   `font-style: roman`, which is invalid CSS and gets dropped.
   --------------------------------------------------------------- */

@font-face {
  font-family: "CMU Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/cmu-serif-500-roman.woff2") format("woff2");
}
@font-face {
  font-family: "CMU Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/cmu-serif-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "CMU Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/cmu-serif-700-roman.woff2") format("woff2");
}
@font-face {
  font-family: "CMU Serif";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/cmu-serif-700-italic.woff2") format("woff2");
}

.resume-page {
  padding: clamp(18px, 2.6vw, 34px) max(16px, calc((100vw - 8.5in) / 2)) clamp(56px, 7vw, 92px);
}

/* Download sits above the paper, not on it. */
.sheet-bar {
  width: min(8.5in, 100%);
  margin: 0 auto 12px;
  display: flex;
  justify-content: flex-end;
}

.download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}

.download:hover { background: #ffffff; color: #000000; }
.download:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sheet {
  width: min(8.5in, 100%);
  margin: 0 auto;
  padding: 0.5in clamp(20px, 4vw, 0.55in) 0.6in;
  background: #ffffff;
  color: #000000;
  border: 0;
  font-family: "CMU Serif", "Latin Modern Roman", "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.32;
}

.sheet h1 {
  margin: 0;
  font-family: inherit;
  font-size: 2.55rem;
  font-weight: 400;
  font-variant: small-caps;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
}

.contact {
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.92rem;
}

.contact .bar { padding: 0 3px; }
.contact a { color: #000; text-decoration: underline; text-underline-offset: 0.14em; }

.sheet h2 {
  max-width: none;
  margin: 15px 0 0;
  padding-bottom: 1px;
  border-bottom: 1px solid #000;
  font-family: inherit;
  font-size: 1.18rem;
  font-weight: 400;
  font-variant: small-caps;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: none;
}

.block { margin: 5px 0 0; padding-left: 0.16in; }

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
}

.row strong { font-weight: 700; }
.row span, .row em { white-space: nowrap; }
.row em:last-child, .row span:last-child { text-align: right; }

.line { margin: 1px 0 0; }
.line.gap { margin-top: 11px; }

.sheet ul {
  margin: 2px 0 0;
  padding-left: 1.15em;
  list-style: disc;
}

.sheet li { margin-top: 1px; }

.sheet a { color: inherit; }

@media print {
  .site-header, .sheet-bar { display: none; }
  body { background: #fff; }
  .resume-page { padding: 0; }
  .sheet { box-shadow: none; border: 0; width: 100%; padding: 0; }
}

@media (max-width: 720px) {
  .sheet { font-size: 14px; }
  .row { flex-direction: column; gap: 0; }
  .row span, .row em { white-space: normal; }
  .row em:last-child, .row span:last-child { text-align: left; }
}

/* Long titles may wrap on a phone rather than overflow the viewport. */

/* ---------------------------------------------------------------
   Home page holds one screen. There is not enough here to earn a
   scrollbar, and an almost-empty second screen reads as unfinished.
   Added 2026-08-18.
   --------------------------------------------------------------- */

.gallery-page {
  display: flex;
  flex-direction: column;
}

/* Home page: header, content, footer, one screen, footer pinned low. */
body:has(.gallery-page) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(.gallery-page) .gallery-page { flex: 1 1 auto; }

.gallery-page .project-shell { flex: 1 1 auto; }

/* The page is sized to fit rather than clipped. Hiding overflow would make
   content unreachable the moment it did not fit, which is worse than a
   scrollbar. If it ever overflows, trim the about copy. */
@media (max-width: 900px) {
  .gallery-page { min-height: 0; }
}

/* ---------------------------------------------------------------
   Project tiles, Anduril-style. Image fills the tile, name bottom
   left, arrow bottom right, hairline gaps, no chrome. The scrim is
   a gradient on the image rather than a panel, so nothing floats.
   Rebuilt 2026-08-18.
   --------------------------------------------------------------- */

.cover-wrap::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 42%,
    rgba(0, 0, 0, 0.30) 68%,
    rgba(0, 0, 0, 0.72) 100%
  );
  pointer-events: none;
}

.tile-label {
  position: absolute;
  left: 20px;
  bottom: 16px;
  z-index: 2;
  color: #ffffff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.tile-arrow {
  position: absolute;
  right: 18px;
  bottom: 15px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.15rem;
  line-height: 1;
  transition: color 200ms ease, transform 200ms ease;
}

.project-plate:hover .tile-arrow,
.project-plate:focus-visible .tile-arrow {
  color: #ffffff;
  transform: translate(2px, -2px);
}

@media (prefers-reduced-motion: reduce) {
  .cover-wrap img,
  .tile-arrow { transition: none; }
  .project-plate:hover .cover-wrap img { transform: none; }
}

/* ---------------------------------------------------------------
   Footer. Brand marks are inline SVG so there is no icon font, no
   external request, and they inherit colour. Added 2026-08-18.
   --------------------------------------------------------------- */

.site-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px max(22px, calc((100vw - 1260px) / 2)) 26px;
  border-top: 1px solid var(--line);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  color: var(--quiet);
  text-decoration: none;
  transition: color 180ms ease;
}

.icon-link:hover,
.icon-link:focus-visible { color: var(--ink); }

.icon-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.icon-text {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The home page is one screen, so the footer sits at the bottom of it. */


@media print { .site-foot { display: none; } }

@media (max-width: 620px) {
  .site-foot { padding-inline: 16px; gap: 14px; }
  .icon-text { font-size: 0.8rem; }
}

/* A clean CAD render, centred and given room. Unlike a UI screenshot it
   has no chrome to align, so it reads best isolated. Added 2026-08-18. */
.fig-render {
  width: min(calc(100vw - 44px), 1000px);
  margin-left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.fig-render img {
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
}

.fig-render figcaption { margin-inline: auto; text-align: left; }

@media (max-width: 620px) {
  .fig-render { width: 100%; margin-left: 0; transform: none; }
}

/* A tile whose image is light. The white scrim that used to sit here
   fought the recessed edge added 2026-08-18, because it washed out the
   two bottom corners the vignette is meant to darken. The scrim is now
   a soft dark pool under the label instead, which keeps a white label
   legible on a light render and leaves the perimeter dark all round. */
.project-card--light .cover-wrap::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 52%,
    rgba(0, 0, 0, 0.24) 74%,
    rgba(0, 0, 0, 0.58) 100%
  );
}




/* ---------------------------------------------------------------
   Click to enlarge. The drawings and cut lists carry numbers that
   are illegible at the reading measure, and unreadable outright on
   a phone. The figure stays a plain image with no script; the
   viewer is added by enlarge.js only if it runs, so nothing is
   lost when it does not. Added 2026-08-18.
   --------------------------------------------------------------- */

.fig img.zoomable {
  cursor: zoom-in;
}

.fig-zoom-hint {
  display: inline-block;
  margin-left: 8px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

dialog.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.94);
  color: var(--ink);
  overscroll-behavior: contain;
}

dialog.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.94);
}

.lightbox-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 56px 16px 74px;
}

.lightbox-scroll img {
  width: auto;
  max-width: none;
  border-radius: 3px;
  background: #ffffff;
}

.lightbox-close {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 3;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible { border-color: var(--ink); }

.lightbox-cap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  margin: 0;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.82);
  color: var(--quiet);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-scroll img { transition: none; }
}

/* Phone layout for the About block. Two rows rather than three.
   Row 1 is the portrait beside the name, with the resume link wrapped
   under the name. Row 2 is the prose at full width.

   The portrait used to sit beside the whole text column, which pinned
   the copy into a 235px measure with a 124px dead strip running its
   full height. Stacking everything fixed that but made the page taller
   than it needed to be, since the portrait had a whole row to itself.
   This keeps the full-width prose and gets the row back.

   `display: contents` on .about-text drops the wrapper out of the
   layout so the h1 and the paragraphs become grid items directly.
   Added 2026-08-18. */
@media (max-width: 620px) {
  .about {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 14px;
    align-items: center;
    padding-inline: 16px;
  }

  .about-text { display: contents; }

  .portrait {
    grid-column: 1;
    grid-row: 1;
    width: 92px;
    height: 92px;
  }

  .about-text h1 {
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
  }

  /* Every paragraph runs the full width beneath the row. */
  .about-text p {
    grid-column: 1 / -1;
    max-width: none;
  }

  .about-text p:first-of-type { margin-top: 0; }
}
