@charset "UTF-8";

/* Fonts — self-hosted, source-prepared font-faces.css incorporated here to
   avoid automatic external requests. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(./assets/fonts/bricolage-grotesque-rwb-latin-1.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(./assets/fonts/instrument-sans-rwb-latin-2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(./assets/fonts/instrument-sans-rwb-latin-2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(./assets/fonts/instrument-sans-rwb-latin-2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(./assets/fonts/instrument-sans-rwb-latin-2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ----- Tokens ----- */
:root {
  --white: #FFFFFF;
  --navy: #001F4B;
  --red: #BE3144;
  --red-hover: #9E2536;
  --body: #26364A;
  --muted: #4A5A70;
  --pale-blue: #E9F4F8;
  --neutral: #F5F6F8;
  --on-navy-muted: #B8C7DA;
  --rule: #C9D3DE;
  --rule-on-navy: #2B4670;

  --display: 'Bricolage Grotesque', 'Helvetica Neue', sans-serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;

  --container: 1280px;
  --side: 48px;
  --section: 104px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.125rem; /* 18px desktop */
  line-height: 1.6;
}
#rwb-page { position: relative; width: 100%; min-height: 100vh; min-width: 0; }

a { color: var(--navy); }
a:hover { color: var(--red); }
img, svg { max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--side);
  padding-right: var(--side);
}

/* ----- Focus ----- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}
.rwb-on-navy a:focus-visible,
.rwb-on-navy button:focus-visible { outline-color: var(--white); }
/* Plain links on navy (footer "Back to top") go white -> pale on hover. */
.rwb-on-navy a:hover { color: var(--pale-blue); }
/* The inverse CTA is a pale button on navy; its label must stay NAVY. Keep a
   higher-specificity rule so the generic on-navy hover above can't recolor the
   text pale (which would be pale-on-pale). */
.rwb-on-navy a.rwb-btn-inverse:hover { background: var(--pale-blue); color: var(--navy); }
.rwb-on-navy a.rwb-btn-inverse:focus-visible { outline-color: var(--white); }

/* ----- Skip link ----- */
.rwb-skip {
  position: absolute;
  left: 24px; top: -80px;
  z-index: 60;
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  text-decoration: none;
}
.rwb-skip:focus { top: 16px; }

/* ----- Buttons ----- */
.rwb-btn-primary, .rwb-btn-secondary, .rwb-btn-inverse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 28px;
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  font-weight: 700;
  text-decoration: none;
  border-radius: 0;
  min-width: 0;
}
.rwb-btn-primary {
  background: var(--red);
  color: var(--white);
  transition: background-color .2s ease;
}
.rwb-btn-primary:hover { background: var(--red-hover); color: var(--white); }
.rwb-btn-secondary {
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
  transition: background-color .2s ease, color .2s ease;
}
.rwb-btn-secondary:hover { background: var(--navy); color: var(--white); }
.rwb-btn-inverse {
  background: var(--white);
  color: var(--navy);
  transition: background-color .2s ease;
}
.rwb-btn-inverse:hover { background: var(--pale-blue); color: var(--navy); }

/* ----- Header ----- */
#site-header { border-bottom: 1px solid var(--rule); background: var(--white); }
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--side);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}
#site-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--display);
  font-size: 1.375rem; /* 22px */
  font-weight: 700;
  letter-spacing: -0.02em;
}
#site-wordmark:hover { color: var(--navy); }
.wordmark-square { display: inline-block; width: 14px; height: 14px; background: var(--red); flex: none; }

#site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.rwb-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 1rem; /* 16px */
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.rwb-nav-link.nav-strong { font-weight: 600; color: var(--navy); }
.rwb-nav-link:hover { color: var(--navy); border-bottom-color: var(--red); }
#nav-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: 10px;
  padding: 0 16px;
  border: 2px solid var(--navy);
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
#nav-linkedin:hover { background: var(--navy); color: var(--white); }

/* Toggle hidden on desktop */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 2px solid var(--navy);
  border-radius: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 0.9375rem; /* 15px */
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.nav-toggle-label { line-height: normal; }
[hidden] { display: none !important; }

