/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Mobile First - Base styles for phones */
@media (max-width: 480px) {
  
  /* Typography adjustments */
  body {
    font-size: 14px;
    line-height: 1.5;
  }
  
  h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  h4 {
    font-size: 1rem;
  }
  
  /* Header and Navigation */
  .navbar {
    padding: 0.5rem 0;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .navbar-brand img {
    height: 30px;
  }
  
  .navbar-nav {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
  }
  
  .nav-link {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    text-align: center;
    width: 100%;
  }
  
  /* Hero Section */
  .hero {
    min-height: 50vh;
    background-attachment: scroll;
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    animation: none; /* Disable typewriter on mobile */
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    animation: none;
  }
  
  /* Buttons */
  .btn-terminal {
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  /* Sections */
  .section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  /* Cards */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-header,
  .card-body {
    padding: 1rem;
  }
  
  /* Gallery */
  .gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  /* Forms */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }
  
  .form-textarea {
    min-height: 100px;
  }
  
  /* Contact Info */
  .contact-info {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .contact-item {
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .footer-section {
    text-align: center;
  }
  
  /* ASCII Art */
  .ascii-art {
    font-size: 0.6rem;
    margin: 1rem 0;
  }
  
  /* Service Lists */
  .service-list li {
    padding: 0.8rem 0 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  /* Blog Posts */
  .blog-post {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .blog-meta {
    font-size: 0.8rem;
  }
  
  /* Utility adjustments */
  .mb-1 { margin-bottom: 0.3rem; }
  .mb-2 { margin-bottom: 0.8rem; }
  .mb-3 { margin-bottom: 1rem; }
  .mb-4 { margin-bottom: 1.5rem; }
  
  .mt-1 { margin-top: 0.3rem; }
  .mt-2 { margin-top: 0.8rem; }
  .mt-3 { margin-top: 1rem; }
  .mt-4 { margin-top: 1.5rem; }
  
  .p-1 { padding: 0.3rem; }
  .p-2 { padding: 0.8rem; }
  .p-3 { padding: 1rem; }
  .p-4 { padding: 1.5rem; }
}

/* Tablet styles */
@media (min-width: 481px) and (max-width: 768px) {
  
  /* Typography */
  body {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  /* Navigation */
  .navbar-nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
  }
  
  /* Hero */
  .hero {
    min-height: 55vh;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  /* Gallery */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large tablet / small desktop */
@media (min-width: 769px) and (max-width: 1024px) {
  
  /* Navigation */
  .navbar-nav {
    gap: 1.5rem;
  }
  
  /* Gallery */
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  
  /* Remove hover effects for touch devices */
  .card:hover,
  .gallery-item:hover,
  .blog-post:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.1);
  }
  
  .gallery-item:hover img {
    transform: none;
  }
  
  .gallery-overlay {
    opacity: 1;
    background: rgba(15, 15, 35, 0.7);
  }
  
  /* Larger touch targets */
  .btn-terminal {
    min-height: 44px;
    padding: 1rem 2rem;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .contact-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  
  /* Sharper text rendering */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Adjust shadows for better visibility */
  .card {
    box-shadow: 0 2px 10px rgba(0, 255, 65, 0.15);
  }
  
  .card:hover {
    box-shadow: 0 4px 25px rgba(0, 255, 65, 0.25);
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  
  .hero {
    min-height: 40vh;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .section {
    padding: 1.5rem 0;
  }
  
  .navbar-nav {
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  
  .nav-link {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Very small screens (less than 320px) */
@media (max-width: 320px) {
  
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .hero-title {
    font-size: 1.3rem;
  }
  
  .hero-subtitle {
    font-size: 0.8rem;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  .navbar-brand img {
    height: 25px;
  }
  
  .nav-link {
    font-size: 0.6rem;
    padding: 0.3rem 0.5rem;
  }
  
  .btn-terminal {
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
  }
  
  .card-header,
  .card-body {
    padding: 0.8rem;
  }
  
  .contact-info {
    padding: 0.8rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.6rem;
    font-size: 0.8rem;
  }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
  
  /* Ensure minimum touch target size */
  button,
  input[type="submit"],
  input[type="button"],
  .btn-terminal,
  .nav-link,
  a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve focus visibility */
  *:focus {
    outline: 2px solid var(--terminal-green);
    outline-offset: 2px;
  }
  
  /* Better spacing for readability */
  p {
    margin-bottom: 1.2rem;
  }
  
  /* Ensure text doesn't get too small */
  .footer-bottom {
    font-size: 0.9rem;
  }
  
  .blog-meta {
    font-size: 0.85rem;
  }
}

/* Print styles (bonus) */
@media print {
  .header,
  .footer,
  .navbar,
  .btn-terminal {
    display: none;
  }
  
  body {
    background: white;
    color: black;
    font-family: serif;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black;
    text-shadow: none;
  }
  
  .card {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
  
  .gallery {
    display: none;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .contact-info {
    border: 1px solid #ccc;
    background: white;
  }
}