/*
 * github-user-search — reset, base, icon centring
 * Build: IYwNhpt6h0
 * Copyright (c) MrLiPx. All rights reserved.
 */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }
* { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }

/* ── Base ── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── ICON CENTRING FIX ────────────────────────────────────────────────────────
 *
 * Flaticon uicons render via CSS ::before on <i> tags. Because <i> is inline
 * by default, the glyph pseudo-element doesn't respect flex/grid centring from
 * a parent container — it appears offset.
 *
 * Fix: force every fi-* icon to inline-flex so the ::before content is a flex
 * child of a centred flex container. Also set line-height:1 on ::before itself
 * to kill any inherited leading that shifts the glyph vertically.
 */
i[class^="fi"],
i[class*=" fi"] {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  line-height:     1;
  flex-shrink:     0;
  vertical-align:  middle;
}

i[class^="fi"]::before,
i[class*=" fi"]::before {
  display:     block;
  line-height: 1;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.1;
}

a   { color: inherit; }
kbd { font-family: var(--font-mono); }

/* ── Utilities ── */
.hidden  { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Keyframes ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -700px 0; }
  100% { background-position:  700px 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0   rgba(75,156,245,.4); }
  50%       { box-shadow: 0 0 0 4px rgba(75,156,245,0); }
}

@keyframes typing-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes avatar-spin {
  to { transform: rotate(360deg); }
}

@keyframes scan-line {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
