/* dirkmueller.net — static, system fonts, no third-party assets.
   Design tokens: Pflichtenheft §5.2. Aliases keep the credit-list rules stable. */
:root {
  --color-text: #17212b;
  --color-muted: #4b5563;
  --color-bg: #ffffff;
  --color-surface: #f5f7fa;
  --color-border: #d5dbe3;
  --color-accent: #245b96;
  --color-accent-hover: #194773;
  --color-error: #a32020;
  --radius-control: 0.5rem;
  --radius-card: 1rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --content-max: 60rem;
  --archive-max: 72rem;
  --reading-max: 66ch;
  --header-offset: 5.5rem;

  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --charcoal: var(--color-text);
  --accent: var(--color-accent);
  --accent-hover: var(--color-accent-hover);
  --accent-soft: #e7eef6;
  --border: var(--color-border);
  --radius: var(--radius-card);
  --max: var(--content-max);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

[id] { scroll-margin-top: var(--header-offset); }

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--color-accent-hover); }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

a[href^="mailto:"],
.overflow-wrap { overflow-wrap: anywhere; }

.skip {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-150%);
  background: var(--color-text);
  color: #fff;
  padding: 0.65rem 1rem;
  min-height: 44px;
  z-index: 100;
  border-radius: var(--radius-control);
  text-decoration: none;
}
.skip:focus { transform: none; color: #fff; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.logo:hover { color: var(--color-accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  justify-content: flex-end;
}
.nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-control);
}
.nav a:hover { color: var(--color-accent); }
.nav a[aria-current="page"] {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.nav-cta {
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 999px;
  padding: 0.35rem 0.9rem !important;
}
.nav a.nav-cta:hover,
.nav a.nav-cta[aria-current="page"] {
  background: var(--color-accent-hover);
  color: #fff !important;
  text-decoration: none;
}

.nav-group { position: relative; }

.nav-sub-toggle {
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-muted);
  min-height: 44px;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-control);
  cursor: pointer;
}
.nav-sub-toggle:hover,
.nav-sub-toggle[data-current-section="true"] { color: var(--color-accent); }
.nav-sub-toggle[data-current-section="true"] {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 15rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 0.35rem;
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.1);
  z-index: 60;
  flex-direction: column;
}
.nav-group.is-open .nav-sub { display: flex; }
.nav-sub a {
  width: 100%;
  border-radius: var(--radius-control);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
#nav-toggle[hidden] { display: none !important; }

@media (min-width: 48.0625rem) {
  .nav-group:hover .nav-sub,
  .nav-group:focus-within .nav-sub,
  .nav-group.is-open .nav-sub { display: flex; }
}

main { min-height: 60vh; }

.page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
body[data-page="referenzen"] .header-inner,
body[data-page="referenzen"] .page,
body[data-page="referenzen"] .footer-inner {
  max-width: var(--archive-max);
}

.prose { max-width: var(--reading-max); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.25rem; }
.prose p,
.prose li { max-width: var(--reading-max); }

.section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.section > * + * { margin-top: 1rem; }

.section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.125rem, 3.4vw, 3rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.page h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.875rem, 3vw, 2.625rem);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5625rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

h3 { margin: 0 0 0.5rem; font-size: 1.375rem; line-height: 1.3; }

.lead { color: var(--color-muted); max-width: var(--reading-max); margin-top: 0; }

.hero-jobs {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--color-accent);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 1rem;
  color: var(--color-muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 0.45rem; }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--color-muted);
}

/* Hero: photo then text in the DOM. Same order on small screens.
   The portrait is 4:5. The oval frame stays 15×17.5rem; the image is
   aligned to the top so the head stays inside the frame. */
.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}
/* picture must stay a grid item. display:contents lets the source
   element take the first cell, which drops the text into the photo column. */
.hero picture {
  display: block;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  justify-self: center;
}
.hero picture source { display: none; }
.hero-copy { min-width: 0; }
.hero-photo {
  width: 15rem;
  height: 17.5rem;
  object-fit: cover;
  object-position: center top;
  border-radius: 28% / 22%;
  justify-self: center;
  border: 3px solid #fff;
  box-shadow: 0 8px 28px rgba(23, 33, 43, 0.14);
  background: var(--accent-soft);
}
.page > picture { display: block; max-width: 20rem; }
.portrait-frame {
  width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
  border-radius: 0.75rem;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.65rem;
}

.hero-sub {
  margin: 0 0 1.5rem;
  color: var(--color-text);
  max-width: var(--reading-max);
}

