/* One closing treatment for current pages. Archived versions stay unchanged. */
/* Contact panel uses the portfolio's existing light canvas, ink and annotation
   purple. Native dialog lives in the browser top layer, with no z-index stack. */
body .hello-dialog {
  box-sizing: border-box;
  width: min(54rem, calc(100% - 3rem));
  max-width: none;
  max-height: calc(100dvh - 3rem);
  margin: auto;
  padding: 3rem;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e9e7ed;
  border-radius: 1.5rem;
  background: #fdfdfc;
  color: #101216;
  font: 1rem/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-align: left;
  box-shadow: 0 24px 100px rgb(40 36 53 / 14%);
}
body .hello-dialog::backdrop { background: rgb(25 27 34 / 28%); }
body .hello-dialog * { box-sizing: border-box; }
body .hello-dialog [hidden] { display: none; }
body .hello-close {
  position: absolute; top: .875rem; right: .875rem;
  z-index: 2;
  width: 2.75rem; height: 2.75rem; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: #515866; cursor: pointer;
  font-family: inherit;
}
body .hello-close span { font: 1.875rem/1 Arial, sans-serif; }
body .hello-close:hover { background: #eeedf0; color: #101216; }
body .hello-layout { display: grid; grid-template-columns: .85fr 1.3fr; gap: 3rem; }
body .hello-dialog h2 { margin: 0 0 1rem; font-size: clamp(2.5rem, 4vw, 3.25rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.15; }
body .hello-dialog h2 span { color: #101216; }
body .hello-dialog #hello-description { margin: 0; font-size: 1.0625rem; color: #576171; line-height: 1.6; }
body .hello-art { position: relative; margin: 1.25rem 0 0; width: 100%; pointer-events: none; }
body .hello-art img { display: block; width: 11rem; height: 16.5rem; object-fit: contain; margin: 0 auto; mix-blend-mode: multiply; }
body .hello-art figcaption { position: absolute; bottom: .5rem; left: 0; color: #7754bf; font: 1.25rem/1.4 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; transform: rotate(-6deg); }
body .hello-compose { min-width: 0; padding-top: .5rem; }
body .hello-topics { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: 0; border: 0; min-width: 0; }
body .hello-topics legend { margin: 0 0 .75rem; padding: 0; font-size: .9375rem; font-weight: 500; }
body .hello-topics label { position: relative; cursor: pointer; }
body .hello-topics input { position: absolute; width: 1px; height: 1px; opacity: 0; }
body .hello-topics label span { display: block; border: 1px solid #dedce3; border-radius: 999px; padding: .625rem .875rem; font-size: .8125rem; color: #515866; white-space: nowrap; transition: background-color 160ms ease, border-color 160ms ease; }
body .hello-topics input:checked + span { background: #eeebf5; border-color: #b7a7d4; color: #553787; }
body .hello-topics label:hover span { border-color: #ab9ac7; }
body .hello-message-label { display: block; margin: 0 0 .625rem; font-size: .9375rem; font-weight: 500; }
body .hello-message-label span { font-weight: 400; color: #687080; }
body .hello-dialog textarea { display: block; width: 100%; min-height: 8.5rem; max-height: 20rem; resize: vertical; margin: 0; padding: .875rem 1rem; border: 1px solid #d8d6dd; border-radius: .75rem; background: #fff; color: #101216; font: 1rem/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0; }
body .hello-dialog textarea::placeholder { color: #767b85; }
body .hello-helper { margin: .625rem 0 1.375rem; color: #606775; font-size: .8125rem; line-height: 1.5; }
body .hello-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
body .hello-primary { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 3.125rem; padding: .8125rem 1.375rem; border: 0; border-radius: 999px; background: #111827; color: #fff; font-size: .9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: transform 160ms ease, background-color 160ms ease; }
body .hello-primary:hover { background: #263042; color: #fff; transform: translateY(-2px); }
body .hello-primary:active { transform: translateY(0); }
body .hello-gmail { display: inline-flex; gap: .5rem; align-items: center; min-height: 2.75rem; color: #515866; font-size: .875rem; text-decoration: none; }
body .hello-gmail:hover { color: #553787; text-decoration: underline; text-underline-offset: .25rem; }
body .hello-dialog a::after { content: none; }
body .hello-email-row { display: flex; align-items: center; gap: .5rem; margin-top: 1.5rem; }
body .hello-address { width: 100%; min-width: 0; padding: .25rem 0; border: 0; border-radius: 0; background: transparent; color: #515866; font: .875rem/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; text-overflow: clip; }
body .hello-copy { flex: none; min-height: 2.75rem; padding: .375rem 0 .375rem .5rem; border: 0; border-radius: .25rem; background: transparent; color: #553787; font: 500 .8125rem/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; cursor: pointer; }
body .hello-copy:hover { text-decoration: underline; text-underline-offset: .2rem; }
body .hello-status { min-height: 2.625rem; margin: .375rem 0 0; color: #515866; font-size: .8125rem; line-height: 1.5; }
body .hello-dialog :is(a, button, textarea, .hello-address):focus-visible,
body .hello-topics input:focus-visible + span { outline: 2px solid #7754bf; outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  body .hello-dialog[open] { animation: hello-enter 220ms cubic-bezier(.2,.8,.2,1) both; }
  @keyframes hello-enter { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
}
@media (max-width: 700px) {
  body .hello-dialog { width: calc(100% - 1.5rem); max-height: calc(100dvh - 1.5rem); padding: 2rem 1.5rem 1.25rem; border-radius: 1.25rem; }
  body .hello-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  body .hello-intro { position: relative; min-height: 6.5rem; padding-right: 5rem; }
  body .hello-dialog h2 { font-size: 2.25rem; margin-bottom: .5rem; }
  body .hello-dialog #hello-description { font-size: .9375rem; }
  body .hello-art { position: absolute; right: .25rem; top: -.25rem; margin: 0; width: 4.75rem; }
  body .hello-art img { width: 4.75rem; height: 7.125rem; }
  body .hello-art figcaption { display: none; }
  body .hello-compose { padding: 0; }
  body .hello-topics { gap: .375rem; margin-bottom: 1.125rem; }
  body .hello-topics label span { padding: .625rem .75rem; }
  body .hello-email-row { flex-wrap: wrap; gap: 0 .5rem; }
  body .hello-address { width: 13rem; flex: 1 1 13rem; }
  body .hello-copy { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { body .hello-dialog * { transition: none !important; } }
body .contact-chapter {
  margin-top: 0;
  padding-block: clamp(3.5rem, 6vw, 5rem) 2rem;
  border-top: 1px solid #e5e5e9;
}
body .contact-chapter > .chapter-container {
  min-height: 0;
  align-items: center;
}
body .ah-contact {
  border-top: 1px solid #e5e5e9;
  padding-block: clamp(3.5rem, 6vw, 5rem) 3.5rem;
}

/* Keep the homepage's filled invitation, with a drawn rather than font arrow. */
body a.contact-destination {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 1.5rem;
  min-height: 3.5rem;
  padding: 1rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.015em;
  text-decoration: none;
  box-shadow: 0 5px 14px rgb(17 24 39 / 6%);
  transition: background-color 200ms ease, transform 200ms ease;
}
body a.contact-destination::after { content: none; }
body a.contact-destination > span { color: inherit; }
body a.contact-destination .closing-arrow {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}
body a.contact-destination:hover {
  gap: 1.5rem;
  color: #fff;
  background: #263042;
  transform: translateY(-2px);
}
body a.contact-destination:hover .closing-arrow { transform: translate(2px, -2px); }
body a.contact-destination:active { transform: translateY(0); }
body .ah-contact .contact-destination { margin-top: 1.75rem; }

/* The shorter Freshness ending uses the same invitation without repeating art. */
body .closing-invitation {
  width: min(77.5rem, calc(100% - 6rem));
  margin-inline: auto;
  padding-block: 3.5rem;
  border-top: 1px solid #e5e5e9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}
body .closing-invitation .chapter-kicker { margin: 0 0 1rem; font-size: .8125rem; }
body .closing-invitation h2 {
  max-width: 23ch;
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

/* A quiet, full-width endcap: signature, handwritten sign-off, return control. */
body .portfolio-footer {
  min-width: 0;
  margin: 0;
  padding: 0;
  background: #f4f3f1;
  border-top: 1px solid #e2e1df;
}
body .portfolio-footer > .chapter-container {
  width: min(77.5rem, calc(100% - 6rem));
  margin-inline: auto;
  min-height: 10rem;
  padding-block: 2.5rem;
  border: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}
body .portfolio-footer .footer-credit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  color: #606775;
  font-size: .8125rem;
  line-height: 1.4;
}
body .portfolio-footer .footer-signature {
  color: #101216;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.04em;
  text-decoration: none;
}
body .portfolio-footer .footer-thought {
  display: flex;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin: 0;
  color: #7754bf;
  font: 1.25rem/1.4 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  transform: rotate(-4deg);
}
body .portfolio-footer .footer-thought span { font-size: 1.5rem; }
body .portfolio-footer .footer-top {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .875rem;
  min-height: 3rem;
  padding: .25rem 0 .25rem .5rem;
  color: #101216;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
  border: 0;
  white-space: nowrap;
}
body .portfolio-footer .footer-top::after { content: none; }
body .portfolio-footer .footer-top-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid #d5d4d2;
  border-radius: 50%;
  background: #fdfdfc;
  transform: none;
  transition: border-color 200ms ease, background-color 200ms ease;
}
body .portfolio-footer .footer-top-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}
body .portfolio-footer .footer-top:hover .footer-top-icon { border-color: #a69eaf; background: #eeebf4; }
body .portfolio-footer .footer-top:hover svg { transform: translateY(-2px); }
body .portfolio-footer .footer-top:active svg { transform: translateY(0); }
body :is(a.contact-destination, .footer-top, .footer-signature):focus-visible {
  outline: 2px solid #7754bf;
  outline-offset: 5px;
}

@media (max-width: 760px) {
  body .contact-chapter { padding-block: 3rem 1.5rem; }
  body .ah-contact { padding-block: 3rem 2rem; }
  body .closing-invitation { flex-direction: column; align-items: flex-start; gap: 1.75rem; padding-block: 2.5rem; }
  body .closing-invitation,
  body .portfolio-footer > .chapter-container { width: calc(100% - 2.5rem); }
  body .portfolio-footer > .chapter-container {
    grid-template-columns: 1fr auto;
    gap: 2rem 1rem;
    padding-block: 2rem;
    min-height: 0;
  }
  body .portfolio-footer .footer-top { grid-column: 2; grid-row: 1; }
  body .portfolio-footer .footer-thought { grid-column: 1 / -1; grid-row: 2; justify-self: center; margin: 0; }
  body .portfolio-footer .footer-signature { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  body a.contact-destination,
  body a.contact-destination .closing-arrow,
  body .portfolio-footer .footer-top-icon,
  body .portfolio-footer .footer-top-icon svg { transition: none; }
}

/* Phone-only closing composition. Keep the approved desktop artwork untouched,
   but do not stack a nine-rem annotation gap over a full-width portrait. */
@media (max-width: 700px) {
  body .contact-chapter > .chapter-container { gap: 1rem; }
  body .contact-art {
    display: block;
    width: 100%;
    max-width: 24rem;
    height: 20rem;
    padding: 0;
    margin: 1rem auto 0;
  }
  body .contact-art .contact-character {
    position: absolute;
    left: auto;
    right: 0;
    bottom: 0;
    width: 12rem;
    max-width: 58%;
    height: auto;
    transform: none;
  }
  body .contact-art .contact-doodle {
    top: 2.5rem;
    left: 0;
    right: auto;
    width: 9rem;
    max-width: 44%;
    font-size: .9375rem;
    line-height: 1.5;
    transform: rotate(-7deg);
  }
  body .contact-doodle svg { width: 3.75rem; height: 3rem; margin: .5rem 0 0 1rem; }
  body .contact-art-glow { inset: 2rem -1rem 0; }
  body .contact-spark { left: 46%; top: 9rem; width: 1.75rem; height: 1.75rem; }
  body .contact-heading { font-size: clamp(2.125rem, 9.4vw, 2.75rem); line-height: 1.1; }
  /* Avoid iOS focus zoom on the read-only address field. */
  body .hello-address { font-size: 1rem; }
}
