/* Responsive Styles */

/* ==================== Mobile (<768px) ==================== */
@media (max-width: 767px) {
  /* Typography */
  :root {
    --font-size-h1: 2.5rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.5rem;
    --font-size-h4: 1.25rem;
  }

  /* Navigation */
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-2xl);
    padding: var(--spacing-4xl) var(--spacing-xl);
    transition: right var(--transition-normal);
    z-index: var(--z-fixed);
  }

  .nav__menu.show-menu {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .nav__link {
    font-size: var(--font-size-body-lg);
  }

  .nav__close {
    display: block;
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
  }

  .nav__toggle {
    display: block;
  }

  .nav__social {
    display: none;
  }

  /* Hero */
  .hero {
    padding-top: 100px;
    padding-bottom: var(--spacing-3xl);
  }

  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__decoration {
    display: none;
  }

  .hero__buttons {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .button {
    width: 100%;
    max-width: 280px;
  }

  /* Work */
  .work__grid {
    grid-template-columns: 1fr;
  }

  /* Notes */
  .notes__grid {
    grid-template-columns: 1fr;
  }

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

  /* Projects */
  .projects__container {
    flex-direction: column;
    overflow-x: visible;
  }

  .project__card {
    width: 100%;
  }

  /* Tools */
  .tools__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  /* Contact */
  .contact__content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .contact__info .section__title {
    text-align: center;
  }

  .contact__subtitle {
    text-align: center;
  }

  /* Modal */
  .modal__content {
    padding: var(--spacing-lg);
    width: 95%;
  }

  /* Back to Top */
  .back-to-top {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
  }
}

/* ==================== Tablet (768-1023px) ==================== */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Typography */
  :root {
    --font-size-h1: 3rem;
    --font-size-h2: 2.25rem;
    --font-size-h3: 1.75rem;
    --font-size-h4: 1.375rem;
  }

  /* Hero */
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__decoration {
    display: none;
  }

  .hero__buttons {
    justify-content: center;
  }

  /* Work */
  .work__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Notes */
  .notes__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Projects */
  .project__card {
    width: 350px;
  }

  /* Tools */
  .tools__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contact */
  .contact__content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .contact__info .section__title {
    text-align: center;
  }

  .contact__subtitle {
    text-align: center;
  }
}

/* ==================== Desktop (≥1024px) ==================== */
@media (min-width: 1024px) {
  /* All default styles are for desktop */
}

/* ==================== Large Screen (≥1440px) ==================== */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
}

/* ==================== Print Styles ==================== */
@media print {
  .header,
  .nav__toggle,
  .back-to-top,
  .modal {
    display: none;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }

  body {
    color: #000;
    background: #fff;
  }
}

/* ==================== Reduced Motion ==================== */
@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;
  }
}

/* ==================== High Contrast ==================== */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #0000EE;
    --color-neutral-400: #666666;
    --color-neutral-600: #333333;
    --color-neutral-800: #000000;
  }
}

/* ==================== Touch Devices ==================== */
@media (hover: none) and (pointer: coarse) {
  .work__card:hover,
  .note__card:hover,
  .project__card:hover,
  .tool__card:hover,
  .contact__card:hover {
    transform: none;
  }

  .button:hover {
    transform: none;
  }
}
