/* Tablet Styles */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px 0;
  }

  .container {
    padding: 0 20px;
  }

  .nav-container {
    padding: 0 20px;
  }

  /* Services grid adjustment */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  /* About section */
  .about-content {
    gap: 60px;
  }

  .about-visual {
    height: 300px;
  }

  .crystal-structure {
    width: 150px;
    height: 150px;
  }

  .crystal-face {
    width: 75px;
    height: 75px;
  }

  /* Work grid */
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  /* Clients section */
  .clients {
    padding: 60px 0;
  }

  .clients .section-title {
    font-size: 1.1rem;
    margin-bottom: 40px;
  }

  .clients-track {
    gap: 80px;
  }

  .client-name {
    font-size: 1rem;
  }

  /* Navigation adjustments */
  .nav-menu {
    gap: 24px;
  }

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

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  body {
    cursor: auto;
  }

  /* Hide custom cursor on mobile */
  .cursor-dot,
  .cursor-outline {
    display: none;
  }

  /* Mobile Navigation */
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .cta-button {
    display: none;
  }

  .navbar {
    padding: 16px 0;
  }

  .nav-container {
    padding: 0 16px;
  }

  /* Hero Section */
  .hero {
    padding-top: 80px;
    min-height: 90vh;
  }

  /* Adjust sun effect for mobile */
  body::after {
    height: 1200px !important;
    background: 
      radial-gradient(ellipse 216% 120% at center top, 
        rgba(255, 206, 84, 0.40) 0%,
        rgba(255, 154, 0, 0.32) 8%,
        rgba(255, 94, 77, 0.24) 16%,
        rgba(212, 51, 241, 0.18) 26%,
        rgba(138, 67, 243, 0.12) 38%,
        rgba(74, 101, 246, 0.06) 50%,
        rgba(74, 101, 246, 0.03) 60%,
        transparent 70%
      ) !important;
  }

  .hero-title {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .hero-cta {
    padding: 14px 28px;
    font-size: 1rem;
  }

  /* Section titles */
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }

  /* Services Section */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .services-grid .service-card:nth-child(3) {
    grid-column: span 1;
    max-width: none;
  }

  .service-card {
    padding: 32px 24px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  .service-card .service-icon {
    margin-bottom: 20px;
    flex-shrink: 0;
  }

  .service-card .service-title {
    margin-bottom: 16px;
    flex-shrink: 0;
  }

  .service-card .service-description {
    flex-grow: 1;
    display: flex;
    align-items: center;
  }

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

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

  .service-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .service-description {
    font-size: 0.95rem;
  }

  /* Work Section */
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .work-item {
    aspect-ratio: 16/10;
  }

  /* Products Section */
  .product-item.full-width {
    aspect-ratio: 16/10;
  }

  .product-image img {
    object-position: left center;
  }

  .product-overlay {
    padding: 24px;
  }

  .product-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .product-category {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .product-description {
    font-size: 0.95rem;
  }

  .product-button {
    padding: 14px 28px;
    font-size: 0.95rem;
    margin-top: 16px;
  }

  .work-title {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }

  .work-category {
    font-size: 0.9rem;
  }

  /* About Section */
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-text .section-title {
    text-align: center;
    margin-bottom: 24px;
  }

  .about-text p {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .about-visual {
    height: 200px;
    order: -1;
  }

  .crystal-structure {
    width: 120px;
    height: 120px;
  }

  .crystal-face {
    width: 60px;
    height: 60px;
  }

  /* Contact Section */
  .contact {
    padding: 60px 0;
  }

  .contact-content {
    padding: 60px 28px 48px;
    max-width: 520px;
    margin: 0 auto;
  }

  .contact .section-title {
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .contact-subtitle {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 40px;
    text-align: center;
    padding: 0 8px;
  }

  .contact-action {
    margin-top: 32px;
  }

  .email-button {
    padding: 20px 36px;
    font-size: 1.05rem;
    width: auto;
    min-width: 300px;
    text-align: center;
    margin-bottom: 8px;
  }

  .contact-details {
    flex-direction: column;
    gap: 36px;
    margin-top: 48px;
    padding-top: 36px;
  }

  .contact-item {
    justify-content: center;
    text-align: center;
    padding: 0 16px;
    flex-direction: column;
    align-items: center;
  }

  .contact-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
    order: -1;
  }

  .contact-label {
    font-size: 0.9rem;
    margin-bottom: 2px;
  }

  .contact-value {
    font-size: 1rem;
    font-weight: 500;
  }

  .contact-note {
    font-size: 0.85rem;
    padding: 0 20px;
  }

  /* Footer */
  .footer {
    padding: 40px 0 32px;
  }

  .footer-content {
    gap: 24px;
  }

  .footer-icon {
    width: 32px;
    height: 32px;
  }

  /* Clients section mobile */
  .clients {
    padding: 40px 0;
  }

  .clients .section-title {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .clients-track {
    gap: 60px;
  }

  .clients-track-top {
    animation: scroll-logos-right 30s linear infinite;
  }

  .clients-track-bottom {
    animation: scroll-logos-left 35s linear infinite;
  }

  .client-name {
    font-size: 0.9rem;
  }

  .footer-social {
    gap: 20px;
  }

  .social-link {
    width: 36px;
    height: 36px;
  }

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

  .footer-copyright {
    font-size: 0.85rem;
  }

  .footer-links {
    gap: 12px;
  }

  .footer-link,
  .footer-separator {
    font-size: 0.85rem;
  }

  /* Modal responsive */
  .modal-header {
    padding: 24px 20px 16px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 24px 20px;
  }

  .modal-close svg {
    width: 20px;
    height: 20px;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  /* Further reduce sun effect for small mobile */
  body::after {
    height: 900px !important;
    background: 
      radial-gradient(ellipse 192% 100% at center top, 
        rgba(255, 206, 84, 0.35) 0%,
        rgba(255, 154, 0, 0.28) 8%,
        rgba(255, 94, 77, 0.20) 15%,
        rgba(212, 51, 241, 0.15) 25%,
        rgba(138, 67, 243, 0.10) 35%,
        rgba(74, 101, 246, 0.05) 45%,
        transparent 60%
      ) !important;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

  .contact-content {
    padding: 56px 24px 48px;
  }

  .contact .section-title {
    font-size: 1.7rem;
    line-height: 1.25;
    margin-bottom: 20px;
  }

  .contact-subtitle {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 40px;
  }

  .email-button {
    padding: 18px 32px;
    font-size: 1rem;
    min-width: 280px;
    margin-bottom: 12px;
  }

  .contact-details {
    gap: 28px;
    margin-top: 40px;
    padding-top: 32px;
  }

  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 8px;
    order: -1;
  }

  .contact-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }

  .contact-value {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .service-card {
    padding: 24px 20px;
    min-height: 200px;
  }

  .service-title {
    font-size: 1rem;
  }

  .service-description {
    font-size: 0.9rem;
  }

  /* Products section mobile */
  .product-image img {
    object-position: left center;
  }

  /* Touch-friendly product interactions */
  .product-item {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .product-button {
    pointer-events: auto;
    z-index: 10;
    position: relative;
  }

  /* Touch-friendly product interactions */
  .product-item {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .product-button {
    pointer-events: auto;
    z-index: 10;
    position: relative;
  }

  /* Small mobile portfolio grid */
  .work-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Small mobile products */
  .product-item.full-width {
    aspect-ratio: 4/3;
  }

  .product-image img {
    object-position: left center;
  }

  .product-overlay {
    padding: 20px;
  }

  .product-title {
    font-size: 1.1rem;
  }

  .product-category {
    font-size: 0.95rem;
  }

  .product-description {
    font-size: 0.9rem;
  }

  .product-button {
    padding: 12px 24px;
    font-size: 0.9rem;
    margin-top: 12px;
  }
}

  /* Mobile Menu */
  .mobile-menu-content {
    gap: 24px;
  }

  .mobile-nav-link {
    font-size: 1.25rem;
  }

  .mobile-cta-button {
    margin-top: 16px;
    padding: 14px 32px;
  }

  /* Disable hover effects on mobile */
  .service-card:hover {
    transform: none;
    box-shadow: none;
  }

  .work-item:hover {
    transform: none;
    box-shadow: none;
  }

  .work-item:hover .work-image img {
    transform: none;
  }

  /* Enable touch interactions for portfolio */
  .work-item {
    cursor: pointer;
  }

  .work-item.active .work-overlay {
    opacity: 1;
  }

  .work-item.active .work-image img {
    transform: scale(1.05);
  }

  /* Typography adjustments */
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.2rem;
    line-height: 1.4;
  }

  p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Reduce animation intensity on mobile */
  .service-card,
  .work-item {
    transition: all 0.2s ease;
  }

  /* Optimize constellation for mobile */
  #constellation-canvas {
    opacity: 0.6;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .nav-container {
    padding: 0 16px;
  }

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

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

  .service-card {
    padding: 24px 20px;
  }

  .contact-form {
    gap: 28px;
  }

  .footer {
    padding: 32px 0 24px;
  }

  .about-visual {
    height: 160px;
  }

  .crystal-structure {
    width: 100px;
    height: 100px;
  }

  .crystal-face {
    width: 50px;
    height: 50px;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding-top: 60px;
  }

  .hero-title {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  :root {
    --section-padding: 50px 0;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo,
  .footer-icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

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

  .constellation-canvas {
    display: none;
  }

  .crystal-structure {
    animation: none;
  }

  .hero-cta {
    animation: none;
  }
}

/* Print Styles */
@media print {
  *,
  *::before,
  *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .navbar,
  .mobile-menu-overlay,
  #constellation-canvas,
  .contact-form,
  .footer-social {
    display: none !important;
  }

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

  section {
    padding: 20px 0;
    page-break-inside: avoid;
  }

  .section-title {
    page-break-after: avoid;
  }

  .service-card,
  .work-item {
    page-break-inside: avoid;
    margin-bottom: 20px;
  }
}