/* ----- Hero ----- */
.hero-inner {
  padding-top: 88px;
  padding-bottom: var(--section);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 64px 72px;
}
#hero-intro { flex: 999 1 560px; min-width: 0; }
#hero-eyebrow {
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow-rule { display: inline-block; width: 40px; height: 3px; background: var(--red); flex: none; }
#hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.5rem, 8vw, 7.75rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--navy);
  overflow-wrap: anywhere;
}
#hero-summary {
  margin: 32px 0 0;
  max-width: 640px;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.5;
  color: var(--body);
}
#hero-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
#hero-actions .rwb-btn-primary { gap: 12px; }
#hero-actions .rwb-btn-secondary { padding: 0 26px; }

#hero-now {
  flex: 1 1 340px;
  max-width: 420px;
  min-width: 0;
  background: var(--navy);
  color: var(--white);
  padding: 36px 36px 40px;
  box-shadow: 14px 14px 0 var(--red);
  margin-right: 14px;
  margin-bottom: 14px;
}
#hero-now-title {
  margin: 0 0 24px;
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}
.now-block { padding: 22px 0 0; }
.now-block-top { padding: 0 0 22px; border-bottom: 1px solid var(--rule-on-navy); }
.now-role {
  margin: 0;
  font-family: var(--display);
  font-size: 1.625rem; /* 26px */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--white);
}
.now-org { margin: 6px 0 0; font-size: 1rem; color: var(--pale-blue); }
.now-meta { margin: 4px 0 0; font-size: 0.875rem; color: var(--on-navy-muted); }

/* ----- Section common ----- */
.sec-index {
  margin: 0 0 14px;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.sec-index-on-navy { color: var(--on-navy-muted); }
.sec-title {
  margin: 0;
  font-family: var(--display);
  font-size: 3.25rem; /* 52px */
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.section-split {
  padding-top: var(--section);
  padding-bottom: var(--section);
  display: flex;
  flex-wrap: wrap;
  gap: 40px 72px;
}
.section-aside { flex: 1 1 240px; max-width: 320px; min-width: 0; }
.section-content { flex: 999 1 560px; min-width: 0; }

/* ----- Career ----- */
#career { border-top: 1px solid var(--rule); }
#career-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 0 48px;
}
.career-item { border-top: 4px solid var(--navy); padding: 24px 0 8px; min-width: 0; }
.career-role-type {
  margin: 0 0 14px;
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.career-role {
  margin: 0;
  font-family: var(--display);
  font-size: 2.25rem; /* 36px */
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.career-org { margin: 10px 0 0; font-size: 1.1875rem; color: var(--body); }
.career-meta { margin: 4px 0 0; font-size: 1rem; color: var(--muted); }

/* ----- Projects ----- */
#projects { background: var(--neutral); }
#projects .container { padding-top: var(--section); padding-bottom: var(--section); }
.projects-head { display: flex; flex-wrap: wrap; gap: 40px 72px; margin-bottom: 48px; }
#project-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.project-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}
.project-index {
  flex: 0 0 72px;
  font-family: var(--display);
  font-size: 2.75rem; /* 44px */
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--red);
}
.project-name {
  flex: 1 1 300px;
  margin: 0;
  font-family: var(--display);
  font-size: 2.125rem; /* 34px */
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy);
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-desc { flex: 2 1 340px; margin: 0; color: var(--body); min-width: 0; }
.project-stage {
  flex: 0 1 280px;
  margin: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  min-width: 0;
}
.project-stage-box {
  padding: 6px 12px;
  border: 1.5px solid var(--navy);
  background: var(--white);
  white-space: nowrap;
}

/* ----- Story ----- */
.story-main {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 820px;
  border-left: 4px solid var(--red);
  padding-left: 36px;
}
#story-text {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--navy);
}

/* ----- Interests ----- */
#interests { background: var(--pale-blue); }
#interests .container { padding-top: var(--section); padding-bottom: var(--section); }
#interests .sec-title { margin-bottom: 40px; }
#interest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 0;
  font-family: var(--display);
  font-size: clamp(1.875rem, 3.6vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--navy);
}
#interest-list li { display: inline-flex; align-items: baseline; }
#interest-list .slash { color: var(--red); padding: 0 0.32em; font-weight: 400; }

/* ----- LEGO ----- */
.lego-title { font-size: 2.5rem; /* 40px */ letter-spacing: -0.03em; line-height: 1.05; }
#lego-empty-state {
  flex: 999 1 560px;
  min-width: 0;
  border: 2px solid var(--navy);
  padding: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 56px;
}
#lego-motif {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 8px;
  max-width: 100%;
}
#lego-motif span { display: block; }
#lego-motif .motif-fill-navy { background: var(--navy); }
#lego-motif .motif-fill-red { background: var(--red); }
#lego-motif .motif-fill-pale { background: var(--pale-blue); }
#lego-motif .motif-square { border: 2px solid var(--navy); }
#lego-motif .motif-circle { border: 2px solid var(--navy); border-radius: 50%; }
.lego-empty-copy { flex: 1 1 280px; min-width: 0; }
#lego-empty-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.875rem; /* 30px */
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--navy);
}
#lego-empty-text { margin: 0; color: var(--body); }

