/* Tablet */
@media (max-width: 1024px) {
  #desktop {
    bottom: calc(var(--taskbar-h) + var(--terminal-h));
  }

  .nexus-window {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    margin-bottom: 8px;
    max-height: 60vh;
  }

  .nexus-window .window-titlebar {
    cursor: pointer;
  }

  #window-container {
    padding: 8px;
    overflow-y: auto;
    height: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --statusbar-h: 28px;
    --taskbar-h: 34px;
    --terminal-h: 180px;
  }

  #status-bar {
    font-size: 9px;
    padding: 0 8px;
  }

  #status-bar .status-center {
    display: none;
  }

  .os-title {
    font-size: 9px;
  }

  #taskbar {
    gap: 2px;
    padding: 0 4px;
  }

  .taskbar-btn {
    font-size: 9px;
    padding: 3px 8px;
  }

  .taskbar-btn .btn-icon {
    display: none;
  }

  #terminal-toggle-btn {
    font-size: 9px;
    padding: 3px 6px;
  }

  .nexus-window {
    border-radius: 0;
    max-height: 55vh;
  }

  .window-content {
    padding: 12px;
    font-size: 11px;
  }

  /* Profile adjustments */
  .skill-name {
    width: 80px;
    font-size: 10px;
  }

  .designation-tags {
    flex-direction: column;
  }

  .profile-meta {
    flex-wrap: wrap;
    font-size: 11px;
  }

  /* Terminal */
  #terminal-panel {
    font-size: 11px;
  }

  #terminal-output {
    font-size: 11px;
    padding: 6px 8px;
  }

  .prompt {
    font-size: 11px;
  }

  #terminal-input {
    font-size: 11px;
  }

  /* Boot */
  #boot-screen {
    padding: 20px;
  }

  #boot-output {
    font-size: 11px;
  }

  .boot-welcome {
    font-size: 13px !important;
    letter-spacing: 2px !important;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  .taskbar-btn {
    font-size: 8px;
    padding: 2px 5px;
  }

  .window-title {
    font-size: 9px;
  }

  .os-title {
    font-size: 8px;
  }
}

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

  .skill-fill {
    transition: none !important;
  }

  .skill-fill.animate {
    width: var(--target-width);
  }

  #neural-bg {
    display: none;
  }

  body::before,
  body::after {
    display: none;
  }
}
