/* Shared RTL/LTR layouts, including narrow phones and short landscape screens. */
html { scroll-padding-top: 150px; overflow-x: clip; }
body { overflow-x: clip; }
.ambient-glow { max-width: 100vw; }
.glow-top { left: 0; }
.glow-middle { right: 0; }
.watermark-bg { max-width: 90%; overflow: hidden; }
img, video { max-width: 100%; }
.hero-grid > *, .contact-wrapper > *, .project-card,
.contact-card-content, .modal-info { min-width: 0; }
.hero-name, .hero-name-en, .hero-subtitle, .contact-card-val,
.section-title, .modal-title { overflow-wrap: anywhere; }
.header-inner { gap: 20px; flex-wrap: wrap; }
.main-nav { flex-wrap: wrap; justify-content: center; }
.nav-link, .lang-btn, .filter-btn, .btn-copy, .btn-link-action { min-height: 44px; }
.nav-link, .btn-link-action { display: inline-flex; align-items: center; justify-content: center; }
.btn svg, .meta-bullet, .pulse-dot { flex-shrink: 0; }
.contact-card-actions { flex-wrap: wrap; }
.media-modal { visibility: hidden; padding: 16px; }
.media-modal.is-open { visibility: visible; }
.modal-content { max-height: calc(100dvh - 32px); }
.modal-body { min-height: 0; overscroll-behavior: contain; }
.modal-media-holder { min-height: 0; flex-shrink: 0; }
.modal-media-holder img, .modal-media-holder video {
  display: block; width: 100%; height: auto; max-height: 65dvh; object-fit: contain;
}
.modal-details { gap: 16px; flex-wrap: wrap; }
.modal-ctrls { flex-shrink: 0; }
.toast-notify { width: max-content; max-width: calc(100% - 32px); border-radius: 18px; }
.toast-notify svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.project-card:focus-visible { outline-offset: -4px; }

@media (max-width: 1150px) {
  .header-inner { justify-content: space-between; gap: 8px 20px; }
  .main-nav { order: 3; width: 100%; gap: 8px 24px; }
  html[dir="ltr"] .main-nav { gap: 8px 24px; }
}
@media (max-width: 768px) {
  .container { padding-inline: 16px; }
  .site-header { padding-block: 8px; }
  .brand { gap: 8px; }
  .brand-logo { font-size: 1.1rem; }
  .status-pill { display: none; }
  .header-cta { display: flex; gap: 8px; }
  .header-cta > .btn { padding: 8px 12px; min-height: 44px; font-size: .8rem; }
  .lang-btn { padding-inline: 8px; gap: 4px; }
  .main-nav { display: flex; gap: 0 16px; }
  html[dir="ltr"] .main-nav { gap: 0 16px; }
  .nav-link { font-size: .82rem; }
  .nav-link.active::after { bottom: 2px; }
  .hero-section { padding-block: 36px; }
  .hero-grid { gap: 36px; }
  .hero-name { font-size: clamp(2rem, 8.5vw, 3.4rem); }
  .hero-name-en { letter-spacing: .16em; }
  .hero-meta-list { gap: 12px 20px; font-size: .9rem; }
  .experience-card { padding: 20px 16px; }
  .exp-row { gap: 12px; text-align: start; }
  .exp-row p { font-size: .9rem; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { padding: 12px 16px; max-width: 100%; }
  .hud-frame { max-width: 360px; }
  .hud-pointer-badge, html[dir="ltr"] .hud-pointer-badge {
    inset-inline-end: 4px; inset-inline-start: auto; font-size: .65rem;
  }
  .portfolio-section, .contact-section { padding-block: 44px; }
  .section-top { margin-bottom: 28px; }
  .section-title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .section-sub { font-size: .95rem; }
  .filter-bar { width: 100%; border-radius: 20px; gap: 4px; }
  .filter-btn { flex: 1 1 auto; padding: 10px 12px; font-size: .8rem; }
  .projects-grid { gap: 20px; }
  .contact-wrapper { padding: 24px 16px; gap: 32px; }
  .avatar-arch { max-width: 300px; }
  .contact-title { font-size: clamp(1.6rem, 7vw, 2.3rem); }
  .contact-desc { font-size: 1rem; }
  .contact-card { padding: 16px 12px; }
  .contact-card-icon, html[dir="ltr"] .contact-card-icon { margin: 0; }
  .contact-card-content { width: 100%; text-align: start; }
  .contact-card-actions { justify-content: flex-start; gap: 6px; }
  .btn-copy, .btn-link-action { padding-inline: 10px; }
  .modal-details { padding: 16px; }
  .modal-title { font-size: 1.1rem; }
  .modal-close-btn { top: 8px; left: 8px; }
  html[dir="ltr"] .modal-close-btn { right: 8px; }
}
@media (max-width: 360px) {
  .header-cta > .btn { padding-inline: 8px; }
  .header-cta > .btn svg { display: none; }
  .main-nav, html[dir="ltr"] .main-nav { gap: 0 12px; }
  .nav-link { font-size: .75rem; }
  .hero-actions .btn { width: 100%; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: relative; }
  .modal-media-holder img, .modal-media-holder video { max-height: 55dvh; }
}
@media (hover: none), (pointer: coarse) {
  .play-overlay { opacity: 1; }
  .project-card:hover, .avatar-arch:hover .contact-photo { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
