@media screen and (max-width: 1000px) {
  p {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  .grid-3 {
    gap: 1rem;
  }

  .skills-right ul li {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 825px) {
  /* Burger */
  .burger {
    display: block;
    cursor: pointer;
  }

  .toggle-burger .line-1 {
    transform: rotate(-45deg) translate(-5px, 7px);
  }

  .toggle-burger .line-2 {
    opacity: 0;
  }

  .toggle-burger .line-3 {
    transform: rotate(45deg) translate(-5px, -7px);
  }

  /* Navigation */
  nav {
    position: fixed;
    width: 50%;
    right: 0;
    top: 0;
    height: 100vh;
    flex-direction: column;
    background: var(--primaryBackgroundColor);
    border-left: 1px solid var(--borderColor);
    z-index: 9;
    transform: translateX(100%);
    transition: 0.2s ease-in-out;
  }

  nav ul {
    height: 100vh;
    align-items: center;
    flex-direction: column;
    justify-content: center;
  }

  .nav-active {
    transform: translateX(0);
  }
  /* End of Navigation */

  :root {
    --sectionPadding: 4rem 0;
  }

  /* Titles */
  .section-title {
    font-size: 1.6rem;
    margin: 0.6rem 0 2.5rem;
  }

  .pre-title {
    font-size: 0.8rem;
  }

  /* Hero Section */
  #hero {
    grid-template-columns: 1fr;
    height: fit-content;
  }

  .hero-right {
    order: -1;
  }

  .hero-right img {
    width: 70%;
  }

  .hero-left {
    text-align: center;
    padding-bottom: 5rem;
  }

  .hero-left .pre-title {
    margin: 0 auto;
  }

  .hero-name {
    font-size: 2.3rem;
    margin-bottom: 0.5rem;
  }

  /* Skills Section */
  .skills-grid {
    gap: 1rem;
  }

  /* Footer */
  footer {
    padding: 2rem 0;
  }
}

/* Mobile Size */
@media screen and (max-width: 640px) {
  /* Titles */
  .section-title {
    font-size: 1.3rem;
  }

  .pre-title {
    font-size: 0.7rem;
  }
}

/* Additional responsive styles for the new design */

/* Large screens */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }

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

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

/* Medium screens */
@media (max-width: 1199px) and (min-width: 769px) {
  .hero-content {
    gap: var(--spacing-2xl);
  }

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

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

/* Tablet and small desktop */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }

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

  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .about-content {
    gap: var(--spacing-2xl);
  }
}

/* Mobile landscape */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
  }
  .hero-content {
    width: 100% !important;
    max-width: 100% !important;
  }
  .hero-container {
    width: 100% !important;
    max-width: 100% !important;
  }
  .container {
    width: 100% !important;
    max-width: 100% !important;
  }
  .nav-toggle {
    display: flex !important;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    padding: var(--spacing-xl);
    gap: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

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

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

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

  .hero-visual,
  .hero-image {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 2rem !important;
  }
  .hero-image img {
    max-width: 90vw !important;
    height: auto !important;
    display: block !important;
  }
  .hero,
  .hero-container,
  .hero-content,
  .hero-visual,
  .hero-image {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .service-card,
  .project-card {
    padding: var(--spacing-lg);
  }

  .contact-form {
    padding: var(--spacing-lg);
  }
}

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

  .hero {
    padding: 100px 0 var(--spacing-2xl);
  }

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

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

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

  .service-card,
  .project-card {
    padding: var(--spacing-md);
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

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

  .project-image {
    height: 200px;
  }

  .service-icon {
    width: 50px;
    height: 50px;
  }

  .service-icon img {
    width: 28px;
    height: 28px;
  }

  .contact-icon {
    width: 45px;
    height: 45px;
  }

  .contact-icon svg {
    width: 20px;
    height: 20px;
  }

  .social-links a {
    width: 40px;
    height: 40px;
  }

  .social-links svg {
    width: 18px;
    height: 18px;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.75rem;
  }

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

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

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

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

  .service-card,
  .project-card {
    padding: var(--spacing-sm);
  }

  .contact-form {
    padding: var(--spacing-sm);
  }
}

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

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-image img {
    animation: none;
  }
}

/* Dark mode support (if needed in the future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

/* Print styles */
@media print {
  .navbar,
  .nav-toggle,
  .hero-actions,
  .project-overlay,
  .contact-form,
  .footer {
    display: none !important;
  }

  .hero {
    padding: 0;
    min-height: auto;
  }

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

  .services,
  .projects,
  .about,
  .contact {
    padding: var(--spacing-lg) 0;
  }

  .service-card,
  .project-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .container {
    max-width: none;
    padding: 0;
  }
}
