/* Keep the opening footer in view until the next section takes over. */
.hero {
  display:flex;
  flex-direction:column;
  min-height:calc(100svh - var(--header-height));
}
.hero-content {flex:1;width:100%;margin:0 auto}
.hero-topline>span:only-child {display:block}
.hero-footer {
  position:sticky;
  bottom:0;
  z-index:5;
  flex-shrink:0;
  background:var(--paper);
}

/* Navigation controls share the same line box and vertical center. */
.site-header nav {height:100%}
.site-header #motion-toggle,
.work-menu summary,
.hello-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0;
  line-height:20px;
}
.work-menu summary {gap:8px}
.menu-icon {width:14px;height:14px;flex-shrink:0}
.site-header details[open] .menu-icon {transform:rotate(45deg)}
.hello-link {position:relative;gap:6px;border:0;list-style:none;cursor:pointer;white-space:nowrap}
.hello-link::-webkit-details-marker {display:none}
.hello-link::after {
  content:'';
  position:absolute;
  inset:auto 0 4px;
  height:1px;
  background:currentColor;
}

.project-menu,
.outreach-menu {
  top:calc(var(--header-height) - 8px);
  width:440px;
  min-width:0;
  max-width:calc(100% - 72px);
  max-height:calc(100svh - var(--header-height) - 16px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.outreach-menu {
  position:absolute;
  right:36px;
  width:320px;
  padding:12px;
  background:#fff9e9;
  border:1px solid #29232f40;
  border-radius:14px;
  box-shadow:7px 9px 0 #29232f,0 24px 60px #29232f30;
}
.outreach-menu a {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:72px;
  padding:13px 12px;
  border-radius:6px;
}
.outreach-menu a:hover,
.outreach-menu a:focus-visible {background:#f3cd44}
.outreach-menu a:focus-visible {outline-offset:0}
.outreach-copy {min-width:0}
.outreach-copy strong {display:block;font-size:19px;font-weight:500;line-height:24px}
.outreach-copy>span {display:block;margin-top:4px;font-size:13px;line-height:1.45;opacity:.75;overflow-wrap:anywhere}
.outreach-arrow {font-size:24px;flex-shrink:0}
.project-menu a {
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  align-items:start;
  gap:16px;
  padding:13px 12px;
}
.project-menu .menu-count {padding-top:2px;line-height:20px}
.menu-copy strong {display:block;font-weight:500;font-size:19px;line-height:24px}
.menu-copy p {margin:4px 0 0;font-size:13px;line-height:1.45;opacity:.75}
.project[hidden] {display:none}

/* Keep the in-person sharing shortcut available on phones, too. */
.site-header .qr-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  flex-shrink:0;
  border-radius:50%;
}
.qr-link svg {width:23px;height:23px}
.qr-link:hover {background:#f3cd44}
.work-menu summary .menu-label,
.work-menu summary .menu-label-compact {padding:0;font-size:inherit}
.work-menu summary .menu-label-compact {display:none}
.work-menu[open] summary .menu-label,
.work-menu[open] summary .menu-label-compact {transform:none}

/* Outreach stays together; the credit can settle onto its own line. */
.contact-bottom {display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:12px 28px;padding-top:18px}
.contact-links {display:flex;align-items:center;flex-wrap:wrap;gap:0 24px}
.contact-bottom a {display:inline-flex;align-items:center;gap:5px;min-height:44px}
.contact-bottom a:hover {text-decoration:underline;text-underline-offset:5px}
.contact-bottom .contact-credit {line-height:1.6}

@media (max-width:1100px) {
  .contact-bottom {grid-template-columns:minmax(0,1fr) auto auto}
  .contact-credit {grid-row:2;grid-column:1 / -1}
}

@media (max-width:700px) {
  .site-header {padding-inline:12px;gap:8px}
  .site-header .wordmark {font-size:32px;flex-shrink:0}
  .site-header nav {gap:8px;white-space:nowrap}
  .work-menu summary {gap:5px}
  .work-menu summary .menu-label {display:none}
  .work-menu summary .menu-label-compact {display:inline}
  .project-menu,
  .outreach-menu {right:18px;max-width:calc(100% - 36px);padding:12px}
  .project-menu a {padding:11px 8px;gap:10px}
  .menu-copy strong {font-size:17px;line-height:22px}
  .menu-copy p {font-size:12px}
  .contact-bottom {grid-template-columns:1fr auto;gap:8px 20px}
  .contact-links {grid-column:1 / -1;gap:0 24px}
  .contact-email {flex-basis:100%}
  .contact-bottom .contact-credit {grid-row:3;order:0;margin-top:12px}
  .contact-bottom>a:last-child {justify-self:end}
  .contact-title {font-size:clamp(48px,16vw,80px)}
  .contact-title svg {width:clamp(32px,8vw,44px)}
}

/* The mobile menu keeps project browsing and contact in one disclosure. */
.compact-menu {display:none;position:static}
.compact-menu>summary {display:flex;align-items:center;justify-content:center;gap:7px;list-style:none;cursor:pointer;min-height:44px;padding:0 0 0 8px;font-size:14px;line-height:20px}
.compact-menu>summary::-webkit-details-marker {display:none}
.compact-menu[open]>summary svg {transform:rotate(45deg)}
.compact-panel {position:absolute;top:69px;left:12px;right:12px;display:flex;flex-direction:column;max-height:calc(100svh - 84px);background:var(--menu-bg);border:1px solid var(--edge);border-radius:14px;box-shadow:5px 7px 0 var(--menu-shadow),0 24px 60px #0003;overflow:hidden}
.compact-work {padding:20px 16px 14px;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.compact-label {margin:0 8px 12px;font:10px/1.6 var(--mono);letter-spacing:.035em;opacity:.7}
.compact-work>a {display:grid;grid-template-columns:24px 1fr;align-items:center;gap:12px;min-height:44px;padding:5px 8px;border-radius:5px;font-size:19px;font-weight:500}
.compact-work>a:hover,.compact-work>a:focus-visible {background:#f3cd44;color:#29232f;outline-offset:0}
.nav-count {font:10px var(--mono);opacity:.65}
.compact-footer {flex-shrink:0;border-top:1px solid var(--line);padding:12px 24px 8px}
.compact-contact>a {display:flex;justify-content:space-between;align-items:center;min-height:44px;font-size:21px;font-weight:500}
.compact-contact>div {display:flex;gap:24px}
.compact-contact>div a {display:inline-flex;align-items:center;min-height:44px;font-size:12px;opacity:.8}
.compact-preferences {display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);margin-top:10px}
.compact-preferences>span {font-size:12px;opacity:.65}
.site-header #mobile-motion-toggle {font-size:12px;min-height:44px;justify-content:flex-end;text-decoration:underline;text-underline-offset:4px}

.site-header #mobile-motion-toggle:disabled {opacity:.6;cursor:default}
.compact-contact a:hover {text-decoration:underline;text-underline-offset:4px}
@media (max-width:700px) {
  .portfolio-page .site-header {padding:0 18px;gap:12px}
  .portfolio-page .site-header nav {gap:8px;margin-left:auto}
  .portfolio-page .site-header #motion-toggle,
  .portfolio-page .work-menu,
  .portfolio-page .hello-menu {display:none}
  .compact-menu {display:block}
}