/* ----- Media (Photos & Videos) ----- */
#media { background: var(--neutral); border-top: 1px solid var(--rule); }
.media-content { display: flex; flex-direction: column; gap: 64px; }
.media-sub-title {
  margin: 0 0 24px;
  padding-top: 20px;
  border-top: 4px solid var(--navy);
  font-family: var(--display);
  font-size: 1.875rem; /* 30px */
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy);
  overflow-wrap: anywhere;
}
#photo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 32px;
  max-width: 780px;
}
.photo-item { min-width: 0; }
.rwbm-photo-trigger { display: block; color: var(--navy); text-decoration: none; }
.rwbm-photo-frame {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--neutral);
  border: 2px solid var(--rule);
  transition: border-color .2s ease;
}
.rwbm-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* complete 3:4 photograph, letterboxed on --neutral, no face crop */
}
.photo-corner {
  position: absolute;
  right: 0; bottom: 0;
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
}
.rwbm-photo-trigger:hover .rwbm-photo-frame { border-color: var(--red); }
.rwbm-photo-trigger:hover { color: var(--navy); }
.photo-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.photo-caption-dot { display: inline-block; width: 8px; height: 8px; background: var(--red); flex: none; }
#video-empty-state {
  max-width: 780px;
  background: var(--white);
  border-left: 4px solid var(--red);
  padding: 32px 36px;
}
#video-empty-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.625rem; /* 26px */
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--navy);
}
#video-empty-text { margin: 0; color: var(--body); }

/* ----- Photo viewer (full-screen navy modal) -----
   One Previous and one Next button serve both breakpoints. On desktop the
   viewer is a grid: the bar spans the top, and the single #viewer-controls
   wrapper is display:contents so its two buttons drop into the left/right
   columns beside the figure (source RWBM_Viewer_Desktop, 64x64 beside figure).
   On mobile it is a flex column with the same two buttons in a 2-column grid
   below the figure (source RWBM_Viewer_Mobile). */
#photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 70; /* above header (55) and menu overlay (50) */
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.5;
  box-sizing: border-box;
  padding: 24px 40px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 16px 32px;
  overflow-y: auto;
}
#photo-viewer[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  #photo-viewer.is-opening { animation: viewer-fade 150ms ease; }
}
@keyframes viewer-fade { from { opacity: 0; } to { opacity: 1; } }
#photo-viewer a:focus-visible,
#photo-viewer button:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.viewer-bar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
#viewer-counter {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.375rem; /* 22px */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
}
.viewer-counter-dot { display: inline-block; width: 10px; height: 10px; background: var(--white); flex: none; }
#viewer-close {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  min-width: 52px;
  padding: 0 20px;
  box-sizing: border-box;
  background: var(--white);
  color: var(--navy);
  border: 0;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 1rem; /* 16px */
  line-height: 1.5; /* native source 24px at 16px; button UA default is line-height:normal */
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease;
}
#viewer-close:hover { background: var(--pale-blue); color: var(--navy); }
/* Desktop: the stage holds only the figure, in the middle column of row 2.
   The controls wrapper is display:contents so prev/next land in the side
   columns beside it. */
.viewer-stage {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#viewer-figure {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
#viewer-image {
  max-width: 100%;
  max-height: calc(100% - 52px);
  object-fit: contain; /* complete image fitted to stage, never cropped or upscaled */
}
#viewer-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  flex: none;
}
.viewer-caption-dot { display: inline-block; width: 8px; height: 8px; background: var(--white); flex: none; }

