/* ==========================================================================
   NOAH - COMPONENTS & RESPONSIVE STYLES
   Modals, Toasts, Sound Toggle, and Responsive Media Queries
   ========================================================================== */

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 4, 3, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Content Container */
.modal-container {
  background: #140b07;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(255, 87, 34, 0.15);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  padding: 36px;
}

.modal-backdrop.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #DDD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-orange);
  color: #FFF;
  transform: rotate(90deg);
}

/* Resume Modal Customization */
.resume-modal-container {
  max-width: 780px;
  background: #110905;
}

.resume-paper {
  background: #190e08;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  margin: 24px 0;
  color: #E2DBD5;
  font-size: 14px;
  line-height: 1.6;
}

.resume-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.resume-candidate-name {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
}

.resume-candidate-role {
  color: var(--accent-orange);
  font-weight: 600;
  font-size: 15px;
}

.resume-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  border-left: 3px solid var(--accent-orange);
  padding-left: 10px;
  margin: 20px 0 12px;
}

.resume-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.resume-modal-header .section-tag {
  margin-bottom: 6px;
}

.resume-modal-header h3 {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 800;
}

.resume-modal-header .btn-resume {
  flex-shrink: 0;
  background: var(--accent-orange);
  border: 0;
  padding: 10px 24px;
}

/* Floating Flag Icon */
.floating-flag-icon {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(18, 26, 20, 0.9);
  border: 2px solid rgba(34, 197, 94, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  z-index: 90;
  pointer-events: auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.floating-flag-icon:hover {
  transform: translateY(-3px) scale(1.12);
  border-color: rgba(74, 222, 128, 1);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.28), 0 0 18px rgba(34, 197, 94, 0.2);
}

.nepal-flag-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.floating-flag-icon:hover .nepal-flag-image {
  transform: scale(1.2);
  filter: saturate(1.2) brightness(1.08);
}

/* Floating portfolio chatbot */
.chatbot-widget {
  position: fixed;
  right: 28px;
  bottom: 92px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chatbot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(255, 133, 88, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-orange), #d83d13);
  color: #FFF;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42), 0 0 24px rgba(255, 87, 34, 0.22);
  font-weight: 800;
}

.chatbot-toggle:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--accent-orange-hover), var(--accent-orange));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 87, 34, 0.36);
}

.chatbot-toggle-icon {
  font-size: 20px;
  line-height: 1;
}

.chatbot-panel {
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: rgba(20, 11, 7, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62), 0 0 34px rgba(255, 87, 34, 0.16);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: chatbot-enter 0.25s ease-out;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.22), rgba(255, 160, 72, 0.06));
  border-bottom: 1px solid var(--glass-border-subtle);
}

.chatbot-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-heading strong,
.chatbot-heading span {
  display: block;
}

.chatbot-heading strong {
  color: var(--text-white);
  font-size: 14px;
}

.chatbot-heading div > span {
  color: var(--text-secondary);
  font-size: 11px;
}

.chatbot-avatar {
  display: grid !important;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-orange);
  color: #FFF !important;
  font-size: 18px !important;
}

.chatbot-avatar-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.chatbot-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
}

.chatbot-close:hover {
  background: var(--accent-orange);
  color: #FFF;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding: 16px;
}

.chatbot-message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.55;
}

.chatbot-message-bot {
  align-self: flex-start;
  border: 1px solid var(--glass-border-subtle);
  border-top-left-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.chatbot-message-user {
  align-self: flex-end;
  border-top-right-radius: 4px;
  background: var(--accent-orange);
  color: #FFF;
}

.chatbot-contact-button {
  display: block;
  margin-top: 10px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 160, 72, 0.5);
  border-radius: 999px;
  background: var(--accent-orange);
  color: #FFF;
  font-size: 11px;
  font-weight: 700;
}

.chatbot-contact-button:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-1px);
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.chatbot-suggestion {
  padding: 6px 10px;
  border: 1px solid rgba(255, 160, 72, 0.35);
  border-radius: 999px;
  background: rgba(255, 87, 34, 0.08);
  color: var(--accent-amber);
  font-size: 11px;
}

