/* ==========================================================================
   OsamaPro.com — Responsive Stylesheet
   Breakpoints: Large Desktop / Desktop / Tablet / Mobile / Small Mobile
   Layouts are optimized per breakpoint — not just vertical stacking.
   ========================================================================== */

/* ===== LARGE DESKTOP (1400px+) ===== */
@media (min-width: 1400px) {
  :root {
    --max-width: 1280px;
    --max-width-wide: 1500px;
    --section-padding: 10rem 0;
  }

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

  .hero-portrait {
    max-width: 480px;
  }

  .ecosystem-grid,
  .projects-grid,
  .activity-grid {
    gap: 2.5rem;
  }
}

/* ===== DESKTOP (1024px - 1399px) ===== */
@media (max-width: 1399px) and (min-width: 1024px) {
  .hero-grid {
    gap: 3rem;
  }

  .stats-grid {
    gap: 1.5rem;
  }
}

/* ===== TABLET (768px - 1023px) ===== */
@media (max-width: 1023px) {
  :root {
    --section-padding: 5rem 0;
  }

  /* Navigation — hide desktop links, show toggle */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
    z-index: 99;
  }

  .nav-links.open {
    right: 0;
  }

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

  .nav-toggle {
    display: block;
  }

  .nav-cta {
    display: none;
  }

  /* Hero — stack vertically */
  .hero {
    padding-top: 6rem;
    min-height: auto;
    padding-bottom: 3rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    order: 2;
  }

  .hero-visual {
    order: 1;
    min-height: 400px;
  }

  .hero-portrait {
    max-width: 320px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-status {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Ecosystem — 2 columns */
  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .eco-card:last-child {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
  }

  /* About — stack */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-visual {
    position: static;
  }

  /* Statistics — 2x2 grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 1rem;
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid var(--border-subtle);
  }

  .stat-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  /* Skills — 2 columns */
  .skills-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-category:last-child {
    grid-column: span 2;
  }

  /* Timeline — left-aligned */
  .timeline-line {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 3.5rem;
    padding-right: 0;
  }

  .timeline-item .timeline-node {
    left: 12px !important;
    right: auto !important;
  }

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

  .project-card:last-child {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
  }

  /* Activity — 1 column */
  .activity-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

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

/* ===== MOBILE (480px - 767px) ===== */
@media (max-width: 767px) {
  :root {
    --section-padding: 4rem 0;
    --grid-gap: 1.25rem;
  }

  .container,
  .container-wide {
    padding: 0 1.25rem;
  }

  section {
    padding: var(--section-padding);
  }

  /* Navigation */
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav.scrolled {
    padding: 0.5rem 1.25rem;
  }

  .nav-links {
    width: 100%;
  }

  /* Hero */
  .hero-name {
    font-size: clamp(3.5rem, 18vw, 6rem);
  }

  .hero-portrait {
    max-width: 260px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

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

  /* Ecosystem — 1 column */
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }

  .eco-card:last-child {
    grid-column: span 1;
    max-width: none;
  }

  /* Statistics — 1 row, smaller */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Skills — 1 column */
  .skills-categories {
    grid-template-columns: 1fr;
  }

  .skill-category:last-child {
    grid-column: span 1;
  }

  /* Projects — 1 column */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card:last-child {
    grid-column: span 1;
    max-width: none;
  }

  /* Contact */
  .contact-actions {
    flex-direction: column;
    width: 100%;
  }

  .contact-actions .btn {
    width: 100%;
  }

  /* Footer */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }

  /* Custom cursor — hide on touch */
  .cursor-dot {
    display: none;
  }

  body {
    cursor: auto;
  }
}

/* ===== SMALL MOBILE (<480px) ===== */
@media (max-width: 479px) {
  .container,
  .container-wide {
    padding: 0 1rem;
  }

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

  .hero-roles {
    font-size: 0.9rem;
  }

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

  .stat-number,
  .stat-suffix {
    font-size: 2.5rem;
  }

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

  .stat-item {
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle);
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .eco-actions {
    flex-direction: column;
  }

  .section-label {
    font-size: 0.7rem;
  }
}

/* ===== TOUCH DEVICE ADJUSTMENTS ===== */
@media (hover: none) and (pointer: coarse) {
  .cursor-dot {
    display: none;
  }

  body {
    cursor: auto;
  }

  /* Remove hover-dependent interactions */
  .eco-preview img {
    filter: blur(0) brightness(0.9);
  }
}

/* ===== PRINT ===== */
@media print {
  .nav,
  .cursor-dot,
  .scroll-progress {
    display: none;
  }

  body {
    background: white;
    color: black;
    cursor: auto;
  }

  body::before,
  body::after {
    display: none;
  }
}

/* ===== ULTRA-WIDE (1920px+) ===== */
@media (min-width: 1920px) {
  :root {
    --max-width: 1400px;
    --max-width-wide: 1600px;
  }

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