/* ============================================================
   OMNI RESUME — UTILITIES
   Small, single-purpose classes. No !important unless noted.
   ============================================================ */

/* ---------- Display ---------- */
.block        { display: block; }
.inline-block { display: inline-block; }
.inline       { display: inline; }
.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.grid         { display: grid; }
.hidden       { display: none; }

/* ---------- Flexbox helpers ---------- */
.flex-row   { flex-direction: row; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.items-baseline { align-items: baseline; }

.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around  { justify-content: space-around; }

.flex-1   { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }

.grow    { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }

.self-start  { align-self: flex-start; }
.self-center { align-self: center; }
.self-end    { align-self: flex-end; }

/* ---------- Gap ---------- */
.gap-1  { gap: var(--sp-1); }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-5  { gap: var(--sp-5); }
.gap-6  { gap: var(--sp-6); }
.gap-8  { gap: var(--sp-8); }
.gap-10 { gap: var(--sp-10); }

/* ---------- Margin ---------- */
.m-0  { margin: 0; }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--sp-1); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-inline: auto; }

/* ---------- Padding ---------- */
.p-0 { padding: 0; }
.p-3 { padding: var(--sp-3); }
.p-4 { padding: var(--sp-4); }
.p-5 { padding: var(--sp-5); }
.p-6 { padding: var(--sp-6); }

.pt-4 { padding-top: var(--sp-4); }
.pb-4 { padding-bottom: var(--sp-4); }
.px-4 { padding-inline: var(--sp-4); }
.py-4 { padding-block: var(--sp-4); }

/* ---------- Width / Height ---------- */
.w-full  { width: 100%; }
.w-auto  { width: auto; }
.h-full  { height: 100%; }
.h-auto  { height: auto; }
.min-w-0 { min-width: 0; }

/* ---------- Position ---------- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

/* ---------- Overflow ---------- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ---------- Border radius ---------- */
.rounded-none { border-radius: 0; }
.rounded-sm   { border-radius: var(--r-sm); }
.rounded-md   { border-radius: var(--r-md); }
.rounded-lg   { border-radius: var(--r-lg); }
.rounded-xl   { border-radius: var(--r-xl); }
.rounded-full { border-radius: var(--r-full); }

/* ---------- Shadow ---------- */
.shadow-none { box-shadow: none; }
.shadow-xs   { box-shadow: var(--sh-xs); }
.shadow-sm   { box-shadow: var(--sh-sm); }
.shadow-md   { box-shadow: var(--sh-md); }
.shadow-lg   { box-shadow: var(--sh-lg); }
.shadow-xl   { box-shadow: var(--sh-xl); }

/* ---------- Border ---------- */
.border    { border: 1px solid var(--c-border); }
.border-t  { border-top: 1px solid var(--c-border); }
.border-b  { border-bottom: 1px solid var(--c-border); }
.border-l  { border-left: 1px solid var(--c-border); }
.border-r  { border-right: 1px solid var(--c-border); }
.border-0  { border: 0; }
.border-none { border: none; }

/* ---------- Background ---------- */
.bg-white   { background: var(--c-white); }
.bg-subtle  { background: var(--c-bg-subtle); }
.bg-muted   { background: var(--c-bg-muted); }
.bg-primary { background: var(--c-primary-700); }
.bg-invert  { background: var(--c-neutral-900); }
.bg-transparent { background: transparent; }

/* ---------- Opacity ---------- */
.opacity-0   { opacity: 0; }
.opacity-50  { opacity: 0.5; }
.opacity-70  { opacity: 0.7; }
.opacity-100 { opacity: 1; }

/* ---------- Cursor ---------- */
.cursor-pointer   { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-grab      { cursor: grab; }
.cursor-grabbing  { cursor: grabbing; }
.cursor-text      { cursor: text; }

/* ---------- User select ---------- */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all  { user-select: all; }

/* ---------- Pointer events ---------- */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ---------- Visibility ---------- */
.visible   { visibility: visible; }
.invisible { visibility: hidden; }

/* ---------- Font weight ---------- */
.fw-regular  { font-weight: var(--fw-regular); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }

/* ---------- Screen-reader only ---------- */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive show/hide ---------- */
.hide-mobile { display: none; }
.show-mobile { display: block; }

@media (min-width: 768px) {
  .hide-mobile { display: initial; }
  .show-mobile { display: none; }
  .hide-tablet { display: none; }
}

@media (min-width: 1024px) {
  .hide-desktop { display: none; }
  .show-desktop { display: initial; }
}

.show-tablet,
.show-desktop { display: none; }

@media (min-width: 768px) {
  .show-tablet { display: initial; }
}

/* ---------- Aspect ratio ---------- */
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-portrait { aspect-ratio: 3 / 4; }
.aspect-a4 { aspect-ratio: 210 / 297; }

/* ---------- Object fit ---------- */
.object-cover   { object-fit: cover; }
.object-contain { object-fit: contain; }

/* ---------- Transform ---------- */
.rotate-90  { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }
.rotate--90 { transform: rotate(-90deg); }

/* ---------- Transition ---------- */
.transition-none { transition: none; }
.transition-fast { transition: all var(--tr-fast); }
.transition-base { transition: all var(--tr-base); }
.transition-slow { transition: all var(--tr-slow); }

/* ---------- Z-index ---------- */
.z-0  { z-index: var(--z-base); }
.z-10 { z-index: var(--z-raised); }
.z-20 { z-index: var(--z-dropdown); }
.z-30 { z-index: var(--z-header); }
.z-40 { z-index: var(--z-modal); }
.z-50 { z-index: var(--z-max); }

/* ---------- Divider helper ---------- */
.divider-y > * + * {
  border-top: 1px solid var(--c-border-subtle);
  padding-top: var(--sp-4);
  margin-top: var(--sp-4);
}

/* ---------- Truncate multi-line ---------- */
.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-1 { -webkit-line-clamp: 1; line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }

/* ---------- Forced colors (Windows High Contrast) ---------- */
@media (forced-colors: active) {
  .btn {
    border: 1px solid ButtonText;
  }
  .btn--primary {
    background: ButtonText;
    color: ButtonFace;
  }
  [aria-pressed="true"],
  [aria-current="true"] {
    border: 2px solid Highlight;
  }
}

/* ---------- Reduced transparency ---------- */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--c-white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .modal,
  .search-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(15, 23, 42, 0.85);
  }
}