.hero-professions {
  color: var(--color-accent);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-actions a:not(.btn) { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }
.btn-ghost { border-color: var(--color-border); color: var(--color-text); }
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
button:disabled,
.btn:disabled { cursor: not-allowed; opacity: 0.7; }

.selected-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin-top: 0.5rem;
}
.selected-work {
  min-width: 0;
  border-top: 1px solid var(--color-border);
  padding-block: 1.25rem;
}
.selected-work h3 { margin-block: 0 0.35rem; overflow-wrap: anywhere; }
.selected-work p { margin: 0 0 0.35rem; }
.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: baseline;
  margin-top: 0.65rem;
}
.work-links a { font-weight: 700; }
.work-source {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.service-blocks {
  display: grid;
  gap: 1.25rem 2rem;
  margin-top: 0.25rem;
}
.service-blocks section {
  min-width: 0;
  padding-top: 0.25rem;
}
.service-blocks h3 { margin-bottom: 0.35rem; }
.service-blocks p { margin: 0 0 0.5rem; max-width: var(--reading-max); }
.service-blocks a { font-weight: 700; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.project-card,
.service-card,
.info-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.15rem 1.35rem;
  min-width: 0;
}
.section-alt .project-card,
.section-alt .service-card { background: #fff; }

.project-card h3,
.service-card h3 { overflow-wrap: anywhere; }

.activity {
  margin: 0 0 0.75rem;
  color: var(--color-accent);
  font-weight: 700;
}

.card-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
}
.card-links a { font-weight: 600; }

.service-card p { margin: 0 0 1rem; color: var(--color-text); }
.service-card a { font-weight: 700; }

.draft-note {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-control);
  max-width: var(--reading-max);
}
.draft-note p { margin: 0; }
.draft-note strong { color: var(--color-accent); }

.fact-list { margin: 0; padding: 0; }
.fact-list div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}
.fact-list dt { font-weight: 700; }
.fact-list dd { margin: 0.25rem 0 0; max-width: var(--reading-max); }

.role-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 46rem;
}
.role-list li,
.plain-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-border);
  overflow-wrap: anywhere;
}
.role-list span,
.meta {
  display: block;
  margin-top: 0.2rem;
  color: var(--color-muted);
  font-size: 1rem;
}

.stats-strip { padding-top: 2.25rem; padding-bottom: 2.25rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  min-width: 0;
  min-height: 7.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.stat-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 20px rgba(36, 91, 150, 0.12);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.stat-card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.stat-number {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  text-align: center;
  overflow-wrap: anywhere;
}

.stats-source {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-muted);
}
.stats-source a {
  color: var(--color-muted);
  font-weight: 400;
}

.credit-panel[id] {
  scroll-margin-top: var(--header-offset, 5.5rem);
}

.contact-panel {
  max-width: var(--reading-max);
}
.contact-panel .email-line {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
.contact-help { margin: 1.5rem 0 0; padding-left: 1.2rem; }
.contact-help li { margin: 0.35rem 0; }

.contact-box {
  background: var(--color-text);
  color: #e8eaef;
  border-radius: var(--radius-card);
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.contact-box h2 { color: #fff; margin: 0 0 0.45rem; }
.contact-box p { margin: 0; color: #d5dbe3; max-width: 36rem; }
.contact-box a { color: #fff; }
.contact-box .btn-primary { background: #fff; color: var(--color-text); }
.contact-box .btn-primary:hover { background: var(--accent-soft); color: var(--color-accent); }
.contact-box .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.45); }
.contact-box .btn-ghost:hover { color: #fff; border-color: #fff; }
.copy-status { min-height: 1.5em; margin-top: 0.75rem; color: #fff; }

.page .copy-status { color: var(--color-text); }

.player-shell {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  max-width: 40rem;
}
.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
  margin: 1rem 0;
}
.player-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1rem;
}
.player-controls input[type="range"] { width: min(100%, 16rem); max-width: 100%; }

.credit-tools {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}
.credit-search {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
}
.credit-search label { font-weight: 700; display: block; margin-bottom: 0.35rem; }
.credit-search input[type="search"] {
  font: inherit;
  min-height: 44px;
  min-width: min(100%, 18rem);
  width: min(100%, 24rem);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  color: var(--color-text);
  background: #fff;
}
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-bar button {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
}
.filter-bar button[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
#credit-reset {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
}
#credit-reset:hover,
#credit-reset:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.filter-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-height: 1.5em;
}
.filter-status p { margin: 0; }

/* Highlights and full credit lists (preserved behavior) */
.highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 0 0 1.75rem;
}

.highlight {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  padding: 1.25rem 0;
  text-align: left;
  min-width: 0;
}

.highlight-title {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.highlight-title a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}
.highlight-title a:hover { color: var(--color-accent); text-decoration: underline; }

.highlight-role {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
}

.credit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.credit-grid-3 { grid-template-columns: repeat(3, 1fr); }
.credit-grid-3 > .credit-panel-wide { grid-column: 1 / -1; }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  min-width: 0;
}
.section-alt .card { background: var(--color-bg); }

.card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  color: var(--color-accent);
  overflow-wrap: anywhere;
}

.card ul { margin: 0; padding: 0; list-style: none; }
.card li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.card li:last-child { border-bottom: none; padding-bottom: 0; }
.card li span {
  display: block;
  font-size: 1rem;
  color: var(--color-muted);
  margin-top: 0.15rem;
}
.card li a { font-weight: 700; text-decoration: none; }
.card li a:hover { text-decoration: underline; }
.card em { font-style: italic; font-weight: 700; }