.chatbot-suggestion:hover {
  background: var(--accent-orange-soft);
  border-color: var(--accent-orange);
}

.chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--glass-border-subtle);
}

.chatbot-input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}

.chatbot-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px var(--accent-orange-soft);
}

.chatbot-send {
  display: grid;
  place-items: center;
  width: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--accent-orange);
  color: #FFF;
}

.chatbot-send:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-1px);
}

@keyframes chatbot-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

:root[data-theme="light"] .chatbot-panel {
  background: rgba(255, 255, 255, 0.97);
  border-color: var(--light-border);
  box-shadow: 0 24px 60px rgba(76, 52, 38, 0.2), 0 0 34px rgba(255, 87, 34, 0.12);
}

:root[data-theme="light"] .chatbot-message-bot,
:root[data-theme="light"] .chatbot-input {
  background: rgba(248, 246, 243, 0.9);
  border-color: var(--light-border);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(22, 12, 8, 0.95);
  border: 1px solid var(--accent-orange);
  color: var(--text-white);
  padding: 14px 28px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 20px var(--accent-orange-glow);
  backdrop-filter: blur(20px);
  z-index: 1100;
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Mobile Navigation Drawer & Hamburger */
.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 105;
}

.hamburger-btn span {
  width: 26px;
  height: 2.5px;
  background: var(--text-white);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* Light theme surfaces keep the same warm accent while replacing dark glass
   with clearer, layered panels and readable controls. */
:root[data-theme="light"] {
  --light-surface: rgba(255, 255, 255, 0.82);
  --light-surface-strong: rgba(255, 255, 255, 0.94);
  --light-border: rgba(91, 64, 47, 0.15);
  --light-shadow: 0 18px 45px rgba(76, 52, 38, 0.11);
}

:root[data-theme="light"] .site-header.scrolled {
  background: rgba(251, 250, 248, 0.9);
  box-shadow: 0 8px 28px rgba(76, 52, 38, 0.08);
}

:root[data-theme="light"] .nav-pill-group,
:root[data-theme="light"] .theme-switcher,
:root[data-theme="light"] .btn-resume {
  background: var(--light-surface-strong);
  border-color: var(--light-border);
  box-shadow: 0 8px 24px rgba(76, 52, 38, 0.08);
}

:root[data-theme="light"] .nav-link {
  color: var(--text-secondary);
}

:root[data-theme="light"] .nav-link:hover,
:root[data-theme="light"] .nav-link.active {
  color: var(--accent-orange);
}

:root[data-theme="light"] .btn-icon-mail,
:root[data-theme="light"] .filter-btn,
:root[data-theme="light"] .btn-project-secondary,
:root[data-theme="light"] .social-link-btn {
  background: var(--light-surface);
  border-color: var(--light-border);
  color: var(--text-primary);
}

:root[data-theme="light"] .skill-card,
:root[data-theme="light"] .project-card,
:root[data-theme="light"] .testimonial-box,
:root[data-theme="light"] .contact-container-grid {
  background: var(--light-surface);
  border-color: var(--light-border);
  box-shadow: var(--light-shadow);
}

:root[data-theme="light"] .skill-card:hover,
:root[data-theme="light"] .project-card:hover,
:root[data-theme="light"] .testimonial-box:hover {
  box-shadow: 0 22px 48px rgba(76, 52, 38, 0.16), 0 0 25px rgba(255, 87, 34, 0.1);
}

:root[data-theme="light"] .skill-icon-wrapper,
:root[data-theme="light"] .contact-detail-card,
:root[data-theme="light"] .project-tag,
:root[data-theme="light"] .form-input,
:root[data-theme="light"] .form-textarea,
:root[data-theme="light"] .form-select {
  background: rgba(248, 246, 243, 0.9);
  border-color: var(--light-border);
}

:root[data-theme="light"] .skill-bar-bg {
  background: rgba(91, 64, 47, 0.12);
}

:root[data-theme="light"] .project-preview {
  background: #eee9e3;
}

:root[data-theme="light"] .project-overlay-badge {
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--light-border);
  color: var(--accent-orange);
}

:root[data-theme="light"] .project-tag {
  color: var(--text-secondary);
}

