@media (max-width: 768px) {
  body {
    touch-action: manipulation;
    padding-bottom: 40px;
  }

  .window {
    min-width: 280px !important;
    min-height: 200px !important;
    max-height: calc(100dvh - 52px) !important;
  }

  .window-control {
    width: 25px;
    height: 25px;
    line-height: 21px;
  }

  .window-content {
    padding: 10px;
    overflow-x: hidden;

  }

  .folder {
    width: 70px;
  }

  .folder-label {
    font-size: 0.65rem;
    word-break: break-word;
    text-align: center;
    padding: 2px 1px;
    line-height: 1.1;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .folder-icon {
    width: 50px;
    height: 40px;
  }

  .folder-icon {
    width: 50px;
    height: 40px;
  }

  #about-folder {
    top: 30px;
    left: 30px;
  }

  #projects-folder {
    top: 30px;
    left: 120px;
  }

  #contact-folder {
    top: 110px;
    left: 120px;
  }

  #services-folder {
    top: 190px;
    left: 30px;
  }

  #wallpapers-folder {
    top: 190px;
    left: 120px;
  }

  #themes-folder {
    top: 270px;
    left: 30px;
  }

  #art-folder {
    top: 110px;
    left: 30px;
  }

  #taskbar {
    height: 40px;
    padding: 0 15px;
    position: fixed;
    z-index: var(--z-taskbar);
  }

  .taskbar-time {
    font-size: 1rem;
    padding: 5px 10px;
  }

  #start-menu {
    width: 180px;
    bottom: 45px;
  }

  .start-menu-item {
    padding: 12px 10px;
  }

  button,
  .taskbar-item {
    min-height: 32px;
    padding: 8px 12px;
  }

  .about-container {
    display: flex;
    flex-direction: column;
  }

  .portrait-container {
    position: static;
    align-self: center;
    height: auto;
    margin-bottom: 15px;
    width: auto;
  }

  .portrait {
    width: auto;
    max-width: 100%;
    height: 300px;
    background-color: var(--color-gray-light);
  }

  .portrait img {
    width: auto;
    height: 100%;
    object-fit: contain;
    image-rendering: crisp-edges;
  }

  .window-content * {
    max-width: 100%;

    box-sizing: border-box;

  }

  /* Tech Stack Mobile Styles */
  .tech-stack {
    justify-content: center !important;
  }

  .tech-item {
    min-width: 50px !important;
  }

  .tech-item img {
    width: 24px !important;
    height: 24px !important;
  }

  .tech-item svg {
    width: 24px !important;
    height: 24px !important;
  }

  /* Services Grid Mobile Styles */
  .services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    padding: 0;
  }

  .service-option {
    display: flex;
    align-items: center;
    padding: 12px;
    min-height: 70px;
    width: 100%;
    box-sizing: border-box;
  }

  .service-icon {
    font-size: 28px;
    margin-right: 12px;
    min-width: 35px;
    flex-shrink: 0;
  }

  .service-info {
    flex: 1;
    overflow: hidden;
    min-width: 0;
  }

  .service-info strong {
    font-size: 14px;
    display: block;
    margin-bottom: 3px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .service-info p {
    font-size: 12px;
    line-height: 1.3;
    margin: 0;
  }

  .service-price-row {
    margin-top: 6px;
  }

  .service-tag-row {
    margin-top: 5px;
  }

  .service-popular-tag {
    font-size: 10px;
    padding: 2px 6px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .service-price-badge {
    font-size: 11px;
    padding: 2px 7px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .service-faq-section h4 {
    font-size: 15px;
  }

  .service-faq-item summary {
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .service-faq-item p {
    font-size: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .service-comparison-section h4,
  .service-process-section h4,
  .business-faq-section h4 {
    font-size: 15px;
  }

  .service-comparison-table {
    min-width: 540px;
  }

  .service-comparison-table th,
  .service-comparison-table td {
    font-size: 12px;
    padding: 7px 8px;
  }

  .compare-action-btn {
    font-size: 10px;
    padding: 3px 7px;
  }

  .service-process-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .service-process-step h5 {
    font-size: 12px;
  }

  .service-process-step p,
  .business-faq-item p {
    font-size: 12px;
  }

  .business-faq-item summary {
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .service-sticky-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .service-sticky-cta-text {
    font-size: 11px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .service-sticky-cta-btn {
    width: 100%;
    font-size: 11px;
    padding: 7px 8px;
    white-space: normal;
  }

  .project-notice {
    padding: 10px;
    margin-bottom: 14px;
  }

  .project-notice-badge {
    font-size: 10px;
    padding: 3px 8px;
    gap: 6px;
    letter-spacing: 0.25px;
  }

  .project-notice-text {
    font-size: 12px;
    line-height: 1.45;
  }

  #services-window:not(.maximized) {
    height: calc(80dvh - 40px) !important;
    min-height: 320px !important;
    max-height: calc(100dvh - 52px) !important;
  }

  #services-window .window-content {
    height: calc(100% - 30px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 10px;
  }

  /* Ensure service detail windows stay scrollable on short devices */
  #gameplay-prototyping-window:not(.maximized),
  #gameplay-programming-window:not(.maximized),
  #ui-ux-implementation-window:not(.maximized),
  #web-development-window:not(.maximized),
  #narrative-design-window:not(.maximized),
  #mentorship-consulting-window:not(.maximized) {
    max-height: calc(100dvh - 52px) !important;
  }

  #gameplay-prototyping-window .window-content,
  #gameplay-programming-window .window-content,
  #ui-ux-implementation-window .window-content,
  #web-development-window .window-content,
  #narrative-design-window .window-content,
  #mentorship-consulting-window .window-content {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #contact-window .window-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 450px;
  }

  #themes-window .window-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 18px;
  }

  #themes-window .theme-option {
    margin: 12px 0;
    padding: 12px;
    min-height: 56px;
    gap: 10px;
  }

  #themes-window .theme-preview {
    width: 46px;
    height: 34px;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .contact-brief-grid {
    grid-template-columns: 1fr;
  }

  .contact-social-hub .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .window-content {
    padding: 6px;

    overflow-x: hidden;
  }

  .contact-brief-panel {
    padding: 10px;
  }

  .contact-social-hub {
    padding: 10px;
  }

  .social-link-card {
    min-width: 134px;
    justify-content: center;
  }

  .contact-brief-actions {
    flex-direction: column;
  }

  .contact-brief-action,
  .contact-brief-link {
    width: 100%;
  }

  #themes-window .window-content {
    padding-bottom: 24px;
  }

  #themes-window .theme-option {
    margin: 14px 0;
    padding: 12px 10px;
    min-height: 60px;
  }

  #themes-window .theme-info {
    line-height: 1.35;
  }

  .about-container {
    gap: 6px;
  }

  .portrait-container {
    width: auto;
    margin-bottom: 8px;
  }

  .portrait {
    width: auto;
    max-width: 100%;
    height: 200px;

  }

  .portrait img {
    width: auto;
    height: 100%;
    object-fit: contain;
  }

  .folder {
    width: 80px;
  }

  .folder-icon {
    width: 50px;
    height: 40px;
  }

  #about-folder {
    top: 30px;
    left: 30px;
  }

  #projects-folder {
    top: 30px;
    left: 120px;
  }

  #contact-folder {
    top: 110px;
    left: 120px;
  }

  #services-folder {
    top: 190px;
    left: 30px;
    touch-action: manipulation;
  }

  #wallpapers-folder {
    top: 190px;
    left: 120px;
  }

  #themes-folder {
    top: 270px;
    left: 30px;
    touch-action: manipulation;
  }

  #art-folder {
    top: 110px;
    left: 30px;
  }
}