.card-sub {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.credit-count {
  display: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.credits-section > summary {
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.credits-section > summary::before { content: "▸"; }
.credits-section[open] > summary::before { content: "▾"; }
.credits-section > summary::-webkit-details-marker { display: none; }

.credit-scroll,
.credit-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

@media (min-width: 48.0625rem) {
  .service-blocks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .credit-scroll,
  .credit-list {
    max-height: 28rem;
    overflow-y: auto;
    overscroll-behavior: auto;
    padding-right: 0.35rem;
    scrollbar-width: thin;
  }
}

.credit-scroll > li[hidden],
.credit-list > li[hidden] {
  display: none !important;
}

.credit-more,
.credit-unfold {
  width: 100%;
  margin-top: 0.9rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: 1px solid #b7c8dc;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--color-accent);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.credit-more:hover,
.credit-more:focus-visible,
.credit-unfold:hover,
.credit-unfold:focus-visible {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.credit-more[hidden],
.credit-unfold[hidden] { display: none !important; }
.credit-more:not([hidden]) { display: block; }
.credit-unfold { display: none; }

.sync-note {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--color-muted);
  max-width: var(--reading-max);
}

.legal-page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.legal-page h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal-page h2 { margin: 2rem 0 0.75rem; font-size: 1.25rem; }
.legal-page p,
.legal-page address { max-width: var(--reading-max); }
.legal-page address { font-style: normal; line-height: 1.7; }

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 2rem 1.25rem;
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}
.footer-name {
  margin: 0;
  font-weight: 800;
  color: var(--color-text);
}
.footer-role,
.footer-brand p { margin: 0.25rem 0 0; color: var(--color-muted); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}
.footer-links a { font-weight: 600; }
.footer-copy {
  position: relative;
  display: inline-block;
  justify-self: start;
  margin: 0;
  color: var(--color-muted);
  max-width: 100%;
}

.homage-link {
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 0.45rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0;
}
.footer-copy:hover .homage-link,
.footer-copy:focus-within .homage-link {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.homage-link:focus-visible { opacity: 1; }

@media (max-width: 760px) {
  /* The hidden 2005 link sits in the line so it cannot widen the page. */
  .footer-copy { display: inline; }
  .homage-link {
    position: static;
    margin-left: 0.45rem;
    white-space: normal;
  }
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
  .footer-copy { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .credit-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 48rem) {
  body { font-size: 1.0625rem; }
  .section { padding-block: 2.25rem; }
  .page { padding-block: 2rem 3rem; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    justify-items: center;
    text-align: left;
    padding-block: 2rem;
  }
  .hero-copy { text-align: left; }
  .hero-photo { width: 12.5rem; height: 14.5rem; }
  .hero-actions { align-items: flex-start; }
  .header-inner { flex-wrap: wrap; align-items: center; }
  .nav {
    display: flex;
    position: static;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.25rem 0 0.75rem;
    gap: 0.15rem;
    max-height: none;
    overflow: visible;
  }
  .nav-sub {
    display: flex;
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0.25rem 0.75rem;
    min-width: 0;
    background: transparent;
  }
  .header-inner.nav-ready #nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-inner.nav-ready .nav { display: none; }
  .header-inner.nav-ready .nav.is-open { display: flex; }
  .header-inner.nav-ready .nav-sub { display: none; }
  .header-inner.nav-ready .nav-group.is-open .nav-sub { display: flex; }
  .highlights,
  .credit-grid,
  .credit-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .contact-box { text-align: left; }
}

@media (max-width: 40rem) {
  .selected-work-grid,
  .highlights { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 30rem) {
  .stats-grid { gap: 0.5rem; }
  .stat-card { min-height: 6.25rem; padding: 1rem 0.4rem; }
  .stat-label { font-size: 0.875rem; }
}

@media (max-width: 22rem) {
  .header-inner,
  .hero,
  .page,
  .section { padding-inline: 1rem; }
  .hero-photo { width: 11rem; height: 12.75rem; }
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-card {
    min-height: 4.5rem;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    text-align: left;
  }
  .stat-label { text-align: left; }
}

@media (min-width: 761px) {
  .credit-scroll.is-filtered > li[hidden] { display: none; }
}

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

.legacy-page {
  background: #000;
  color: #e10600;
  min-height: 100vh;
}
.legacy {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.25rem 1.25rem 4rem;
  text-align: center;
}
.legacy-kicker {
  margin: 0 0 1.75rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: #e10600;
}
.legacy-portrait {
  width: min(240px, 70vw);
  margin: 0 auto 1.75rem;
  filter: grayscale(1) contrast(1.08);
}
.legacy-name {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin: 0 0 2.25rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.05;
}
.legacy-name span {
  color: #fff;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 400;
}
.legacy-name strong {
  color: #e10600;
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 700;
}
.legacy-note {
  max-width: 28rem;
  margin: 0 auto 1.75rem;
  color: #f3f3f3;
  font-size: 0.98rem;
}
.legacy-page a { color: #e10600; text-underline-offset: 3px; }
.legacy-page a:hover { color: #fff; }
