/* Shared layout corrections; retain the original typefaces and palette. */
img { max-width: 100%; }
.home-hero-wrap > *, .split > *, .split1 > *, .edu-work > *,
.tools-grid > *, .xp-card > *, .contact-wrap > *, .form-grid > *,
.featured-layout > *, .qa-grid > *, .project-card { min-width: 0; }
.project-thumb-img { object-fit: cover; object-position: center; }
.project-card { display: flex; flex-direction: column; }
.project-body { display: flex; flex-direction: column; flex: 1; }
.project-actions { margin-top: auto; }
.project-meta, .xp-text, .contact-item, .about-intro { overflow-wrap: anywhere; }
.filter-bar { flex-wrap: wrap; }
.menu-overlay { visibility: hidden; overflow-y: auto; }
body.menu-open .menu-overlay { visibility: visible; }
.menu-toggle, .filter-btn { min-height: 44px; min-width: 44px; }
.home-hero-media img { max-width: 100%; }
.about-divider, .about-divider.big { max-width: 100%; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10001;
  padding: 12px 18px; background: var(--lime); color: #0f0f12;
  border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }

@media (max-width: 980px) {
  .page .container { width: 100%; padding-inline: 22px; }
  header { position: absolute !important; background: transparent !important;
    backdrop-filter: none !important; border-bottom: none !important; }
  .spec-bar { width: calc(100% + 44px); left: auto; transform: none;
    margin: 0 -22px 10px; }
  .page-banner { width: 100%; left: auto; transform: none; margin-inline: 0; }
  .home-hero-wrap, .tools-grid, .xp-card, .contact-wrap, .form-grid,
  .featured-layout, .qa-grid, .split, .split1, .edu-work { grid-template-columns: minmax(0, 1fr); }
  .home-hero-media { width: 100%; max-width: 440px; margin-inline: auto; }
  .home-hero-media img { width: 100%; height: auto; transform: none; }
  .edu-img-wrap { display: none; }
  .about-intro, .work-sub { width: 100%; }
  .xp-media { aspect-ratio: 3 / 2; height: auto; min-height: 0; overflow: hidden; }
  .xp-media img { height: 100%; object-fit: cover; }
}

@media (max-width: 740px) {
  html { scrollbar-gutter: auto; scroll-padding-top: 88px; }
  body { padding-bottom: 0; }
  .container, .page .container { width: 100%; padding-inline: 18px; }
  header .container { padding-inline: 18px; }
  .nav.nav-simple { padding-block: 10px; }
  .logo-img { height: 56px; width: auto; }
  .top-strip { height: 96px; }
  .menu-overlay { padding: 96px 20px max(24px, env(safe-area-inset-bottom)); }
  .menu-links { gap: 12px; }
  .menu-links a { display: block; padding: 8px; }
  .page { padding-bottom: 32px; }
  .home-hero-wrap { gap: 24px; }
  .home-eyebrow { font-size: 13px; }
  .contact-title { font-size: clamp(32px, 9vw, 48px); line-height: 1.12; }
  .h2, .section-title, .qa-title { font-size: clamp(27px, 7.5vw, 36px); }
  .home-lead, .about-intro { font-size: 16px; line-height: 1.75; }
  .home-hero-media { max-width: 340px; }
  .spec-bar { width: calc(100% + 36px); left: auto; transform: none;
    margin: 0 -18px 10px; }
  .split, .split1 { gap: 20px; }
  .split1 { padding-top: 24px; }
  .tools-section, .contact-form-card, .edu-card { padding: 18px; }
  .about-title { transform: none; font-size: clamp(36px, 11vw, 52px); }
  .about-title .title-emoji { width: 48px; height: 48px; vertical-align: -10px; }
  .tools-title { font-size: 30px; }
  .skill { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  .skill-ico { width: 36px; height: 36px; }
  .xp-content { padding: 18px; }
  .contact-item { font-size: 16px; gap: 10px; }
  .contact-form-card input, .contact-form-card textarea { font-size: 16px; }
  .contact-send .btn-send { width: 100%; min-width: 0; }
  .filter-bar { gap: 8px; justify-content: center; padding-block: 8px 20px; }
  .filter-btn { padding: 10px 13px; font-size: 13px; white-space: nowrap; }
  .project-title { font-size: 20px; }
  .feat-badge { min-width: 0; max-width: 100%; }
  .featured-badges { right: 16px; }
  .site-footer .container { padding-inline: 18px; }
  .take-me-up { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  .projects-grid, .posts-grid, .services-grid, .cards3 { grid-template-columns: minmax(0, 1fr); }
  .projects-grid { gap: 18px; }
  .project-thumb { height: auto; aspect-ratio: 16 / 9; }
}

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