/* ============================================================
   OMNI RESUME — RESPONSIVE
   Breakpoints: 320 360 375 390 412 480 768 1024 1280 1440 1920
   ============================================================ */

/* ---------- Extra small (<= 359px) ---------- */
@media (max-width: 359px) {
  .container { padding-inline: var(--sp-4); }

  .hero__title { font-size: 1.75rem; }
  .section__title { font-size: 1.5rem; }
  .display { font-size: 2rem; }

  .btn--lg, .btn--xl { padding-inline: var(--sp-4); font-size: var(--fs-sm); }

  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }

  .footer-grid { gap: var(--sp-8); }
}

/* ---------- Small (360 – 479px) ---------- */
@media (min-width: 360px) and (max-width: 479px) {
  .hero__title { font-size: 2rem; }
}

/* ---------- Phones landscape / small tablets (480 – 639px) ---------- */
@media (min-width: 480px) and (max-width: 639px) {
  .hero__title { font-size: 2.25rem; }
  .section__title { font-size: 1.75rem; }
}

/* ---------- Tablet portrait (640 – 767px) ---------- */
@media (min-width: 640px) and (max-width: 767px) {
  .hero__title { font-size: 2.5rem; }
}

/* ---------- Tablet (768 – 1023px) ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__title { font-size: 2.75rem; }
  .section__title { font-size: 2rem; }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: span 3;
    max-width: none;
  }
}

/* ---------- Desktop small (1024 – 1279px) ---------- */
@media (min-width: 1024px) and (max-width: 1279px) {
  .editor__panel { display: none; }
}

/* ---------- Desktop (1280 – 1439px) ---------- */
@media (min-width: 1280px) and (max-width: 1439px) {
  .container { max-width: 1200px; }
}

/* ---------- Large (1440 – 1919px) ---------- */
@media (min-width: 1440px) {
  .container { max-width: 1320px; }
}

/* ---------- Ultra wide (>= 1920px) ---------- */
@media (min-width: 1920px) {
  :root {
    --container-max: 1440px;
  }
  .container { max-width: 1440px; }
  .hero__title { font-size: 4.75rem; }
  .section__title { font-size: 3rem; }
}

/* ---------- Landscape phones ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-block: var(--sp-10); }
  .hero__stats { display: none; }
  .section { padding-block: var(--sp-10); }
}

/* ---------- Narrow editor: hide panel ---------- */
@media (max-width: 1279px) {
  .editor__panel { display: none; }
}

/* ---------- Mobile editor experience ---------- */
@media (max-width: 1023px) {
  .editor__sidebar,
  .editor__panel { display: none; }

  .editor__canvas { padding: var(--sp-4); }

  .resume-page {
    padding: 32px 28px;
    font-size: 10.5px;
    width: min(100%, 560px);
    min-height: auto;
  }

  .editor__zoom { bottom: var(--sp-4); right: var(--sp-3); }
}

/* ---------- Mobile nav visibility ---------- */
@media (min-width: 1024px) {
  .mobile-nav { display: none !important; }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-mock { transform: none; }
  .hero-mock:hover { transform: none; }
  .avatar-marquee__track { animation: none; }
  .announce-bar__dot { animation: none; }
  .skeleton { animation: none; background: var(--c-neutral-100); }
}

/* ---------- Touch devices: larger tap targets ---------- */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn--xs { min-height: 32px; }
  .btn--sm { min-height: 40px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .tpl-card__actions { opacity: 1; }
  .entry__drag { padding: var(--sp-2); }
}

/* ---------- Print-adjacent: hide heavy visuals ---------- */
@media print {
  .site-header,
  .site-footer,
  .announce-bar,
  .mobile-nav,
  .search-overlay,
  .toast-host,
  .modal-host,
  .editor__toolbar,
  .editor__sidebar,
  .editor__panel,
  .editor__zoom,
  .editor-mobile__bottom-nav,
  .editor-mobile__toolbar { display: none !important; }
}

/* ---------- High contrast ---------- */
@media (prefers-contrast: more) {
  .btn--ghost { border-color: var(--c-border-strong); }
  .cat-pill,
  .chip,
  .badge { border: 1px solid currentColor; }
}

/* ---------- Dark scheme (opt-in via [data-theme]) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Neutral swap for immersive reading contexts.
       Core site remains light by design; opt in via data-theme="dark". */
  }
}

[data-theme="dark"] {
  --c-bg: #0B1220;
  --c-bg-subtle: #0F172A;
  --c-bg-muted: #111C33;
  --c-bg-elevated: #111C33;
  --c-bg-inverse: #F8FAFC;

  --c-text-strong: #F8FAFC;
  --c-text: #E2E8F0;
  --c-text-muted: #94A3B8;
  --c-text-subtle: #64748B;

  --c-border: #1E293B;
  --c-border-strong: #334155;
  --c-border-subtle: #16233B;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --sh-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --sh-lg: 0 12px 24px rgba(0, 0, 0, 0.55);
  --sh-xl: 0 24px 48px rgba(0, 0, 0, 0.6);
}