@font-face {
  font-family: "Portfolio Courier";
  src: url("Assets/Fonts/Courier New/Courier New Regular/Courier New Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Portfolio Helvetica Neue";
  src: url("Assets/Fonts/Helvetica Neue/HelveticaNeueBold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Portfolio Helvetica Neue";
  src: url("Assets/Fonts/Helvetica Neue/HelveticaNeueBoldItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Portfolio Helvetica Neue Regular";
  src: url("Assets/Fonts/Helvetica Neue/HelveticaNeueRoman.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Portfolio Helvetica Neue Regular";
  src: url("Assets/Fonts/Helvetica Neue/HelveticaNeueItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --page-padding: clamp(1.25rem, 2vw, 2.5rem);
  --titles-top: clamp(9rem, 25vh, 16rem);
  --titles-bottom: var(--titles-top);
  --project-title-height: clamp(2.6rem, 4.5vw, 4.25rem);
  --about-margin: clamp(.35rem, .65vw, .75rem);
  --ink: #111;
  --placeholder: #9b9b9b;
}

* { box-sizing: border-box; }
html { overflow-x: clip; background: #fff; scrollbar-gutter: stable; }
body { min-width: 320px; margin: 0; overflow-x: clip; color: var(--ink); font-family: "Manrope", Arial, sans-serif; font-size: clamp(.7rem, .86vw, .9rem); font-weight: 300; letter-spacing: -.055em; }
a { color: inherit; }

/* ---------- Custom cursor ---------- */
.custom-cursor { display: none; }
@media (pointer: fine) {
  body, a, button { cursor: none; }
  .custom-cursor {
    position: fixed;
    z-index: 100;
    display: block;
    width: 32px;
    height: 32px;
    background: transparent url("Assets/Cursors/StMatthew_Cursor_Black.svg") center / contain no-repeat;
    opacity: 0;
    pointer-events: none;
    transform: translate(-18%, 0);
    transition: opacity 120ms ease, width 120ms ease, height 120ms ease;
  }
  .custom-cursor.is-visible { opacity: 1; }
}

/* ---------- Page frame and navigation ---------- */
.portfolio { position: relative; display: flex; min-height: 100svh; }
.sidebar { position: sticky; top: 0; display: flex; flex: 0 0 42%; flex-direction: column; justify-content: space-between; height: 100svh; padding: var(--titles-top) var(--page-padding) var(--titles-bottom); }
.identity p, .links a { margin: 0; line-height: 1.22; }
.identity { transform: translateY(calc((var(--project-title-height) - 1em) / 2)); }
.name-highlight { transition: background-color 100ms ease-in-out, color 100ms ease-in-out; }
.name-highlight.is-highlighted { background-color: var(--name-highlight-color); color: var(--name-highlight-text-color); }
.links { display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; }
.links .contact-trigger { position: relative; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; line-height: 1; text-align: left; }
.project-nav-row { display: grid; grid-template-columns: 25% auto; align-items: baseline; width: calc(50vw - var(--page-padding)); min-height: 1em; line-height: 1; }
.project-nav-row > a { justify-self: start; }
.project-number-links { display: flex; flex-direction: column; gap: 0; }
.project-menu-placeholder { line-height: 1; }
.b-side-label, .links a.b-side-label { display: block; margin-top: 1.22em; line-height: 1; }
.project-list-bottom { margin-top: calc(5 * 1.22em); }
.projects-page .project-number-links a { background-color: transparent; }

/* Archived random-color header treatment (see headerRandomColorEnabled in script.js). */
.project-number-links a.is-projects-label-highlighted { background-color: var(--projects-label-color) !important; color: var(--projects-label-text-color) !important; }
.projects-label .project-word { display: inline-block; }
.projects-label.is-number-highlighted { background-color: transparent !important; color: var(--ink) !important; }
.projects-label.is-number-highlighted .project-word { background-color: var(--number-hover-color); color: var(--number-hover-text-color); }
.projects-label.is-project-color-persist { background-color: transparent !important; color: var(--ink) !important; }
.projects-label.is-project-color-persist .project-word { background-color: var(--project-color); color: var(--project-text-color); }
.project-number-links a.project-color-persist,
.project-number-links a[aria-current="page"].project-color-persist { background-color: var(--project-color); color: var(--project-text-color); }

/* Blinking block cursor beside menu items. */
.links a { position: relative; padding: 0; margin: 0; line-height: 1; text-decoration: none; transition: color 100ms ease-in-out; }
.links a[aria-current="page"] { background-color: transparent; }
.links a::before, .links .contact-trigger::before {
  position: absolute;
  top: 50%;
  left: auto;
  right: calc(100% + .6ch);
  width: .55em;
  height: .8em;
  opacity: 0;
  content: "";
  background-color: currentColor;
  color: var(--ink);
  mix-blend-mode: normal;
  pointer-events: none;
  transform: translateY(-50%);
  animation: menu-block-blink 1s steps(1, end) infinite;
}
@keyframes menu-block-blink {
  0%, 49% { background-color: currentColor; }
  50%, 100% { background-color: transparent; }
}
.identity .project-number-links { align-items: flex-start; }
@media (prefers-reduced-motion: reduce) {
  .links a::before, .links .contact-trigger::before { animation: none; }
}
.links a::after { display: none; }
.links a:hover, .links a:focus-visible { background-color: transparent; color: var(--ink); }
.links a:hover::before, .links a:focus-visible::before,
.links .contact-trigger:hover::before, .links .contact-trigger:focus-visible::before { opacity: 1; }
.links a[aria-current="page"]::before, .links a[aria-current="page"]::after { opacity: 1; }

/* ---------- Fixed header ---------- */
.top-meta-layout .projects-sidebar {
  inset: 0;
  display: block;
  width: 100%;
  height: 0;
  padding: 0;
  pointer-events: none;
}
.top-meta-layout .identity,
.top-meta-layout .projects-credit,
.top-meta-layout .projects-location {
  position: absolute;
  transform: none;
  pointer-events: auto;
}
.top-meta-layout .identity {
  top: calc(var(--page-padding) + 8.25rem);
  left: var(--page-padding);
}
.top-meta-layout .projects-location { right: var(--page-padding); text-align: right; }
.projects-credit p, .projects-location p { margin: 0; line-height: 1; }

.brand-header {
  position: absolute;
  z-index: 3;
  top: calc(.25rem + 20px);
  left: var(--page-padding);
  display: flex;
  align-items: flex-end;
  width: max-content;
  gap: 1ch;
  transform: scale(1.05);
  transform-origin: bottom left;
  pointer-events: none;
}
.brand-header img { display: block; height: auto; }
.brand-header-i-arch { width: 62.78px; }
.brand-header-by-hand { position: relative; top: 2px; width: 139.45271445px; }

/* ---------- Bio copy ---------- */
.about-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--about-margin);
  pointer-events: none;
}
.about-copy { width: 100%; pointer-events: auto; }
.oracle-statement { position: relative; z-index: 1; font-size: clamp(2.1rem, 3.7vw, 4.6rem); line-height: .86; letter-spacing: -.065em; text-align: justify; text-align-last: left; }
.oracle-name, .oracle-emphasis { font-weight: inherit; }
.oracle-highlight { display: inline; }
.random-color { position: relative; z-index: 0; display: inline-block; isolation: isolate; font-weight: inherit; transition: color 100ms ease-in-out; }
.random-color::before { position: absolute; z-index: -1; top: 50%; right: 0; left: 0; height: .82em; content: ""; background-color: #eeeeee; transform: translateY(-48%); transition: background-color 700ms ease-in-out; }
.random-color.is-highlighted { color: var(--hover-text-color); }
.random-color.is-highlighted::before { background-color: var(--hover-color); }

/* The header-layout bio uses the same compact treatment as the header info. */
.top-meta-layout .about-content {
  --bio-text-size: clamp(.7rem, .86vw, .9rem);
  position: fixed;
  z-index: 2;
  top: auto;
  right: auto;
  bottom: calc(var(--page-padding) + 4rem + 25px);
  left: 50%;
  display: block;
  width: min(calc(50vw - var(--page-padding) - 90px), calc(48rem - 90px));
  padding: 0;
  pointer-events: none;
  transform: none;
  transition: opacity 120ms ease;
}
.top-meta-layout .about-copy { width: 100%; pointer-events: auto; }
.top-meta-layout.is-sotm-open .about-content { opacity: 0; pointer-events: none; }
.top-meta-layout .oracle-statement {
  font-family: "Portfolio Courier", "Courier New", monospace;
  font-size: var(--bio-text-size);
  line-height: 1.22;
  letter-spacing: inherit;
  text-align: justify;
  text-align-last: left;
}
.top-meta-layout .oracle-statement p { margin: 0; }
.top-meta-layout .bio-description { letter-spacing: -.015em; }
.top-meta-layout .oracle-statement .bio-intro { margin-bottom: 1.22em; letter-spacing: 0; white-space: nowrap; }
.top-meta-layout .random-color::before { background-color: transparent; }
.top-meta-layout .random-color.is-highlighted::before { background-color: var(--hover-color); }

/* ---------- Song of the Month player ---------- */
.sotm {
  position: fixed;
  z-index: 3;
  bottom: calc(var(--page-padding) + 4rem + 25px);
  left: var(--page-padding);
  display: flex;
  align-items: flex-end;
  min-height: 1.22em;
  font-size: clamp(.7rem, .86vw, .9rem);
  line-height: 1.22;
}
.sotm button { padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; line-height: 1; }
.sotm-controls { position: absolute; bottom: 0; left: calc(100% + 2ch + 100px); display: grid; grid-template-columns: clamp(13rem, 14vw, 15rem); gap: .8em; width: clamp(13rem, 14vw, 15rem); overflow: hidden; opacity: 0; pointer-events: none; transform: translateY(calc(.35em + 2px)); transition: opacity 120ms ease, transform 180ms ease; }
.sotm.is-expanded .sotm-controls { opacity: 1; pointer-events: auto; transform: translateY(2px); }
.top-meta-layout.is-sotm-open .sotm-controls { position: fixed; bottom: calc(var(--page-padding) + 4rem + 25px); left: 50%; }
.sotm-cover { width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--ink); }
.sotm-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sotm-track { display: grid; gap: .3em; margin: 0; }
.sotm-track em { font-style: italic; }
.sotm-track span { white-space: nowrap; }
.sotm-transport { display: flex; align-items: center; gap: .55em; min-width: 0; }
.sotm-transport button { display: grid; flex: 0 0 1.3em; width: 1.3em; height: 1.3em; place-items: center; text-align: center; }
.sotm-icon { width: .95em; height: .95em; fill: currentColor; }
.sotm-progress { --progress-position: 0%; position: relative; flex: 1 1 auto; min-width: 0; height: 1.3em; margin-left: .65em; cursor: none; touch-action: none; }
.sotm-progress-track { position: absolute; top: 50%; right: 0; left: 0; height: 1px; background: var(--ink); transform: translateY(-50%); }
.sotm-progress-handle { position: absolute; top: 50%; left: var(--progress-position); width: .95em; height: .95em; fill: var(--ink); pointer-events: none; transform: translate(-50%, -50%); }
.sotm-stem-controls { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: .35em; white-space: nowrap; }
.sotm .sotm-stem-toggle { padding: .12em .4em .16em; border: 1px solid transparent; border-radius: .3em; }
.sotm .sotm-stem-toggle.is-active { border-color: var(--ink); }

@media (max-width: 700px) {
  .portfolio { display: block; }
  .sidebar { position: relative; height: auto; min-height: 42svh; padding: var(--page-padding); }
  .identity { transform: none; }
  .project-nav-row { display: flex; width: auto; gap: 4ch; }
  .brand-header { transform: scale(.672); transform-origin: bottom left; }
  .projects-page .identity { top: calc(var(--page-padding) + 6rem); }
  .top-meta-layout .projects-sidebar { display: grid; width: auto; height: auto; padding: var(--page-padding); grid-template-columns: 1fr 1fr; gap: 1rem; }
  .top-meta-layout .identity, .top-meta-layout .projects-credit, .top-meta-layout .projects-location { position: static; transform: none; }
  .top-meta-layout .projects-location { text-align: right; }
  .about-content { position: relative; inset: auto; padding: 6rem var(--page-padding) var(--page-padding); }
  .about-copy { width: 100%; }
  .oracle-statement { font-size: clamp(1.4rem, 6.5vw, 2.2rem); }
  .top-meta-layout .about-content { --bio-text-size: clamp(.55rem, 2vw, .7rem); position: fixed; inset: auto var(--page-padding) calc(clamp(9.75rem, 22.25vw, 22.25rem) + var(--page-padding)) auto; width: calc(100vw - (2 * var(--page-padding))); padding: 0; transform: none; }
  .sotm { bottom: calc(clamp(9.75rem, 22.25vw, 22.25rem) + var(--page-padding)); }
  .sotm-controls { bottom: calc(100% + 1rem); left: 100px; grid-template-columns: min(12rem, calc(100vw - (2 * var(--page-padding)))); width: min(12rem, calc(100vw - (2 * var(--page-padding)))); }
  .top-meta-layout.is-sotm-open .sotm-controls { right: var(--page-padding); bottom: calc(clamp(9.75rem, 22.25vw, 22.25rem) + var(--page-padding)); left: auto; }
}

/* ---------- Rush Market (main landing page) ---------- */
body.main-landing-page { isolation: isolate; background-color: #fff; }
.projects-credit, .projects-location { font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; }
/* Main image and project story form consecutive scrolling sections. */
body.main-landing-page .portfolio { display: block; min-height: calc(150svh + 50px); padding-top: 100svh; }
body.main-landing-page .oracle-statement {
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.035em;
  text-align: left;
}
/* Full-screen Main image behind the fixed header and menu. */
body.main-landing-page::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  content: "";
  background: url("Assets/Projects/Rush Market/Cover Image/NGO-4993-Main.webp") center top / cover no-repeat;
  pointer-events: none;
  animation: main-image-fade-in 350ms ease-out both;
}
@keyframes main-image-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body.main-landing-page::before { animation: none; }
}

/* Match the left navigation and SOTM to the Helvetica Bold typography. */
.identity,
.sotm {
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
}
/* Keep the cursor beside each menu label. */
.identity .links a, .identity .links .contact-trigger { width: max-content; max-width: 100%; }
/* Keep the menu cursor solid during hover. */
.links a:hover::before,
.links .contact-trigger:hover::before {
  animation: none;
  background-color: currentColor;
  opacity: 1;
}

/* Keep the header, left navigation, and SOTM fixed together on scroll. */
.top-meta-layout .brand-header { position: fixed; }
.top-meta-layout .projects-sidebar,
body.main-landing-page .top-meta-layout .projects-sidebar { position: fixed; top: 0; }

/* ---------- Contact menu ---------- */
.identity .contact-menu-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: .8ch;
  max-width: calc(100vw - 2 * var(--page-padding));
}
.identity .links .contact-detail,
.identity .links .contact-detail:hover,
.identity .links .contact-detail:focus-visible { color: #888; }
.identity .links .contact-detail::before { display: none; }
.identity .links .contact-detail:hover { text-decoration: none; }
.identity .links .contact-detail::after {
  display: inline-block;
  content: "↗";
  margin-left: .35em;
}
/* Reveal contact details on click and mark the active contact with the cursor. */
.identity .contact-menu-row .contact-detail { display: none; }
.identity .contact-menu-row.is-open .contact-detail { display: inline-block; }
.identity .links.has-contact-open a[aria-current="page"]::before { opacity: 0; }
.identity .contact-menu-trigger[aria-expanded="true"]::before { opacity: 1; }
.identity .contact-menu-trigger:hover::before { animation: none; background-color: currentColor; }

/* ---------- Resume ---------- */
/* Resume starts on the creator-credit column and Main menu baseline. */
.resume-content {
  --resume-fade-start: calc(var(--resume-top, 0px) + var(--resume-scroll, 0px));
  --resume-fade-length: min(160px, var(--resume-scroll, 0px));
  position: relative;
  width: calc(100% - var(--resume-left, 50%));
  margin-left: var(--resume-left, 50%);
  padding-top: var(--resume-top, calc(var(--page-padding) + 8.25rem));
  padding-right: var(--page-padding);
  padding-bottom: 5rem;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: inherit;
  line-height: 1.3;
  letter-spacing: -.015em;
  /* Hide scrolling Resume text above its original alignment with Main. */
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--resume-fade-start), #000 calc(var(--resume-fade-start) + var(--resume-fade-length)));
  mask-image: linear-gradient(to bottom, transparent var(--resume-fade-start), #000 calc(var(--resume-fade-start) + var(--resume-fade-length)));
  animation: main-image-fade-in 350ms ease-out both;
}
.resume-content h1 { margin: 0 0 2rem; font: inherit; line-height: 1; }
.resume-content h2 { margin: 0; font: inherit; }
.resume-entry { max-width: 35rem; }
.resume-entry p { margin: 0; }
.resume-dates, .resume-description { color: #888; }
.resume-entry .resume-description { margin-top: 1rem; max-width: 42ch; }
.resume-page { display: block; }
.resume-entry + .resume-entry { margin-top: 2rem; }
@media (prefers-reduced-motion: reduce) {
  .resume-content { animation: none; }
}

/* ---------- SOTM page ---------- */
.sotm-navigation {
  position: fixed;
  bottom: 1.5rem;
  left: var(--page-padding);
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
}
.sotm-page .sotm {
  top: auto;
  left: 50%;
  display: block;
}
.sotm-page-title { display: none; }
.sotm-page .sotm .sotm-controls {
  position: static;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
@media (max-width: 700px) {
  .sotm-page .sotm { left: auto; }
}
/* Regular Helvetica for track information, stem labels, and revealed contact links. */
.sotm .sotm-track,
.sotm .sotm-stem-toggle,
.identity .links .contact-detail,
.identity .links .contact-detail::after {
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
}
/* Fade in gray contact links when revealed. */
.identity .contact-menu-row.is-open .contact-detail {
  animation: main-image-fade-in 350ms ease-out both;
}
@media (prefers-reduced-motion: reduce) {
  .identity .contact-menu-row.is-open .contact-detail { animation: none; }
}
/* Keep fixed navigation above scrolling bio text and highlights. */
.top-meta-layout .projects-sidebar,
.sotm-navigation { z-index: 20; }
.top-meta-layout .brand-header { z-index: 21; }

/* Bio uses the Resume text treatment with interactive word highlights. */
.resume-content .resume-bio { max-width: 42ch; margin: 0 0 3rem; }
.resume-content .resume-section-title { margin: 0 0 2rem; line-height: 1; }
.resume-bio .random-color {
  display: inline;
  background-color: #eee;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color 300ms ease, color 100ms ease;
}
.resume-bio .random-color::before { display: none; }
.resume-bio .random-color.is-highlighted {
  background-color: var(--hover-color);
  color: var(--hover-text-color);
}
/* Education shares the experience entry typography and spacing. */
.resume-education { margin-bottom: 3rem; }
.resume-education h3 { margin: 0; font: inherit; }

/* Periodic music-note burst; motion is calculated using constant gravity in script.js. */
.sotm-note { position: relative; display: inline-block; }
.sotm-note-particle {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  font: inherit;
  color: inherit;
}
@media (prefers-reduced-motion: reduce) {
  .sotm-note-particle { display: none; animation: none; }
}

/* ---------- Glass surfaces ---------- */
.identity .links a,
.identity .links .contact-trigger,
.identity .project-menu-placeholder,
.identity .b-side-label,
.sotm-navigation > a { border: 0; border-radius: .3em; box-shadow: none; }
.identity .project-menu-placeholder,
.identity .b-side-label { width: fit-content; }
.top-meta-layout .brand-header-by-hand { display: none; }
.top-meta-layout .projects-credit,
.top-meta-layout .projects-location { border: 0; border-radius: .3em; box-shadow: none; }
/* Retain I Arch as the visible top-left graphic. */
.top-meta-layout .brand-header-i-arch {
  display: block;
  visibility: visible;
  opacity: 1;
  flex-shrink: 0;
}
.top-meta-layout .brand-header { overflow: visible; border-radius: .3em; transform: none; }

/* White navigation and header on the Main image. */
body.main-landing-page .identity,
body.main-landing-page .identity .links a,
body.main-landing-page .identity .links .contact-trigger,
body.main-landing-page .projects-credit,
body.main-landing-page .projects-location,
body.main-landing-page .sotm-navigation,
body.main-landing-page .sotm-navigation > a {
  color: #fff;
}
body.main-landing-page .identity .links .contact-detail,
body.main-landing-page .identity .links .contact-detail:hover { color: #bbb; }
body.main-landing-page .links a::before,
body.main-landing-page .links .contact-trigger::before { color: #fff; }
body.main-landing-page .brand-header-i-arch { filter: brightness(0) invert(1); }
/* Crisp, consistently sized header and navigation typography. */
.identity,
.projects-credit,
.projects-location,
.sotm-navigation {
  font-size: 14px;
  letter-spacing: normal;
}
/* Switch each fixed item to dark ink after it leaves the Main image. */
body.main-landing-page .is-past-main-image { color: #111 !important; }
body.main-landing-page .identity .links .contact-detail.is-past-main-image { color: #888 !important; }
body.main-landing-page .links .is-past-main-image::before { color: #111; }
body.main-landing-page .brand-header-i-arch.is-past-main-image { filter: none; }
/* Render menu text separately from the blurred glass surfaces. */
.identity .links a:not(.contact-detail),
.identity .links .contact-trigger,
.identity .project-menu-placeholder,
.identity .b-side-label,
.sotm-navigation > a {
  position: relative;
  isolation: isolate;
}
.identity .links a:not(.contact-detail)::after,
.identity .links .contact-trigger::after,
.identity .project-menu-placeholder::after,
.identity .b-side-label::after,
.sotm-navigation > a::after {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 1;
  pointer-events: none;
  border-radius: .3em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
/* Software follows Experience in the existing Resume text style. */
.resume-software { margin-top: 3rem; max-width: 42ch; }
.resume-software-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1rem; margin: 0; }
.resume-software-list dt { font-style: normal; }
.resume-software-list dd { margin: 0; color: #888; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: 2rem var(--page-padding) 1.5rem;
  color: #000;
  background: transparent;
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.025em;
}
/* Edge-to-edge footer wordmark with a cropped final H. */
.footer-wordmark {
  width: calc(100% + 2 * var(--page-padding));
  margin-bottom: 1.5rem;
  margin-left: calc(-1 * var(--page-padding));
  overflow: hidden;
}
.footer-wordmark span {
  position: relative;
  left: -.025em;
  display: block;
  width: max-content;
  font-size: 15vw;
  line-height: .9;
  letter-spacing: -.065em;
  white-space: nowrap;
}
/* Blinking insertion cursor follows the footer typing. */
.footer-wordmark span::after {
  display: inline-block;
  content: "";
  width: .006em;
  height: .7em;
  margin-left: .025em;
  vertical-align: -.015em;
  background: #000;
  animation: footer-caret-blink 1s steps(1, end) infinite;
}
@keyframes footer-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-wordmark span::after { animation: none; }
}
/* The hand sits on the same bottom edge as the footer identifier. */
.footer-details { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; align-items: end; line-height: 1.15; }
.footer-details p { margin: 0; }
@media (max-width: 700px) {
  .footer-details { gap: 1.25rem; font-size: 12px; }
}
/* Right-align the footer coordinates at the outer content edge. */
.footer-details > p:last-child {
  text-align: right;
  justify-self: end;
}

/* Extend contact glass behind the label and revealed address as one surface. */
.identity .contact-menu-row.is-open {
  position: relative;
  isolation: isolate;
  width: fit-content;
}
.identity .contact-menu-row.is-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: .3em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.identity .contact-menu-row.is-open .contact-trigger::after { display: none; }

/* Small signature centered under the header credit's column. */
.footer-by-hand {
  display: block;
  width: 35px;
  height: auto;
}
.footer-details .footer-by-hand { margin: 0; justify-self: center; align-self: end; transform: translateX(50%); }

/* Reveal SOTM only after its final dimensions and position are ready (position is set in script.js). */
.sotm-page .sotm {
  right: auto;
  bottom: auto;
  width: 200px;
  padding: 0;
  transform-origin: top left;
  opacity: 0;
  pointer-events: none;
}
.sotm-page .sotm.is-player-ready {
  opacity: 1;
  pointer-events: auto;
  animation: main-image-fade-in 300ms ease-out both;
}
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  .sotm-page .sotm.is-player-ready { animation: none; }
}

/* ---------- Who am I ---------- */
.who-am-i-page { display: block; }
/* Full-screen opening photo on Who am I. */
.who-fullscreen-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: none;
  animation: main-image-fade-in 350ms ease-out both;
}
@media (prefers-reduced-motion: reduce) {
  .who-fullscreen-photo { animation: none; }
}

/* White ink over Who am I's hero; dark ink when each item leaves the photo. */
body.who-photo-page .identity,
body.who-photo-page .identity .links a,
body.who-photo-page .identity .links .contact-trigger,
body.who-photo-page .projects-credit,
body.who-photo-page .projects-location,
body.who-photo-page .sotm-navigation,
body.who-photo-page .sotm-navigation > a { color: #fff; }
body.who-photo-page .identity .links .contact-detail,
body.who-photo-page .identity .links .contact-detail:hover { color: #bbb; }
body.who-photo-page .links a::before,
body.who-photo-page .links .contact-trigger::before { color: #fff; }
body.who-photo-page .brand-header-i-arch { filter: brightness(0) invert(1); }
body.who-photo-page .is-past-main-image { color: #111 !important; }
body.who-photo-page .identity .links .contact-detail.is-past-main-image { color: #888 !important; }
body.who-photo-page .links .is-past-main-image::before { color: #111; }
body.who-photo-page .brand-header-i-arch.is-past-main-image { filter: none; }

/* Large centered bio follows the opening image; the photo gallery follows the bio. */
body.who-photo-page .about-content {
  position: relative;
  inset: auto;
  width: min(65rem, calc(100% - 2 * var(--page-padding)));
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 7rem) 0 clamp(5rem, 9vw, 10rem);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
body.who-photo-page .about-content .oracle-statement {
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.035em;
}
body.who-photo-page .about-content .bio-intro { display: none; }
body.who-photo-page .who-am-i-page { padding-top: 100svh; }
body.who-photo-page .about-copy {
  max-width: 65rem;
  margin-left: auto;
  margin-right: auto;
}
body.who-photo-page .about-content .oracle-statement,
body.who-photo-page .about-content .bio-description {
  text-align: center;
  text-align-last: center;
}
@media (max-width: 600px) {
  body.who-photo-page .about-content .oracle-statement { font-size: 1.25rem; line-height: 1.1; }
}
.sotm-navigation { gap: .3rem; }
.library-page { display: block; }

/* Toph's Shoe Reviews: an array of lateral shoe views; empty tiles hold space for future reviews */
.shoe-reviews-page { display: block; }
/* The fixed menu runs about 13rem in from the left, so the grid (and review) keep that much clear on both sides.
   Shoes sit side by side and shrink with the window; they only wrap to a new row once they would get too small. */
.shoe-reviews-page { --shoe-menu-clear: 14rem; }
.shoe-array {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 8px;
  width: min(65rem, calc(100% - 2 * var(--shoe-menu-clear)));
  margin: 0 auto;
  /* The row sits in the middle of the screen, top to bottom as well as side to side */
  box-sizing: border-box;
  min-height: 100svh;
  align-content: center;
  padding: 160px 0;
}
/* On phones the menu stops being fixed, so the grid can use the full width */
@media (max-width: 700px) {
  .shoe-reviews-page { --shoe-menu-clear: var(--page-padding); }
  .shoe-array { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); min-height: 0; padding: 2rem 0 8rem; }
}
.shoe-tile {
  display: block;
  aspect-ratio: 764 / 573;
  padding: 0;
  border: 0;
  background: #ececec;
  overflow: hidden;
}
/* Reviewed shoes sit straight on the page; only empty slots are grey */
a.shoe-tile { cursor: pointer; background: transparent; }
/* Upcoming reviews: placeholder shoes under the same frosted glass as the menu, not clickable */
/* The blur sits on the image itself (not a backdrop layer) and the tile doesn't clip, so the soft edges fade out instead of cutting off */
.shoe-tile.is-upcoming { background: transparent; overflow: visible; pointer-events: none; user-select: none; }
.shoe-tile.is-upcoming img { filter: blur(10px); }
/* Review view: the grid hides, All Shoes appears, and the hero fades in */
.shoe-all-button { display: none; }
body.is-reviewing .shoe-all-button { display: block; }
body.is-reviewing .shoe-array { display: none; }
.shoe-review[hidden] { display: none; }
/* Full-screen hero of Toph wearing the shoe; the shoes sit near the top of the portrait photo */
.shoe-review-hero {
  display: block;
  width: 100%;
  height: 100svh;
  object-fit: cover;
  object-position: 50% 25%;
  opacity: 0;
  transition: opacity .8s ease;
}
.shoe-review.is-shown .shoe-review-hero { opacity: 1; }
/* Triple Double app screens, laid out like the elevator pitch: the phone mockup on the left, its
   callouts on the right in regular Helvetica, each set at the height of the spot it points to,
   with lines drawn by script (data-arrow-figure) from the note to the screen. */
/* Two equal halves across the page: the notes start on the centre line, so their left edge lines up
   with the "Created by" credit at the top; the phone sits at the end of the left half. */
.who-story-photo.td-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  margin-bottom: clamp(5rem, 9vw, 9rem);
}
/* Mockups never start left of the bold statements' left edge (the 65rem text column), nor under the
   fixed menu (about 14rem in) on narrower windows; phones shrink as needed to stay inside that line. */
.td-screen {
  --td-gap: clamp(4rem, 9vw, 9rem);
  --td-left: max(14rem, calc((100vw - 65rem) / 2));
  --td-w: min(17rem, calc(50vw - var(--td-left) - var(--td-gap))); /* every phone mockup's width */
}
.td-screen .td-phone,
.td-screen .td-screen-label { width: var(--td-w); justify-self: end; margin-right: var(--td-gap); }
.td-screen .td-phone { grid-column: 1; grid-row: 1; }
.td-notes { position: relative; grid-column: 2; grid-row: 1; padding-right: var(--page-padding); }
/* Loading screen and Create account side by side, at the same size as every other mockup. The pair
   starts where the single phones start and runs past the centre line; its callouts (for Create account,
   the right phone) follow just after it with short arrows instead of lining up with "Created by". */
.who-story-photo.td-pair {
  --td-pair-gap: 2rem;
  /* spacer up to where single phones start | the two phones | the callouts */
  grid-template-columns: calc(50% - var(--td-gap) - var(--td-w)) auto minmax(0, 1fr);
}
/* The notes column matches the phone's height so each note's --y lines up with the screen */
.td-pair .td-notes { grid-column: 3; align-self: start; height: calc(var(--td-w) * 2281 / 1211); margin-left: 3rem; }
/* A statement right after a mockup: the mockup's bottom margin is the gap, so it matches the gap below the statement */
.triple-double-page .td-screen + .about-content.project-intro { padding-top: 0; }
.td-phones {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(2, var(--td-w));
  column-gap: var(--td-pair-gap);
  align-self: start;
}
.td-screen .td-phones .td-phone,
.td-screen .td-phones .td-screen-label { width: 100%; margin: 0; grid-column: 2; }
.td-screen .td-phones .td-phone { grid-row: 1; }
.td-screen .td-phones .td-screen-label { grid-row: 2; margin-top: 1rem; }
.td-screen .td-phones .td-phone-lead { grid-column: 1; }
.td-note {
  position: absolute;
  left: 0;
  top: var(--y);
  max-width: 22rem;
  margin: 0;
  transform: translateY(-50%);
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.3;
}
.td-screen .td-screen-label { grid-column: 1; grid-row: 2; justify-content: center; margin-top: 1rem; }
/* Phones: notes become a plain list under the mockup (the lines hide at this width) */
@media (max-width: 700px) {
  .who-story-photo.td-screen { grid-template-columns: minmax(0, 1fr); width: calc(100% - 2 * var(--page-padding)); }
  .td-screen .td-phone,
  .td-screen .td-screen-label { width: min(17rem, 100%); justify-self: center; margin-right: 0; }
  .td-notes { grid-column: 1; grid-row: 3; display: grid; gap: .75rem; margin-top: 1.5rem; padding-right: 0; }
  .who-story-photo.td-pair { grid-template-columns: minmax(0, 1fr); --td-w: calc((100vw - 2 * var(--page-padding) - var(--td-pair-gap)) / 2); }
  .td-phones { grid-column: 1; justify-self: center; }
  .td-pair .td-notes { grid-column: 1; height: auto; margin-left: 0; }
  .td-note { position: static; transform: none; max-width: none; }
}
/* Triple Double hero: the ball sits at the photo's top edge, so the crop trims only from the bottom */
.triple-double-page .project-fullscreen-photo { object-position: 50% 0; }
.shoe-review-hero.is-placeholder,
.project-fullscreen-photo.is-placeholder { background: #ececec; }
/* Review story uses the shared project format (large centered statements, story photos); a few sizes suit the shoe shots */
/* Title set as a statement, in the same Helvetica as the other projects' text */
.shoe-review-title { font-size: inherit; font-weight: inherit; }
/* Lead side view: pulled into the surrounding text padding so about 80px of white shows above and below the shoe */
.who-story-photo.shoe-review-lead { margin-top: -178px; margin-bottom: -185px; }
.who-story-photo.shoe-review-outsole { width: min(16rem, calc(100% - 2 * var(--page-padding))); }
.who-story-photo.shoe-review-top { width: min(28rem, calc(100% - 2 * var(--page-padding))); }
.who-story-photo.shoe-review-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 2rem; align-items: center; }
.who-story-photo.shoe-review-outsoles { width: min(34rem, calc(100% - 2 * var(--page-padding))); }
.shoe-review-outsoles .who-story-caption { margin: 0; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .shoe-review-hero { transition: none; } }
/* Scroll-driven booklets (shoe review, DE intro): the booklet pins in view while about 70% of a screen of scrolling turns each page */
.shoe-book-scroll, .book-scroll { height: calc(var(--book-pages, 8) * 70svh + 100svh); }
.shoe-book-sticky, .book-sticky {
  position: sticky;
  top: 0;
  box-sizing: border-box;
  height: 100svh;
  padding: 110px 0 24px; /* clear of the credit and All Shoes at the top */
  display: flex;
  align-items: center;
}
.shoe-book-sticky .pitch-book, .book-sticky .pitch-book { margin: 0 auto; }
.shoe-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* "All Shoes" sits fixed just under the "Created by" credit, in the same type and blurred-glass surface */
.shoe-all-button {
  position: fixed;
  z-index: 20;
  top: 82px;
  left: var(--credit-left, 50%);
  isolation: isolate;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  color: inherit;
  text-decoration: none;
}
/* The arrow hangs in the margin so the "A" lines up with the "C" of the credit above */
.shoe-return-glyph {
  position: absolute;
  right: 100%;
  margin-right: .3em;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
}
.shoe-all-button::before {
  position: absolute;
  inset: -4px -7px -4px calc(-7px - 1.2em);
  z-index: -1;
  content: "";
  pointer-events: none;
  border-radius: .3em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Personal bio typing treatment, matching the footer cursor. */
.bio-typed-text::after {
  display: inline-block;
  content: "";
  width: .025em;
  height: .85em;
  margin-left: .08em;
  vertical-align: -.06em;
  background: currentColor;
  animation: footer-caret-blink 1s steps(1, end) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .bio-typed-text::after { animation: none; }
}
/* Compact glass surfaces behind each header text group and behind I Arch. */
.top-meta-layout .projects-credit,
.top-meta-layout .projects-location,
.top-meta-layout .brand-header { isolation: isolate; }
.top-meta-layout .projects-credit::before,
.top-meta-layout .projects-location::before,
.top-meta-layout .brand-header::before {
  position: absolute;
  inset: -4px -7px;
  z-index: -1;
  content: "";
  pointer-events: none;
  border-radius: .3em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
/* Story images below the typed introduction. */
.who-story-photo {
  width: min(65rem, calc(100% - 2 * var(--page-padding)));
  margin: 0 auto 4rem;
}
.who-story-photo img { display: block; width: 100%; height: auto; }
/* Paragraphs sharing one OSB text block are separated by a single blank line */
.osb-gsd-page .project-intro .bio-description + .bio-description,
.shoe-reviews-page .project-intro .bio-description + .bio-description,
.triple-double-page .project-intro .bio-description + .bio-description { margin-top: 1lh; }
/* OSB napkin sketches side by side at a shared height (columns sized by each SVG's width-to-height ratio) */
.who-story-photo.osb-sketch-row {
  display: grid;
  grid-template-columns: minmax(0, 822fr) minmax(0, 955fr);
  gap: 4rem;
  align-items: start;
}
/* OSB cutting diagram sits above the tabletop photo, with an arrow down to the printed graphic.
   The photo comes first in the markup because the arrow script targets the figure's first image. */
.who-story-photo.osb-top-figure { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4rem; }
.osb-top-figure .osb-top-diagram { order: -1; width: 100%; }
/* OSB build photos: five portraits in one row, 8px apart */
.who-story-photo.osb-build-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
/* Captions fill the row under the photos in order: first under the far-left photo, second under the next */
.osb-build-row .osb-build-caption { margin: 0; }
/* Washer caption runs a little narrower than its photo */
.osb-build-row .osb-build-caption:first-of-type { max-width: 85%; }
/* OSB exploded render: nearly square, so it runs narrower than the gallery width to keep its height in check */
.who-story-photo.osb-exploded { width: min(42rem, calc(100% - 2 * var(--page-padding))); margin-top: 8rem; margin-bottom: 2rem; }
/* OSB closing front view matches the 25%-wider table photo near the top of the page */
.who-story-photo.osb-closing-photo { width: min(81.25rem, calc(100% - 2 * var(--page-padding))); }
/* OSB cutout on white runs 25% wider than the standard gallery width */
.who-story-photo.osb-table-photo {
  width: min(81.25rem, calc(100% - 2 * var(--page-padding)));
  /* Pull the photo into the text blocks' padding so about 80px of white shows above and below the table */
  margin-top: -70px;
  margin-bottom: -23px;
}
.terra-walking-video { display: block; width: 100%; height: auto; }
/* The walker and belt sit left of the frame's centre, so the whole loop is nudged right */
.terra-walking-film { transform: translateX(100px); }
@media (max-width: 1100px) { .terra-walking-film { transform: none; } }

body.who-photo-page .who-bio-passage .bio-description + .bio-description { margin-top: 1.25em; }

/* Remove the bio cursor after each paragraph finishes typing. */
.bio-typed-text.is-typing-complete::after { visibility: hidden; animation: none; }

.who-story-caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-top: .5rem;
  text-align: left;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.2;
}
.who-story-caption strong {
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
}
.who-caption-date { text-align: right; white-space: nowrap; }

/* Repeat the project menu beneath the final bio at the bio's type size. */
.who-bio-projects {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-top: 1.25em;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}
.who-bio-projects > a,
.who-bio-projects > span {
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-decoration: none;
}
body.who-photo-page .who-bio-projects {
  display: grid;
  justify-content: start;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  text-align-last: left;
}
.project-menu-connectors {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.project-menu-connectors polygon {
  fill: #f0f0f0;
  stroke: none;
}
/* Keep the photos following the large project list close together. */
.who-story-photo.who-photo-tight { margin-bottom: 8px; }
/* Edge-to-edge photo (Terra Supra's shoe-shelf closing shot) */
.who-story-photo.terra-full-width { width: 100%; }
/* Scroll-scrubbed photo sequence (Terra Supra kick): the frames stack on top of each other. The photo scrolls in
   like the gallery around it, pins mid-screen while about a quarter screen of scrolling steps each frame
   (forward through the kick and back to the first frame), then scrolls on. */
/* Anything placed after the kick inside .terra-flip-sticky rides along with it. script.js sets the section's
   height to the pinned block plus a quarter screen of scrolling per step. */
.terra-flip-scroll {
  --flip-w: min(65rem, calc(100vw - 2 * var(--page-padding)));
  --flip-h: calc(var(--flip-w) * var(--flip-ratio, calc(2480 / 3680)));
}
.terra-flip-sticky {
  display: flow-root;
  position: sticky;
  top: max(0px, calc((100svh - var(--flip-h)) / 2));
}
.who-story-photo.terra-flip { position: relative; width: var(--flip-w); margin: 0 auto; }
/* Rotating renders: transparent cutouts, shown smaller than a photo so the whole slide fits on screen */
.terra-orbit-scroll {
  --flip-w: min(40rem, calc(100vw - 2 * var(--page-padding)));
  --flip-ratio: calc(1053 / 1196);
}
.who-story-photo.terra-flip:not(:last-child) { margin-bottom: 8px; }
.terra-flip-sticky > .who-story-photo.who-photo-tight:last-child { margin-bottom: 8px; }
.terra-flip img:not(:first-child) { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.terra-flip img:not(.is-active) { opacity: 0; }
.who-story-photo.who-photo-tight:last-child { margin-bottom: 4rem; }
/* Tighten personal bio tracking slightly and avoid orphaned last words. */
body.who-photo-page .about-content .bio-description {
  letter-spacing: -.04em;
  text-wrap: pretty;
}

/* ---------- Library ---------- */
.library-bookshelf-stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--page-padding);
}
.library-bookshelf {
  display: block;
  width: min(100%, 1000px);
  max-height: calc(100svh - 2 * var(--page-padding));
  object-fit: contain;
  height: auto;
}
.library-bookshelf-figure {
  position: relative;
  width: min(100%, 1000px, calc((100svh - 2 * var(--page-padding)) * 1.50376));
  margin: 0;
  animation: main-image-fade-in 300ms ease-out both;
}
.library-bookshelf-figure .library-bookshelf { width: 100%; }
.library-construction-caption {
  position: absolute;
  left: calc(85.7% + 8px);
  bottom: calc(29.17% - 3px);
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}
.library-construction-caption p { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .library-bookshelf-figure { animation: none; }
}

/* Match the measured header size before JavaScript runs, avoiding a small-logo flash. */
.top-meta-layout .brand-header {
  font-size: 14px;
  top: calc(.25rem + 5px + 68.357px - 28px - 9px);
}
.top-meta-layout .projects-credit,
.top-meta-layout .projects-location {
  top: calc(.25rem + 5px + 68.357px - 2em - 9px);
}
.top-meta-layout .brand-header-i-arch {
  width: auto;
  height: 28px;
  aspect-ratio: 23.5 / 6.3;
}

/* ---------- Page transitions ---------- */
/* Keep the outgoing page visible beneath the incoming page during navigation. */
::view-transition-image-pair(root) { isolation: isolate; }
::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
  z-index: 1;
}
::view-transition-new(root) {
  animation: page-arrival 300ms ease-out both;
  mix-blend-mode: normal;
  z-index: 2;
}
@keyframes page-arrival {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) { animation: none; }
}
/* Navigation already fades the whole page; show its content fully in the snapshot. */
html.has-page-transition .sotm-page .sotm,
html.has-page-transition .sotm-page .sotm.is-player-ready {
  opacity: 1;
  pointer-events: auto;
  animation: none;
}
html.has-page-transition .library-bookshelf-figure { animation: none; }
html.has-page-transition body.main-landing-page::before,
html.has-page-transition .who-fullscreen-photo,
html.has-page-transition .resume-content {
  animation: none;
  opacity: 1;
}

/* ---------- Terra Supra, De-Construction and Padded Workwear heroes ---------- */
.terra-supra-page,
.padded-workwear-page { display: block; min-height: calc(150svh + 50px); padding-top: 100svh; }
/* OSB hero is a cutout on transparency, shown 25% smaller in the middle of the screen */
.terra-fullscreen-photo,
.project-fullscreen-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100svh;
  object-fit: cover;
  object-position: center;
}
/* Full-screen silent placeholder loop for De-Construction Co. */
.de-construction-page { display: block; min-height: calc(150svh + 50px); padding-top: 100svh; }
.de-fullscreen-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100svh;
  object-fit: cover;
  object-position: center;
}
/* White navigation over De-Construction's video and Padded Workwear's photo; dark ink beyond their bounds. */
body.de-video-page .identity,
body.de-video-page .projects-credit,
body.de-video-page .projects-location,
body.de-video-page .sotm-navigation,
body.de-video-page .sotm-navigation > a,
body.padded-photo-page .identity,
body.padded-photo-page .projects-credit,
body.padded-photo-page .projects-location,
body.padded-photo-page .sotm-navigation,
body.padded-photo-page .sotm-navigation > a { color: #fff; }
body.de-video-page .identity .links .contact-detail,
body.de-video-page .identity .links .contact-detail:hover,
body.padded-photo-page .identity .links .contact-detail,
body.padded-photo-page .identity .links .contact-detail:hover { color: #bbb; }
body.de-video-page .links a::before,
body.de-video-page .links .contact-trigger::before,
body.padded-photo-page .links a::before,
body.padded-photo-page .links .contact-trigger::before { color: #fff; }
body.de-video-page .brand-header-i-arch,
body.padded-photo-page .brand-header-i-arch { filter: brightness(0) invert(1); }
body.de-video-page .is-past-main-image,
body.padded-photo-page .is-past-main-image { color: #111 !important; }
body.de-video-page .identity .links .contact-detail.is-past-main-image,
body.padded-photo-page .identity .links .contact-detail.is-past-main-image { color: #888 !important; }
body.de-video-page .links .is-past-main-image::before,
body.padded-photo-page .links .is-past-main-image::before { color: #111; }
body.de-video-page .brand-header-i-arch.is-past-main-image,
body.padded-photo-page .brand-header-i-arch.is-past-main-image { filter: none; }

/* ---------- Page decks ---------- */
/* The same centered width as Who am I's story photos, narrowed in short windows (or for tall pages)
   so the whole page plus its navigation row fits on screen. Set --page-aspect per deck. */
.pitch-book {
  position: relative;
  z-index: 10;
  width: min(65rem, calc(100% - 2 * var(--page-padding)), calc((100svh - 13rem) * var(--page-aspect, 16 / 9)));
  margin: 4rem auto;
  color: #111;
  background: #fff;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
}
/* De-Construction's steamroller logo, narrower than a story photo so the line art reads as a mark. */
.who-story-photo.de-logo { width: min(37.5rem, calc(100% - 2 * var(--page-padding))); }/* De-Construction's deck sits 100px closer to the intro text above it. */
.de-construction-page .pitch-book { margin-top: calc(4rem - 100px); }
/* Pinned DE card: sit lower so its drop shadow clears the white strip under the header */
.de-construction-page .book-sticky { padding-top: 150px; }
.de-construction-page .book-sticky .pitch-book { margin: 0 auto; }
.pitch-book-stage {
  position: relative;
  aspect-ratio: var(--page-aspect, 16 / 9);
  overflow: hidden;
  background: #fff;
  /* A subtle paper edge for the white pages. */
  box-shadow: 0 0 6px rgba(0, 0, 0, .07), 0 0 28px rgba(0, 0, 0, .12);
  user-select: none;
}
.pitch-book-page {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* WebGL page curl: a full-window layer above the header cutoff but below the header and menu,
   so a turned page can splay out across the screen. Script clips it to stay clear of the
   header cutoff and the deck's navigation row. */
.page-curl-canvas {
  position: fixed;
  z-index: 16;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* The turning sheet keeps the same paper shadow as the page at rest. */
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, .07)) drop-shadow(0 0 28px rgba(0, 0, 0, .12));
}
.page-curl-canvas[hidden] { display: none; }
/* Title, previous / page number / next, and PDF link. */
.pitch-book-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: .5rem;
  line-height: 1.2;
}
.pitch-book-pagination { display: flex; align-items: center; gap: 1rem; }
.pitch-book-toolbar [data-book-status] { font-variant-numeric: tabular-nums; }
.pitch-book-toolbar button,
.pitch-book-toolbar a {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}
.pitch-book-toolbar a { justify-self: end; }
.pitch-book-toolbar button:disabled { opacity: .3; }
.pitch-book-toolbar button:focus-visible,
.pitch-book-toolbar a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
/* Project introductions in the same large centered style as the personal bio. */
body.main-landing-page .about-content.rush-intro,
.terra-supra-page .about-content.project-intro,
.de-construction-page .about-content.project-intro,
.padded-workwear-page .about-content.project-intro,
.shoe-reviews-page .about-content.project-intro {
  position: relative;
  inset: auto;
  width: min(65rem, calc(100% - 2 * var(--page-padding)));
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 7rem) 0 clamp(5rem, 9vw, 10rem);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
body.main-landing-page .rush-intro .oracle-statement,
.terra-supra-page .project-intro .oracle-statement,
.de-construction-page .project-intro .oracle-statement,
.padded-workwear-page .project-intro .oracle-statement,
.shoe-reviews-page .project-intro .oracle-statement {
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.04em;
}
body.main-landing-page .rush-intro .bio-description,
.terra-supra-page .project-intro .bio-description,
.de-construction-page .project-intro .bio-description,
.padded-workwear-page .project-intro .bio-description,
.shoe-reviews-page .project-intro .bio-description {
  margin: 0;
  text-align: center;
  text-align-last: center;
  letter-spacing: inherit;
  text-wrap: pretty;
}
@media (max-width: 600px) {
  body.main-landing-page .rush-intro .oracle-statement,
  .terra-supra-page .project-intro .oracle-statement,
  .de-construction-page .project-intro .oracle-statement,
  .padded-workwear-page .project-intro .oracle-statement,
.shoe-reviews-page .project-intro .oracle-statement { font-size: 1.25rem; line-height: 1.1; }
}
/* Let the centered player scroll away with its page before the footer. */
.sotm-page .sotm { position: absolute; }

/* Group navigation glass into blocks; B-Side keeps its individual surface. */
.identity .menu-glass-group {
  position: relative;
  isolation: isolate;
  width: max-content;
  max-width: calc(100vw - 2 * var(--page-padding));
}
.identity .menu-primary-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .05rem;
}
.identity .menu-primary-group .project-nav-row { display: block; width: max-content; }
.identity .menu-glass-group::after,
.sotm-navigation::after {
  content: "";
  position: absolute;
  inset: -3px -6px;
  z-index: -1;
  border-radius: .3em;
  pointer-events: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.identity .menu-glass-group a:not(.contact-detail)::after,
.identity .menu-glass-group .contact-trigger::after,
.identity .menu-glass-group .project-menu-placeholder::after,
.identity .menu-glass-group .contact-menu-row.is-open::after,
.sotm-navigation > a::after { display: none; }
.sotm-navigation { isolation: isolate; width: max-content; }

/* ---------- Vendor invitation ---------- */
/* A paper envelope drawn in CSS, opening to a vertically tri-folded, two-sided invitation. */
.rush-invitation {
  width: min(38rem, calc(100% - 2 * var(--page-padding)));
  margin: 0 auto 4rem;
  color: #111;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
}
.invitation-scene { perspective: 1800px; }
.invitation-card {
  position: relative;
  width: 100%;
  aspect-ratio: 115 / 151;
  transform-style: preserve-3d;
  transition: transform 650ms cubic-bezier(.3,.05,.25,1);
  box-shadow: 0 2px 5px rgba(0,0,0,.05), 0 10px 28px rgba(0,0,0,.08);
}
.invitation-card.is-flipped { transform: rotateY(180deg); }
.invitation-face {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  object-fit: contain;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.invitation-back { transform: rotateY(180deg); }
.invitation-side { color: #888; }
.invitation-flip { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; }
.invitation-flip:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .invitation-card { transition: none; } }
/* The display is locked to the card width as its height expands. */
.invitation-display { position: relative; width: 100%; max-width: 100%; min-width: 0; height: auto; aspect-ratio: auto; }
.invitation-display .invitation-scene { position: absolute; top: 0; left: 0; width: 100%; max-width: 100%; visibility: hidden; transform-origin: center; }
.is-envelope-open .invitation-display .invitation-scene { visibility: visible; }
.invitation-envelope {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 2.3;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  letter-spacing: inherit;
  perspective: 1400px;
  box-shadow: 0 0 6px rgba(0, 0, 0, .07), 0 0 28px rgba(0, 0, 0, .12);
}
.invitation-envelope:focus-visible { outline: 1px solid #111; outline-offset: 6px; }
.envelope-body { position: absolute; inset: 0; background: #eeeae3; border: 1px solid #dfdbd4; }
.envelope-paper { position: absolute; inset: 8% 5%; background: #fff; box-shadow: 0 0 4px #00000016; }
.envelope-pocket {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, #faf8f4, #eeeae3);
  clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
}
.envelope-flap {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: center top;
  background: linear-gradient(#f8f6f1, #e4dfd6);
  clip-path: polygon(0 0, 100% 0, 50% 56%);
  backface-visibility: visible;
}
.is-envelope-open .invitation-envelope { visibility: hidden; pointer-events: none; }
.invitation-unfold { position: absolute; top: 0; left: 0; width: 100%; max-width: 100%; aspect-ratio: 115 / 151; perspective: 1800px; transform-style: preserve-3d; transform-origin: center; pointer-events: none; }
.invitation-fold-panel { position: absolute; left: 0; width: 100%; height: 33.33334%; transform-style: preserve-3d; }
.fold-top { top: 0; transform-origin: center bottom; }
.fold-middle { top: 33.33333%; }
.fold-bottom { top: 66.66666%; transform-origin: center top; }
.fold-front, .fold-back { position: absolute; inset: 0; backface-visibility: hidden; }
.fold-front { background-color: #fff; background-size: 100% 300%; background-repeat: no-repeat; }
.fold-back { transform: rotateX(180deg); background: linear-gradient(#fafafa, #eaeaea); }
.invitation-reset { grid-column: 3; grid-row: 2; justify-self: end; border: 0; padding: 0; color: inherit; background: transparent; font: inherit; }
.invitation-flip[hidden], .invitation-reset[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .invitation-envelope *, .invitation-unfold * { animation: none; } }
.invitation-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .75rem;
  line-height: 1.2;
}
.invitation-toolbar > span:first-child { grid-column: 1; grid-row: 1; justify-self: start; }
.invitation-toolbar .invitation-side { grid-column: 2; grid-row: 1; justify-self: center; }
.invitation-open, .invitation-flip {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
.invitation-open { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: right; }
.invitation-open[hidden] { display: none; }
.invitation-open:focus-visible { outline: 1px solid #111; outline-offset: 4px; }
/* Hide the flat card while the temporary paper panels fold back into the envelope. */
.is-envelope-closing .invitation-display .invitation-scene { visibility: hidden; }
.identity .menu-primary-group .projects-label { white-space: nowrap; }

/* Restore the creator credit's original left edge at the page midpoint.
   On narrower screens it slides left just enough to keep its glass clear of the location and clock (--credit-left). */
:root { --credit-left: min(50%, calc(100% - var(--page-padding) - 25rem)); }
.top-meta-layout .projects-credit {
  left: var(--credit-left);
  right: auto;
  width: max-content;
  transform: none;
  text-align: left;
}

/* ---------- Rush Market story ---------- */
/* Compact graphic pair directly below the design collaboration passage. */
body.main-landing-page .about-content.rush-intro.rush-design-intro { padding-bottom: 0; }
.rush-graphic-pair {
  width: min(43.2rem, calc(100% - 2 * var(--page-padding)));
  margin: calc(5rem + 75px) auto calc(4rem + 25px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 2.4rem;
}
.rush-graphic-pair figure { position: relative; margin: 0; overflow: hidden; }
.rush-graphic-pair img { position: absolute; display: block; max-width: none; }
/* Frame the artwork within the supplied canvases; keep the source files intact. */
.rush-graphic-shirt { aspect-ratio: 3492 / 2074; }
.rush-graphic-shirt img { width: 137.4857%; height: 289.296%; left: -18.843%; top: -94.503%; }
.rush-graphic-logo { aspect-ratio: 1666 / 1071; }
.rush-graphic-logo img { width: 250.12%; height: 389.076%; left: -74.91%; top: -144.258%; }
.rush-graphic-pair .rush-graphic-logo { transform: translateY(15px); }
@media (max-width: 600px) { .rush-graphic-pair { gap: 1.2rem; } }

/* Menu artwork at 75% of the standard story image width. */
.who-story-photo.rush-menu-photo {
  width: min(48.75rem, calc((100% - 2 * var(--page-padding)) * .75));
}
.rush-menu-photo img {
  box-shadow: 0 2px 5px rgba(0, 0, 0, .05), 0 10px 28px rgba(0, 0, 0, .08);
}
/* Match the tight spacing between consecutive story photos. */
body.main-landing-page .who-story-photo:has(+ .who-story-photo) {
  margin-bottom: 8px;
}

/* A fixed cutoff beneath the header; the cover images conceal it when scrolled into view. */
.story-header-cover {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background: #fff;
  z-index: 15;
  pointer-events: none;
}
body.main-landing-page::before,
.who-fullscreen-photo,
.terra-fullscreen-photo,
.project-fullscreen-photo,
.de-fullscreen-video {
  z-index: 16;
}
/* Slide the paper above the open flap but behind the front pocket. */
.is-paper-extracting .envelope-flap { z-index: 0; }
.is-paper-extracting .envelope-paper { z-index: 1; }
.is-paper-extracting .envelope-pocket { z-index: 2; }
/* Three uncropped portraits share the standard gallery width and a common height. */
.who-story-photo.rush-portrait-row {
  display: grid;
  grid-template-columns: minmax(0, 1.075fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.who-story-photo.rush-video-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.rush-video-row video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}
@media (max-width: 700px) {
  .who-story-photo.rush-video-row { grid-template-columns: minmax(0, 22rem); justify-content: center; }
}
.rush-portrait-row img {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

/* ---------- Terra Supra story ---------- */
/* Reserved photography space while new project images are being made. */
.project-photo-placeholder {
  aspect-ratio: 3300 / 2550;
  background: #eee;
}
/* A cut-out image pinned to the right edge of the window (its shadow runs off the page).
   Each image sets --photo-width so its subject lands near the middle of the screen. */
.flush-right-photo { width: var(--photo-width, 67vw); margin: 0 0 4rem auto; }
.flush-right-photo img { display: block; width: 100%; height: auto; }
/* On Padded Workwear, the text after that photo sits 50px closer to it. */
.padded-workwear-page .flush-right-photo + .about-content.project-intro { margin-top: -50px; }
/* Closing walking shot: 15% larger, nudged 220px right, with the shadow's tail clipped at the right edge. */
.flush-right-photo.pad-final-photo { width: calc(var(--photo-width, 67vw) * 1.15); overflow: hidden; }
.pad-final-photo img { transform: translateX(220px); }

/* Pad pocket close-up: a toggle that fades in the view of the pad inside the pocket, then
   caption-style notes in three columns with arrows drawn by script up to the photo. */
.pad-detail { position: relative; }
.pad-detail-notes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 4.5rem;
  color: #111;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.2;
}
.pad-detail-notes p { margin: 0; }
@media (max-width: 700px) {
  .pad-detail-notes { grid-template-columns: 1fr; gap: 1.5em; margin-top: 2rem; }
  .pad-detail-arrows { display: none; }
}
.pad-detail-frame { position: relative; }
.pad-detail-inside {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
}
.pad-detail.is-showing-inside .pad-detail-inside { opacity: 1; }
.pad-detail-toolbar {
  margin-top: .5rem;
  text-align: right;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.2;
}
.pad-detail-toolbar button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  letter-spacing: inherit;
}
.pad-detail-toolbar button:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.pad-detail-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.pad-detail-arrows path:not([fill]) { fill: none; stroke: #111; stroke-width: 1; }
@media (prefers-reduced-motion: reduce) { .pad-detail-inside { transition: none; } }

/* Full-width walking render with the knee pad to his left and the calf pad to his right;
   arrows drawn by script. */
.who-story-photo.pad-render { position: relative; width: 100%; }
/* Pulled 100px toward a paragraph directly above (its white top overlaps the text's padding). */
.about-content + .who-story-photo.pad-render { margin-top: -100px; }
/* The render runs full width, but its caption keeps the usual photo bounds. */
.pad-render-caption { width: min(65rem, calc(100% - 2 * var(--page-padding))); margin-inline: auto; display: block; text-align: center; }
.pad-render .pad-render-knee,
.pad-render .pad-render-calf {
  position: absolute;
  height: auto;
}
/* The render is centered, so the pads sit evenly either side of him (34% and 66%). */
/* Grasshopper lattice frames: the stage pins to the screen while scrolling through the section,
   and script swaps frames with scroll progress (about 14% of a screen of scroll per frame). */
.pad-cycle { height: calc(7 * 14svh + 100svh); margin-top: -200px; }
.pad-cycle-stage {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  height: 100svh;
  /* Above the text (z 2) but below the header cover (15) and menu (20+). */
  z-index: 3;
  pointer-events: none;
}
/* Script adds .is-pinned while the stage is locked in place. The paragraphs either side overlap the
   section, so they fade out (as a whole) while it's pinned and fade back in when it lets go. */
.pad-cycle + .about-content,
.about-content:has(+ .pad-cycle) { transition: opacity .5s ease; }
.pad-cycle.is-pinned + .about-content,
.about-content:has(+ .pad-cycle.is-pinned) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .pad-cycle + .about-content,
  .about-content:has(+ .pad-cycle) { transition: none; }
}
/* Pull the text after the animation up toward the closing (wide, shorter) frame: about 176px gap at 1440×900. */
.pad-cycle + .about-content.project-intro { margin-top: -203px; }
/* CLO3D fit walk: 13 frames of the avatar walking toward the camera, in a wider stage capped at 80% of the window height. */
.pad-cycle.fit-cycle { height: calc(13 * 10svh + 100svh); margin-top: -120px; }
/* Two walking views, then the hammer loop close-up on the right. The walking views share one vertical crop
   (824 units: side view's head to its shadow), so their relative scale is kept. The close-up is 82% of the
   back walker's head-to-right-foot height (rows 82–700 of 824 → 507 units tall, 402 wide), centered on that
   span; its 138-unit top margin is written as a % of its own 402-unit column width. */
.who-story-photo.pad-clo-views-row {
  display: grid;
  /* An empty 40px track before the close-up separates it from the walkers (56px with both 8px gaps). */
  grid-template-columns: minmax(0, 526fr) minmax(0, 311fr) 40px minmax(0, 402fr);
  gap: 8px;
  align-items: start;
}
/* Group scaled up 8% (more slides the side walker under the fixed left menu), pinned to the usual right edge and allowed past the left edge (the side walker has no
   hard left edge, so the extra width there reads as centered). Never wider than the page minus the right margin. */
.who-story-photo.pad-clo-views-row {
  --row-w: min(65rem, calc(100% - 2 * var(--page-padding)));
  width: min(calc(var(--row-w) * 1.08), calc(100% - (100% - var(--row-w)) / 2));
  margin-right: calc((100% - var(--row-w)) / 2);
  margin-left: auto;
}
.pad-clo-views-row img:last-child { grid-column: 4; margin-top: calc(138 / 402 * 100%); }
/* Back walker nudged 20px toward the side walker; multiply keeps its white background from hiding the
   side walker's faint shadow where they overlap. */
.pad-clo-views-row img:nth-child(2) { transform: translateX(-20px); mix-blend-mode: multiply; }
/* Kick render runs edge to edge across the window. */
.who-story-photo.pad-full-width { width: 100%; }
/* Kick render right after the walk: ~128px below its last frame at 1440×900. */
.pad-cycle.fit-cycle + .who-story-photo { margin-top: 104px; }
/* The stage starts below the fixed white header cover (~110px tall) so the avatar's head is never hidden under it. */
.fit-cycle .pad-cycle-stage { box-sizing: border-box; padding: 120px 0 24px; }
.fit-cycle .pad-cycle-stage img { width: min(65rem, calc((100svh - 144px) * 1536 / 1384), calc(100% - 2 * var(--page-padding))); }
.pad-cycle-stage img {
  grid-area: 1 / 1;
  width: min(36rem, 64svh, calc(100% - 2 * var(--page-padding)));
  height: auto;
  visibility: hidden;
}
.pad-cycle-stage img.is-active { visibility: visible; }
/* The closing frame (the lattice lofted into the pad shape) is much wider, so it gets the usual photo width. */
.pad-cycle-stage img.pad-cycle-wide { width: min(65rem, calc(100% - 2 * var(--page-padding))); }
/* Pad prototype photos side by side with the site's 8px photo gap. */
.who-story-photo.pad-iteration-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
/* Print-bed photo (3:4) beside the two flex photos (16:9): columns sized by aspect ratio so all
   three share one height; cover trims the sub-pixel difference the gaps leave. */
.who-story-photo.pad-flex-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7.111fr) minmax(0, 7.111fr);
  gap: 8px;
}
.pad-flex-row img { height: 100%; object-fit: cover; }
/* Three 3:4 process photos and a 9:16 video in one row: columns sized by aspect ratio
   (0.75 : 0.5625 = 4 : 3) so all four share one height. */
.who-story-photo.pad-process-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 8px;
  margin-top: calc(8px - 4rem);
}
.pad-process-row img,
.pad-process-row video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Captions sit under each photo and the video: the caption joins the grid (display: contents) so each
   span lands in its photo's column. The grid gap already spaces them from the photos. */
.pad-process-row .pad-process-caption { display: contents; }
.pad-process-caption span { grid-row: 2; }
.pad-process-caption span:nth-child(1) { grid-column: 1; }
.pad-process-caption span:nth-child(2) { grid-column: 2; }
.pad-process-caption span:nth-child(3) { grid-column: 3; }
.pad-process-caption span:nth-child(4) { grid-column: 4; }
/* Three 3:4 workshop photos and one 4:3: columns sized by aspect ratio (0.75 : 1.333 = 9 : 16)
   so all four share one height. */
.who-story-photo.pad-workshop-row {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 9fr) minmax(0, 9fr) minmax(0, 16fr);
  gap: 8px;
}
.pad-workshop-row img { height: 100%; object-fit: cover; }
/* Shift the side views left so the pads (not the spines sticking out on the left) look centered;
   25px short of true center, since the pads' light right ends read as lighter mass. */
.pad-side-views img { transform: translateX(-3.94%); }
.pad-render .pad-render-knee { left: 20%; top: 36%; width: 14%; }
.pad-render .pad-render-calf { left: 66%; top: 40%; width: 16.5%; transform: scaleX(-1); }
/* Images stacked one above another, centered, 8px apart. */
.who-story-photo.photo-stack {
  display: grid;
  gap: 8px;
  width: min(1008px, calc(100% - 2 * var(--page-padding)));
  /* Sits 15px closer to the text above it. */
  margin-top: -15px;
}
.photo-stack img { display: block; width: 100%; height: auto; }
/* Reserved space for a video that hasn't been added yet. */
.project-video-placeholder {
  aspect-ratio: 16 / 9;
  background: #eee;
}
/* Give render compositions more breathing room between photo placeholders. */
.terra-split-render,
.terra-orbit-stack {
  margin-top: 8rem;
  margin-bottom: 8rem;
}
/* The orbit stack closes the page; script.js sets the space below it so the renders stay in view at the bottom */
.terra-orbit-stack { margin-bottom: 0; }
.terra-split-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(26rem, 100%);
  margin: 1.5rem auto 0;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
}
/* Match the SOTM slider's single-pixel track and small round handle. */
.terra-split-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 1.3em;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  accent-color: #111;
  font: inherit;
  cursor: ew-resize;
}
.terra-split-slider:focus-visible { outline: 1px solid #111; outline-offset: 5px; }
.terra-split-slider::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
.terra-split-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}
.terra-split-slider::-moz-range-track { height: 1px; background: var(--ink); }
.terra-split-slider::-moz-range-progress { height: 1px; background: var(--ink); }
.terra-split-slider::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}
/* The adaptations diagram sits close to its introduction and shifts left within the page. */
.terra-adaptations-diagram { margin-top: 0; margin-bottom: calc(1rem + 75px); transform: translate(-100px, 10px); }
.terra-supra-page .about-content.project-intro:has(+ .terra-adaptations-diagram) {
  padding-bottom: 2rem;
}
/* Outsole detail at 75% of the standard story-image width. */
.who-story-photo.terra-outsole-render {
  width: min(48.75rem, calc((100% - 2 * var(--page-padding)) * .75));
}
/* Bring the outsole explanation closer to the adaptations diagram. */
.terra-supra-page .terra-adaptations-diagram + .about-content.project-intro {
  padding-top: 1rem;
}
/* Balance the spacing above and below the outsole explanation. */
.terra-supra-page .about-content.project-intro:has(+ .terra-outsole-render) {
  padding-bottom: calc(2rem + 65px);
}
/* Extra room before the placeholder following the outsole render. */
.terra-outsole-render:has(+ .project-photo-placeholder) {
  margin-bottom: calc(4rem + 50px);
}
/* Crop inside the scanned paper border without altering the source image. */
.terra-sketch-photo {
  aspect-ratio: 2448 / 1880;
  overflow: hidden;
  position: relative;
}
.terra-sketch-photo img {
  position: absolute;
  max-width: none;
  width: 104.166667%;
  height: auto;
  left: -2.083333%;
  top: -2.712766%;
}
/* Carbon campaign images remain uncropped in one row. */
.who-story-photo.terra-carbon-marketing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.terra-carbon-marketing img { min-width: 0; }

/* B-Side Projects: a record-sleeve tracklist. Number, name, date per line; the image shows on hover (touch: on tap). */
.bside-page { display: block; }
.bside {
  width: min(52rem, calc(100% - 2 * 14rem));
  margin: 0 auto;
  min-height: 100svh;
  box-sizing: border-box;
  /* The first track number starts level with "Who am I?" (script.js measures and sets --bside-top) */
  padding: var(--bside-top, 160px) 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-family: "Portfolio Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/* B-Side page: the description under the B-Side Projects button, on the same blurred glass as the menu.
   Narrow enough to stay clear of the track numbers. */
/* The glass is the box itself (padding + backdrop blur), so if it runs out of room above SOTM it can scroll
   inside the glass; script.js caps its height (--note-max) to the space left. */
.identity .b-side-note {
  box-sizing: border-box;
  width: min(12rem, calc(100vw - 2 * var(--page-padding)));
  max-height: var(--note-max, none);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 0 0 -6px;
  padding: 3px 6px;
  border-radius: .3em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .25) transparent;
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.3;
}
/* Phones and small screens (where the menu sits behind the logo): the description moves above the list instead */
.bside-note-top { display: none; }
@media (max-width: 1100px) {
  .identity .b-side-note { display: none; }
  .bside-note-top {
    display: block;
    max-width: 34em;
    margin: 0 0 2.5rem;
    font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.35;
  }
}
/* Wide screens: the tracklist always starts right of the description (16rem in), centred when there's room */
@media (min-width: 1101px) {
  .bside {
    width: min(52rem, calc(100% - 30rem));
    margin-left: max(16rem, calc((100% - min(52rem, calc(100% - 30rem))) / 2));
    margin-right: auto;
  }
}
/* Sub info (track number, date, zoom hint) uses the photo-caption Helvetica (.who-story-caption) */
.bside-no, .bside-date, .bside-hint {
  font-family: "Portfolio Helvetica Neue Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
}
.bside-list { list-style: none; margin: 0; padding: 0; }
/* Left column: track number with the date under it. Right: the title.
   Titles never wrap; only if a screen is truly too narrow does the title trim with an ellipsis. */
.bside-track {
  --bside-gap: 1.25rem;
  --bside-name-size: clamp(1.5rem, 3.5vw, 4.5rem);
  display: grid;
  grid-template-columns: auto minmax(0, max-content) 1fr;
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "no name hint" "date name ." ". name .";
  align-items: start;
  column-gap: var(--bside-gap);
  row-gap: 0;
  padding: 1rem 0;
  outline: none;
  cursor: pointer;
}
.bside-no, .bside-date { font-variant-numeric: tabular-nums; line-height: 1; text-align: right; }
/* Nudge the number down so it lines up with the top of the title's capitals */
.bside-no { grid-area: no; margin-top: calc(var(--bside-name-size) * .18); }
.bside-date { grid-area: date; }
/* Zoom hint for 3D tracks: right of the title, level with the track number, only while the model is open */
.bside-hint { grid-area: hint; display: none; margin-top: calc(var(--bside-name-size) * .18); line-height: 1; white-space: nowrap; }
.bside-track.is-open .bside-hint { display: block; }
.bside-hint-touch { display: none; }
@media (hover: none) {
  .bside-hint-mouse { display: none; }
  .bside-hint-touch { display: inline; }
}
.bside-name { grid-area: name; }
/* Same size as the project text blocks (.project-intro .oracle-statement) */
.bside-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--bside-name-size);
  font-weight: 700;
  letter-spacing: -.04em;
  /* Taller line box so descenders (g, p, y) aren't clipped by the ellipsis overflow */
  line-height: 1.2;
}
/* Long titles marked to wrap onto a second line instead of trimming */
.bside-name.bside-name-wrap { white-space: normal; overflow: visible; text-overflow: clip; text-wrap: balance; }
.bside-img { display: none; }
/* Opened line: the image sits under the title, no taller than most of the screen */
.bside-track.is-open .bside-img {
  display: block;
  grid-column: 2 / -1;
  justify-self: start;
  grid-row: 4;
  max-width: 100%;
  max-height: 70svh;
  width: auto;
  height: auto;
  margin: .75rem 0 1rem;
}
/* Fading image tracks: each image fades in over the one before, then the last fades out to reveal the first,
   on a loop while open (sketch → finished shoe → close-up → back to sketch) */
/* Any number of images: script.js runs the loop (4s per image, 1.2s fades) while the track is open.
   Each fade sets its frame shape with --fade-ratio; images of other shapes sit centred inside it on white. */
.bside-track.is-open .bside-fade {
  position: relative;
  width: min(100%, calc(70svh * (var(--fade-ratio, 2000 / 1545))));
  aspect-ratio: var(--fade-ratio, 2000 / 1545);
}
/* White behind each image fills the whole frame, so a narrower image fully covers the one before as it fades in */
/* Images narrower than the frame sit against its left edge, in line with the title above */
.bside-fade img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; background: #fff; }
.bside-fade img + img { position: absolute; inset: 0; opacity: 0; }
@media (max-width: 600px) {
  .bside-track.is-open .bside-img { grid-column: 1 / -1; grid-row: 4; width: 100%; max-height: none; }
}
/* 3D model tracks: the stage runs the full width and height of the screen, so the model only clips at the
   screen's edges. script.js pulls it out to the left edge (--model-x / --model-w) and sets the starting zoom. */
.bside-track.is-open .bside-img.bside-model {
  position: relative;
  z-index: 1;
  justify-self: stretch;
  width: auto;
  max-width: none;
  height: 65svh;
  max-height: none;
  aspect-ratio: auto;
  /* Negative side margins reach the screen edges without widening the grid columns above */
  margin-left: var(--model-x, 0px);
  margin-right: var(--model-r, 0px);
  background: transparent;
  --poster-color: transparent;
  cursor: grab;
}
/* Extra images under a track's 3D model, stacked and scrolled through */
.bside-gallery { display: none; }
.bside-track.is-open .bside-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: 2 / -1;
  grid-row: 5;
  margin-bottom: 1rem;
}
/* Side-by-side variant: the images sit in one row of equal-width columns (two per row on phones), centred vertically */
.bside-track.is-open .bside-gallery.bside-gallery-row {
  display: grid;
  grid-template-columns: repeat(var(--row-count, 4), minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  /* Nudged 25px left of the title line, with extra room before the next track */
  transform: translateX(-25px);
  margin-bottom: 3rem;
}
.bside-gallery.bside-gallery-row img { width: 100%; height: auto; max-height: none; }
@media (max-width: 600px) {
  .bside-track.is-open .bside-gallery.bside-gallery-row { --row-count: 2; transform: none; }
}
/* Tracks that are only a stack of images (no 3D model above): the stack sits right under the title */
.bside-track.is-open:not(:has(.bside-model)) .bside-gallery { grid-row: 4; margin-top: .75rem; }
.bside-gallery img { display: block; max-width: 100%; max-height: 70svh; width: auto; height: auto; }
@media (max-width: 600px) {
  /* Phones: the zoom hint drops to its own line under the title so long titles stay whole */
  .bside-track.is-open .bside-hint { grid-area: auto; grid-column: 2 / -1; grid-row: 4; margin-top: .5rem; }
  .bside-track.is-open .bside-img.bside-model { grid-row: 5; }
  .bside-track.is-open .bside-gallery { grid-column: 1 / -1; grid-row: 6; }
  .bside-gallery img { width: 100%; max-height: none; }
}
/* No grey loading bar across the top of the model */
.bside-model::part(default-progress-bar) { display: none; }
@media (max-width: 1100px) {
  .bside { width: calc(100% - 2 * var(--page-padding)); min-height: 0; padding: 2rem 0 8rem; }
}
@media (max-width: 600px) {
  .bside-name { line-height: 1.25; }
  .bside-track { --bside-gap: .75rem; --bside-name-size: 1.25rem; }
}
