/* ==========================================================================
   Responsive — Mobile-First Architecture
   ========================================================================== */

/* Large Desktop (1200px+) — default styles in style.css */

/* Laptop / Small Desktop */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: left;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
    display: flex;
    justify-content: center;
  }

  .hero-visual .glass-card {
    max-width: 320px;
  }

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

  #portfolio .glass-card[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Tablet */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .section {
    padding: 80px 0;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

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

  /* Hero adjustments */
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 48px;
  }

  .hero .container {
    gap: 32px;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-visual {
    display: none; /* Hide the floating card on mobile — hero text is enough */
  }

  /* Portfolio case study cards */
  #portfolio .glass-card {
    grid-template-columns: 1fr !important;
  }

  #portfolio .glass-card > div {
    padding: 32px !important;
  }

  #portfolio .glass-card > div[style*="border-left"],
  #portfolio .glass-card > div[style*="border-right"] {
    border: none !important;
    border-top: 1px solid var(--border) !important;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  /* Contact */
  #contact .glass-card {
    padding: 48px 24px !important;
  }

  #contact h2 { font-size: 1.75rem; }

  #contact div[style*="display: flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #contact .btn {
    width: 100%;
    justify-content: center;
  }

  /* Mobile Nav */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 14px 16px;
    width: 100%;
    text-align: left;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-cta {
    margin-top: 4px;
    text-align: center !important;
  }

  .mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }

  .mobile-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background-color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
    border-radius: 2px;
  }

  /* Btn group on mobile */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }

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

  /* Stats cards */
  .stats-card {
    padding: 24px 16px !important;
  }
}

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

  h1 { font-size: 1.875rem; }

  .section {
    padding: 64px 0;
  }

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

  .glass-card {
    padding: 24px;
  }

  .skills-grid {
    gap: 8px;
  }

  .skill-tag {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

/* ==========================================================================
   Desktop Only — Hover effects, cursor, magnetic
   ========================================================================== */
@media (min-width: 769px) {
  .mobile-toggle {
    display: none;
  }
}

/* Disable custom cursor on touch devices */
@media (hover: none) {
  html, a, .btn, .skill-tag, .nav-cta {
    cursor: auto !important;
  }

  #cursor-aura {
    display: none !important;
  }

  /* Disable magnetic pull on touch */
  .magnetic {
    transform: none !important;
  }
}