.viewer-controls { display: contents; }
.rwbm-viewer-nav {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sans);
  transition: background-color .2s ease, color .2s ease;
}
.rwbm-viewer-nav:hover { background: var(--white); color: var(--navy); }
/* Desktop: square 64x64 icon buttons beside the figure; text labels hidden. */
.rwbm-viewer-nav {
  grid-row: 2;
  justify-self: center;
  align-self: center;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#viewer-prev { grid-column: 1; }
#viewer-next { grid-column: 3; }
.viewer-nav-label { display: none; } /* desktop: icon only */
.viewer-nav-icon-mobile { display: none; } /* desktop uses the 24px icon */

/* Mobile: one labeled Previous/Next pair in a 2-column grid below the image. */
@media (max-width: 900px) {
  #photo-viewer {
    padding: 14px 20px 28px;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* flex column inherits desktop align-items:center; stretch so bar/controls fill width */
    gap: 16px;
  }
  .viewer-bar { min-height: 52px; }
  #viewer-counter { font-size: 1.25rem; /* 20px */ gap: 10px; letter-spacing: normal; }
  .viewer-counter-dot { width: 9px; height: 9px; }
  #viewer-close { gap: 8px; padding: 0 16px; }
  .viewer-stage { flex: 1 1 auto; }
  #viewer-figure { gap: 12px; }
  #viewer-caption { font-size: 0.8125rem; /* 13px */ gap: 8px; }
  #viewer-image { max-height: calc(100% - 50px); }
  .viewer-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    flex: none;
  }
  .rwbm-viewer-nav {
    grid-row: auto;
    justify-self: stretch; /* reset desktop justify-self:center so each button fills its column */
    width: auto;
    height: auto;
    min-height: 56px;
    gap: 10px;
    padding: 0 12px;
    font-size: 1rem; /* 16px */
    font-weight: 700;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  #viewer-prev { grid-column: auto; }
  #viewer-next { grid-column: auto; }
  .viewer-nav-label { display: inline; }
  .viewer-nav-icon-desktop { display: none; }
  .viewer-nav-icon-mobile { display: inline; }
}

/* ----- Contact ----- */
#contact { background: var(--navy); color: var(--white); }
.contact-inner {
  padding-top: var(--section);
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
#contact-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.25rem, 7vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--white);
  overflow-wrap: anywhere;
}

/* ----- Footer ----- */
#site-footer { background: var(--navy); }
.footer-inner {
  padding-bottom: 40px;
  border-top: 1px solid var(--rule-on-navy);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem; /* 15px */
  color: var(--on-navy-muted);
}
.footer-top { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); }

/* ----- Mobile menu ----- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--white);
  color: var(--navy);
  border-top: 6px solid var(--red);
  flex-direction: column;
  /* Reserve exactly the real header's painted height at the top; the first
     menu row (source y87 at 390x844) then clears the header. The menu list
     adds its own 16px below. */
  padding-top: var(--header-h, 65px);
  overflow-y: auto;
}
.mobile-menu.is-open { display: flex; }
.menu-list { flex: 1 1 auto; padding: 16px 20px 0; display: flex; flex-direction: column; }
.menu-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-height: 60px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  font-size: 1.75rem; /* 28px */
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy);
  text-decoration: none;
  /* At very narrow widths with enlarged root font, long labels (e.g.
     "Projects") are unbreakable anonymous flex text and force the overlay to
     scroll horizontally. Let them shrink and wrap instead. .menu-strong
     inherits both. */
  min-width: 0;
  overflow-wrap: anywhere;
}
.menu-link.menu-strong { min-height: 68px; font-size: 2.375rem; /* 38px */ font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.menu-link:hover { color: var(--red); }
.menu-num {
  font-family: var(--sans);
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--red);
}
.menu-cta { padding: 20px 20px 36px; }
#menu-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  background: var(--red);
  color: var(--white);
  font-size: 1.0625rem; /* 17px */
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease;
  /* Same enlarged-width safety as .menu-link: allow the label to shrink and
     wrap rather than forcing horizontal overflow of the overlay. */
  min-width: 0;
  overflow-wrap: anywhere;
}
#menu-linkedin:hover { background: var(--red-hover); color: var(--white); }

