/* ===== MOBILE FIRST RESPONSIVE DESIGN ===== */
/* File: assets/css/responsive.css */

/* Hero Avatar Responsive Styles */
@media (max-width: 768px) {
  .hero-avatar {
    width: 250px !important;
    height: 250px !important;
  }
  
  .hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
  }
  
  /* Tablet Hero Stats */
  .hero-stats {
    gap: 2rem;
    flex-wrap: wrap;
  }
  
  .stat {
    min-width: 100px;
    flex: none;
  }
}

@media (max-width: 480px) {
  .hero-avatar {
    width: 200px !important;
    height: 200px !important;
  }
  
  .hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .hero-stats {
    gap: 0.8rem !important;
    padding: 0 0.5rem !important;
  }
  
  .stat {
    min-width: 60px !important;
    max-width: 80px !important;
  }
  
  .stat-number {
    font-size: 1.2rem !important;
  }
  
  .stat-label {
    font-size: 0.7rem !important;
  }
}

/* Base mobile styles (320px+) */
@media (max-width: 480px) {
  /* Typography scaling */
  html {
    font-size: 14px;
  }
  
  /* Hero Stats Mobile Fix */
  .hero-stats {
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    margin-top: 2rem !important;
    padding: 0 1rem !important;
  }
  
  .stat {
    text-align: center !important;
    min-width: 70px !important;
    flex: 1 !important;
    max-width: 90px !important;
  }
  
  .stat-number {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.3rem !important;
  }
  
  .stat-label {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Header mobile optimization */
  .header {
    padding: 0.75rem 1rem;
    backdrop-filter: blur(15px);
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
    z-index: 998;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 1rem 0;
  }

  .nav-menu a {
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
    display: block;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 999;
  }

  .hamburger span {
    width: 25px;
    height: 3px;
    background: var(--cyan);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
  }

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

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

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

  /* Hero section mobile */
  .hero {
    padding: 6rem 1rem 4rem;
    text-align: center;
    min-height: 80vh;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero .subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }

  .hero .description {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
  }

  /* Stats mobile optimization */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }

  .stat-item {
    padding: 1.5rem 1rem;
  }

  .stat-number {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }

  .stat-text {
    font-size: 0.85rem;
  }

  /* Services mobile */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  /* Timeline mobile */
  .timeline {
    padding: 0 1rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-left: 50px;
    margin-bottom: 2rem;
  }

  .timeline-item::before {
    left: 15px;
    width: 10px;
    height: 10px;
  }

  .timeline-date {
    position: static;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
  }

  .timeline-content {
    padding: 1rem;
  }

  /* Contact form mobile */
  .contact-form {
    padding: 0 1rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-control {
    padding: 0.75rem;
    font-size: 1rem;
  }

  /* Buttons mobile */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .btn-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Portfolio grid mobile */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }

  .portfolio-item {
    margin-bottom: 1rem;
  }

  /* Footer mobile */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

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

  /* Particles canvas mobile */
  #particles-canvas {
    opacity: 0.3; /* Reduce particle intensity on mobile */
  }

  /* Touch interactions */
  .service-card,
  .portfolio-item,
  .btn {
    -webkit-tap-highlight-color: rgba(0, 255, 255, 0.1);
  }

  /* Scroll performance */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* Tablet styles (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .btn-group {
    flex-direction: row;
    justify-content: center;
  }

  .btn {
    width: auto;
  }
}

/* Desktop small (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 95%;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* High resolution displays */
@media (min-resolution: 192dpi) {
  .hero {
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
  }

  .particles-bg {
    opacity: 0.8;
  }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 4rem 1rem 2rem;
    min-height: 90vh;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .description {
    margin-bottom: 1rem;
  }

  .nav-menu {
    height: calc(100vh - 60px);
    top: 60px;
  }
}

/* Dark mode mobile adjustments */
@media (prefers-color-scheme: dark) {
  .nav-menu {
    background: rgba(5, 5, 5, 0.98);
  }

  .service-card,
  .portfolio-item {
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* Reduced motion mobile */
@media (prefers-reduced-motion: reduce) {
  .nav-menu {
    transition: none;
  }

  .hamburger span {
    transition: none;
  }

  #particles-canvas {
    display: none;
  }

  .service-card,
  .portfolio-item {
    transform: none !important;
  }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }

  .form-control {
    border-radius: 8px;
    -webkit-appearance: none;
    appearance: none;
  }

  .btn {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 8px;
  }
}

/* Android specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
  select {
    background-image: none;
  }

  input[type="submit"],
  input[type="button"],
  button {
    -webkit-appearance: none;
    appearance: none;
  }
}