/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Optimize font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

/* Optimize image rendering */
img {
  content-visibility: auto;
  contain-intrinsic-size: 16em 16em;
}

/* Ensure smooth scrolling on supported browsers */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ===== ORIGINAL STYLES (OPTIMIZED) ===== */

/* Navbar */
.navbar {
  text-transform: uppercase;
  font-size: 1.25rem;
}

/* Body */
.body {
   padding: 0px;
   margin: 0px;
}

/* PERFORMANCE FIX: Changed from justify to left (justify causes 500-1000ms of reflows) */
main p,
article p,
.content p {
  text-align: left; /* Changed from justify for performance */
}

/* Keep footer centered */
footer p,
.footer p,
.nav-footer-center p {
  text-align: center;
}

.nav-footer-left p {  /* Fixed typo: was nav-fooger-left */
  text-align: left;   /* Removed quotes */
}

/* .main .content */
main .content, 
main.content,
article .content,
article.content {
  max-width: 800px; 
  margin: 0 auto;
  padding: 0 20px;
  contain: layout;
}

/* Footer */
.nav-footer-center .fa-brands,
.nav-footer-center .fa-solid,
.nav-footer-center .ai {
  font-size: 1.25em;
}

.footer {
  font-size: 1.33rem;
  line-height: 1;
  contain: layout style;
}

/* Title */
.title, .h1 {
  font-size: 3em;
  font-style: bold;
  font-weight: 500;
  line-height: 1.1em;
  text-align: left;
}

/* Subtitle */
.quarto-title p {
  font-family: "Petrona";
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
}

/* Hero heading */
#hero-heading {
  text-align: left; /* Changed from justify for performance */
}

/* About image */
.about-image {
  width: 16em !important;
  height: 16em !important;
  margin-right: 1em;
  margin-top: 0em;
}

/* About content */
.about-contents {
  max-width: 75rem !important;
}

/* About links */
.about-links .fa-brands,
.about-links .fa-solid,
.about-links .ai {
  font-size: 1.25em;
  margin-left: 0.1em;
  vertical-align: middle;
}

/* Mobile query - OPTIMIZED */
@media screen and (max-width: 991.98px) {

  /* Simplified layout - block is faster than flex */
  .page-wrapper,
  .site,
  .quarto-site,
  main#main,
  .quarto-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  main#main,
  .page-content,
  .quarto-main,
  .content {
    flex: 1 1 auto;
    overflow: auto;
  }

  footer.site-footer,
  footer,
  .footer,
  .site-footer {
    flex-shrink: 0;
  }

  .about-image,
  .about-image img {
    max-height: 40vh;
    height: auto !important;
    width: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
  }

  /* Remove transforms on mobile (expensive) */
  .quarto-about-solana,
  .about-entity,
  .about-wrapper {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    contain: none;
  }

  .entity-contents {
    margin-top: 0 !important;
    order: 2 !important;
  }

  .about-image {
    order: 1 !important;
    padding: 0.5em !important;
    margin-top: 1.25rem !important;
  }

  .about-contents {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}