/* Scoped About / Contact / Footer rendering fallbacks for Gecko and WebKit.
   Blink (Chrome / Edge / Opera) keeps the unmodified original appearance.
   No hero CSS or JavaScript is changed. */

@supports (-moz-appearance: none) or (-webkit-touch-callout: none) {
  /* Stable two-column sizing. Gecko/WebKit can otherwise distribute a large
     intrinsic image and an unbreakable display heading differently. */
  #about .about-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: 76px;
    align-items: center;
  }
  #about .about-grid > *, #about .about-content { min-width: 0; }
  #about .about-mark { width: 100%; min-width: 0; }
  #about .mark-frame {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
  }
  #about .mark-frame img {
    display: block;
    width: auto;
    height: auto;
    max-width: 68%;
    max-height: 78%;
    object-fit: contain;
    mix-blend-mode: normal;
  }
  #about .about-content h2 {
    font-size: 100px;
    line-height: 1.08;
    max-width: 100%;
    overflow-wrap: normal;
    text-wrap: normal;
  }
  #about .about-links { min-width: 0; }
  #about .about-links a { max-width: 100%; }

  /* Keep the contact heading and decoration within their own paint layer.
     Use a CSS-drawn eight-ray symbol instead of a platform-dependent Unicode
     glyph, which appears much heavier in Firefox on some operating systems. */
  #contact { isolation: isolate; }
  #contact > .container { position: relative; z-index: 1; }
  #contact h2 {
    max-width: 1060px;
    font-size: 106px;
    line-height: 1.06;
    overflow-wrap: normal;
    text-wrap: normal;
  }
  #contact p { max-width: 900px; }
  #contact::after {
    content: "";
    width: 330px;
    height: 330px;
    right: -60px;
    top: 60px;
    font-size: 0;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(212,160,23,.11) 0deg 2deg, transparent 2deg 45deg);
    opacity: .55;
    pointer-events: none;
  }
  #contact .contact-mail { max-width: 100%; }

  /* Footer logo and social icons do not rely on browser-specific flex
     min-content sizing; keep the same desktop left/right alignment. */
  .site-footer .footer-top { flex-wrap: wrap; }
  .site-footer .footer-logo { min-width: 0; flex: 0 0 auto; }
  .site-footer .socials { min-width: 0; flex: 0 1 auto; justify-content: flex-end; }
  .site-footer .socials a { flex: 0 0 41px; }
  .site-footer .socials img { display: block; width: 17px; height: 17px; }
}

@media (max-width: 1220px) {
  @supports (-moz-appearance: none) or (-webkit-touch-callout: none) {
    #about .about-grid { column-gap: 48px; }
    #about .mark-frame { max-width: 390px; }
    #about .about-content h2 { font-size: 80px; }
    #contact h2 { font-size: 77px; }
  }
}
@media (max-width: 980px) {
  @supports (-moz-appearance: none) or (-webkit-touch-callout: none) {
    #about .about-grid { grid-template-columns: minmax(0, 1fr); gap: 46px; }
    #about .mark-frame { max-width: 350px; }
    #about .about-content h2 { font-size: 72px; }
    #contact h2 { font-size: clamp(52px, 8vw, 77px); }
    .site-footer .footer-top { align-items: flex-start; }
    .site-footer .socials { justify-content: flex-start; }
  }
}
@media (max-width: 700px) {
  @supports (-moz-appearance: none) or (-webkit-touch-callout: none) {
    #about .about-grid { gap: 34px; }
    #about .mark-frame { max-width: 285px; }
    #about .about-content h2 { font-size: 57px; }
    #contact h2 { font-size: clamp(46px, 10vw, 65px); }
    #contact::after { width: 230px; height: 230px; right: -80px; top: 70px; }
    .site-footer .socials a { flex-basis: 37px; }
  }
}
@media (max-width: 380px) {
  @supports (-moz-appearance: none) or (-webkit-touch-callout: none) {
    #about .about-content h2 { font-size: 47px; }
  }
}
