/* Responsive Styles for Simple Personal Website */

/* Tablet Styles */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-8);
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
  }
  
  .profile-photo {
    width: 240px;
    height: 240px;
  }
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  /* Show mobile toggle button */
  .nav-toggle {
    display: flex !important;
    z-index: 101;
  }
  
  /* Hide desktop navigation menu by default */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-background);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    padding: var(--spacing-4);
    gap: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
  }
  
  /* Show navigation menu when active */
  .nav-menu.active {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
  }
  
  .nav-item {
    width: 100%;
    display: block !important;
    opacity: 1;
    transform: translateY(0);
  }
  
  .nav-link {
    display: block !important;
    padding: var(--spacing-4);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--font-size-lg);
    position: relative;
    overflow: visible;
    width: 100%;
    opacity: 1 !important;
  }
  
  .nav-item:last-child .nav-link {
    border-bottom: none;
  }
  
  /* Mobile-specific hover effects */
  .nav-link:hover {
    background-color: rgba(37, 99, 235, 0.05);
    transform: none;
  }
  
  .nav-link::after {
    display: none;
  }
  
  /* AI Chat Link in mobile */
  .ai-chat-link {
    display: flex !important;
    justify-content: center;
    width: 100%;
  }
  
  /* Adjust section padding for mobile */
  section {
    padding: var(--spacing-12) 0;
  }
  
  .hero-section {
    padding: var(--spacing-16) 0;
  }
  
  /* Mobile typography adjustments */
  .hero-title {
    font-size: var(--font-size-3xl);
  }
  
  .section-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-8);
  }
  
  /* Mobile profile photo */
  .profile-photo {
    width: 200px;
    height: 200px;
  }
  
  /* Mobile button adjustments */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-3);
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  /* Mobile skills grid */
  .skills-list {
    grid-template-columns: 1fr;
  }
  
  /* Mobile form adjustments */
  .contact-form {
    gap: var(--spacing-4);
  }
  
  .form-submit {
    width: 100%;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  /* Reduce container padding */
  .nav-container,
  .hero-container,
  .about-container,
  .contact-container,
  .footer-container {
    padding: 0 var(--spacing-3);
  }
  
  /* Further reduce typography */
  .hero-title {
    font-size: var(--font-size-2xl);
  }
  
  .section-title {
    font-size: var(--font-size-xl);
  }
  
  .site-title {
    font-size: var(--font-size-lg);
  }
  
  /* Smaller profile photo */
  .profile-photo {
    width: 160px;
    height: 160px;
  }
  
  /* Adjust spacing */
  section {
    padding: var(--spacing-10) 0;
  }
  
  .hero-section {
    padding: var(--spacing-12) 0;
  }
  
  .hero-content,
  .about-content,
  .contact-content {
    gap: var(--spacing-6);
  }
  
  /* Mobile content blocks */
  .content-block {
    padding: var(--spacing-4);
  }
  
  /* Mobile navigation adjustments */
  .nav-menu {
    padding: var(--spacing-3);
  }
  
  .nav-link {
    padding: var(--spacing-3);
    font-size: var(--font-size-base);
  }
}

/* Landscape Mobile Styles */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    padding: var(--spacing-8) 0;
  }
  
  .profile-photo {
    width: 140px;
    height: 140px;
  }
  
  .hero-content {
    grid-template-columns: auto 1fr;
    text-align: left;
    gap: var(--spacing-6);
  }
}

/* High DPI / Retina Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .profile-photo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1f2937;
    --color-text: #f9fafb;
    --color-text-light: #d1d5db;
    --color-border: #374151;
  }
  
  .header {
    background-color: var(--color-background);
  }
  
  .nav-menu {
    background-color: var(--color-background);
  }
  
  .form-input,
  .form-textarea {
    background-color: var(--color-background);
    color: var(--color-text);
  }
}