/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }

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

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .about-details {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

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

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card.featured {
    grid-column: span 2;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .section-title {
    font-size: 2.2rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  :root {
    --spacing-xs: 0.4rem;
    --spacing-sm: 0.8rem;
    --spacing-md: 1.2rem;
    --spacing-lg: 1.6rem;
    --spacing-xl: 2.4rem;
    --spacing-xxl: 3.2rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--primary-bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: var(--spacing-xxl);
    transition: left var(--transition-medium);
    box-shadow: 0 2px 20px rgba(200, 217, 240, 0.3);
  }

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

  .nav-menu li {
    margin-bottom: var(--spacing-lg);
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: var(--spacing-xl) 0;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
  }

  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

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

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: span 1;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item::before {
    display: none;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }
}

/* Large Mobile Phones */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .profile-card {
    max-width: 250px;
    padding: var(--spacing-lg);
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

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

  .skill-category {
    padding: var(--spacing-lg);
  }

  .skill-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .timeline-item,
  .about-card,
  .contact-form {
    padding: var(--spacing-lg);
  }

  .project-content {
    padding: var(--spacing-md);
  }

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

  .contact-item {
    padding: var(--spacing-md);
  }

  .section-title {
    font-size: 1.8rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

/* Small Mobile Phones */
@media (max-width: 375px) {
  :root {
    --spacing-xs: 0.3rem;
    --spacing-sm: 0.6rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.4rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 2.8rem;
  }

  .nav-container {
    padding: 0 var(--spacing-sm);
  }

  .nav-logo h3 {
    font-size: 1.3rem;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .profile-card {
    max-width: 220px;
    padding: var(--spacing-md);
  }

  .profile-image {
    width: 100px;
    height: 100px;
  }

  .skill-icon {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .contact-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .project-tech {
    gap: var(--spacing-xs);
  }

  .project-tech span {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }
}

/* Ultra-wide screens */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }

  .hero-title {
    font-size: 4rem;
  }

  .section-title {
    font-size: 3rem;
  }

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

  .project-card.featured {
    grid-column: span 2;
  }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .profile-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--spacing-lg) 0;
  }

  .nav-menu.active {
    height: calc(100vh - 60px);
    padding-top: var(--spacing-lg);
  }

  .hero-content {
    gap: var(--spacing-lg);
  }

  .profile-card {
    max-width: 200px;
    padding: var(--spacing-md);
  }

  .profile-image {
    width: 80px;
    height: 80px;
  }
}

/* Print styles */
@media print {

  .navbar,
  .hamburger,
  .back-to-top,
  .loader {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .neumorphism,
  .neumorphism-card,
  .neumorphism-button {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  .hero,
  .about,
  .skills,
  .experience,
  .projects,
  .contact {
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }

  .project-overlay {
    display: none !important;
  }

  .social-links,
  .footer-social {
    display: none !important;
  }
}

/* Focus styles for accessibility */
@media (prefers-reduced-motion: no-preference) {

  .nav-link:focus,
  .btn:focus,
  .social-link:focus,
  .project-link:focus,
  .back-to-top:focus,
  input:focus,
  textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-bg: #ffffff;
    --secondary-bg: #f5f5f5;
    --surface-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --accent-color: #0066cc;
    --shadow-light: #cccccc;
    --shadow-dark: #999999;
  }

  .neumorphism,
  .neumorphism-card,
  .neumorphism-button {
    border: 2px solid var(--accent-color);
  }

  .gradient-text {
    color: var(--accent-color);
    background: none;
    -webkit-text-fill-color: initial;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loader-circle {
    animation: none;
  }

  .status-dot {
    animation: none;
  }

  .neumorphism-animated {
    animation: none;
  }
}