/* Page chrome for the working résumé. Scoped to html.rv-site so a lab
   that links this file without that class is unchanged. */

html.rv-site {
  scroll-behavior: smooth;
  color-scheme: dark;
  background: var(--rv-bg);
  color: var(--rv-ink);
  caret-color: var(--rv-brass);
  scrollbar-color: var(--rv-scroll-thumb) var(--rv-bg);
}

html.rv-site[data-theme="dark"] { color-scheme: dark; }
html.rv-site[data-theme="light"] { color-scheme: light; }

@media (prefers-color-scheme: light) {
  html.rv-site:not([data-theme="dark"]) { color-scheme: light; }
}

html.rv-site,
html.rv-site *,
html.rv-site *::before,
html.rv-site *::after { box-sizing: border-box; }

html.rv-site body {
  margin: 0;
  background: var(--rv-bg);
  color: var(--rv-ink);
  font: 1.0625rem/1.65 var(--rv-sans);
  overflow-wrap: break-word;
}

html.rv-site [hidden] { display: none !important; }
html.rv-site h1,
html.rv-site h2,
html.rv-site h3,
html.rv-site h4 { text-wrap: balance; }
:where(html.rv-site) p { margin: 0; }
:where(html.rv-site) a { color: inherit; }
html.rv-site a.rv-skip { color: var(--rv-brass-ink); background: var(--rv-brass); }

html.rv-site :focus-visible {
  outline: 3px solid var(--rv-focus);
  outline-offset: 3px;
}

html.rv-site ::selection {
  background: var(--rv-brass);
  color: var(--rv-brass-ink);
}

html.rv-site main [id] { scroll-margin-top: calc(72px + 1.5rem); }

.rv-skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-150%);
  z-index: 40;
  background: var(--rv-brass);
  color: var(--rv-brass-ink);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
}

.rv-skip:focus { transform: none; }

.rv-wrap {
  width: min(70rem, calc(100% - 2rem));
  margin-inline: auto;
}

/* The canonical site header. Same structure, text and metrics on every
   surface; this room supplies its own ground, ink, muted and accent. */
html.rv-site .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--rv-header-bg);
  border-bottom: 1px solid var(--rv-line);
}

html.rv-site .site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  width: min(70rem, calc(100% - 2rem));
  min-height: 72px;
  margin-inline: auto;
}

html.rv-site .site-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--rv-ink);
  text-decoration: none;
}

html.rv-site .site-monogram {
  font: italic 30px/1 var(--rv-serif);
  letter-spacing: -0.04em;
  color: var(--rv-brass);
}

html.rv-site .site-name {
  display: flex;
  flex-direction: column;
  font: 15px/1.2 var(--rv-sans);
  color: var(--rv-ink);
}

html.rv-site .site-tagline {
  margin-top: 2px;
  font: 12px/1.3 var(--rv-mono);
  letter-spacing: 0.02em;
  color: var(--rv-muted);
}

html.rv-site .site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

html.rv-site .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--rv-ink);
  font: 12px/1 var(--rv-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

html.rv-site .site-nav a:hover { text-decoration-line: underline; text-decoration-color: var(--rv-muted); }
html.rv-site .site-nav a[aria-current="page"] { text-decoration-line: underline; text-decoration-color: var(--rv-brass); }

.rv-section { padding: 3.25rem 0; }
#work { padding-top: 0; }
#work > .rv-wrap { padding-top: 2.5rem; }
.rv-section + .rv-section,
.rv-band,
.rv-close { border-top: 1px solid var(--rv-line); }

/* Element defaults carry no specificity, so the component rules below win. */
:where(html.rv-site) h1,
:where(html.rv-site) h2,
:where(html.rv-site) h3 {
  margin: 0;
  font-family: var(--rv-serif);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--rv-ink);
}

:where(html.rv-site) h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); margin-bottom: 1rem; }
:where(html.rv-site) h3 { font-size: clamp(1.7rem, 2.5vw, 2.15rem); }

.rv-hero {
  display: block;
  padding: 4rem 0 2.5rem;
}

