/* ============================================================
   RESPONSIVE.CSS - Mobile Breakpoints
   ============================================================ */

/* Utility: hide elements below desktop */
@media (max-width: 1023px) {
  .desktop-only { display: none; }
}

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

/* Desktop: 1024px - 1399px */
@media (max-width: 1280px) {
  .projects-grid,
  .skills-grid,
  .learning-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
  :root {
    --radius-lg: 20px;
    --radius-xl: 28px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.6, 0, 0.2, 1);
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 0.75rem 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 101;
    width: 44px;
    height: 44px;
    padding: 13px 8px;
    box-sizing: border-box;
  }

  .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(5px, -5px);
  }

  .hero {
    padding: 7rem 1.5rem 3rem;
  }

  .hero-name {
    font-size: clamp(2rem, 7vw, 4rem);
  }

  .hero-cards {
    gap: 1rem;
  }

  .hero-card {
    width: 140px;
    padding: 1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .stat-num { font-size: 2rem; }

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

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

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

  .timeline {
    padding-left: 2rem;
  }

  .timeline-item::before {
    left: -2rem;
    width: 10px;
    height: 10px;
  }

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

  .hobbies-row {
    gap: 2rem;
  }

  .hobby-icon {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }
}

/* Mobile: 480px - 767px */
@media (max-width: 767px) {
  :root {
    --radius-md: 14px;
    --radius-lg: 18px;
  }

  .nav {
    padding: 1rem;
  }

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

  .nav-logo .logo-mark {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .theme-btn span {
    display: none;
  }

  .theme-btn {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .cycle-btn {
    width: 44px;
    height: 44px;
  }

  .hero {
    padding: 6rem 1rem 2rem;
    min-height: auto;
  }

  .hero-eyebrow {
    font-size: 0.7rem;
  }

  .hero-name {
    font-size: clamp(1.8rem, 6.5vw, 3.5rem);
  }

  .hero-alias {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
  }

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

  .hero-cta-row {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
  }

  .hero-cards {
    gap: 0.75rem;
  }

  .hero-card {
    width: 100%;
    max-width: 280px;
    padding: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

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

  .section-title { font-size: clamp(1.5rem, 5vw, 2.2rem); }

  .about-card {
    padding: 1.5rem;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-item { padding: 1rem; }

  .stat-num { font-size: 1.8rem; }

  .project-card,
  .skill-category,
  .learning-card,
  .contact-card {
    padding: 1.5rem;
  }

  .project-tech,
  .skill-list {
    gap: 0.3rem;
  }

  .tech-badge,
  .skill-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item {
    padding: 1rem 0 1.5rem;
  }

  .timeline-item::before {
    left: -1.5rem;
    top: 1.3rem;
    width: 8px;
    height: 8px;
  }

  .timeline-item h4 { font-size: 0.95rem; }
  .timeline-role { font-size: 0.8rem; }
  .timeline-item p { font-size: 0.85rem; }

  .learning-card {
    padding: 1.5rem;
  }

  .learning-icon { font-size: 2rem; }

  .hobbies-row {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hobby-icon {
    width: 65px;
    height: 65px;
    font-size: 1.4rem;
  }

  .contact-card { padding: 1.5rem; }

  .footer p { font-size: 0.75rem; }
}

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

  .hero-name { font-size: clamp(1.6rem, 9vw, 2.2rem); }

  .hero-alias { font-size: 0.75rem; }

  .hero-card { max-width: 100%; }

  .about-stats { grid-template-columns: 1fr 1fr; }

  .stat-num { font-size: 1.5rem; }

  .btn { font-size: 0.85rem; padding: 0.8rem 1.2rem; }

  .project-icon { font-size: 1.5rem; }

  .skill-category h4 { font-size: 0.9rem; }

  .contact-icon { font-size: 1.5rem; }

  /* Theme dropdown mobile */
  .theme-dropdown {
    right: -100px;
    min-width: 220px;
  }
}

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 5rem 1rem 3rem;
  }

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

  .hero-cards { display: none; }

  .section { padding: 2.5rem 0; }
}

/* 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;
  }

  .hero-bg::before,
  .hero-bg::after {
    animation: none !important;
  }

  .btn-download.chasing {
    animation: none !important;
  }
}

/* High Contrast */
@media (prefers-contrast: high) {
  :root {
    --border: currentColor;
    --muted: var(--ink);
  }

  .btn-primary {
    border: 2px solid currentColor;
  }

  .theme-option,
  .tech-badge,
  .skill-tag {
    border-width: 2px;
  }
}

/* Dark Mode (system) - Only applies if no theme selected */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a1a1f;
    --bg-secondary: #0f2429;
    --bg-card: #122a30;
    --ink: #f4e9cd;
    --ink-soft: #c8d6d4;
    --accent: #468189;
    --accent-bright: #77aca2;
  }
}

/* Print Styles */
@media print {
  .nav,
  .hero-cards,
  .hero-cta-row,
  .theme-switcher,
  .cycle-btn,
  .btn-download {
    display: none !important;
  }

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

  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .about-card,
  .project-card,
  .skill-category,
  .learning-card,
  .contact-card,
  .stat-item {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: white !important;
    break-inside: avoid;
  }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
  .hero-card:hover,
  .project-card:hover,
  .about-card:hover,
  .skill-category:hover,
  .learning-card:hover,
  .contact-card:hover {
    transform: none;
  }

  .btn-primary:hover,
  .btn-ghost:hover,
  .btn-download:hover {
    transform: none;
  }

  .nav-links a:hover::after {
    width: 0;
  }

  /* Active states for touch */
  .hero-card:active,
  .project-card:active,
  .about-card:active,
  .skill-category:active,
  .learning-card:active,
  .contact-card:active {
    transform: scale(0.98);
  }
}