:root[data-theme="light"] .test-quote,
:root[data-theme="light"] .testimonial-text,
:root[data-theme="light"] .testimonial-back-text {
  color: var(--text-secondary);
}

:root[data-theme="light"] .testimonial-card-face {
  background: var(--light-surface);
  border-color: var(--light-border);
  box-shadow: var(--light-shadow);
}

:root[data-theme="light"] .quote-icon {
  color: var(--accent-orange);
}

:root[data-theme="light"] .author-role,
:root[data-theme="light"] .form-group label {
  color: var(--text-muted);
}

:root[data-theme="light"] .contact-detail-card:hover {
  background: rgba(255, 87, 34, 0.06);
}

:root[data-theme="light"] .form-input,
:root[data-theme="light"] .form-textarea,
:root[data-theme="light"] .form-select {
  color: var(--text-primary);
}

:root[data-theme="light"] .form-input::placeholder,
:root[data-theme="light"] .form-textarea::placeholder {
  color: #9b8b81;
}

:root[data-theme="light"] .site-footer {
  border-top-color: var(--light-border);
}

:root[data-theme="light"] .modal-backdrop {
  background: rgba(49, 31, 21, 0.42);
}

:root[data-theme="light"] .modal-container,
:root[data-theme="light"] .resume-modal-container {
  background: var(--light-surface-strong);
  border-color: var(--light-border);
  box-shadow: 0 30px 80px rgba(76, 52, 38, 0.22), 0 0 50px rgba(255, 87, 34, 0.1);
}

:root[data-theme="light"] .resume-paper {
  background: #fffdfa;
  border-color: var(--light-border);
  color: var(--text-secondary);
}

:root[data-theme="light"] .resume-candidate-name,
:root[data-theme="light"] .resume-section-title {
  color: var(--text-primary);
}

:root[data-theme="light"] .modal-close-btn {
  background: #f5f1ed;
  border-color: var(--light-border);
  color: var(--text-secondary);
}

:root[data-theme="light"] .toast-notification {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-primary);
  box-shadow: 0 12px 36px rgba(76, 52, 38, 0.18), 0 0 20px rgba(255, 87, 34, 0.14);
}

:root[data-theme="light"] .floating-flag-icon {
  box-shadow: 0 10px 25px rgba(76, 52, 38, 0.18);
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM
   ========================================================================== */

/* Laptops and Desktops under 1280px */
@media (max-width: 1280px) {
  .hero-layout {
    grid-template-columns: 1fr 1fr;
  }
  .character-img {
    max-width: 480px;
  }
}

/* Tablets under 1024px */
@media (max-width: 1024px) {
  .nav-container {
    padding: 0 28px;
  }
  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    min-height: auto;
    padding-top: 40px;
  }
  .hero-content {
    align-items: center;
    padding-right: 0;
  }
  .hero-actions {
    justify-content: center;
  }
  .testimonial-card-hero {
    margin: 0 auto;
    text-align: left;
  }
  .hero-visual-scene {
    min-height: 520px;
  }
  .character-img {
    max-width: 420px;
  }
  .contact-container-grid {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }
}