.rv-hero h1 {
  margin: 0 0 1.75rem;
  font-size: clamp(3.25rem, 8vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.rv-subtitle {
  margin: 1rem 0 0;
  color: var(--rv-brass);
  font: italic 1.25rem/1.35 var(--rv-serif);
}

.rv-hero h1 em,
.rv-statement em {
  font-style: italic;
  color: var(--rv-brass);
}

.rv-statement {
  margin: 2.25rem 0 1rem;
  max-width: 16ch;
  font-family: var(--rv-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.rv-lede,
.rv-intro,
.rv-status {
  max-width: 40rem;
  color: var(--rv-muted);
}

.rv-lede { max-width: 62ch; font-size: 1.125rem; line-height: 1.6; text-wrap: pretty; }
.rv-intro { margin-bottom: 0.75rem; }
.rv-status { margin-bottom: 2rem; }

.rv-guide {
  margin: 1.5rem 0 0;
  color: var(--rv-brass);
  font: 12px/1.5 var(--rv-mono);
  letter-spacing: 0.04em;
}

.rv-contents {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  padding: 0.25rem 0 1.5rem;
}

.rv-contents a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--rv-brass);
  font: 12px/1 var(--rv-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.rv-contents-rule {
  width: 1px;
  height: 1.25rem;
  background: var(--rv-line);
}

.rv-status-strip {
  background: var(--rv-surface);
  border-top: 1px solid var(--rv-line);
  border-bottom: 1px solid var(--rv-line);
}

.rv-status-strip-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rv-surface);
}

.rv-status-strip a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-height: 4.75rem;
  min-width: 0;
  padding: 0.85rem 0.95rem;
  background: var(--rv-surface);
  color: var(--rv-ink);
  text-decoration: none;
  border-top: 3px solid var(--rv-line);
  box-shadow: 1px 0 0 var(--rv-line), 0 1px 0 var(--rv-line);
}

.rv-status-strip a[href="#shipped"] { border-top-color: var(--rv-shipped); }
.rv-status-strip a[href="#building"] { border-top-color: var(--rv-building); }
.rv-status-strip a[href="#exploring"] { border-top-color: var(--rv-exploring); }
.rv-status-strip a[href="#learning"] { border-top-color: var(--rv-learning); }

.rv-status-word {
  font-family: var(--rv-serif);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.rv-status-strip .rv-count { margin-left: 0; }

.rv-status-strip a:hover { background: var(--rv-bg); }

.rv-register {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

.rv-group { min-width: 0; }

.rv-group + .rv-group {
  margin-top: 0;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rv-line);
}

.rv-group > h3 { margin-bottom: 1rem; }

.rv-count {
  margin-left: 0.7rem;
  color: var(--rv-brass);
  font: 12px/1 var(--rv-mono);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.rv-band { background: var(--rv-surface); padding: 3.25rem 0; }
.rv-band .rv-lede { margin-bottom: 1.75rem; }

.rv-labs {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.rv-labs a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  height: 100%;
  min-height: 100%;
  min-width: 0;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--rv-line);
  background: var(--rv-bg);
  text-decoration: none;
  color: var(--rv-ink);
}

.rv-lab-code {
  color: var(--rv-brass);
  font: 12px/1.4 var(--rv-mono);
  letter-spacing: 0.04em;
}
.rv-lab-name {
  font-family: var(--rv-serif);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.rv-lab-line { color: var(--rv-muted); }
.rv-labs a:hover,
.rv-labs a:focus-visible { background: var(--rv-bg); }

.rv-about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 1.5rem;
  align-items: start;
}

.rv-portrait { margin: 0; }

.rv-portrait-plate {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0;
  padding: 1rem 1rem 1.15rem;
  background: var(--rv-bg);
  color: var(--rv-ink);
  border: 1px solid var(--rv-line);
  box-shadow: inset 0 0 0 6px var(--rv-surface), inset 0 0 0 7px var(--rv-line);
}

.rv-portrait-index {
  color: var(--rv-brass);
  font: 12px/1.4 var(--rv-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rv-portrait-mark {
  font-family: var(--rv-serif);
  font-style: italic;
  font-size: 3.25rem;
  line-height: 1;
  color: var(--rv-brass);
}

.rv-portrait-plate strong {
  font-family: var(--rv-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.rv-frames {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

html.rv-site h3.rv-bio-placeholder {
  margin: 0 0 0.85rem;
  font-family: var(--rv-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--rv-ink);
}

.rv-about h3 { margin-bottom: 0.75rem; }
.rv-bio-note { max-width: 36rem; color: var(--rv-muted); margin-bottom: 1.25rem; }

.rv-bio-lines { display: grid; gap: 0.85rem; max-width: 36rem; }
.rv-bio-lines span {
  display: block;
  height: 0;
  border-bottom: 1px solid var(--rv-line);
}

.rv-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.75rem;
}

.rv-note h3 { font-size: clamp(1.45rem, 2vw, 1.85rem); margin: 0 0 0.65rem; }
.rv-note > p { color: var(--rv-muted); }

.rv-note a,
.rv-textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.35rem;
  color: var(--rv-brass);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.rv-note-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

.rv-close { padding: 3.5rem 0 4rem; }
.rv-close h2 { max-width: 12ch; font-size: clamp(2.5rem, 6vw, 4.25rem); }
.rv-close .rv-intro { margin-bottom: 0.5rem; }

/* Project notes, case pages and the project index: one reading column in the résumé room. */
.rv-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rv-doc { padding: 1.5rem 0 4rem; }

.rv-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-bottom: 1.5rem;
}

.rv-crumbs a,
.rv-doc-links a,
.rv-doc-neighbors a,
.rv-index h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--rv-brass);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.rv-crumbs a { font-size: 0.9375rem; }

.rv-doc-head { max-width: 68ch; }

html.rv-site .rv-doc h1 {
  margin: 0 0 1rem;
  max-width: 20ch;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.rv-doc-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin: 0 0 1.25rem;
  color: var(--rv-muted);
  font: 12px/1.6 var(--rv-mono);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.04em;
}

.rv-doc-lede {
  max-width: 62ch;
  font-size: 1.1875rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.rv-doc-lede + .rv-doc-lede { margin-top: 1rem; }

.rv-doc article > section {
  max-width: 68ch;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rv-line);
}

html.rv-site .rv-doc h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.rv-doc section > p { color: var(--rv-muted); text-wrap: pretty; }
.rv-doc section > p + p { margin-top: 1rem; }

.rv-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rv-doc-neighbors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 2rem;
  max-width: 68ch;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rv-line);
}

.rv-doc-neighbors a { flex-wrap: wrap; gap: 0 0.6rem; }
.rv-doc-neighbors span {
  display: inline-block;
  color: var(--rv-muted);
  font: 12px/1.4 var(--rv-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rv-index {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rv-index > li {
  padding: 1rem 0 1.15rem;
  border-bottom: 1px solid var(--rv-line);
}

.rv-index > li:first-child { padding-top: 0.25rem; }

html.rv-site .rv-index h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  line-height: 1.2;
}

.rv-index .rv-doc-status { margin: 0.1rem 0 0.4rem; }
.rv-index p { color: var(--rv-muted); max-width: 62ch; text-wrap: pretty; }

@media (min-width: 720px) {
  .rv-doc { padding-top: 2.25rem; }
  .rv-doc-neighbors { grid-template-columns: 1fr 1fr; }
  .rv-doc-neighbors a[rel="next"] { justify-content: flex-end; text-align: right; }
}

/* The canonical footer: one style on every surface. */
html.rv-site .site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 2rem;
  padding: 1.25rem max(1rem, calc((100% - 70rem) / 2)) 2.5rem;
  border-top: 1px solid var(--rv-line);
  color: var(--rv-muted);
  font: 12px/1.6 var(--rv-mono);
}

html.rv-site .site-footer-stamp { flex-basis: 100%; }
html.rv-site .site-footer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.75rem; }
html.rv-site .site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }

html.rv-site .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--rv-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (min-width: 640px) {
  .rv-labs { grid-template-columns: 1fr 1fr; }
  .rv-frames { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 800px) {
  .rv-status-strip-inner { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

@media (min-width: 1024px) {
  .rv-labs { grid-template-columns: 1fr 1fr 1fr; }
  .rv-about { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2.5rem; }
}

@media (max-width: 900px) {
  .rv-hero { padding-top: 2.25rem; }
}

@media (max-width: 760px) {
  .rv-notes { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  html.rv-site .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.25rem 0 0.5rem;
  }
  html.rv-site .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 12px;
  }
  html.rv-site main [id] { scroll-margin-top: 10rem; }
  .rv-contents-rule { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.rv-site { scroll-behavior: auto; }
  html.rv-site *,
  html.rv-site *::before,
  html.rv-site *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .rv-portrait-plate,
  .rv-labs a,
  .rv-status-strip a,
  .rv-slot-stage,
  .rv-plate,
  .rv-card {
    border-color: CanvasText;
  }
}
