/* Performance-focused rendering hints. */

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

#about,
#skills,
#projects,
#certifications,
#contact {
  content-visibility: auto;
  contain-intrinsic-size: 960px;
}

.project-card,
.gallery-tile,
.cert-image-card,
.about-card,
.contact-panel,
.video-player-shell {
  contain: layout paint;
}

.video-player-frame {
  aspect-ratio: 16 / 9;
}

@media (max-width: 768px) {
  .project-card,
  .gallery-tile,
  .cert-image-card,
  .contact-panel {
    box-shadow: var(--shadow-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader::before {
    animation: none !important;
  }
}

/* Dark mode: flat surfaces (no shadows) */
body:not(.theme-light) :where(.navbar, .navbar *, main *, footer *) {
  box-shadow: none !important;
  text-shadow: none !important;
}

body:not(.theme-light) :where(.navbar, .navbar *, main *, footer *)::before,
body:not(.theme-light) :where(.navbar, .navbar *, main *, footer *)::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

body:not(.theme-light) .logo-mark,
body:not(.theme-light) .logo-brand:hover .logo-mark {
  filter: none !important;
}