/* Mobile Devices under 768px */
@media (max-width: 768px) {
  .modal-backdrop {
    padding: 16px;
  }

  .modal-container {
    max-height: calc(100dvh - 32px);
    padding: 28px 22px;
    border-radius: 22px;
  }

  .site-header {
    padding: 14px 0;
  }

  .nav-container {
    min-height: 64px;
  }

  .nav-actions > .btn-resume {
    display: none;
  }

  .nav-pill-group {
    position: fixed;
    top: 100px;
    left: 20px;
    right: 20px;
    flex-direction: column;
    background: rgba(18, 10, 6, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: none;
  }
  .nav-pill-group.mobile-open {
    display: flex;
  }
  .nav-link {
    width: 100%;
  }
  .mobile-resume-action {
    display: block;
    text-align: left;
    color: var(--accent-orange);
    font-weight: 700;
  }
  .mobile-resume-action:hover {
    background: var(--accent-orange-soft);
  }
  .hamburger-btn {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
  .hero-section {
    padding: 132px 0 40px;
  }
  .hero-title {
    font-size: 46px;
    display: block;
    line-height: 1.06;
  }
  .typewriter-text {
    display: inline;
    white-space: normal;
  }
  .type-cursor {
    display: inline-block;
    transform: translateY(-2px);
  }
  .character-img {
    max-width: 320px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .chatbot-widget {
    right: 16px;
    bottom: 84px;
  }
  .chatbot-toggle {
    min-height: 48px;
    padding: 0 15px;
  }
  .testimonial-card-face {
    min-height: auto;
    padding: 22px 18px;
  }
  .testimonial-text {
    font-size: 13px;
    line-height: 1.6;
  }
  .testimonial-author {
    gap: 10px;
  }
  .author-name {
    font-size: 14px;
  }
  .author-role {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  :root[data-theme="light"] .nav-pill-group {
    background: rgba(255, 255, 255, 0.96);
    border-color: var(--light-border);
    box-shadow: 0 20px 50px rgba(76, 52, 38, 0.16);
  }
}

/* Small phones and narrow viewports */
@media (max-width: 480px) {
  .nav-container {
    gap: 8px;
    padding: 0 12px;
  }

  .nav-container > .brand-logo {
    font-size: 21px;
  }

  .nav-actions {
    flex-shrink: 0;
    gap: 8px;
  }

  .theme-switcher {
    padding: 2px;
  }

  .theme-option {
    padding: 6px 7px;
    font-size: 11px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-container {
    max-height: calc(100dvh - 24px);
    padding: 24px 18px;
    border-radius: 18px;
  }

  .resume-modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-right: 28px;
  }

  .resume-modal-header h3 {
    font-size: 21px;
  }

  .resume-modal-header .btn-resume {
    padding: 10px 16px;
  }

  .resume-paper {
    padding: 20px;
    font-size: 13px;
  }

  .container { padding: 0 16px; }
  .nav-container { padding: 0 16px; }
  .nav-pill-group {   top: 100px; left: 12px; right: 12px; padding: 16px; border-radius: 14px; }
  .hero-section { padding: 132px 0 32px; }
  .hero-layout { gap: 24px; min-height: auto; grid-template-columns: 1fr; }
  .hero-intro { font-size: 18px; }
  .hero-title { font-size: 34px; }
  .hero-desc { max-width: 100%; font-size: 15px; margin-bottom: 20px; }
  .hero-actions { flex-direction: column; gap: 12px; align-items: stretch; }
  .btn-hire { width: 100%; padding: 12px 18px; }
  .btn-icon-mail { width: 48px; height: 48px; align-self: center; }
  .character-container { width: min(100%, 280px); min-height: 220px; }
  .character-img { max-width: 260px; }
  .hero-visual-scene { min-height: 360px; }
  .tech-marquee { width: calc(100% - 24px); margin-top: 20px; padding: 8px 0; }
  .tech-item { width: 44px; height: 44px; border-radius: 12px; padding: 8px; }
  .testimonial-card-hero { max-width: 100%; position: relative; left: 0; transform: none; margin-top: 18px; }
  .testimonial-card-face { padding: 18px 16px; border-radius: 22px; }
  .testimonial-text { font-size: 12.5px; }
  .testimonial-back-text { font-size: 14px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonial-box { padding: 20px; }
  .chatbot-widget { right: 12px; bottom: 72px; }
}

@media print {
  @page {
    margin: 16mm;
  }

  body * {
    visibility: hidden !important;
  }

  #modal-resume,
  #modal-resume * {
    visibility: visible !important;
  }

  #modal-resume {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
  }

  #modal-resume .resume-modal-container {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #modal-resume .resume-modal-header,
  #modal-resume .modal-close-btn {
    display: none !important;
  }

  #modal-resume .resume-paper {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #111;
    font-size: 10pt;
    line-height: 1.45;
  }

  #modal-resume .resume-paper * {
    color: #111 !important;
  }

  #modal-resume .resume-candidate-role {
    color: #a33b14 !important;
  }

  #modal-resume .resume-section-title {
    border-color: #a33b14;
    break-after: avoid;
  }

  #modal-resume .resume-paper p,
  #modal-resume .resume-paper li {
    break-inside: avoid;
  }
}