@media (max-width: 768px) {
  .wallpaper-preview {
    height: 100px;
  }
}

@media (max-width: 768px) {
  #thank-you-page .window {
    width: 90vw !important;
    max-width: 350px !important;
    height: auto !important;
    min-height: 300px !important;
  }

  #thank-you-page .window-content {
    padding: 20px 15px !important;
  }

  #thank-you-page .fa-check-circle {
    font-size: 3rem !important;
  }

  #thank-you-page h2 {
    font-size: 1.3rem !important;
  }

  #thank-you-page p {
    font-size: 0.9rem !important;
  }
}
@media (max-width: 768px) {
  /* Services styling for mobile */
  .service-header {
    flex-direction: column;
    text-align: center;
  }

  .service-header-icon {
    margin-right: 0;
    margin-bottom: 10px;
    font-size: 36px;
  }

  .service-section {
    margin-bottom: 15px;
  }

  .service-section h3 {
    font-size: 16px;
  }

  .service-section p,
  .service-section li {
    font-size: 14px;
  }

  .service-cta {
    padding: 15px;
  }

  .cta-button {
    width: 100%;
    padding: 10px 20px;
    font-size: 14px;
  }

  .service-icon {
    font-size: 28px;
  }

  #services-folder {
    touch-action: manipulation;
  }
}

/* Desktop Tech Stack Styles */
.tech-item img {
  width: 32px;
  height: 32px;
}

.tech-item svg {
  width: 32px;
  height: 32px;
}
