/* Responsive styles */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
  :root {
    --container-width: 960px;
  }
  
  .hero-title {
    font-size: clamp(28px, 4vw, 48px);
  }
  
  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
  :root {
    --container-width: 720px;
    --spacing-xxxl: 48px;
    --spacing-xxl: 36px;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .about-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .contact-links {
    margin-top: var(--spacing-lg);
  }

  .modal-content {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    max-height: 100vh;
  }

  .modal-body {
    grid-template-columns: 1fr;
    padding: var(--spacing-lg);
    height: 100%;
    overflow-y: auto;
  }

  .modal-main {
    overflow: visible;
    padding-right: 0;
  }

  .modal-sidebar {
    position: relative;
    top: 0;
    order: -1;
    margin-bottom: var(--spacing-xl);
  }

  .modal-image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .modal-image-container {
    aspect-ratio: 16/9;
  }

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

  .modal-variants {
    flex-wrap: wrap;
  }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
  :root {
    --container-width: 540px;
    --spacing-xxxl: 40px;
    --spacing-xxl: 32px;
    --spacing-xl: 24px;
  }
  
  .hero-title {
    font-size: clamp(24px, 6vw, 36px);
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .project-details {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
  }

  .modal-body {
    padding: var(--spacing-md);
  }

  .modal-sidebar {
    padding: var(--spacing-md);
  }

  .modal-variants {
    gap: var(--spacing-sm);
  }

  .variant-button {
    font-size: 14px;
    padding: 8px 16px;
  }

  .nav-button {
    font-size: 14px;
    padding: 8px 16px;
  }

  .close-button {
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .modal h2 {
    font-size: 24px;
  }

  .modal p {
    font-size: 16px;
  }

  .detail-value {
    font-size: 20px;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --container-width: 100%;
    --spacing-lg: 16px;
    --header-height: 64px;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .hero {
    padding-top: calc(var(--header-height) + var(--spacing-xl));
    padding-bottom: var(--spacing-xl);
  }
  
  .hero-title {
    font-size: 28px;
    margin-bottom: var(--spacing-lg);
  }
  
  .hero-info {
    font-size: 16px;
  }
  
  .about-text h2,
  .contact-heading h2 {
    font-size: 32px;
  }
  
  .about-intro {
    font-size: 18px;
  }
  
  .about-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .primary-button,
  .secondary-button {
    width: 100%;
    text-align: center;
  }
  
  .contact-links {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .contact-column:nth-child(2) {
    margin-top: var(--spacing-md);
  }

  .modal-body {
    padding: var(--spacing-md);
  }

  .modal-sidebar {
    padding: var(--spacing-md);
  }

  .modal h2 {
    font-size: 24px;
    margin-bottom: var(--spacing-sm);
  }

  .modal p {
    font-size: 16px;
  }

  .detail-value {
    font-size: 18px;
  }
}