/* ----- Breakpoint: 900 and below — reproduce RWB_Mobile (390px) ----- */
@media (max-width: 900px) {
  :root { --side: 20px; --section: 56px; }
  body { font-size: 1.0625rem; } /* 17px mobile body */

  #site-nav { display: none; }
  .nav-toggle { display: inline-flex; }

  /* Header: normal height ~65px, padding 10px 16px 10px 20px, wordmark 20px,
     gap 10px, red marker 12x12. (Source RWB_Mobile header.) */
  .header-inner { flex-wrap: nowrap; padding: 10px 16px 10px 20px; gap: 10px; }
  #site-wordmark { gap: 10px; font-size: 1.25rem; /* 20px */ }
  .wordmark-square { width: 12px; height: 12px; }

  /* Reset desktop flex-basis values so columns stack without extra gaps. */
  .section-split { flex-direction: column; gap: 0; }
  .section-aside,
  .section-content,
  .story-main,
  #hero-intro,
  #hero-now,
  #lego-empty-state { flex: 1 1 auto; max-width: none; min-width: 0; }

  /* Section labels + titles (source: label 13 margin 10; title 40). */
  .sec-index { margin: 0 0 10px; font-size: 0.8125rem; }
  .sec-title { font-size: 2.5rem; /* 40px */ margin: 0 0 28px; }
  .section-aside { margin-bottom: 0; }

  /* ----- Hero (source: top48 side20 bottom56) ----- */
  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 48px;
    padding-bottom: var(--section);
    flex-wrap: nowrap;
  }
  /* Children wrap their own text instead of forcing the row intrinsic width;
     a column flex container still lets an unconstrained child push min-content
     width, so pin the child widths here. */
  #hero-intro { width: 100%; max-width: 100%; }
  #hero-eyebrow { margin: 0 0 20px; gap: 12px; font-size: 0.8125rem; /* 13px */ }
  .eyebrow-rule { width: 32px; height: 3px; }
  #hero-title { font-size: 4rem; /* 64px */ line-height: 0.95; }
  #hero-summary { margin: 24px 0 0; font-size: 1.1875rem; /* 19px */ line-height: 1.5; }
  #hero-actions { margin-top: 28px; gap: 12px; }
  /* source: aside margin 40 0 10 0 above summary spacing — top gap 40 */
  #hero-now {
    margin: 40px 10px 10px 0;
    width: calc(100% - 10px);
    max-width: 100%;
    padding: 28px 24px 30px;
    box-shadow: 10px 10px 0 var(--red);
  }
  #hero-now-title { margin: 0 0 18px; font-size: 0.75rem; /* 12px */ }
  .now-block { padding: 18px 0 0; }
  .now-block.now-block-top { padding: 0 0 18px; }
  .now-role { font-size: 1.4375rem; /* 23px */ line-height: 1.15; }
  .now-org { margin: 4px 0 0; font-size: 1rem; /* 16px */ }
  .now-meta { margin: 2px 0 0; font-size: 0.875rem; /* 14px */ }

  /* ----- Career (source: role card top navy 4, pad-top 18) ----- */
  .section-content #career-list { display: flex; flex-direction: column; gap: 28px; }
  .career-item { padding: 18px 0 0; }
  .career-role-type { margin: 0 0 10px; font-size: 0.75rem; /* 12px */ }
  .career-role { font-size: 1.75rem; /* 28px */ line-height: 1.1; }
  .career-org { margin: 6px 0 0; font-size: 1.0625rem; /* 17px */ }
  .career-meta { margin: 2px 0 0; font-size: 0.9375rem; /* 15px */ }

  /* ----- Projects (source: row 26 vertical, column, gap 10) ----- */
  .projects-head { margin-bottom: 0; gap: 0; }
  .project-item { flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px 0; }
  .project-index,
  .project-name,
  .project-desc,
  .project-stage { flex: 0 1 auto; }
  .project-index { font-size: 2.125rem; /* 34px */ }
  .project-name { font-size: 1.6875rem; /* 27px */ line-height: 1.1; }
  .project-desc { font-size: 1.0625rem; /* 17px */ line-height: 1.6; }
  /* Stage: single box (border/padding live on the box only, no duplication).
     Must wrap at ALL enlarged widths, not overflow. */
  .project-stage { justify-content: flex-start; margin-top: 4px; font-size: 0.75rem; /* 12px */ }
  .project-stage-box { padding: 5px 10px; border: 1.5px solid var(--navy); white-space: normal; }

  /* ----- Story (source: text 21 lh1.45, left pad 18 border-left 4) ----- */
  .story-main { border-left: 4px solid var(--red); padding-left: 18px; max-width: none; }
  #story-text { font-size: 1.3125rem; /* 21px */ line-height: 1.45; }
  #story .sec-title { margin: 0 0 24px; }

  /* ----- Interests (source: list 28 lh1.25, gap 4, slash pad .3em) ----- */
  #interests .sec-title { margin-bottom: 24px; }
  #interest-list { font-size: 1.75rem; /* 28px */ line-height: 1.25; gap: 4px 0; }
  #interest-list li { flex-wrap: wrap; }
  #interest-list .slash { padding: 0 0.3em; }

  /* ----- LEGO (source: title 32; card 28 24, column, gap 24) ----- */
  .lego-title { font-size: 2rem; /* 32px */ margin: 0 0 24px; }
  #lego-empty-state { flex-direction: column; align-items: flex-start; gap: 24px; padding: 28px 24px; }
  /* Reset desktop flex-basis so copy doesn't add 280px height in a column. */
  .lego-empty-copy { flex: 0 0 auto; }
  #lego-motif { grid-template-columns: repeat(3, 32px); grid-template-rows: repeat(3, 32px); gap: 6px; }
  #lego-empty-title { font-size: 1.5rem; /* 24px */ line-height: 1.2; margin: 0 0 8px; }
  #lego-empty-text { font-size: 1.0625rem; /* 17px */ line-height: 1.6; }

  /* ----- Media (source RWBM_Mobile: subheads 24, caption 13, copy 22) ----- */
  .media-content { gap: 40px; }
  .media-sub-title { margin: 0 0 18px; padding-top: 16px; border-top: 4px solid var(--navy); font-size: 1.5rem; /* 24px */ }
  #photo-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .photo-caption { font-size: 0.8125rem; /* 13px */ gap: 8px; }
  .photo-corner { width: 44px; height: 44px; }
  #video-empty-state { padding: 24px 20px; }
  #video-empty-title { font-size: 1.375rem; /* 22px */ margin: 0 0 6px; }

  /* ----- Contact (source: 56 20 48; title 56 lh.95 mb28; CTA full width) ----- */
  .contact-inner { padding-bottom: 48px; gap: 0; flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  /* The title wrapper (first child div) must be allowed to shrink so its
     "Contact" heading wraps at 200% rather than forcing 365px intrinsic width. */
  .contact-inner > div { min-width: 0; max-width: 100%; width: 100%; }
  #contact-title { font-size: 3.5rem; /* 56px */ line-height: 0.95; margin: 0 0 28px; }
  #contact .sec-index { margin: 0 0 10px; }
  #contact-linkedin { width: 100%; }

  /* ----- Footer (source: outer 0 20 32; divider inset 20; top 16; font 15) ----- */
  .footer-inner { padding-bottom: 32px; padding-top: 16px; }

  /* ----- Header above the open overlay ----- */
  body.menu-open #site-header {
    position: fixed;
    top: 6px;
    left: 0;
    right: 0;
    z-index: 55; /* above the overlay (z 50) */
    background: var(--white);
    border-bottom: 1px solid var(--rule);
  }
  /* Menu overlay inherits normal (not 1.6) line-height; keep header controls
     at normal line-height while open so the 65px header height holds. */
  body.menu-open #site-wordmark,
  body.menu-open .nav-toggle,
  .mobile-menu { line-height: normal; }
  /* Close button styling (source: navy background, white text). */
  body.menu-open .nav-toggle { background: var(--navy); color: var(--white); }
}

