/* Responsive Navigation */
@media (max-width: 1120px) {
  :root {
    --nav-height: 72px;
  }

  .menu-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 1rem;
    right: 1rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem;
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: var(--radius);
    background: rgba(7, 11, 20, 0.96);
    box-shadow: var(--glow), 0 30px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
  }
}

/* Tablet Layout */
@media (max-width: 980px) {
  .section {
    padding: 5.2rem 0;
  }

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

  .glitch {
    font-size: 4.6rem;
  }

  .about-grid,
  .contact-layout,
  .projects-grid {
    grid-template-columns: 1fr;
  }

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

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

}

/* Mobile Layout */
@media (max-width: 680px) {
  body {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-glow {
    display: none;
  }

  .container,
  .hero-inner {
    width: min(100% - 1.25rem, 1160px);
  }

  .section {
    padding: 4.4rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

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

  .hero {
    min-height: 100svh;
    padding-top: calc(var(--nav-height) + 2rem);
  }

  .hero-kicker {
    font-size: 0.78rem;
  }

  .hero-kicker::before,
  .hero-kicker::after {
    width: 20px;
  }

  .glitch {
    font-size: 3.25rem;
  }

  .direction-tagline {
    font-size: 1.08rem;
  }

  .typewriter {
    align-items: center;
    flex-direction: column;
    font-size: 1.05rem;
  }

  .typewriter-text {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
  }

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

  .hero-actions,
  .project-actions {
    width: 100%;
    justify-content: stretch;
  }

  .hero-actions .btn,
  .project-actions .btn,
  .project-actions .text-link {
    width: 100%;
    justify-content: center;
  }

  .project-visual {
    padding: 0.8rem 0.8rem 0;
  }

  .visual-placeholder {
    min-height: 210px;
  }

  .visual-title {
    font-size: 1.08rem;
  }

  .project-content {
    padding: 0.95rem 0.95rem 1rem;
  }

  .project-heading {
    align-items: start;
  }

  .project-title {
    font-size: 1.16rem;
  }

  .project-facts div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .timeline {
    margin-left: 0.4rem;
    padding-left: 1.55rem;
  }

  .timeline-item {
    padding: 1.15rem;
  }

  .timeline-item::before {
    left: calc(-1.55rem - 8px);
  }

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

  .achievement-card {
    grid-template-columns: 1fr;
  }

  .contact-title {
    font-size: 2.35rem;
  }

  .contact-method {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 0.65rem;
  }

  .lightbox-header {
    padding: 1rem 1rem 0.75rem;
  }

  .lightbox-header h2 {
    font-size: 1.1rem;
  }

  .lightbox-stage {
    padding: 1rem;
  }

  .lightbox-placeholder {
    min-height: 300px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .glitch {
    font-size: 2.55rem;
  }

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

  .hero-kicker {
    flex-wrap: wrap;
  }

  .project-icon {
    width: 42px;
    height: 42px;
  }
}

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