/* Mobile-First Styles */

/* Navbar Mobile Styles */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    padding: 12px 16px !important;
    height: auto !important;
    min-height: 60px;
    gap: 10px !important;
    border-radius: 16px !important;
    margin: 10px auto !important;
    width: 98% !important;
  }

  .nav-left {
    width: auto;
    justify-content: flex-start !important;
  }

  .nav-brand {
    font-size: 1.1rem;
  }

  .nav-center {
    display: none !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100%;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .nav-center.open {
    display: flex !important;
  }

  .nav-center a {
    padding: 10px 16px !important;
    font-size: 1rem;
    text-align: center;
    width: 100%;
  }

  .nav-ideas-btn {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
  }

  .hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Mobile nav ideas button */
  .mobile-ideas-btn {
    display: block !important;
    width: 100%;
    text-align: center;
    background: white;
    color: black;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
  }
}

/* Hide hamburger on desktop */
.hamburger {
  display: none;
}

.mobile-ideas-btn {
  display: none;
}

/* Main Content Mobile */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(1.8rem, 7vw, 2.5rem) !important;
    padding: 0 10px;
  }

  h1.css-arch-underline::after {
    height: 50px;
    bottom: -40px;
  }

  h2 {
    font-size: 1.3rem !important;
    padding: 0 15px;
  }

  .main-text-area-container {
    width: 96% !important;
    margin: 20px auto !important;
    flex-direction: column !important;
  }

  .main-text-area-container:has(.main-text-area:focus) {
    width: 96% !important;
  }

  .main-text-area {
    min-height: 120px !important;
    font-size: 16px !important;
  }

  .main-text-area-button-container {
    flex: none !important;
    min-height: auto !important;
    padding: 8px !important;
    justify-content: center;
  }

  .main-text-area-button {
    width: 100% !important;
    height: 48px !important;
    border-radius: 8px !important;
    font-size: 1.2rem !important;
  }

  /* Spacer adjustment */
  .spacer {
    height: 60px !important;
  }
}

/* About Section Mobile */
@media (max-width: 768px) {
  .about {
    padding: 5px !important;
    gap: 10px !important;
  }

  .about.visible {
    flex-direction: column;
  }

  .video-wrapper {
    width: 96% !important;
    margin: 0 auto;
  }

  .video-wrapper iframe {
    height: 250px !important;
  }

  .about-text {
    width: 96% !important;
    margin: 0 auto;
    padding: 20px !important;
  }

  .about-text h1 {
    font-size: 1.6rem !important;
  }

  .about-text h4 {
    font-size: 1rem !important;
    line-height: 1.5;
  }

  .about-text ul {
    padding-left: 10px;
  }

  .about-text li {
    font-size: 0.95rem;
  }
}

/* Footer Mobile */
@media (max-width: 768px) {
  footer {
    padding: 30px 15px 15px !important;
  }

  .footer-content {
    gap: 25px !important;
  }

  .footer-section {
    min-width: 100% !important;
  }

  .footer-section h3 {
    text-align: center !important;
    font-size: 1.1rem !important;
  }

  .footer-links {
    align-items: center;
  }

  .footer-links a {
    font-size: 0.9rem;
    padding: 4px 0;
  }
}

/* Touch Targets - ensure minimum 44px touch targets */
@media (max-width: 768px) {
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Projects Grid Mobile */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 96% !important;
  }

  .project-card {
    padding-top: 0 !important;
  }

  .project-inner {
    padding: 10px !important;
  }

  .project-title {
    font-size: 0.9rem !important;
    margin: 5px 0 0 0;
  }

  .project-desc {
    font-size: 0.75rem !important;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .modified-date {
    font-size: 0.65rem !important;
  }
}

@media (max-width: 400px) {
  .projects-grid {
    grid-template-columns: 1fr !important;
  }
}

/* General Mobile Adjustments */
@media (max-width: 768px) {
  body {
    align-items: stretch !important;
  }

  /* Create page messaging */
  .messaging-text-area-container {
    flex-direction: column !important;
    height: auto !important;
    padding: 10px !important;
    gap: 8px !important;
  }

  .messaging-text-area {
    width: 100% !important;
    height: 60px !important;
  }

  .messaging-text-area-submit {
    width: 100% !important;
    height: 44px !important;
  }

  .message-bubble-outgoing,
  .message-bubble-incoming {
    width: 90% !important;
    font-size: 0.9rem !important;
  }
}