/* Source hero name is two lines ("Martín" / "Sosa"). A real <br>, shown only
   below 480px, forces the break without the single-line fit collapsing the
   layout 60.8px; above 480px the <br> is hidden and the normalized space keeps
   "Martín Sosa" on one line with no desktop layout shift. The accessible name
   stays "Martín Sosa" in both states. */
.hero-name-br { display: none; }
.hero-name-space { white-space: pre; }
@media (max-width: 480px) {
  #hero-title { white-space: normal; }
  .hero-name-br { display: inline; }
  .hero-name-space { display: none; }
}

/* Hero actions full width under 600px. */
@media (max-width: 600px) {
  #hero-actions { flex-direction: column; }
  #hero-actions > a { width: 100%; }
}

/* ----- No-JavaScript fallback: show real nav links in the wrapped header,
   hide the dead toggle. All same-page + LinkedIn links stay functional. ----- */
@media (max-width: 900px) {
  .no-js #site-nav { display: flex; }
  .no-js .nav-toggle { display: none; }
  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .mobile-menu { display: none !important; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Approved Bloom media layout adapted only to the personal palette and fonts. */
#media .personal-media-inner { padding-top:var(--section); padding-bottom:var(--section); }
#media .personal-media-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:40px; margin-bottom:32px; }
#media .sec-title { margin-bottom:0; }
#media .personal-media-intro { max-width:34ch; margin:0; }
#media .media-perspective { margin:16px 0 0; font-family:var(--display); font-size:1.875rem; line-height:1.2; font-weight:600; letter-spacing:-.025em; }
#media .media-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; align-items:start; }
#media .media-card { min-width:0; border:1px solid var(--rule); border-radius:18px; background:var(--white); overflow:hidden; }
#media .media-front { --photo-w:300px; padding:0 14px 26px; background:var(--white); text-align:center; }
#media .media-photo-stage { position:relative; height:calc(var(--photo-w)*4/3 + 108px); }
#media .media-photo-stage::before { content:''; position:absolute; inset:40px 10px; border:2px solid var(--navy); box-shadow:8px 8px 0 var(--red); transform:rotate(2deg); }
#media .media-photo-frame { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); margin:0; padding:12px; width:calc(var(--photo-w) + 24px); background:var(--white); border-radius:14px; box-shadow:0 13px 32px #001f4b16; z-index:1; }
#media .media-photo { display:block; width:var(--photo-w); height:auto; max-width:none; border-radius:3px; object-fit:contain; image-orientation:from-image; }
#media .media-photo-button { display:block; width:100%; padding:0; border:0; background:var(--white); border-radius:3px; cursor:pointer; }
#media .media-caption h3 { margin:0; font-family:var(--display); font-size:1.5rem; line-height:1.25; letter-spacing:-.02em; }
#media .media-date { font-size:.875rem; line-height:1.5; color:var(--body); margin:8px 0 4px; }
#media .media-role { font-size:.9375rem; line-height:1.5; margin:0 auto; max-width:27ch; }
#media .media-bio { font-size:1rem; line-height:1.6; margin:22px 6px 0; text-align:left; }
#media .media-bio-sources { font-size:.8125rem; line-height:1.6; margin:12px 6px 0; text-align:left; overflow-wrap:anywhere; }
#media .media-bio-sources a { color:var(--navy); text-underline-offset:3px; }
#media .media-bio-sources a[target=_blank]::after { content:' ↗'; }
#media button { font-family:var(--sans); color:var(--navy); }
#media .button.primary { display:inline-flex; align-items:center; justify-content:center; min-height:48px; max-width:100%; padding:12px 22px; border:1px solid var(--red); border-radius:0; background:var(--red); color:var(--white); font-size:.9375rem; line-height:1.5; font-weight:700; cursor:pointer; overflow-wrap:anywhere; }
#media .button.primary:hover { background:var(--red-hover); border-color:var(--red-hover); }
#media .media-read-question { margin-top:22px; }
#media .media-back { padding:24px 32px 30px; background:var(--white); }
#media .media-text-button { border:0; background:none; color:var(--navy); padding:8px 0; min-height:44px; font-size:.875rem; line-height:1.5; text-decoration:underline; text-underline-offset:4px; cursor:pointer; }
#media .media-reading { font-size:1.125rem; line-height:1.65; max-width:880px; margin:20px auto 0; }
#media .media-label { font-family:var(--display); font-size:.875rem; line-height:1.5; font-weight:700; letter-spacing:.07em; text-transform:uppercase; margin:0 0 18px; color:var(--navy); }
#media .media-question { margin:0; padding:0 0 0 26px; position:relative; }
#media .media-question::before { content:'“'; position:absolute; left:0; top:-14px; font:3.75rem/1 var(--display); color:var(--red); }
#media .media-question p { margin:0 0 15px; }
#media .media-question p:last-child { margin:0; }
#media .media-response-header { border-top:1px solid var(--red); margin-top:30px; padding-top:25px; }
#media .media-response-header .media-label { margin-bottom:8px; }
#media .media-provenance { font-size:.75rem; line-height:1.55; color:var(--body); margin:0 0 26px; }
#media .media-response-section { display:grid; grid-template-columns:182px minmax(0,1fr); gap:30px; align-items:start; }
#media .media-signpost { font-family:var(--display); font-size:1.0625rem; line-height:1.45; letter-spacing:0; margin:2px 0 0; font-weight:700; color:var(--navy); }
#media .media-response-copy { min-width:0; }
#media .media-response-paragraph { margin:0 0 22px; }
#media .media-response-paragraph:last-child { margin:0; }
#media .media-expand { margin-top:22px; }
#media .media-continuation { margin-top:26px; }
#media .media-section-two { border-top:1px solid var(--rule); padding-top:26px; margin-top:30px; }
#media .media-reading-actions { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-top:26px; }
#media .media-grid[data-reading=true] .media-card[data-face=question] { grid-column:1/-1; grid-row:1; }
#media .media-controls { display:none; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:16px; align-items:center; margin-top:20px; }
#media .media-controls button { min-height:46px; min-width:0; border:1px solid var(--navy); border-radius:0; background:var(--white); padding:10px 18px; font-size:.875rem; line-height:1.5; font-weight:700; overflow-wrap:anywhere; cursor:pointer; }
#media .media-controls button:disabled { opacity:.5; cursor:default; }
#media .media-controls button:last-child { background:var(--red); color:var(--white); border-color:var(--red); }
#media #conversation-status { font-size:.875rem; min-width:40px; text-align:center; font-variant-numeric:tabular-nums; }
#media .media-tabs { display:flex; gap:10px; border-bottom:1px solid var(--rule); margin:0 0 28px; padding-bottom:12px; }
#media .media-tabs [role=tab] { border:1px solid var(--navy); border-radius:0; background:var(--white); min-height:48px; min-width:110px; padding:10px 24px; font-size:1rem; font-weight:700; line-height:1.5; cursor:pointer; }
#media .media-tabs [aria-selected=true] { background:var(--red); border-color:var(--red); color:var(--white); }
#media .media-name-row { display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; margin:0 auto; }
#media .media-name-row .media-affiliation-logo { display:block; flex:0 0 32px; width:32px; height:32px; object-fit:contain; max-width:32px; filter:none; transform:none; }
#media .media-name-row h3 { min-width:0; }
#media .media-name-row .media-affiliation-arist { height:28px; width:32px; }
#media .media-video-empty { padding:36px 28px; border:1px solid var(--rule); border-radius:18px; max-width:720px; background:var(--white); }
#media .media-video-empty h3 { margin:0 0 12px; font-family:var(--display); font-size:1.5625rem; line-height:1.2; color:var(--navy); }
#media .media-video-empty p { margin:0; line-height:1.6; }
#media :is(button,a,[tabindex]):focus-visible { outline:3px solid var(--navy); outline-offset:4px; }
#media [role=tabpanel]:focus-visible { outline:3px solid var(--navy); outline-offset:6px; }
.no-js #media :is(.media-tabs,.media-controls,button) { display:none; }
.no-js #media .media-photo-button { display:block; cursor:default; }
@media (max-width:1200px) { #media .media-front { --photo-w:calc((100vw - 254px)/3); } }
@media (max-width:900px) { #media .personal-media-heading { flex-direction:column; align-items:flex-start; gap:24px; } #media .personal-media-intro { max-width:42ch; } #media .media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; } #media .media-front { --photo-w:calc((100vw - 180px)/2); } }
@media (max-width:850px) { #media .media-response-section { grid-template-columns:minmax(0,1fr); gap:16px; } #media .media-signpost { margin:0; } }
@media (max-width:700px) { #media .media-grid { display:block; } #media .media-front { --photo-w:min(330px,calc(100vw - 130px)); padding:0 14px 24px; } #media .media-controls { display:grid; } #media .media-back { padding:20px 20px 26px; } #media .media-reading { font-size:1.0625rem; } #media .media-caption h3 { font-size:1.4375rem; } #media .media-reading-actions { flex-wrap:wrap; } #media .media-perspective { font-size:1.6875rem; } #media .media-tabs { margin-bottom:22px; } #media .media-tabs [role=tab] { flex:1; min-width:0; padding:10px 18px; } .no-js #media .media-card { margin-bottom:20px; } }
@media (max-width:350px) { #media .media-name-row { gap:8px; } #media .media-name-row h3 { font-size:1.375rem; } }

/* Owner-approved Bloom project links; scoped to the personal portfolio. */
#projects .project-detail { flex:2 1 340px; min-width:0; }
#projects .project-links { display:flex; flex-wrap:wrap; align-items:center; gap:0 14px; margin-top:10px; }
#projects .project-links a { display:inline-flex; align-items:center; gap:6px; min-height:44px; color:var(--navy); font-size:0.8125rem; font-weight:600; line-height:1.35; text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }
#projects .project-links a svg { flex:none; }
#projects .project-links a:hover { color:var(--red); }
#projects .project-links a:focus-visible { outline:3px solid var(--navy); outline-offset:4px; }
@media (max-width:900px) { #projects .project-detail { flex:0 1 auto; width:100%; } }
@media (max-width:480px) { #projects .project-links { display:grid; grid-template-columns:repeat(2,max-content); column-gap:20px; } }
